solmate-skills 2.0.12 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/AGENTS.md +11 -2
  2. package/CLAUDE.md +13 -3
  3. package/README.md +104 -6
  4. package/USAGE.md +137 -14
  5. package/bin/cli.js +169 -1
  6. package/bin/harness-artifact.js +621 -0
  7. package/bin/harness-artifact.test.js +520 -0
  8. package/bin/harness-check.js +373 -0
  9. package/bin/harness-check.test.js +168 -0
  10. package/bin/test.js +2 -0
  11. package/docs/01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md +164 -0
  12. package/docs/03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md +378 -0
  13. package/docs/03_Technical_Specs/assets/01_agent_harness_data_flow.svg +94 -0
  14. package/docs/04_Logic_Progress/00_BACKLOG.md +339 -0
  15. package/docs/04_Logic_Progress/01_EXECUTION_PLAN.md +160 -0
  16. package/docs/04_Logic_Progress/03_DECISION_LOG.md +98 -0
  17. package/docs/05_QA_Validation/01_TEST_SCENARIOS.md +322 -0
  18. package/docs/05_QA_Validation/02_AGENT_HARNESS_DESIGN_REVIEW.md +100 -0
  19. package/docs/05_QA_Validation/03_AGENT_HARNESS_CONTRACT_QA.md +96 -0
  20. package/manage-collaboration/SKILL.md +2 -0
  21. package/package.json +6 -4
  22. package/rules-docs/SKILL.md +15 -1
  23. package/rules-product/SKILL.md +32 -8
  24. package/rules-product/agents/openai.yaml +2 -2
  25. package/rules-workflow/SKILL.md +34 -8
  26. package/rules-workflow/adapters/claude/solmate-context-reader.md +20 -0
  27. package/rules-workflow/adapters/claude/solmate-implementer.md +20 -0
  28. package/rules-workflow/adapters/claude/solmate-verifier.md +21 -0
  29. package/rules-workflow/agents/openai.yaml +2 -2
  30. package/rules-workflow/resources/agent-harness-contract.md +191 -0
  31. package/rules-workflow/resources/agent-harness-v1.schema.json +432 -0
  32. package/verify-docs/SKILL.md +33 -6
  33. package/verify-docs/agents/openai.yaml +2 -2
  34. package/verify-implementation/SKILL.md +17 -5
  35. package/verify-implementation/agents/openai.yaml +2 -2
  36. package/verify-skills/SKILL.md +29 -0
package/AGENTS.md CHANGED
@@ -99,6 +99,15 @@
99
99
  - **프로토타입 예외**: 프로토타입·스파이크·탐색 단계에서는 차단 조건이 아니라 기록성 체크로 적용한다.
100
100
  - **안전 예외**: 검증, 인증·인가, 에러 처리, 접근성, 보안, 데이터 보존, 테스트 가능성은 단순화를 이유로 제거하지 않는다.
101
101
 
102
+ ### 3.3. Agent Harness Gate (Context / Implementation / Verification)
103
+ - **정본 위치**: 역할·권한·인계·Receipt 상세 형식은 `rules-workflow/resources/agent-harness-contract.md`를 따른다.
104
+ - **적용 범위**: `Work Type`이 `code` 또는 `deploy`인 백로그 작업에 필수로 적용한다. `docs`, `prototype`은 기록성 체크로 적용한다.
105
+ - **구현 전 차단**: `blocking` 모드에서는 읽기 전용 Context Agent가 모든 Related 문서를 읽고 PASS Context Receipt를 남기지 않으면 구현을 시작할 수 없다.
106
+ - **완료 전 차단**: `blocking` 모드에서는 읽기 전용 Verification Agent가 명령 결과와 QA 문서 또는 PR 근거를 포함한 PASS Verification Receipt를 남기지 않으면 Done, PR, merge, publish, deploy로 이동할 수 없다.
107
+ - **역할 분리**: Implementation Agent가 작성한 Change Receipt는 독립 검증이 아니다. Verification Agent는 발견 사항을 직접 수정하지 않고 Coordinator를 통해 Implementation Agent로 반환한다.
108
+ - **Claude와 Codex**: Claude Code는 `.claude/agents/solmate-*.md`를 사용한다. Codex는 `rules-workflow` 정본을 사용 가능한 subagent 또는 별도 task에 전달한다.
109
+ - **강제 수준**: 처음 5개 실제 작업은 Coordinator가 내부 `warning` 결과를 기록하고 사용자 확인 후 진행한다. 이후 Coordinator 또는 CI가 `preflight TASK-ID --strict`와 `verify TASK-ID --strict`를 차단 게이트로 사용한다. 사용자에게 이 명령·Task ID·Receipt 작성을 요구하지 않고, 통과 결과 또는 막힌 사유만 보고한다.
110
+
102
111
  ## 4. Skills & AI Capabilities
103
112
  AI 에이전트는 본 프로젝트에 설치된 다음 **26개 스킬**을 활용하여 작업을 수행하며, 모든 작업 결과물은 이 스킬들의 검증 가이드를 통과해야 한다.
104
113
 
