82 lines
3.3 KiB
Markdown
82 lines
3.3 KiB
Markdown
# Step 0: Coding Style Agent Contract
|
|
|
|
## 담당 역할과 필수 스킬
|
|
|
|
- 담당 역할: `implementation-agent`
|
|
- 필수 스킬: `harness`, `fesa-cpp-msvc-tdd`
|
|
- 이 Step만 `RED -> observed failure -> minimal GREEN -> focused/full VERIFY`로 수행한다.
|
|
|
|
## 읽어야 할 파일
|
|
|
|
- `/.agents/skills/harness/SKILL.md`
|
|
- `/.codex/skills/fesa-cpp-msvc-tdd/SKILL.md`
|
|
- `/AGENTS.md`
|
|
- `/docs/CODINGSTYLE.md`
|
|
- `/docs/SOLVER_AGENT_DESIGN.md`
|
|
- `/docs/HARNESS.md`
|
|
- `/docs/HARNESS_WORKFLOW.md`
|
|
- `/.codex/hooks.json`
|
|
- `/.codex/agents/implementation-agent.toml`
|
|
- `/tests/test_agent_skill_workflow_contract.py`
|
|
- `/docs/cpp-object-oriented-modular-refactoring/implementation-plan.md`
|
|
- `/phases/cpp-object-oriented-modular-refactoring/index.json`
|
|
- `/phases/cpp-object-oriented-modular-refactoring/step0.md`
|
|
|
|
필수 파일이 없거나 승인 설계와 충돌하면 현재 Step을 `blocked`로 기록하고 중단한다.
|
|
|
|
## 작업
|
|
|
|
Requirement `R-AGENT-001`만 구현한다.
|
|
|
|
1. `tests/test_agent_skill_workflow_contract.py`에 `P-AGENT-001`을 먼저 추가한다.
|
|
2. Test는 `implementation-agent.toml`의 mandatory global input 구간이 literal path
|
|
`docs/CODINGSTYLE.md`를 직접 포함하고, C++ Step 시작 전에 읽도록 지시하는지 검증한다.
|
|
3. RED에서 현재 profile이 이 contract를 만족하지 않아 assertion failure가 발생함을 기록한다.
|
|
4. `/.codex/agents/implementation-agent.toml`에 다음 의미의 지시를 최소 추가한다.
|
|
|
|
```text
|
|
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.
|
|
```
|
|
|
|
5. 다른 agent profile, solver 문서, production C++, CMake는 수정하지 않는다.
|
|
|
|
## Acceptance Criteria
|
|
|
|
RED와 GREEN을 다음 명령으로 구분해 기록한다.
|
|
|
|
```powershell
|
|
uv run --with pytest python -m pytest -v -rs `
|
|
tests/test_agent_skill_workflow_contract.py
|
|
uv run --with pytest python -m pytest -v -rs
|
|
```
|
|
|
|
Repository Stop 검증과 동일한 C++ 회귀 확인:
|
|
|
|
```powershell
|
|
cmake -S . -B .harness/build -G "Visual Studio 18 2026" -A x64 `
|
|
"-DFESA_GTEST_SOURCE_DIR=C:/git/googletest" `
|
|
"-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" `
|
|
"-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" `
|
|
"-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"
|
|
cmake --build .harness/build --config Debug
|
|
ctest --test-dir .harness/build -C Debug --show-only=json-v1
|
|
ctest --test-dir .harness/build -C Debug --output-on-failure
|
|
```
|
|
|
|
## 검증 및 상태 갱신
|
|
|
|
- RED assertion, GREEN targeted/full pytest, C++ regression 결과를 summary에 남긴다.
|
|
- 성공 시 현재 Step만 `completed`와 한 줄 `summary`로 갱신한다.
|
|
- 실패면 `error`/`error_message`, 사용자 개입이 필요하면
|
|
`blocked`/`blocked_reason`을 기록한다.
|
|
- timestamp, retry, commit, 다음 Step 선택은 Executor 소유다.
|
|
|
|
## 금지사항
|
|
|
|
- C++ 또는 CMake를 수정하지 마라. 이유: 이 Step은 agent contract만 소유한다.
|
|
- 다른 agent profile에 동일 문구를 일괄 추가하지 마라. 이유: 승인 범위를 넓힌다.
|
|
- 직접 commit하거나 hook script를 수동 실행하지 마라. 이유: Executor와 hook의 소유권이다.
|
|
- `scripts/execute.py`를 호출하지 마라. 이유: 현재 독립 Step을 재귀 실행하면 안 된다.
|