From cd2b0afc6d747a47f1b4764d8587561921b12988 Mon Sep 17 00:00:00 2001 From: "KOKO\\Mimi" Date: Sun, 16 Aug 2026 03:10:54 +0900 Subject: [PATCH] feat(cpp-object-oriented-modular-refactoring): step 0 - coding-style-agent-contract --- .codex/agents/implementation-agent.toml | 5 +++++ tests/test_agent_skill_workflow_contract.py | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.codex/agents/implementation-agent.toml b/.codex/agents/implementation-agent.toml index 7bdc0b4..f0c44ad 100644 --- a/.codex/agents/implementation-agent.toml +++ b/.codex/agents/implementation-agent.toml @@ -21,6 +21,11 @@ Mission: Skill references: - Use $fesa-cpp-msvc-tdd when writing C++17/MSVC tests first, verifying RED failures, implementing minimal solver code, registering CMake/CTest targets, running validation, or preparing implementation reports. +Mandatory global input: +- Before every C++ implementation Step, read docs/CODINGSTYLE.md as a mandatory global + input and apply it to production and test code. +- Doxygen coverage applies only to production code. + Mandatory Harness reading: - Read .agents/skills/harness/SKILL.md, docs/HARNESS.md, docs/HARNESS_WORKFLOW.md, and .codex/hooks.json before executing a Harness Step; inspect the relevant phase indexes and diff --git a/tests/test_agent_skill_workflow_contract.py b/tests/test_agent_skill_workflow_contract.py index 2ace34b..20c5c27 100644 --- a/tests/test_agent_skill_workflow_contract.py +++ b/tests/test_agent_skill_workflow_contract.py @@ -302,6 +302,23 @@ def test_implementation_steps_keep_final_comparison_in_a_final_gate(): assert "reference-comparison.md" in text, path +def test_p_agent_001_implementation_agent_reads_coding_style_before_cpp_steps(): + parsed = tomllib.loads(read(AGENT_DIR / "implementation-agent.toml")) + instructions = parsed["developer_instructions"] + section_match = re.search( + r"Mandatory global input:\n(?P
.*?)(?=\n[A-Z][^\n]+:\n)", + instructions, + re.DOTALL, + ) + + assert section_match is not None + section = section_match.group("section") + assert "Before every C++ implementation Step" in section + assert "read docs/CODINGSTYLE.md" in section + assert "apply it to production and test code" in section + assert "Doxygen coverage applies only to production code" in section + + def test_agent_hierarchy_is_explicit(): coordinator = read(AGENT_DIR / "coordinator-agent.toml").lower() assert "main agent" in coordinator