@@ -142,8 +151,8 @@ AI 에이전트는 사용자가 스킬을 호출하지 않아도, 아래 상황
142
151
  | 기술 선택, DB/API/아키텍처 설계 논의 시작 | `manage-decisions` | "결정이 필요한 상황입니다. `/manage-decisions`로 유형별 질문을 진행할까요?" |
143
152
  | 보안·인증·인가·환경변수 관련 코드 작성 전후 | `verify-security` | "보안 관련 변경입니다. `/verify-security`로 OWASP 점검을 실행할까요?" |
144
153
  | 성능·렌더링·이미지·번들 관련 작업 완료 후 | `verify-performance` | "성능 영향이 있을 수 있습니다. `/verify-performance`로 Lighthouse 점검을 실행할까요?" |
145
- | UI·화면·컴포넌트 구현 완료 후 | `verify-ui` | "UI 구현 변경입니다. `/verify-ui`로 HTML Preview·화면 문서·사용자 동선 정합성을 검증할까요?" |
146
- | PR 생성 전, 코드 변경 완료 | `verify-code`, `verify-implementation` | "PR 전 최종 점검입니다. `/verify-implementation`으로 전체 검증을 실행할까요?" |
154
+ | UI·화면·컴포넌트 구현 완료 후 | `verify-ui` | Coordinator가 관련 UI 검증을 자동 실행하고 결과만 보고 |
155
+ | 기능 구현 완료 또는 PR 생성 | `verify-code`, `verify-implementation` | Coordinator가 `/verify-implementation`과 필요한 내부 Harness 검증을 즉시 실행하고 결과만 보고 |
147
156
  | 기획·UI 문서 작성 요청 | `docs-plan` | "Layer 1-2 문서 작성은 `/docs-plan`을 사용하세요." |
148
157
  | DB 스키마·API 명세·백로그 작성 요청 | `docs-dev` | "Layer 3-5 문서 작성은 `/docs-dev`를 사용하세요." |
149
158
  | Drizzle 스키마 파일 수정 | `verify-drizzle-schema` | "스키마 변경 후 `/verify-drizzle-schema`로 정합성을 검증하세요." |
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
 
5
5
  ## What This Repo Is
6
6
 
7
- `solmate-skills` is an npm package that ships curated AI skill files (SKILL.md) to downstream projects. It is **not** an application — it is a skill library and CLI tool. Each top-level directory (except `bin/`) is a skill that gets copied into `.agent/skills/<skill-name>` of a target project.
7
+ `solmate-skills` is an npm package that ships curated AI skill files (SKILL.md) to downstream projects. It is **not** an application — it is a skill library and CLI tool. Each installable top-level directory contains `SKILL.md` and is copied into `.agent/skills/<skill-name>` of a target project.
8
8
 
9
9
  ## CLI Commands
10
10
 
@@ -17,13 +17,20 @@ npx solmate-skills install <skill-name>
17
17
 
18
18
  # Install all skills
19
19
  npx solmate-skills@latest install all
20
+
21
+ # Refresh native Claude project agents
22
+ npx solmate-skills@latest install agents
23
+
24
+ # Check backlog context and verification receipts
25
+ npx solmate-skills preflight TASK-000 --strict
26
+ npx solmate-skills verify TASK-000 --strict
20
27
  ```
21
28
 
22
- There are no build, test, or lint scripts in this repo (`"test": "echo \"Error: no test specified\" && exit 1"`).
29
+ Run `npm test` to validate the harness receipt parser and blocking behavior. There is no build or lint script.
23
30
 
24
31
  ## Installing Skills via Symlink (Dev)
25
32
 
26
- `init-skills.sh` creates symlinks from a target project's `.agent/skills/` to this repo, and links `AGENTS.md` and `USAGE.md` to the project root. Run it from inside the target project:
33
+ `init-skills.sh` creates symlinks from a target project's `.agent/skills/` to this repo, links `AGENTS.md` and `USAGE.md` to the project root, and links the namespaced Claude project agents under `.claude/agents/`. Run it from inside the target project:
27
34
 
28
35
  ```bash
29
36
  bash /Users/namhyeongseog/Documents/solmate-skills/init-skills.sh
@@ -33,6 +40,7 @@ bash /Users/namhyeongseog/Documents/solmate-skills/init-skills.sh
33
40
 
34
41
  ```
35
42
  bin/cli.js — CLI entrypoint; discovers skills as top-level dirs, copies them to .agent/skills/
43
+ bin/harness-check.js — Backlog Context/Verification Receipt parser and blocking checks
36
44
  AGENTS.md — Global AI collaboration rules (linked into target projects)
37
45
  init-skills.sh — Symlink installer for local development
38
46
  <skill-name>/
@@ -40,6 +48,7 @@ init-skills.sh — Symlink installer for local development
40
48
  templates/ — (optional) document templates
41
49
  resources/ — (optional) reference files
42
50
  examples/ — (optional) example outputs
51
+ adapters/ — (optional) runtime-specific thin adapters; canonical policy remains in resources/
43
52
  ```
44
53
 
45
54
  Skills discovered by `bin/cli.js` = any top-level directory not in `IGNORED_FOLDERS` (`bin`, `node_modules`, `.git`, `.github`, `.gemini`, `.agent`).
