thachvd-kit 1.0.19 → 1.0.21

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.
@@ -12,9 +12,10 @@
12
12
 
13
13
  `thachvd-kit init` creates thin root entry files and puts project-specific knowledge in `.agent/docs/`:
14
14
 
15
- - `AGENTS.md`: shared instructions for Codex, Antigravity, and Claude Code.
15
+ - `AGENTS.md`: shared instructions for Codex, Antigravity, Claude Code, and Cursor.
16
16
  - `CLAUDE.md`: imports `AGENTS.md` for Claude Code.
17
- - `GEMINI.md`: Antigravity entry that points to `AGENTS.md`.
17
+ - `GEMINI.md`: points to `AGENTS.md` for Antigravity.
18
+ - `.cursorrules`: points to `AGENTS.md` for Cursor.
18
19
  - `.agent/docs/*.md`: stack, architecture, conventions, and workflow.
19
20
 
20
21
  ## Maintenance Rule
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Docs And Rules
11
11
 
12
- - Root `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` should stay concise.
12
+ - Root `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, and `.cursorrules` should stay concise.
13
13
  - Put scan-specific or project-specific detail in `.agent/docs/`.
14
14
  - Keep `.agent/rules/GEMINI.md` and `rules/GEMINI.md` aligned.
15
15
  - Keep mirrored source folders and `.agent/` content aligned when changing kit assets.
@@ -23,6 +23,12 @@ args = ["-y", "@upstash/context7-mcp"]
23
23
  startup_timeout_sec = 20
24
24
  tool_timeout_sec = 120
25
25
 
26
+ [mcp_servers.filesystem]
27
+ command = "npx"
28
+ args = ["-y", "@modelcontextprotocol/server-filesystem", "<projectPath>"]
29
+ startup_timeout_sec = 20
30
+ tool_timeout_sec = 120
31
+
26
32
  [mcp_servers.playwright]
27
33
  command = "npx"
28
34
  args = ["-y", "@playwright/mcp"]
@@ -67,6 +73,10 @@ Gemini CLI / Antigravity `mcp_config.json` example:
67
73
  "command": "npx",
68
74
  "args": ["-y", "@upstash/context7-mcp"]
69
75
  },
76
+ "filesystem": {
77
+ "command": "npx",
78
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
79
+ },
70
80
  "playwright": {
71
81
  "command": "npx",
72
82
  "args": ["-y", "@playwright/mcp"]
@@ -91,6 +101,16 @@ Claude Code user config example:
91
101
  "command": "codegraph",
92
102
  "args": ["serve", "--mcp"]
93
103
  },
104
+ "context7": {
105
+ "type": "stdio",
106
+ "command": "npx",
107
+ "args": ["-y", "@upstash/context7-mcp"]
108
+ },
109
+ "filesystem": {
110
+ "type": "stdio",
111
+ "command": "npx",
112
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
113
+ },
94
114
  "playwright": {
95
115
  "type": "stdio",
96
116
  "command": "npx",
@@ -102,18 +122,15 @@ Claude Code user config example:
102
122
 
103
123
  Common local path:
104
124
 
105
- - Claude Code: `~/.claude.json`
106
-
107
- ## Native Skill Folders
125
+ - Claude Code: `~/.claude.json` or `~/.claude/settings.json`
108
126
 
109
- The shared kit skills live in `.agent/skills/`. Antigravity can use that folder directly, but Codex expects repo skills under `.agents/skills/` or user skills under `~/.agents/skills/`. Claude Code may require its own native skill location depending on the installed client.
127
+ The shared kit skills live in `.agent/skills/`. Antigravity reads that folder directly. Codex shows skills from `~/.codex/skills/` in the `$` menu. Claude Code reads project skills from `.claude/skills/`.
110
128
 
111
- - Codex repo skills: `.agents/skills/`
112
- - Codex user skills: `~/.agents/skills/`
113
- - Codex may also keep installed/system skills under `$CODEX_HOME/skills` such as `~/.codex/skills`; treat that as local Codex state, not a repo folder to generate or commit.
114
- - Claude Code project skills commonly live under `.claude/skills/`.
115
- - `thachvd-kit` copies selected native skills to `.agents/skills/` and `.claude/skills/` based on the detected stack.
129
+ - Codex global skills: `~/.codex/skills/` — installed by `thachvd-kit init`, visible in Codex `$` menu
130
+ - Claude Code project skills: `.claude/skills/`
131
+ - Antigravity: reads `.agent/skills/` directly (no copy needed)
116
132
  - Keep `.agent/skills/` as the full shared source of truth committed with the repo.
133
+ - Do not commit `~/.codex/skills/`; it is local user state.
117
134
 
118
135
  Recommended candidates to copy first:
119
136
 
@@ -9,7 +9,7 @@ Use this skill when a project has just run `thachvd-kit init`, when `.agent/docs
9
9
 
