@codenhub/skills 0.0.2
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.
- package/LICENSE +201 -0
- package/README.md +53 -0
- package/dist/cli.js +213 -0
- package/package.json +36 -0
- package/src/agents-md-improver/SKILL.md +216 -0
- package/src/agents-md-improver/agents/openai.yaml +4 -0
- package/src/agents-md-improver/references/quality-criteria.md +116 -0
- package/src/agents-md-improver/references/templates.md +255 -0
- package/src/agents-md-improver/references/update-guidelines.md +155 -0
- package/src/brainstorming/SKILL.md +118 -0
- package/src/brainstorming/agents/openai.yaml +4 -0
- package/src/caveman/SKILL.md +59 -0
- package/src/caveman/agents/openai.yaml +4 -0
- package/src/caveman-commit/SKILL.md +68 -0
- package/src/caveman-commit/agents/openai.yaml +4 -0
- package/src/caveman-review/SKILL.md +54 -0
- package/src/caveman-review/agents/openai.yaml +4 -0
- package/src/cli.test.ts +102 -0
- package/src/cli.ts +311 -0
- package/src/executing-plans/SKILL.md +92 -0
- package/src/executing-plans/agents/openai.yaml +4 -0
- package/src/frontend-design/SKILL.md +60 -0
- package/src/frontend-design/agents/openai.yaml +4 -0
- package/src/subagent-specialist/SKILL.md +226 -0
- package/src/subagent-specialist/agents/openai.yaml +4 -0
- package/src/subagent-specialist/references/code-quality-reviewer-prompt.md +48 -0
- package/src/subagent-specialist/references/implementer-prompt.md +84 -0
- package/src/subagent-specialist/references/parallel-investigator-prompt.md +49 -0
- package/src/subagent-specialist/references/spec-reviewer-prompt.md +52 -0
- package/src/test-driven-development/SKILL.md +239 -0
- package/src/test-driven-development/agents/openai.yaml +11 -0
- package/src/test-driven-development/testing-anti-patterns.md +162 -0
- package/src/test-driven-development/verification-baselines.md +42 -0
- package/src/writing-plans/SKILL.md +169 -0
- package/src/writing-plans/agents/openai.yaml +4 -0
- package/src/writing-skills/SKILL.md +222 -0
- package/src/writing-skills/agents/openai.yaml +4 -0
- package/src/writing-skills/best-practices.md +321 -0
- package/src/writing-skills/examples/SKILL_AUTHORING_GUIDE_TESTING.md +156 -0
- package/src/writing-skills/persuasion-principles.md +172 -0
- package/src/writing-skills/testing-skills-with-subagents.md +310 -0
- package/src/writing-specs/SKILL.md +72 -0
- package/src/writing-specs/agents/openai.yaml +4 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agents-md-improver
|
|
3
|
+
description: Audit and improve AGENTS.md files in repositories. Use when the user asks to check, audit, update, improve, or fix AGENTS.md files. Evaluate the target file against a quality rubric, output a report, then make targeted updates after approval.
|
|
4
|
+
metadata:
|
|
5
|
+
short-description: Audit and improve AGENTS.md files
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AGENTS.md Improver
|
|
9
|
+
|
|
10
|
+
Audit, evaluate, and improve `AGENTS.md` files across a codebase so future
|
|
11
|
+
agent sessions have better project guidance.
|
|
12
|
+
|
|
13
|
+
This skill can update `AGENTS.md` files. After presenting a quality report and
|
|
14
|
+
getting user approval, it makes targeted improvements.
|
|
15
|
+
|
|
16
|
+
## Tool Compatibility
|
|
17
|
+
|
|
18
|
+
- Keep instructions tool-agnostic and avoid provider-specific wording.
|
|
19
|
+
- When behavior differs across tools, resolve conflicts in this order: OpenCode > Claude Code > Codex CLI > Gemini CLI.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### Phase 1: Discovery
|
|
24
|
+
|
|
25
|
+
Determine the target file before auditing anything:
|
|
26
|
+
|
|
27
|
+
1. If the user explicitly names a file, use that file as the primary target.
|
|
28
|
+
2. Otherwise, search for `AGENTS.md` files and default to the project root
|
|
29
|
+
`AGENTS.md` when it exists.
|
|
30
|
+
3. Only inspect related instruction files such as `AGENTS_LONG.md` when the
|
|
31
|
+
user asks for them or they are necessary to explain the target file.
|
|
32
|
+
|
|
33
|
+
Use the host environment's file search capability instead of assuming shell
|
|
34
|
+
commands like `find` are available.
|
|
35
|
+
|
|
36
|
+
**File Types & Locations:**
|
|
37
|
+
|
|
38
|
+
| Type | Location | Purpose |
|
|
39
|
+
| ---------------- | --------------------------- | ---------------------------------------- |
|
|
40
|
+
| Explicit target | User-provided path | Highest-priority file to audit |
|
|
41
|
+
| Project root | `./AGENTS.md` | Primary shared project instructions |
|
|
42
|
+
| Package-specific | `./packages/*/AGENTS.md` | Module-level guidance in monorepos |
|
|
43
|
+
| Subdirectory | Any nested location | Feature or domain-specific instructions |
|
|
44
|
+
| Related guides | `AGENTS_LONG.md` or similar | Supplemental context only when requested |
|
|
45
|
+
|
|
46
|
+
### Phase 2: Quality Assessment
|
|
47
|
+
|
|
48
|
+
For each target `AGENTS.md` file, evaluate against the quality criteria. See
|
|
49
|
+
[references/quality-criteria.md](references/quality-criteria.md) for detailed
|
|
50
|
+
rubrics.
|
|
51
|
+
|
|
52
|
+
**Quick Assessment Checklist:**
|
|
53
|
+
|
|
54
|
+
| Criterion | Weight | Check |
|
|
55
|
+
| --------------------------------- | ------ | --------------------------------------------------------------- |
|
|
56
|
+
| Commands and workflows documented | High | Are build, test, lint, and common operations present? |
|
|
57
|
+
| Architecture clarity | High | Can the agent understand the codebase structure and boundaries? |
|
|
58
|
+
| Non-obvious patterns | Medium | Are gotchas, quirks, and exceptions documented? |
|
|
59
|
+
| Conciseness | Medium | Is the file dense and useful instead of verbose? |
|
|
60
|
+
| Currency | High | Does it reflect the current codebase state? |
|
|
61
|
+
| Actionability | High | Are instructions concrete and executable? |
|
|
62
|
+
|
|
63
|
+
**Quality Scores:**
|
|
64
|
+
|
|
65
|
+
- **A (90-100)**: Comprehensive, current, actionable
|
|
66
|
+
- **B (70-89)**: Good coverage, minor gaps
|
|
67
|
+
- **C (50-69)**: Basic info, missing key sections
|
|
68
|
+
- **D (30-49)**: Sparse or outdated
|
|
69
|
+
- **F (0-29)**: Missing or severely outdated
|
|
70
|
+
|
|
71
|
+
### Phase 3: Quality Report Output
|
|
72
|
+
|
|
73
|
+
Always output the quality report before making any updates.
|
|
74
|
+
|
|
75
|
+
Format:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
## AGENTS.md Quality Report
|
|
79
|
+
|
|
80
|
+
### Summary
|
|
81
|
+
- Files found: X
|
|
82
|
+
- Average score: X/100
|
|
83
|
+
- Files needing update: X
|
|
84
|
+
|
|
85
|
+
### File-by-File Assessment
|
|
86
|
+
|
|
87
|
+
#### 1. ./AGENTS.md (Project Root)
|
|
88
|
+
**Score: XX/100 (Grade: X)**
|
|
89
|
+
|
|
90
|
+
| Criterion | Score | Notes |
|
|
91
|
+
|-----------|-------|-------|
|
|
92
|
+
| Commands and workflows | X/20 | ... |
|
|
93
|
+
| Architecture clarity | X/20 | ... |
|
|
94
|
+
| Non-obvious patterns | X/15 | ... |
|
|
95
|
+
| Conciseness | X/15 | ... |
|
|
96
|
+
| Currency | X/15 | ... |
|
|
97
|
+
| Actionability | X/15 | ... |
|
|
98
|
+
|
|
99
|
+
**Issues:**
|
|
100
|
+
- [List specific problems]
|
|
101
|
+
|
|
102
|
+
**Recommended additions:**
|
|
103
|
+
- [List what should be added]
|
|
104
|
+
|
|
105
|
+
#### 2. ./packages/api/AGENTS.md (Package-specific)
|
|
106
|
+
...
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Phase 4: Targeted Updates
|
|
110
|
+
|
|
111
|
+
After outputting the quality report, ask the user for confirmation before
|
|
112
|
+
updating anything.
|
|
113
|
+
|
|
114
|
+
**Update Guidelines (Critical):**
|
|
115
|
+
|
|
116
|
+
1. Propose targeted additions only. Focus on genuinely useful information:
|
|
117
|
+
- commands or workflows discovered during analysis
|
|
118
|
+
- gotchas or non-obvious patterns found in code
|
|
119
|
+
- package relationships that were not clear
|
|
120
|
+
- testing approaches that work
|
|
121
|
+
- configuration quirks
|
|
122
|
+
|
|
123
|
+
2. Keep it minimal. Avoid:
|
|
124
|
+
- restating what is obvious from the code
|
|
125
|
+
- generic best practices already covered elsewhere
|
|
126
|
+
- one-off fixes unlikely to recur
|
|
127
|
+
- verbose explanations when a one-liner will do
|
|
128
|
+
|
|
129
|
+
3. Show diffs. For each change, show:
|
|
130
|
+
- which `AGENTS.md` file to update
|
|
131
|
+
- the specific addition as a diff or quoted block
|
|
132
|
+
- a brief explanation of why this helps future sessions
|
|
133
|
+
|
|
134
|
+
**Diff Format:**
|
|
135
|
+
|
|
136
|
+
`````markdown
|
|
137
|
+
### Update: ./AGENTS.md
|
|
138
|
+
|
|
139
|
+
**Why:** The build command was missing, which makes it harder for future
|
|
140
|
+
sessions to get started quickly.
|
|
141
|
+
|
|
142
|
+
````diff
|
|
143
|
+
+## Quick Start
|
|
144
|
+
+
|
|
145
|
+
+```bash
|
|
146
|
+
+npm install
|
|
147
|
+
+npm run dev # Start development server
|
|
148
|
+
+```
|
|
149
|
+
````
|
|
150
|
+
`````
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Phase 5: Apply Updates
|
|
155
|
+
|
|
156
|
+
After user approval, apply changes using the host environment's editing
|
|
157
|
+
capability. Preserve the existing content structure unless restructuring is part
|
|
158
|
+
of the approved improvement.
|
|
159
|
+
|
|
160
|
+
## Templates
|
|
161
|
+
|
|
162
|
+
See [references/templates.md](references/templates.md) for `AGENTS.md`
|
|
163
|
+
templates by project type.
|
|
164
|
+
|
|
165
|
+
## Common Issues to Flag
|
|
166
|
+
|
|
167
|
+
1. Stale commands: documented commands no longer work
|
|
168
|
+
2. Missing dependencies: required tools or setup not mentioned
|
|
169
|
+
3. Outdated architecture: directory structure or key files have changed
|
|
170
|
+
4. Missing environment setup: required variables or configuration are absent
|
|
171
|
+
5. Broken test commands: test scripts or workflows have changed
|
|
172
|
+
6. Undocumented gotchas: non-obvious patterns are not captured
|
|
173
|
+
7. Generic filler: the file contains broad advice instead of project-specific guidance
|
|
174
|
+
|
|
175
|
+
## User Tips to Share
|
|
176
|
+
|
|
177
|
+
When presenting recommendations, remind users:
|
|
178
|
+
|
|
179
|
+
- Keep `AGENTS.md` concise and human-readable. Dense is better than verbose.
|
|
180
|
+
- Prefer commands that are copy-paste ready.
|
|
181
|
+
- Document project-specific patterns and gotchas, not generic engineering advice.
|
|
182
|
+
- Separate shared project instructions from personal preferences when the host workflow supports it.
|
|
183
|
+
- Revisit `AGENTS.md` after important workflow or architecture changes so it stays current.
|
|
184
|
+
|
|
185
|
+
## What Makes a Great AGENTS.md
|
|
186
|
+
|
|
187
|
+
**Key principles:**
|
|
188
|
+
|
|
189
|
+
- Concise and human-readable
|
|
190
|
+
- Actionable commands that can be copy-pasted
|
|
191
|
+
- Project-specific patterns, not generic advice
|
|
192
|
+
- Non-obvious gotchas and warnings
|
|
193
|
+
- Current guidance that matches the repository as it exists today
|
|
194
|
+
|
|
195
|
+
**Recommended sections** (use only what is relevant):
|
|
196
|
+
|
|
197
|
+
- Commands (build, test, dev, lint)
|
|
198
|
+
- Architecture (directory structure)
|
|
199
|
+
- Key Files (entry points, config)
|
|
200
|
+
- Code Style (project conventions)
|
|
201
|
+
- Environment (required vars, setup)
|
|
202
|
+
- Testing (commands, patterns)
|
|
203
|
+
- Gotchas (quirks, common mistakes)
|
|
204
|
+
- Workflow (when to do what)
|
|
205
|
+
|
|
206
|
+
## Failure Modes To Handle
|
|
207
|
+
|
|
208
|
+
- If no target file exists, say so clearly and ask whether to create one or use a
|
|
209
|
+
different file.
|
|
210
|
+
- If several candidate files exist, explain the candidates and anchor the audit
|
|
211
|
+
to the user-requested file or the root `AGENTS.md` by default.
|
|
212
|
+
- If a recommendation cannot be verified from the repository, label it as
|
|
213
|
+
uncertain instead of stating it as fact.
|
|
214
|
+
- If the file is already high quality, say so explicitly and avoid editing for
|
|
215
|
+
the sake of editing.
|
|
216
|
+
```
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "AGENTS.md Improver"
|
|
3
|
+
short_description: "Audit and improve AGENTS.md files"
|
|
4
|
+
default_prompt: "Use $agents-md-improver to audit the target AGENTS.md file, score it, show the quality report, and propose only targeted high-value improvements before editing."
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# AGENTS.md Quality Criteria
|
|
2
|
+
|
|
3
|
+
## Scoring Rubric
|
|
4
|
+
|
|
5
|
+
### 1. Commands and Workflows (20 points)
|
|
6
|
+
|
|
7
|
+
**20 points**: All essential commands documented with context
|
|
8
|
+
|
|
9
|
+
- Build, test, lint, and deploy commands are present when relevant
|
|
10
|
+
- Development workflow is clear
|
|
11
|
+
- Common operations are documented
|
|
12
|
+
|
|
13
|
+
**15 points**: Most commands are present, some context is missing
|
|
14
|
+
|
|
15
|
+
**10 points**: Basic commands only, little or no workflow guidance
|
|
16
|
+
|
|
17
|
+
**5 points**: Few commands, many missing
|
|
18
|
+
|
|
19
|
+
**0 points**: No commands documented
|
|
20
|
+
|
|
21
|
+
### 2. Architecture Clarity (20 points)
|
|
22
|
+
|
|
23
|
+
**20 points**: Clear codebase map
|
|
24
|
+
|
|
25
|
+
- Key directories are explained
|
|
26
|
+
- Module relationships are documented
|
|
27
|
+
- Entry points are identified
|
|
28
|
+
- Data flow is described where relevant
|
|
29
|
+
|
|
30
|
+
**15 points**: Good structure overview, minor gaps
|
|
31
|
+
|
|
32
|
+
**10 points**: Basic directory listing only
|
|
33
|
+
|
|
34
|
+
**5 points**: Vague or incomplete
|
|
35
|
+
|
|
36
|
+
**0 points**: No architecture info
|
|
37
|
+
|
|
38
|
+
### 3. Non-Obvious Patterns (15 points)
|
|
39
|
+
|
|
40
|
+
**15 points**: Gotchas and quirks are captured
|
|
41
|
+
|
|
42
|
+
- Known issues are documented
|
|
43
|
+
- Workarounds are explained
|
|
44
|
+
- Edge cases are noted
|
|
45
|
+
- Unusual patterns include a short explanation of why they exist
|
|
46
|
+
|
|
47
|
+
**10 points**: Some patterns are documented
|
|
48
|
+
|
|
49
|
+
**5 points**: Minimal pattern documentation
|
|
50
|
+
|
|
51
|
+
**0 points**: No patterns or gotchas
|
|
52
|
+
|
|
53
|
+
### 4. Conciseness (15 points)
|
|
54
|
+
|
|
55
|
+
**15 points**: Dense, valuable content
|
|
56
|
+
|
|
57
|
+
- No filler or obvious information
|
|
58
|
+
- Each line adds value
|
|
59
|
+
- No redundancy with other project docs unless the repetition is intentional and useful
|
|
60
|
+
|
|
61
|
+
**10 points**: Mostly concise, some padding
|
|
62
|
+
|
|
63
|
+
**5 points**: Verbose in places
|
|
64
|
+
|
|
65
|
+
**0 points**: Mostly filler or restates obvious code
|
|
66
|
+
|
|
67
|
+
### 5. Currency (15 points)
|
|
68
|
+
|
|
69
|
+
**15 points**: Reflects the current codebase
|
|
70
|
+
|
|
71
|
+
- Commands work as documented
|
|
72
|
+
- File references are accurate
|
|
73
|
+
- Stack and workflow details are current
|
|
74
|
+
|
|
75
|
+
**10 points**: Mostly current, minor staleness
|
|
76
|
+
|
|
77
|
+
**5 points**: Several outdated references
|
|
78
|
+
|
|
79
|
+
**0 points**: Severely outdated
|
|
80
|
+
|
|
81
|
+
### 6. Actionability (15 points)
|
|
82
|
+
|
|
83
|
+
**15 points**: Instructions are executable
|
|
84
|
+
|
|
85
|
+
- Commands can be copy-pasted
|
|
86
|
+
- Steps are concrete
|
|
87
|
+
- Paths are real
|
|
88
|
+
- Guidance tells the reader what to do, not just what exists
|
|
89
|
+
|
|
90
|
+
**10 points**: Mostly actionable
|
|
91
|
+
|
|
92
|
+
**5 points**: Some vague instructions
|
|
93
|
+
|
|
94
|
+
**0 points**: Vague or theoretical
|
|
95
|
+
|
|
96
|
+
## Assessment Process
|
|
97
|
+
|
|
98
|
+
1. Read the target `AGENTS.md` file completely.
|
|
99
|
+
2. Cross-check with the actual repository:
|
|
100
|
+
- verify documented commands where practical
|
|
101
|
+
- check that referenced files and directories exist
|
|
102
|
+
- confirm architecture descriptions match the codebase
|
|
103
|
+
3. Score each criterion.
|
|
104
|
+
4. Calculate the total and assign a grade.
|
|
105
|
+
5. List specific issues found.
|
|
106
|
+
6. Propose concrete improvements.
|
|
107
|
+
|
|
108
|
+
## Red Flags
|
|
109
|
+
|
|
110
|
+
- Commands that would fail because of wrong paths, missing dependencies, or stale names
|
|
111
|
+
- References to deleted files or folders
|
|
112
|
+
- Outdated stack or workflow descriptions
|
|
113
|
+
- Generic template content that was never customized for the project
|
|
114
|
+
- Advice that is not specific to the repository
|
|
115
|
+
- Placeholder text such as `TODO` that was never resolved
|
|
116
|
+
- Duplicated guidance spread across multiple instruction files without a clear reason
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# AGENTS.md Templates
|
|
2
|
+
|
|
3
|
+
## Key Principles
|
|
4
|
+
|
|
5
|
+
- **Concise**: Dense, human-readable content; one line per concept when possible
|
|
6
|
+
- **Actionable**: Commands should be copy-paste ready
|
|
7
|
+
- **Project-specific**: Document patterns unique to this project, not generic advice
|
|
8
|
+
- **Current**: All guidance should reflect the actual codebase state
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Recommended Sections
|
|
13
|
+
|
|
14
|
+
Use only the sections relevant to the project. Not every section is needed.
|
|
15
|
+
|
|
16
|
+
### Commands
|
|
17
|
+
|
|
18
|
+
Document the essential commands for working with the project.
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
| ------------------- | ------------------------ |
|
|
25
|
+
| `<install command>` | Install dependencies |
|
|
26
|
+
| `<dev command>` | Start development server |
|
|
27
|
+
| `<build command>` | Production build |
|
|
28
|
+
| `<test command>` | Run tests |
|
|
29
|
+
| `<lint command>` | Lint or format code |
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Architecture
|
|
33
|
+
|
|
34
|
+
Describe the project structure so the agent understands where things live.
|
|
35
|
+
|
|
36
|
+
````markdown
|
|
37
|
+
## Architecture
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
<root>/
|
|
41
|
+
<dir>/ # <purpose>
|
|
42
|
+
<dir>/ # <purpose>
|
|
43
|
+
<dir>/ # <purpose>
|
|
44
|
+
```
|
|
45
|
+
````
|
|
46
|
+
|
|
47
|
+
### Key Files
|
|
48
|
+
|
|
49
|
+
List important files that an agent should know about.
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
## Key Files
|
|
53
|
+
|
|
54
|
+
- `<path>` - <purpose>
|
|
55
|
+
- `<path>` - <purpose>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Code Style
|
|
59
|
+
|
|
60
|
+
Document project-specific coding conventions.
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## Code Style
|
|
64
|
+
|
|
65
|
+
- <convention>
|
|
66
|
+
- <convention>
|
|
67
|
+
- <preference over alternative>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Environment
|
|
71
|
+
|
|
72
|
+
Document required environment variables and setup.
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## Environment
|
|
76
|
+
|
|
77
|
+
Required:
|
|
78
|
+
|
|
79
|
+
- `<VAR_NAME>` - <purpose>
|
|
80
|
+
- `<VAR_NAME>` - <purpose>
|
|
81
|
+
|
|
82
|
+
Setup:
|
|
83
|
+
|
|
84
|
+
- <setup step>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Testing
|
|
88
|
+
|
|
89
|
+
Document the testing approach and commands.
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
## Testing
|
|
93
|
+
|
|
94
|
+
- `<test command>` - <what it tests>
|
|
95
|
+
- <testing convention or pattern>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Gotchas
|
|
99
|
+
|
|
100
|
+
Document non-obvious patterns, quirks, and warnings.
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## Gotchas
|
|
104
|
+
|
|
105
|
+
- <non-obvious thing that causes issues>
|
|
106
|
+
- <ordering dependency or prerequisite>
|
|
107
|
+
- <common mistake to avoid>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Workflow
|
|
111
|
+
|
|
112
|
+
Document development workflow patterns.
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
## Workflow
|
|
116
|
+
|
|
117
|
+
- <when to do X>
|
|
118
|
+
- <preferred approach for Y>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Template: Project Root (Minimal)
|
|
124
|
+
|
|
125
|
+
````markdown
|
|
126
|
+
# <Project Name>
|
|
127
|
+
|
|
128
|
+
<One-line description>
|
|
129
|
+
|
|
130
|
+
## Commands
|
|
131
|
+
|
|
132
|
+
| Command | Description |
|
|
133
|
+
| ----------- | ------------- |
|
|
134
|
+
| `<command>` | <description> |
|
|
135
|
+
|
|
136
|
+
## Architecture
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
<structure>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Gotchas
|
|
143
|
+
|
|
144
|
+
- <gotcha>
|
|
145
|
+
````
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Template: Project Root (Comprehensive)
|
|
150
|
+
|
|
151
|
+
````markdown
|
|
152
|
+
# <Project Name>
|
|
153
|
+
|
|
154
|
+
<One-line description>
|
|
155
|
+
|
|
156
|
+
## Commands
|
|
157
|
+
|
|
158
|
+
| Command | Description |
|
|
159
|
+
| ----------- | ------------- |
|
|
160
|
+
| `<command>` | <description> |
|
|
161
|
+
|
|
162
|
+
## Architecture
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
<structure with descriptions>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Key Files
|
|
169
|
+
|
|
170
|
+
- `<path>` - <purpose>
|
|
171
|
+
|
|
172
|
+
## Code Style
|
|
173
|
+
|
|
174
|
+
- <convention>
|
|
175
|
+
|
|
176
|
+
## Environment
|
|
177
|
+
|
|
178
|
+
- `<VAR>` - <purpose>
|
|
179
|
+
|
|
180
|
+
## Testing
|
|
181
|
+
|
|
182
|
+
- `<command>` - <scope>
|
|
183
|
+
|
|
184
|
+
## Gotchas
|
|
185
|
+
|
|
186
|
+
- <gotcha>
|
|
187
|
+
````
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Template: Package or Module
|
|
192
|
+
|
|
193
|
+
For packages within a monorepo or distinct modules.
|
|
194
|
+
|
|
195
|
+
````markdown
|
|
196
|
+
# <Package Name>
|
|
197
|
+
|
|
198
|
+
<Purpose of this package>
|
|
199
|
+
|
|
200
|
+
## Usage
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
<import or usage example>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Key Exports
|
|
207
|
+
|
|
208
|
+
- `<export>` - <purpose>
|
|
209
|
+
|
|
210
|
+
## Dependencies
|
|
211
|
+
|
|
212
|
+
- `<dependency>` - <why needed>
|
|
213
|
+
|
|
214
|
+
## Notes
|
|
215
|
+
|
|
216
|
+
- <important note>
|
|
217
|
+
````
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Template: Monorepo Root
|
|
222
|
+
|
|
223
|
+
```markdown
|
|
224
|
+
# <Monorepo Name>
|
|
225
|
+
|
|
226
|
+
<Description>
|
|
227
|
+
|
|
228
|
+
## Packages
|
|
229
|
+
|
|
230
|
+
| Package | Description | Path |
|
|
231
|
+
| -------- | ----------- | -------- |
|
|
232
|
+
| `<name>` | <purpose> | `<path>` |
|
|
233
|
+
|
|
234
|
+
## Commands
|
|
235
|
+
|
|
236
|
+
| Command | Description |
|
|
237
|
+
| ----------- | ------------- |
|
|
238
|
+
| `<command>` | <description> |
|
|
239
|
+
|
|
240
|
+
## Cross-Package Patterns
|
|
241
|
+
|
|
242
|
+
- <shared pattern>
|
|
243
|
+
- <generation or sync pattern>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Update Principles
|
|
249
|
+
|
|
250
|
+
When updating any `AGENTS.md`:
|
|
251
|
+
|
|
252
|
+
1. **Be specific**: Use actual file paths and real commands from this project.
|
|
253
|
+
2. **Be current**: Verify the guidance against the actual codebase.
|
|
254
|
+
3. **Be brief**: One line per concept when possible.
|
|
255
|
+
4. **Be useful**: Would this help a new agent session understand the project?
|