@@ -61,6 +70,7 @@ Skills discovered by `bin/cli.js` = any top-level directory not in `IGNORED_FOLD
61
70
  - **Conventional Commits in Korean**: `type(scope): 한글 요약` (e.g. `feat(login): 소셜 로그인 API 연동`).
62
71
  - **5-Layer doc structure**: `docs/01_Concept_Design/`, `02_UI_Screens/`, `03_Technical_Specs/`, `04_Logic_Progress/`, `05_QA_Validation/`.
63
72
  - **Backlogs and roadmaps** belong exclusively in `docs/04_Logic_Progress/`.
73
+ - **Agent Harness Gate**: code/deploy work requires a passing Context Receipt before implementation and an independent Verification Receipt before completion or release.
64
74
 
65
75
  ## Skill Categories
66
76
 
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # solmate-skills
2
2
 
3
- Reusable AI-agent skills for disciplined product work.
3
+ Reusable AI-agent harness and workflow skills for disciplined product work.
4
4
 
5
- `solmate-skills` packages the Solmate workflow as installable skills: plan the product, create browser-viewable UI previews, lock backlog tasks to their source documents, plan components and libraries before coding, implement with YAGNI/KISS/DRY approval gates, and verify the result before release.
5
+ `solmate-skills` packages the Solmate workflow as installable skills: plan the product, create browser-viewable UI previews, lock backlog tasks to their source documents, prove that required context was read, plan components and libraries before coding, implement with YAGNI/KISS/DRY approval gates, and independently verify the result before release.
6
6
 
7
7
  Use it when you want an AI coding agent to follow a shared workflow instead of improvising project structure, documentation, implementation order, and QA.
8
8
 
@@ -22,9 +22,12 @@ npx solmate-skills@latest install rules-product
22
22
 
23
23
  # Install proactive hook suggestions for Claude Code projects
24
24
  npx solmate-skills@latest install hooks
25
+
26
+ # Refresh native Claude agents for the shared harness
27
+ npx solmate-skills@latest install agents
25
28
  ```
26
29
 
27
- The installer copies each selected skill folder into `.agent/skills/<skill-name>` in your current project and copies [USAGE.md](./USAGE.md) to the project root.
30
+ The installer copies each selected skill folder into `.agent/skills/<skill-name>` in your current project and copies [USAGE.md](./USAGE.md) to the project root. Installing `rules-workflow` or `all` also installs the namespaced Claude project agents under `.claude/agents/`; Codex uses the same canonical contract through `rules-workflow`, reinforced by `AGENTS.md` when that file is linked into the project.
28
31
 
29
32
  **Detailed usage:** see `USAGE.md` at the project root (English default, Korean below) for the situation-to-skill cheat sheet, orchestrator map, full skill catalog (26 skills), gate details, and recommended prompts.
30
33
 