10
10
  ## Goal
11
11
 
12
- Create or update the shared project docs used by Codex, Antigravity, and Claude Code:
12
+ Create or update the shared project docs used by Codex, Antigravity, Claude Code, and Cursor:
13
13
 
14
14
  - `.agent/docs/project.md`
15
15
  - `.agent/docs/architecture.md`
@@ -27,11 +27,10 @@ ls -d worktrees 2>/dev/null # Alternative
27
27
 
28
28
  **If found:** Use that directory. If both exist, `.worktrees` wins.
29
29
 
30
- ### 2. Check CLAUDE.md / GEMINI.md
30
+ ### 2. Check CLAUDE.md / GEMINI.md / .cursorrules
31
31
 
32
32
  ```bash
33
- grep -i "worktree.*director" CLAUDE.md 2>/dev/null
34
- grep -i "worktree.*director" GEMINI.md 2>/dev/null
33
+ grep -i "worktree.*director" CLAUDE.md GEMINI.md .cursorrules 2>/dev/null
35
34
  ```
36
35
 
37
36
  **If preference specified:** Use it without asking.
@@ -1,110 +1,170 @@
1
- ---
2
- name: writing-skills
3
- description: Use when creating a new skill or improving an existing one — follows best practices for SKILL.md structure, Claude Search Optimization, token efficiency, and skill testing methodology
4
- allowed-tools: Read, Write, Edit
5
- ---
6
-
7
- # Writing Skills
8
-
9
- ## What is a Skill?
10
-
11
- A skill is a reusable instruction set that activates when Claude detects a relevant context. It lives in a folder with a `SKILL.md` file.
12
-
13
- ## Skill Types
14
-
15
- | Type | Purpose | Example |
16
- |------|---------|---------|
17
- | **Technique** | How-to guide | `tdd-workflow` |
18
- | **Pattern** | Mental model | `clean-code` |
19
- | **Reference** | Documentation | `api-patterns` |
20
- | **Discipline** | Rules/enforcement | `verification-before-completion` |
21
-
22
- ## Directory Structure
23
-
24
- ```
25
- skill-name/
26
- ├── SKILL.md # Required: metadata + instructions
27
- ├── scripts/ # Optional: runnable scripts
28
- └── references/ # Optional: templates, docs
29
- ```
30
-
31
- ## SKILL.md Structure
32
-
33
- ```markdown
34
- ---
35
- name: skill-name
36
- description: [Trigger description — when to use this skill]
37
- allowed-tools: [Bash, Read, Edit, Write, ...]
38
- ---
39
-
40
- # Skill Title
41
-
42
- ## Overview
43
- Brief summary + core principle
44
-
45
- ## [Main Content]
46
- ...
47
- ```
48
-
49
- ## Claude Search Optimization (CSO)
50
-
51
- The `description` field is how Claude decides whether to load your skill. Make it trigger correctly:
52
-
53
- ### 1. Rich Description
54
-
55
- ```yaml
56
- # ❌ Vague
57
- description: For code review
58
-
59
- # ✅ Specific with triggers
60
- description: Use when completing tasks, implementing major features, or before merging — pre-review checklist, evidence-before-claims workflow
61
- ```
62
-
63
- ### 2. Keyword Coverage
64
-
65
- Include synonyms, trigger phrases, and common user requests in description.
66
-
67
- ### 3. Token Efficiency (Critical)
68
-
69
- - Use tables instead of prose for comparisons
70
- - Use code blocks for commands
71
- - Use flowcharts/diagrams for processes
72
- - Avoid narrative explanations — use structured data
73
-
74
- ### 4. Cross-Referencing
75
-
76
- Use `Pairs with:` and `Integration:` sections to link related skills.
77
-
78
- ## Anti-Patterns to Avoid
79
-
80
- | ❌ Anti-Pattern | ✅ Fix |
81
- |----------------|-------|
82
- | Narrative prose everywhere | Tables, bullet lists, code blocks |
83
- | Same content in multiple languages | Pick one, note variants |
84
- | Code examples in flowchart labels | Flowcharts for flow, code blocks for code |
85
- | Generic labels ("Step 1", "Step 2") | Descriptive labels ("Verify baseline", "Create worktree") |
86
- | Vague description | Specific triggers and use cases |
87
-
88
- ## Skill Creation Checklist
89
-
90
- - [ ] Description field triggers correctly (test with: "would Claude load this for X?")
91
- - [ ] Core principle stated in Overview
92
- - [ ] Content uses tables/code blocks, not prose paragraphs
93
- - [ ] Token-efficient (no redundant explanations)
94
- - [ ] Red Flags / Anti-Patterns section included for discipline skills
95
- - [ ] Integration section lists related skills
96
- - [ ] Tested: create a scenario where this skill should fire, verify it does
97
-
98
- ## Testing Skills
99
-
100
- For **discipline skills** (rules): Create scenario where rule should fire, verify AI follows it.
101
- For **technique skills** (how-to): Apply skill to a real task, verify output quality.
102
- For **reference skills** (docs): Query for specific info, verify correct answer.
103
-
104
- ## The Bottom Line
105
-
106
- A skill is good when:
107
- 1. It fires when it should (good description/CSO)
108
- 2. It improves output quality noticeably
109
- 3. It's token-efficient (doesn't waste context)
110
- 4. It has no ambiguous loopholes
1
+ ---
2
+ name: writing-skills
3
+ description: Use when creating a new skill or improving an existing one — follows best practices for SKILL.md structure, Claude Search Optimization, token efficiency, anti-rationalization tables, and skill testing methodology
4
+ allowed-tools: Read, Write, Edit
5
+ ---
6
+
7
+ # Writing Skills
8
+
9
+ ## What is a Skill?
10
+
11
+ A skill is a reusable instruction set that activates when an AI detects a relevant context. It lives in a folder with a `SKILL.md` file and works across Codex, Antigravity, Claude, and Cursor.
12
+
13
+ ## Skill Types
14
+
15
+ | Type | Purpose | Example | Anti-Rationalization Required? |
16
+ |------|---------|---------|----|
17
+ | **Technique** | How-to guide | `tdd-workflow` | Optional |
18
+ | **Pattern** | Mental model | `clean-code` | Optional |
19
+ | **Reference** | Documentation | `api-patterns` | No |
20
+ | **Discipline** | Rules/enforcement | `verification-before-completion` | **Mandatory** |
21
+
22
+ ## Directory Structure
23
+
24
+ ```
25
+ skill-name/
26
+ ├── SKILL.md # Required: metadata + instructions
27
+ ├── scripts/ # Optional: runnable scripts
28
+ └── references/ # Optional: templates, docs
29
+ ```
30
+
31
+ ## SKILL.md Structure
32
+
33
+ ```markdown
34
+ ---
35
+ name: skill-name
36
+ description: [Trigger description — when to use this skill]
37
+ allowed-tools: [Bash, Read, Edit, Write, ...]
38
+ ---
39
+
40
+ # Skill Title
41
+
42
+ ## Overview
43
+ Brief summary + core principle
44
+
45
+ ## When to Use
46
+ - Specific trigger scenarios
47
+
48
+ ## [Main Content]
49
+ ...
50
+
51
+ ## Anti-Rationalization ← REQUIRED for Discipline/Technique skills
52
+ | Excuse | Correct Response |
53
+ |--------|-----------------|
54
+ | "Just this once" | No exceptions. Apply the rule. |
55
+
56
+ ## Exit Criteria ← REQUIRED for Technique/Discipline skills
57
+ - [ ] Specific, verifiable condition 1
58
+ - [ ] Specific, verifiable condition 2
59
+ ```
60
+
61
+ ## Claude Search Optimization (CSO)
62
+
63
+ The `description` field is how the AI decides whether to load your skill. Make it trigger correctly:
64
+
65
+ ### 1. Rich Description
66
+
67
+ ```yaml
68
+ # ❌ Vague
69
+ description: For code review
70
+
71
+ # ✅ Specific with triggers
72
+ description: Use when completing tasks, implementing major features, or before merging — pre-review checklist, evidence-before-claims workflow
73
+ ```
74
+
75
+ ### 2. Keyword Coverage
76
+
77
+ Include synonyms, trigger phrases, and common user requests in description.
78
+
79
+ ### 3. Token Efficiency (Critical)
80
+
81
+ - Use tables instead of prose for comparisons
82
+ - Use code blocks for commands
83
+ - Use flowcharts/diagrams for processes
84
+ - Avoid narrative explanations — use structured data
85
+
86
+ ### 4. Cross-Referencing
87
+
88
+ Use `Pairs with:` and `Integration:` sections to link related skills.
89
+
90
+ ## Anti-Rationalization Tables (Key Concept)
91
+
92
+ The most powerful feature of a discipline skill. A table that blocks the AI's most common excuses for skipping a rule.
93
+
94
+ ### Why They Matter
95
+
96
+ AI agents (like humans) tend to rationalize shortcuts under pressure. An Anti-Rationalization table names each excuse explicitly and provides the correct response, making it impossible to skip without consciously overriding the rule.
97
+
98
+ ### Format
99
+
100
+ ```markdown
101
+ ## Anti-Rationalization
102
+
103
+ | Excuse | Reality / Correct Response |
104
+ |--------|---------------------------|
105
+ | "It's a small change" | Size doesn't reduce the need. Apply the rule. |
106
+ | "I'm confident it works" | Confidence ≠ evidence. Run verification. |
107
+ | "Just this once" | No exceptions — "just this once" is how standards die. |
108
+ | "The last run passed" | Stale results. Run fresh verification now. |
109
+ ```
110
+
111
+ ### What Makes a Good Entry
112
+
113
+ - **Excuse column**: Real phrases AI uses to justify skipping. Be specific.
114
+ - **Reality column**: The direct counter. Short, imperative, no hedging.
115
+ - Cover at least 4–6 common excuses for discipline skills.
116
+
117
+ ## Exit Criteria
118
+
119
+ Every Technique or Discipline skill must end with a verifiable checklist the AI can check off before declaring the task done.
120
+
121
+ ```markdown
122
+ ## Exit Criteria
123
+
124
+ Before claiming this task is complete:
125
+ - [ ] [Verifiable condition 1]
126
+ - [ ] [Verifiable condition 2]
127
+ - [ ] [Verifiable condition 3]
128
+ ```
129
+
130
+ **Rules for Exit Criteria:**
131
+ - Each item must be binary (done or not done) — no vague "looks good" items
132
+ - Must be something that can be checked programmatically or by inspection
133
+ - Failing any item = task is NOT complete
134
+
135
+ ## Anti-Patterns to Avoid
136
+
137
+ | ❌ Anti-Pattern | ✅ Fix |
138
+ |----------------|-------|
139
+ | Narrative prose everywhere | Tables, bullet lists, code blocks |
140
+ | Discipline skill with no Anti-Rationalization | Add the table — it's mandatory |
141
+ | Technique skill with no Exit Criteria | Add verifiable checklist |
142
+ | Vague description | Specific triggers and use cases |
143
+ | Generic labels ("Step 1", "Step 2") | Descriptive labels ("Verify baseline", "Run tests") |
144
+ | Code examples in flowchart labels | Flowcharts for flow, code blocks for code |
145
+
146
+ ## Skill Creation Checklist
147
+
148
+ - [ ] Description field triggers correctly (test: "would AI load this for X?")
149
+ - [ ] Core principle stated in Overview
150
+ - [ ] Content uses tables/code blocks, not prose paragraphs
151
+ - [ ] Token-efficient (no redundant explanations)
152
+ - [ ] **Anti-Rationalization section included** (Discipline/Technique skills — mandatory)
153
+ - [ ] **Exit Criteria section included** (Discipline/Technique skills — mandatory)
154
+ - [ ] Integration section lists related skills
155
+ - [ ] Tested: create a scenario where this skill should fire, verify it does
156
+
157
+ ## Testing Skills
158
+
159
+ For **discipline skills** (rules): Create scenario where rule should fire, verify AI follows it AND rejects the rationalizations in the Anti-Rationalization table.
160
+ For **technique skills** (how-to): Apply skill to a real task, verify output quality and that Exit Criteria are met.
161
+ For **reference skills** (docs): Query for specific info, verify correct answer.
162
+
163
+ ## The Bottom Line
164
+
165
+ A skill is good when:
166
+ 1. It fires when it should (good description/CSO)
167
+ 2. It improves output quality noticeably
168
+ 3. It's token-efficient (doesn't waste context)
169
+ 4. It has no ambiguous loopholes (Anti-Rationalization table closes them)
170
+ 5. It's verifiable (Exit Criteria defines "done")
@@ -0,0 +1,125 @@
1
+ # /review — Pre-Merge Code Review
2
+
3
+ Structured multi-axis review before any change enters the main branch.
4
+
5
+ > **Rule:** Every change gets reviewed before merge — no exceptions, no shortcuts.
6
+
7
+ ---
8
+
9
+ ## When to Use
10
+
11
+ - Before merging any PR or change
12
+ - After completing a feature implementation
13
+ - When another agent or model produced code you need to evaluate
14
+ - When refactoring existing code
15
+ - After any bug fix (review both fix and regression test)
16
+
17
+ ---
18
+
19
+ ## Step 1: Understand the Context
20
+
21
+ Before looking at code, understand the intent:
22
+
23
+ ```
24
+ - What is this change trying to accomplish?
25
+ - What spec or task does it map to?
26
+ - What could go wrong if this change is wrong?
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Step 2: Five-Axis Review
32
+
33
+ Work through each axis in order. Flag issues with 🔴 BLOCKING / 🟡 SUGGESTION / 🟢 NIT.
34
+
35
+ ### Axis 1 — Correctness
36
+ - [ ] Matches spec/task requirements
37
+ - [ ] Edge cases handled (null, empty, boundary values)
38
+ - [ ] Error paths covered
39
+ - [ ] Tests pass and test the right things
40
+
41
+ ### Axis 2 — Readability & Simplicity
42
+ - [ ] Names descriptive and consistent
43
+ - [ ] Could this be done in fewer lines?
44
+ - [ ] No clever tricks that should be simplified
45
+ - [ ] No dead code (no-op variables, `// removed` comments)
46
+
47
+ ### Axis 3 — Architecture
48
+ - [ ] Follows existing patterns (or new pattern justified)
49
+ - [ ] Clean module boundaries
50
+ - [ ] No unnecessary code duplication
51
+ - [ ] No circular dependencies
52
+
53
+ ### Axis 4 — Security
54
+ - [ ] Input validated and sanitized
55
+ - [ ] No secrets in code, logs, or version control
56
+ - [ ] Auth/authz checked where needed
57
+ - [ ] SQL queries parameterized
58
+ - [ ] External data treated as untrusted
59
+
60
+ ### Axis 5 — Performance
61
+ - [ ] No N+1 queries
62
+ - [ ] No unbounded loops or unconstrained fetching
63
+ - [ ] Missing pagination on list endpoints
64
+ - [ ] No unnecessary re-renders in UI
65
+
66
+ ---
67
+
68
+ ## Step 3: Change Size Sanity Check
69
+
70
+ ```
71
+ ~100 lines changed → Good
72
+ ~300 lines changed → Acceptable (single logical change)
73
+ ~1000+ lines changed → Too large — request a split
74
+ ```
75
+
76
+ If too large, request it be split before reviewing further.
77
+
78
+ ---
79
+
80
+ ## Step 4: Write Review Output
81
+
82
+ Use comment conventions:
83
+
84
+ ```
85
+ 🔴 BLOCKING: [Specific issue that must be fixed before merge]
86
+ 🟡 SUGGESTION: [Improvement worth considering but not blocking]
87
+ 🟢 NIT: [Minor style/preference item]
88
+ ❓ QUESTION: [Clarification needed]
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Approval Standard
94
+
95
+ Approve when the change **definitely improves overall code health**, even if imperfect.
96
+
97
+ Do not block because it isn't exactly how you would have written it. If it improves the codebase and follows project conventions, approve it.
98
+
99
+ ---
100
+
101
+ ## Anti-Rationalization
102
+
103
+ | Excuse | Correct Response |
104
+ |--------|-----------------|
105
+ | "It's a small PR, not worth five axes" | Small PRs still introduce bugs. Run all five. |
106
+ | "I wrote this code, I know it's correct" | Author bias is real. Treat it as a stranger's code. |
107
+ | "Tests pass so it's fine" | Tests prove what you tested, not what you didn't. |
108
+ | "No time for a thorough review" | A partial review is a false sense of security. Flag as skipped. |
109
+ | "The security axis doesn't apply here" | Apply it and confirm explicitly — don't silently skip. |
110
+ | "Just reviewing, not approving" | Still run the full checklist. Review = accountability. |
111
+
112
+ ---
113
+
114
+ ## Exit Criteria
115
+
116
+ Before approving or merging:
117
+
118
+ - [ ] All five axes reviewed (not skimmed)
119
+ - [ ] Change size is appropriate (< ~300 lines for one logical change)
120
+ - [ ] All 🔴 BLOCKING issues resolved or explicitly accepted with rationale
121
+ - [ ] Tests present and passing for changed behavior
122
+ - [ ] No secrets, magic numbers, or hardcoded values
123
+ - [ ] Review decision posted with explicit rationale
124
+
125
+ **Pairs with:** `code-review-checklist`, `verification-before-completion`, `requesting-code-review`
@@ -0,0 +1,140 @@
1
+ # /spec — Spec-Driven Development
2
+
3
+ Write a structured specification before writing any code.
4
+
5
+ > **Rule:** Code without a spec is guessing. The spec is the shared source of truth.
6
+
7
+ ---
8
+
9
+ ## When to Use
10
+
11
+ Use `/spec` when:
12
+ - Starting a new project or feature
13
+ - Requirements are ambiguous or incomplete
14
+ - The change touches multiple files or modules
15
+ - You're about to make an architectural decision
16
+ - The task would take more than 30 minutes to implement
17
+
18
+ **Skip when:** Single-line fixes, typo corrections, or changes where requirements are unambiguous and self-contained.
19
+
20
+ ---
21
+
22
+ ## The Gated Workflow
23
+
24
+ Do not advance to the next phase without human validation.
25
+
26
+ ```
27
+ SPECIFY ──→ PLAN ──→ TASKS ──→ IMPLEMENT
28
+ │ │ │ │
29
+ ▼ ▼ ▼ ▼
30
+ Human Human Human Human
31
+ reviews reviews reviews reviews
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Phase 1: Surface Assumptions First
37
+
38
+ Before writing any spec content, explicitly state what you're assuming:
39
+
40
+ ```
41
+ ASSUMPTIONS I'M MAKING:
42
+ 1. [assumption about tech stack or framework]
43
+ 2. [assumption about architecture]
44
+ 3. [assumption about scope or boundaries]
45
+ → Correct me now or I'll proceed with these.
46
+ ```
47
+
48
+ Do not silently fill in ambiguous requirements.
49
+
50
+ ---
51
+
52
+ ## Phase 2: Write the Spec
53
+
54
+ Create a spec document in `docs/spec-[feature-name].md` covering six areas:
55
+
56
+ ### 1. Objective
57
+ What are we building and why? Who is the user? What does success look like?
58
+
59
+ ### 2. Commands
60
+ Full executable commands with flags:
61
+ ```
62
+ Build: npm run build
63
+ Test: npm test
64
+ Lint: npm run lint
65
+ Dev: npm run dev
66
+ ```
67
+
68
+ ### 3. Project Structure
69
+ Where source code lives, where tests go, where docs belong:
70
+ ```
71
+ src/ → Application source
72
+ src/components → Components
73
+ tests/ → Unit and integration tests
74
+ ```
75
+
76
+ ### 4. Code Style
77
+ One real code snippet showing style beats three paragraphs describing it. Include naming conventions and examples.
78
+
79
+ ### 5. Testing Strategy
80
+ Framework, where tests live, coverage expectations, which test levels for which concerns.
81
+
82
+ ### 6. Boundaries (Three-Tier)
83
+ - **Always do:** Run tests before commits, follow naming conventions
84
+ - **Ask first:** Database schema changes, adding dependencies, changing CI config
85
+ - **Never do:** Commit secrets, remove failing tests without approval
86
+
87
+ ---
88
+
89
+ ## Spec Template
90
+
91
+ ```markdown
92
+ # Spec: [Feature Name]
93
+
94
+ ## Objective
95
+ [What we're building and why. User stories or acceptance criteria.]
96
+
97
+ ## Tech Stack
98
+ [Framework, language, key dependencies with versions]
99
+
100
+ ## Commands
101
+ [Build, test, lint, dev commands — exact flags]
102
+
103
+ ## Project Structure
104
+ [Key directories and what goes where]
105
+
106
+ ## Code Style
107
+ [One code example showing conventions]
108
+
109
+ ## Testing Strategy
110
+ [Framework, location, coverage target, test levels]
111
+
112
+ ## Boundaries
113
+ - Always: ...
114
+ - Ask first: ...
115
+ - Never: ...
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Anti-Rationalization
121
+
122
+ | Excuse | Correct Response |
123
+ |--------|-----------------|
124
+ | "Requirements are clear, no need for a spec" | Write a one-page spec to confirm. Misalignments appear during writing, not before. |
125
+ | "We'll figure out details during implementation" | Ambiguities discovered during coding are more expensive. Resolve them now. |
126
+ | "The spec will become outdated" | A living spec that's 80% right is better than no spec. Update it as you learn. |
127
+ | "This is too small for a spec" | If it takes more than 30 minutes, it needs a spec. Estimate conservatively. |
128
+ | "I already know what to build" | Write it down to confirm alignment, then proceed. |
129
+
130
+ ## Exit Criteria
131
+
132
+ Before moving from spec to plan:
133
+
134
+ - [ ] Assumptions explicitly listed and confirmed by human
135
+ - [ ] Spec document covers all six areas (objective, commands, structure, style, testing, boundaries)
136
+ - [ ] Human has reviewed and approved the spec
137
+ - [ ] No ambiguous requirements remain open
138
+ - [ ] Spec saved as `docs/spec-[feature-name].md` or equivalent location
139
+
140
+ **Pairs with:** `plan-writing`, `tdd-workflow`, `verification-before-completion`