@@ -37,8 +40,99 @@ The installer copies each selected skill folder into `.agent/skills/<skill-name>
37
40
  - **Component & Library Planning Gate**: React work must name the shadcn/ui components, custom components, reused components, libraries to add, libraries to avoid, and preset action before coding.
38
41
  - **YAGNI/KISS/DRY Gate**: `rules-dev` is the canonical source for avoiding future-only features, preferring the simplest existing/native path, and removing only true duplicate knowledge.
39
42
  - **Implementation workflow**: `/rules-workflow` keeps coding work tied to approved documents, preconditions, and acceptance criteria.
43
+ - **Agent harness**: a read-only Context Agent proves required documents were read, an Implementation Agent returns a scoped change summary, and a read-only Verification Agent provides independent evidence before completion.
44
+ - **Machine-checkable receipts**: `preflight TASK-ID` checks linked document coverage and `verify TASK-ID` checks command results plus QA/PR evidence; `--strict` turns findings into blocking exit codes.
45
+ - **Versioned harness artifacts**: `validate-harness` checks v1 task manifests, structured messages, ordered state events, role activation, evidence gates, and exclusive write ownership.
40
46
  - **Release verification**: `/verify-implementation` runs the verification family for docs, UI, code, security, performance, DB schema, and skill package readiness.
41
47
 
48
+ ## Agent Harness
49
+
50
+ The shared Claude/Codex agent harness strengthens the existing Solmate workflow. It addresses two recurring failure modes in long AI-assisted projects:
51
+
52
+ 1. An implementation starts from a backlog item without reading the linked concept, UI, technical, and QA documents.
53
+ 2. An agent marks work complete based only on its own summary, without independent verification evidence.
54
+
55
+ The harness makes both boundaries explicit and machine-checkable while preserving the existing skill installation and backlog format.
56
+
57
+ ### How the harness works
58
+
59
+ ```text
60
+ Coordinator
61
+ -> read-only Context Agent -> Context Receipt
62
+ -> Implementation Agent -> Change Receipt
63
+ -> read-only QA Inspector -> Verification Receipt
64
+ -> Done / PR / merge / publish / deploy
65
+ ```
66
+
67
+ - **Context Receipt** records every required backlog reference that was read, the extracted constraints, and any conflict found before implementation.
68
+ - **Change Receipt** records changed files, covered requirements, excluded scope, checks, and remaining risks. It is a handoff, not independent proof.
69
+ - **Verification Receipt** records commands, results, unrun checks, detailed QA evidence, and the independent PASS/FAIL decision.
70
+ - Code and deploy tasks are blocked from implementation without Context evidence and from completion without Verification evidence. Documentation and prototype work remain advisory.
71
+
72
+ The canonical contract lives at [`rules-workflow/resources/agent-harness-contract.md`](./rules-workflow/resources/agent-harness-contract.md).
73
+
74
+ ### Default behavior: ask for a feature, receive a verified result
75
+
76
+ You do not run Harness commands during normal feature work. Ask the coding agent to implement the feature; the Coordinator finds the backlog task, checks the linked documents before coding, and starts independent verification immediately after implementation.
77
+
78
+ | You say | The agent does internally | You receive |
79
+ |:---|:---|:---|
80
+ | "Implement file upload" | Finds the related backlog task, reads its linked documents, and runs the Context gate | Either implementation begins or a plain-language explanation of the missing decision or document |
81
+ | "The feature is done" | Runs `verify-implementation`, relevant checks, and the Verification gate | A concise PASS/FAIL report, remaining risks, and the next decision only when needed |
82
+
83
+ The agent must not ask you to type `preflight`, `verify`, `validate-harness`, a task ID, or Receipt content. When a gate blocks progress, it explains what is missing rather than exposing its internal command.
84
+
85
+ ### Advanced automation and CI
86
+
87
+ The following interfaces are for Coordinator runtimes, CI, and teams building custom automation. They are optional; existing backlog Receipt projects do not need structured artifacts.
88
+
89
+ <details>
90
+ <summary>Internal Receipt and structured-artifact commands</summary>
91
+
92
+ ```bash
93
+ npx solmate-skills preflight TASK-000 --strict
94
+ npx solmate-skills verify TASK-000 --strict
95
+
96
+ npx solmate-skills validate-harness manifest _workspace/harness/TASK-000/manifest.json
97
+ npx solmate-skills validate-harness message _workspace/harness/TASK-000/attempt-01/messages/msg-001.json \
98
+ --manifest _workspace/harness/TASK-000/manifest.json
99
+ npx solmate-skills validate-harness events _workspace/harness/TASK-000/events.jsonl \
100
+ --manifest _workspace/harness/TASK-000/manifest.json
101
+ ```
102
+
103
+ [`agent-harness-v1.schema.json`](./rules-workflow/resources/agent-harness-v1.schema.json) defines the manifest, message, and state-event shapes. The validator checks task identity, legal state transitions, active roles, message authority, required evidence, canonical file paths, and exclusive write ownership.
104
+
105
+ | Mode / result | Exit code | Behavior |
106
+ |:---|:---:|:---|
107
+ | Default warning mode, valid | `0` | Reports PASS |
108
+ | Default warning mode, contract finding | `0` | Reports findings without blocking migration |
109
+ | `--strict`, contract finding | `1` | Blocks the workflow or CI step |
110
+ | Invalid command input, unreadable file, malformed JSON/JSONL | `2` | Reports an operational error |
111
+
112
+ </details>
113
+
114
+ ### Compatibility and current scope
115
+
116
+ - Existing `preflight`, `verify`, and backlog Receipt fixtures continue to work without structured artifact files.
117
+ - The structured v1 contract is opt-in and warning-first; projects can move to `--strict` after a real-task pilot.
118
+ - The implementation uses the Node standard library and adds no runtime dependency.
119
+ - Claude Code can install the current namespaced `solmate-*` project agents with `install agents`; Codex follows the same canonical contract through its available delegation mechanism.
120
+ - Specialist personas, runtime orchestration, persistent recovery, pilot automation, and blocking rollout remain separate follow-up work.
121
+ - This release ships the contract and validation foundation; specialist personas and runtime orchestration remain separately gated follow-up work.
122
+
123
+ ## What's New in 2.0.14
124
+
125
+ `solmate-skills@2.0.14` makes verification an agent responsibility instead of a user checklist.
126
+
127
+ - After implementation, the Coordinator automatically starts `verify-implementation` and the required Harness Receipt checks before reporting completion.
128
+ - Context and Verification agents run their applicable checks internally and return plain-language results or a blocked decision.
129
+ - `npx solmate-skills list` now describes automatic workflow verification rather than presenting internal Harness commands as the default path.
130
+ - README and `USAGE.md` keep `preflight`, `verify`, and `validate-harness` in advanced runtime/CI guidance.
131
+
132
+ ## What's New in 2.0.13
133
+
134
+ `solmate-skills@2.0.13` introduced the shared Agent Harness contract, versioned artifacts, Context/Change/Verification Receipts, and the `validate-harness` validator.
135
+
42
136
  ## What's New in 2.0.12
43
137
 
44
138
  `solmate-skills@2.0.12` adds a bilingual usage guide and copies it into every target project on install.
@@ -86,7 +180,7 @@ Recent workflow guardrails:
86
180
 
87
181
  ## Install Details
88
182
 
89
- `install all` installs only skill folders that contain `SKILL.md`. Use `install hooks` separately when you want prompt/file-change suggestions that nudge the agent toward `/rules-product`, `/rules-workflow`, and the relevant `verify-*` skills.
183
+ `install all` installs only skill folders that contain `SKILL.md` and adds the namespaced Claude agent adapters. Use `install hooks` separately when you want prompt/file-change suggestions. Use `install agents` to refresh `rules-workflow`, its canonical contract, and the native Claude adapters in an existing project.
90
184
 
91
185
  ---
92
186
 
@@ -98,7 +192,8 @@ Install skills, then invoke one command based on your situation.
98
192
  |:---|:---|:---|
99
193
  | New project or "where do I start?" | `/rules-product` | Diagnoses phase and delegates to the right skill |
100
194
  | Implement one feature | `/rules-product` then `/rules-workflow` | Gates must pass before coding |
101
- | Pre-PR / pre-release check | `/verify-implementation` | Runs the verify-* family in order |
195
+ | Feature implementation just finished | No extra command | The Coordinator automatically starts `verify-implementation` and reports the result |
196
+ | Explicit audit request | `/verify-implementation` | Runs the verify-* family in order |
102
197
 
103
198
  **Recommended first line:**
104
199
 
@@ -137,15 +232,18 @@ Reinstall from the project root, then diagnose — do not restart from Phase 1 b
137
232
  ```bash
138
233
  npx solmate-skills@latest install all
139
234
  npx solmate-skills@latest install hooks
235
+ npx solmate-skills@latest install agents
140
236
  ```
141
237
 
238
+ For a `code` or `deploy` backlog item, ask the agent to implement the feature. The Coordinator handles the Context and Verification gates internally and reports only the result or the decision needed to unblock it.
239
+
142
240
  Example prompts: [USAGE.md §9 Recommended Prompts](./USAGE.md#9-recommended-prompts) (EN) · [§9 권장 프롬프트](./USAGE.md#9-권장-프롬프트-모음) (KO)
143
241
 
144
242
  ---
145
243
 
146
244
  ## Skills at a Glance
147
245
 
148
- 26 installable skills plus `hooks`. Category summary:
246
+ 26 installable skills plus `hooks` and `agents` utilities. Category summary:
149
247
 
150
248
  | Category | Skills |
151
249
  |:---|:---|
package/USAGE.md CHANGED
@@ -3,12 +3,12 @@
3
3
  <a id="solmate-skills-usage-guide"></a>
4
4
 
5
5
  Created Date: 2026-06-25 03:00
6
- Last Updated Date: 2026-06-29 15:20
6
+ Last Updated Date: 2026-07-17 00:33
7
7
 
8
8
  **Language:** English (default) · [Korean version below](#solmate-skills-usage-guide-korean)
9
9
 
10
10
  This is a **human-readable** guide for choosing and invoking skills.
11
- Agent execution rules live in each `SKILL.md` and the installed `AGENTS.md`.
11
+ Agent execution rules live in each `SKILL.md` and the project `AGENTS.md` when it is linked or installed.
12
12
 
13
13
  ---
14
14
 
@@ -29,9 +29,10 @@ Run /verify-implementation on the current changes
29
29
  ```bash
30
30
  npx solmate-skills@latest install all # .agent/skills/<skill-name>/ + ./USAGE.md
31
31
  npx solmate-skills@latest install hooks # Claude Code suggestions (optional) + ./USAGE.md
32
+ npx solmate-skills@latest install agents # Refresh rules-workflow + native Claude project agents
32
33
  ```
33
34
 
34
- Every `install` command (single skill, `all`, or `hooks`) copies `USAGE.md` to the **project root**.
35
+ Every `install` command (single skill, `all`, `hooks`, or `agents`) copies `USAGE.md` to the **project root**. Installing `rules-workflow` or `all` also installs the namespaced Claude agents automatically.
35
36
 
36
37
  ### Local development (symlink)
37
38
 
@@ -42,7 +43,7 @@ When hacking on the `solmate-skills` repo itself:
42
43
  bash /path/to/solmate-skills/init-skills.sh
43
44
  ```
44
45
 
45
- This symlinks `.agent/skills/` to the repo and links `AGENTS.md` and `USAGE.md` at the project root.
46
+ This symlinks `.agent/skills/` to the repo, links `AGENTS.md` and `USAGE.md` at the project root, and links the namespaced Claude agents under `.claude/agents/`.
46
47
 
47
48
  ---
48
49
 
@@ -107,11 +108,52 @@ This symlinks `.agent/skills/` to the repo and links `AGENTS.md` and `USAGE.md`
107
108
  | `rules-workflow` | Plan → implement → cleanup → PR (18 steps) | Feature work, commit/PR prep |
108
109
  | `verify-implementation` | Run verify-* by changed files, unified report | Pre-PR / pre-release |
109
110
 
111
+ ### Agent harness sequence
112
+
113
+ For backlog tasks with `Work Type: code` or `Work Type: deploy`:
114
+
115
+ ```text
116
+ Coordinator
117
+ -> read-only Context Agent -> Context Receipt
118
+ -> Implementation Agent -> Change Receipt
119
+ -> read-only Verifier -> Verification Receipt
120
+ -> Coordinator completion decision
121
+ ```
122
+
123
+ - Claude Code uses `.claude/agents/solmate-context-reader.md`, `solmate-implementer.md`, and `solmate-verifier.md`.
124
+ - Codex uses available subagents or separate tasks with the same canonical contract from `rules-workflow/resources/agent-harness-contract.md`.
125
+ - The verifier reports findings but does not modify source files.
126
+ - Receipt summaries stay in the backlog; detailed verification links to a QA document or GitHub PR.
127
+ - For normal feature work, the Coordinator runs Context and Verification checks internally. Do not ask the user to run a Harness command, choose a task ID, or fill in a Receipt. Report only a PASS/FAIL result or the missing decision and document.
128
+
129
+ <details>
130
+ <summary>Advanced: runtime and CI commands</summary>
131
+
132
+ Use warning mode for the first five real tasks, then let the Coordinator or CI switch to blocking checks:
133
+
134
+ ```bash
135
+ npx solmate-skills preflight TASK-000 --strict
136
+ npx solmate-skills verify TASK-000 --strict
137
+ ```
138
+
139
+ Optional v1 structured artifacts use the same warning-to-blocking migration:
140
+
141
+ ```bash
142
+ npx solmate-skills validate-harness manifest _workspace/harness/TASK-000/manifest.json
143
+ npx solmate-skills validate-harness message _workspace/harness/TASK-000/attempt-01/messages/msg-001.json --manifest _workspace/harness/TASK-000/manifest.json
144
+ npx solmate-skills validate-harness events _workspace/harness/TASK-000/events.jsonl --manifest _workspace/harness/TASK-000/manifest.json
145
+ ```
146
+
147
+ Add `--strict` for blocking validation. Contract failures then exit `1`; malformed JSON, missing files, and invalid command input exit `2`. Existing backlog-only projects do not need to create these files.
148
+
149
+ </details>
150
+
110
151
  ### Individual verify-* vs master
111
152
 
112
153
  | Situation | Use |
113
154
  |:---|:---|
114
- | Full pre-PR / pre-release | `verify-implementation` |
155
+ | Feature implementation just finished | Coordinator automatically invokes `verify-implementation` |
156
+ | Explicit full audit request | `verify-implementation` |
115
157
  | Docs only changed | `verify-docs` |
116
158
  | TSX screens only | `verify-ui` |
117
159
  | API / auth / env changed | `verify-security` (+ `verify-code` if needed) |
@@ -129,9 +171,10 @@ Phase 2 UI design docs → docs-plan (02_UI_Screens)
129
171
  UI-First Gate → screens, flows, data, states
130
172
  Pre-Code Technical Brief → API, state, acceptance criteria
131
173
  Component & Library Planning Gate → shadcn, custom, reuse, libraries
174
+ Context Receipt Gate → linked docs read by a read-only agent
132
175
  Phase 3 React implementation → rules-react (+ tools-shadcn)
133
176
  Phase 4 Dev docs → docs-dev (03–05)
134
- Phase 5 Quality verification → verify-implementation
177
+ Phase 5 Independent verification Verification Receipt + verify-implementation
135
178
  Phase 6 Deliverables (opt.) → docs-pitch / docs-business
136
179
  ```
137
180
 
@@ -171,9 +214,9 @@ Each entry: **When** / **Prerequisites** / **Invoke** / **Outputs** / **Next**
171
214
  #### `rules-workflow`
172
215
 
173
216
  - **When:** Feature implementation, planning, commit/PR (18 steps)
174
- - **Prerequisites:** HTML UI Preview Gate, UI-First Gate, Backlog Context Lock, Component & Library Plan (non-prototype)
217
+ - **Prerequisites:** HTML UI Preview Gate, UI-First Gate, Backlog Context Lock, Component & Library Plan, Context Receipt (code/deploy)
175
218
  - **Invoke:** `/rules-workflow` — implement this backlog item
176
- - **Outputs:** Plan review, implementation, self-check, PR readiness
219
+ - **Outputs:** Context Receipt, plan review, Change Receipt, independent Verification Receipt, PR readiness
177
220
  - **Next:** `verify-implementation`
178
221
 
179
222
  #### `rules-dev`
@@ -428,11 +471,22 @@ Required fields per item in `docs/04_Logic_Progress/00_BACKLOG.md`:
428
471
 
429
472
  - `Related Concept Docs`, `Related UI Docs`, `Related HTML Preview`
430
473
  - `Related Technical Docs`, `Related QA Docs`
431
- - `Implementation Preconditions`, `Component & Library Plan`
474
+ - `Work Type`, `Implementation Preconditions`, `Component & Library Plan`
475
+ - `Context Receipt`, `Change Receipt`, `Verification Receipt`
432
476
  - `Acceptance Criteria`, `Document Sync Check`
433
477
 
434
478
  Use `N/A - reason` when a doc does not exist. Pause implementation if a missing doc blocks a safe decision.
435
479
 
480
+ ### Agent Harness Gate
481
+
482
+ - Canonical contract: `rules-workflow/resources/agent-harness-contract.md`
483
+ - `code` and `deploy`: Context Receipt before implementation; Verification Receipt before Done, PR, merge, publish, or deploy
484
+ - `docs` and `prototype`: advisory receipts
485
+ - Context and Verification agents are read-only
486
+ - Verification details must link to an existing `docs/05_QA_Validation/` document or GitHub PR
487
+ - Default CLI mode is `warning`; `--strict` returns a blocking non-zero exit
488
+ - `preflight`, `verify`, and `validate-harness` are Coordinator/CI interfaces, not commands a normal user needs to run
489
+
436
490
  ### YAGNI/KISS/DRY Gate
437
491
 
438
492
  - **Canonical:** `rules-dev` § Minimal Implementation Gate
@@ -447,6 +501,7 @@ Use `N/A - reason` when a doc does not exist. Pause implementation if a missing
447
501
  ### [ ] TASK-000: Implement feature name
448
502
 
449
503
  - Status: ToDo
504
+ - Work Type: code
450
505
  - Related Concept Docs:
451
506
  - [Product Specs](../01_Concept_Design/03_PRODUCT_SPECS.md) - feature purpose and user value
452
507
  - Related UI Docs:
@@ -464,6 +519,13 @@ Use `N/A - reason` when a doc does not exist. Pause implementation if a missing
464
519
  - [ ] Confirm user path and screen-by-screen data flow
465
520
  - [ ] Confirm loading, empty, and error states
466
521
  - [ ] Confirm implementation scope does not conflict with documented intent
522
+ - Context Receipt:
523
+ - Status: PENDING
524
+ - Required References Read:
525
+ - PENDING - repeat every linked Related document after reading it
526
+ - Constraints:
527
+ - PENDING - extracted implementation constraints
528
+ - Conflicts: PENDING - use `None` only after checking
467
529
  - Component & Library Plan:
468
530
  - shadcn/ui components: button, card, form, or `N/A - reason`
469
531
  - Custom components: feature-specific components or `N/A - reason`
@@ -475,6 +537,23 @@ Use `N/A - reason` when a doc does not exist. Pause implementation if a missing
475
537
  - [ ] Feature follows the confirmed screen structure and user path
476
538
  - [ ] Feature behavior matches linked Concept/UI/Technical docs
477
539
  - [ ] QA criteria are testable and satisfied
540
+ - Change Receipt:
541
+ - Files Changed:
542
+ - PENDING
543
+ - Requirements Covered:
544
+ - PENDING
545
+ - Excluded Scope: PENDING
546
+ - Basic Checks:
547
+ - PENDING
548
+ - Remaining Risks: PENDING
549
+ - Verification Receipt:
550
+ - Status: PENDING
551
+ - Commands and Results:
552
+ - PENDING - `command` - PASS/FAIL - exact scope and result
553
+ - Unrun Checks:
554
+ - PENDING - skipped checks and reasons
555
+ - Detailed Evidence:
556
+ - PENDING - link an existing QA document or GitHub PR
478
557
  - Document Sync Check:
479
558
  - [ ] No mismatch between implementation and linked documents
480
559
  - [ ] Update related documents if implementation changes the agreed behavior
@@ -540,7 +619,7 @@ Run /verify-implementation on current changes. Include a Flow Status Block in th
540
619
  **언어:** [English (default)](#solmate-skills-usage-guide) · 한국어 (아래)
541
620
 
542
621
  사람이 읽기 위한 스킬 사용법 가이드입니다.
543
- 에이전트 실행 규칙의 정본은 각 `SKILL.md`와 프로젝트에 설치된 `AGENTS.md`입니다.
622
+ 에이전트 실행 규칙의 정본은 각 `SKILL.md`와 프로젝트에 링크 또는 설치된 `AGENTS.md`입니다.
544
623
 
545
624
  ---
546
625
 
@@ -561,9 +640,10 @@ Run /verify-implementation on current changes. Include a Flow Status Block in th
561
640
  ```bash
562
641
  npx solmate-skills@latest install all # .agent/skills/<skill-name>/ + ./USAGE.md
563
642
  npx solmate-skills@latest install hooks # Claude Code 자동 제안 (별도) + ./USAGE.md
643
+ npx solmate-skills@latest install agents # rules-workflow + Claude 프로젝트 에이전트 갱신
564
644
  ```
565
645
 
566
- 모든 `install` 명령(단일 스킬, `all`, `hooks`)은 `USAGE.md`를 **프로젝트 루트**에 복사합니다.
646
+ 모든 `install` 명령(단일 스킬, `all`, `hooks`, `agents`)은 `USAGE.md`를 **프로젝트 루트**에 복사합니다. `rules-workflow` 또는 `all` 설치 시 Claude 에이전트도 자동 설치됩니다.
567
647
 
568
648
  ### 로컬 개발 (symlink)
569
649
 
@@ -574,7 +654,7 @@ npx solmate-skills@latest install hooks # Claude Code 자동 제안 (별도)
574
654
  bash /path/to/solmate-skills/init-skills.sh
575
655
  ```
576
656
 
577
- `.agent/skills/`가 저장소로 symlink되고, `AGENTS.md`와 `USAGE.md`가 루트에 링크됩니다.
657
+ `.agent/skills/`가 저장소로 symlink되고, `AGENTS.md`와 `USAGE.md`가 루트에 링크되며, `.claude/agents/`에 Solmate 에이전트가 연결됩니다.
578
658
 
579
659
  ---
580
660
 
@@ -620,11 +700,52 @@ bash /path/to/solmate-skills/init-skills.sh
620
700
  | `rules-workflow` | 승인된 문서 기준으로 계획→구현→정리→PR (18단계) | 기능 구현·커밋·PR 직전 |
621
701
  | `verify-implementation` | 변경 파일에 맞춰 verify-* 순차 실행·통합 보고 | PR·배포 전 최종 점검 |
622
702
 
703
+ ### 에이전트 하네스 순서
704
+
705
+ `Work Type`이 `code` 또는 `deploy`인 백로그 작업은 다음 순서로 진행합니다.
706
+
707
+ ```text
708
+ Coordinator
709
+ -> 읽기 전용 Context Agent -> Context Receipt
710
+ -> Implementation Agent -> Change Receipt
711
+ -> 읽기 전용 Verifier -> Verification Receipt
712
+ -> Coordinator 완료 판단
713
+ ```
714
+
715
+ - Claude Code는 `.claude/agents/solmate-*.md`를 사용합니다.
716
+ - Codex는 `rules-workflow/resources/agent-harness-contract.md`의 같은 계약을 subagent 또는 별도 task에 전달합니다.
717
+ - 검증자는 문제를 직접 수정하지 않고 Implementation Agent로 돌려보냅니다.
718
+ - Receipt 요약은 백로그에, 상세 검증 근거는 QA 문서 또는 GitHub PR에 남깁니다.
719
+ - 일반 기능 작업에서는 Coordinator가 Context·Verification 검사를 내부적으로 실행합니다. 사용자에게 Harness 명령, Task ID, Receipt 작성을 요구하지 않고 통과/실패 결과 또는 필요한 결정과 문서만 설명합니다.
720
+
721
+ <details>
722
+ <summary>고급: 런타임·CI 명령</summary>
723
+
724
+ 처음 5개 실제 작업은 Coordinator 또는 CI가 warning으로 확인한 뒤 blocking으로 전환합니다.
725
+
726
+ ```bash
727
+ npx solmate-skills preflight TASK-000 --strict
728
+ npx solmate-skills verify TASK-000 --strict
729
+ ```
730
+
731
+ 선택형 v1 구조화 산출물도 같은 warning-to-blocking 마이그레이션을 사용합니다.
732
+
733
+ ```bash
734
+ npx solmate-skills validate-harness manifest _workspace/harness/TASK-000/manifest.json
735
+ npx solmate-skills validate-harness message _workspace/harness/TASK-000/attempt-01/messages/msg-001.json --manifest _workspace/harness/TASK-000/manifest.json
736
+ npx solmate-skills validate-harness events _workspace/harness/TASK-000/events.jsonl --manifest _workspace/harness/TASK-000/manifest.json
737
+ ```
738
+
739
+ 차단 검증에는 `--strict`를 추가합니다. 계약 위반은 종료 코드 `1`, JSON 파싱·파일·명령 입력 오류는 종료 코드 `2`입니다. 기존 백로그 Receipt만 사용하는 프로젝트는 이 파일을 만들 필요가 없습니다.
740
+
741
+ </details>
742
+
623
743
  ### verify-* 개별 vs 통합
624
744
 
625
745
  | 상황 | 사용 |
626
746
  |:---|:---|
627
- | PR·배포 전체 점검 | `verify-implementation` |
747
+ | 기능 구현 직후 | Coordinator가 `verify-implementation`을 자동 실행 |
748
+ | 명시적 전체 점검 요청 | `verify-implementation` |
628
749
  | 문서만 수정함 | `verify-docs` |
629
750
  | TSX 화면만 수정함 | `verify-ui` |
630
751
  | API·auth·env 수정함 | `verify-security` (+ 필요 시 `verify-code`) |
@@ -642,9 +763,10 @@ Phase 2 UI 설계 문서 → docs-plan (02_UI_Screens)
642
763
  UI-First Gate → 화면·동선·데이터 흐름·상태 확인
643
764
  Pre-Code Technical Brief → API·상태·acceptance criteria 합의
644
765
  Component & Library Planning Gate → shadcn·커스텀·재사용·라이브러리 계획
766
+ Context Receipt Gate → 읽기 전용 에이전트의 관련 문서 확인
645
767
  Phase 3 React 구현 → rules-react (+ tools-shadcn)
646
768
  Phase 4 개발문서 → docs-dev (03~05)
647
- Phase 5 품질 검증 → verify-implementation
769
+ Phase 5 독립 품질 검증 Verification Receipt + verify-implementation
648
770
  Phase 6 전달물 (선택) → docs-pitch / docs-business
649
771
  ```
650
772
 
@@ -738,6 +860,7 @@ Gate: UI-First Gate 진행 중
738
860
  - **UI-First Gate:** 화면·동선·CTA·데이터 흐름·로딩/빈/오류 상태
739
861
  - **Component & Library Planning Gate:** shadcn·커스텀·재사용·라이브러리·preset
740
862
  - **Backlog Context Lock:** Related Docs, Preconditions, Component Plan, Acceptance, Sync Check
863
+ - **Agent Harness Gate:** code/deploy 작업은 Context Receipt와 독립 Verification Receipt 필수
741
864
  - **YAGNI/KISS/DRY Gate:** `rules-dev` 정본; 프로토타입은 기록성 체크
742
865
 
743
866
  백로그 템플릿: [영문 §7 Backlog item template](#backlog-item-template) (필드명은 영문 유지)