@martinffx/atelier 1.2.2 → 1.3.0
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/CHANGELOG.md +19 -0
- package/README.md +22 -24
- package/agents/architect.md +1 -1
- package/agents/oracle.md +1 -1
- package/dist/atelier.js +12 -14
- package/package.json +1 -1
- package/skills/code-commit/SKILL.md +5 -13
- package/skills/code-pull-request/SKILL.md +36 -0
- package/skills/code-pull-request/references/common.md +76 -0
- package/skills/code-pull-request/references/create-pr.md +122 -0
- package/skills/code-pull-request/references/default-template.md +25 -0
- package/skills/code-pull-request/references/leave-comment.md +53 -0
- package/skills/code-pull-request/references/merge-pr.md +94 -0
- package/skills/code-pull-request/references/read-comments.md +61 -0
- package/skills/code-pull-request/references/respond-to-comment.md +66 -0
- package/skills/code-review/SKILL.md +21 -12
- package/skills/code-review/references/reviewers.md +142 -41
- package/skills/code-review/references/rq.md +48 -32
- package/skills/oracle-debug/SKILL.md +218 -0
- package/skills/{code-debug → oracle-debug}/references/bug-patterns.md +3 -3
- package/skills/oracle-domain-modelling/SKILL.md +84 -0
- package/skills/oracle-grill-me/SKILL.md +20 -0
- package/skills/spec-brainstorm/SKILL.md +91 -71
- package/skills/spec-finish/SKILL.md +20 -14
- package/skills/spec-implement/SKILL.md +3 -2
- package/skills/spec-orchestrator/SKILL.md +4 -15
- package/skills/spec-plan/SKILL.md +1 -1
- package/agents/scout.md +0 -40
- package/skills/code-commit/references/pr-workflow.md +0 -145
- package/skills/code-debug/SKILL.md +0 -199
- package/skills/code-docs/SKILL.md +0 -171
- package/skills/code-docs/references/api-docs.md +0 -116
- package/skills/code-docs/references/changelog.md +0 -64
- package/skills/code-docs/references/readme-structure.md +0 -94
- package/skills/oracle-architect/SKILL.md +0 -327
- package/skills/oracle-architect/references/api-design.md +0 -345
- package/skills/oracle-architect/references/data-modeling.md +0 -318
- package/skills/oracle-architect/references/ddd-patterns.md +0 -348
- package/skills/oracle-architect/references/interface-design.md +0 -203
- package/skills/oracle-challenge/SKILL.md +0 -126
- package/skills/oracle-doubt/SKILL.md +0 -252
- package/skills/oracle-doubt/references/adversarial-prompt.md +0 -47
- package/skills/oracle-grillme/SKILL.md +0 -160
- package/skills/oracle-security/SKILL.md +0 -225
- package/skills/oracle-security/references/security-patterns.md +0 -236
- package/skills/oracle-security/references/threat-modeling-guide.md +0 -137
- package/skills/oracle-testing/SKILL.md +0 -237
- package/skills/oracle-testing/references/anti-patterns.md +0 -618
- package/skills/oracle-testing/references/boundaries.md +0 -579
- package/skills/oracle-testing/references/core-testing.md +0 -691
- package/skills/oracle-testing/references/edge-testing.md +0 -794
- package/skills/oracle-testing/references/stub-driven-tdd.md +0 -322
- package/skills/oracle-thinkdeep/SKILL.md +0 -164
- /package/skills/{code-debug → oracle-debug}/references/language-tools.md +0 -0
- /package/skills/{code-debug → oracle-debug}/references/techniques.md +0 -0
- /package/skills/{oracle-grillme → oracle-domain-modelling}/references/ADR-FORMAT.md +0 -0
- /package/skills/{oracle-grillme → oracle-domain-modelling}/references/CONTEXT-FORMAT.md +0 -0
|
@@ -50,8 +50,6 @@ spec-plan → Implementation plan + tasks → plan.json
|
|
|
50
50
|
spec-implement → Execute tasks, track progress, report
|
|
51
51
|
spec-finish → Post-implementation validation
|
|
52
52
|
code-subagents → Parallel dispatch, two-stage review
|
|
53
|
-
oracle-architect → DDD patterns, component responsibilities
|
|
54
|
-
oracle-testing → TDD patterns, boundary testing
|
|
55
53
|
```
|
|
56
54
|
|
|
57
55
|
### "Create a spec for X" / Build / Add Feature
|
|
@@ -66,18 +64,6 @@ spec-brainstorm → spec-plan → spec-implement → spec-finish
|
|
|
66
64
|
spec-brainstorm (research-heavy) → spec-plan (targeted) → spec-implement
|
|
67
65
|
```
|
|
68
66
|
|
|
69
|
-
### Write Tests / Testing Questions
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
oracle-testing
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Architecture / Domain Modeling Questions
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
oracle-architect
|
|
79
|
-
```
|
|
80
|
-
|
|
81
67
|
### Quick Fix / Trivial Change
|
|
82
68
|
|
|
83
69
|
If genuinely trivial (typo, single-line config, variable rename) — skip the pipeline.
|
|
@@ -145,9 +131,12 @@ If you loop 2+ times on the same issue, stop and ask the human:
|
|
|
145
131
|
**Process skills** (spec-brainstorm, spec-plan, spec-implement, spec-finish): Follow exactly.
|
|
146
132
|
Don't adapt away discipline.
|
|
147
133
|
|
|
148
|
-
**Knowledge skills** (oracle-
|
|
134
|
+
**Knowledge skills** (oracle-grill-me, oracle-domain-modelling): Adapt principles to
|
|
149
135
|
context. These inform decisions within the workflow.
|
|
150
136
|
|
|
137
|
+
**Discipline skills** (oracle-debug): Strict methodology that must be followed
|
|
138
|
+
exactly — no adaptation that bypasses root-cause investigation.
|
|
139
|
+
|
|
151
140
|
Process skills come first. Knowledge skills get invoked by process skills when needed.
|
|
152
141
|
|
|
153
142
|
## User Instructions
|
package/agents/scout.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scout
|
|
3
|
-
description: Fast codebase reconnaissance and exploration, concise summarization of findings, precise location of relevant context, and efficient workspace preparation through targeted file operations and template application
|
|
4
|
-
model: minimax-m2.7
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Scout**, a fast reconnaissance agent. Your job is to explore codebases, summarize what you find, highlight relevant context, and point others to exactly where things live. You move quickly, read minimally, and never break existing work.
|
|
8
|
-
|
|
9
|
-
## Role
|
|
10
|
-
|
|
11
|
-
- Explore and map codebase structure, conventions, and key files
|
|
12
|
-
- Summarize findings with clear, concise overviews
|
|
13
|
-
- Highlight relevant context and explain why it matters
|
|
14
|
-
- Point to exact locations (file paths, line numbers, symbol names) so others can dive deeper
|
|
15
|
-
- Retrieve targeted snippets on request—never dump full files unless necessary
|
|
16
|
-
- Create files from templates and set up directory structures when asked
|
|
17
|
-
- Respect existing files—never overwrite without explicit direction
|
|
18
|
-
|
|
19
|
-
## Skills
|
|
20
|
-
|
|
21
|
-
Before beginning work, scan your environment for relevant skills and load any that apply to the task at hand. Use them to guide how you explore, summarize, and present your findings.
|
|
22
|
-
|
|
23
|
-
## Checklist
|
|
24
|
-
|
|
25
|
-
Before finishing, confirm you have:
|
|
26
|
-
|
|
27
|
-
- [ ] Retrieved only the specific context requested (no unnecessary full-file reads)
|
|
28
|
-
- [ ] Verified the target file does not already exist before creating
|
|
29
|
-
- [ ] Created parent directories as needed
|
|
30
|
-
- [ ] Applied all relevant variable substitutions when using templates
|
|
31
|
-
- [ ] Confirmed the output matches the request exactly
|
|
32
|
-
- [ ] Reported what was created, retrieved, or modified
|
|
33
|
-
|
|
34
|
-
## Boundaries
|
|
35
|
-
|
|
36
|
-
- DO handle file operations and retrieval efficiently
|
|
37
|
-
- DO create files and directories as requested
|
|
38
|
-
- DON'T make design or architectural decisions
|
|
39
|
-
- DON'T conduct requirements discovery
|
|
40
|
-
- NEVER overwrite existing files unless explicitly told to
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Pull Request Workflow
|
|
2
|
-
|
|
3
|
-
Creating GitHub pull requests via the `gh` CLI.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- `gh` CLI installed and authenticated: `gh auth status`
|
|
8
|
-
- Remote `origin` points to GitHub: `git remote -v`
|
|
9
|
-
- On a feature branch (not main): `git branch --show-current`
|
|
10
|
-
|
|
11
|
-
## Check for Project Template
|
|
12
|
-
|
|
13
|
-
Before creating a PR, check if the project has its own PR template:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# Check for PR template in .github/
|
|
17
|
-
ls .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || echo "No project template found"
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
**If found:** Use it. The `gh pr create` command will automatically pick it up.
|
|
21
|
-
|
|
22
|
-
**If not found:** Use the minimal template below.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Create Pull Request
|
|
27
|
-
|
|
28
|
-
### Option 1: Auto-fill from commits (recommended)
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
gh pr create --fill
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
This uses the commit messages as the PR title and body. Best when commits are clean and conventional.
|
|
35
|
-
|
|
36
|
-
### Option 2: Interactive
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
gh pr create
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Opens an editor with the template. Fill in title and body interactively.
|
|
43
|
-
|
|
44
|
-
### Option 3: Inline (for simple PRs)
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
gh pr create --title "feat(auth): add JWT authentication" --body "Implements token-based auth with refresh support."
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## PR Title Format
|
|
53
|
-
|
|
54
|
-
Follow conventional commit style for PR titles:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
<type>(<scope>): <description>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Examples:
|
|
61
|
-
- `feat(api): add user profile endpoint`
|
|
62
|
-
- `fix(db): resolve connection pool leak`
|
|
63
|
-
- `docs(readme): update installation instructions`
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## PR Body Template (fallback if no project template)
|
|
68
|
-
|
|
69
|
-
```markdown
|
|
70
|
-
## Description
|
|
71
|
-
<!-- What does this PR do? -->
|
|
72
|
-
|
|
73
|
-
## Changes
|
|
74
|
-
<!-- What changed? -->
|
|
75
|
-
|
|
76
|
-
## Testing
|
|
77
|
-
<!-- How was this tested? -->
|
|
78
|
-
|
|
79
|
-
## Checklist
|
|
80
|
-
- [ ] Tests pass
|
|
81
|
-
- [ ] Commits follow conventional format
|
|
82
|
-
- [ ] Documentation updated (if needed)
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Linking Issues
|
|
88
|
-
|
|
89
|
-
Add issue references in the PR body:
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
Closes #123
|
|
93
|
-
Fixes #456
|
|
94
|
-
Relates to #789
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
This auto-closes linked issues when the PR merges.
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Draft PRs
|
|
102
|
-
|
|
103
|
-
For work-in-progress PRs:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
gh pr create --draft
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Mark as ready later:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
gh pr ready <pr-number>
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Review Requests
|
|
118
|
-
|
|
119
|
-
Request reviewers after creating the PR:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
gh pr edit <pr-number> --add-reviewer username
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Or add via the GitHub web UI.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Verify PR Created
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
gh pr view --web # Open in browser
|
|
133
|
-
gh pr status # Show PR status
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Common Mistakes
|
|
139
|
-
|
|
140
|
-
| Mistake | Fix |
|
|
141
|
-
|---------|-----|
|
|
142
|
-
| PR from main branch | Switch to feature branch first |
|
|
143
|
-
| No remote | `git remote add origin <url>` |
|
|
144
|
-
| Unpushed commits | `git push -u origin <branch>` |
|
|
145
|
-
| PR body is empty | Use `--fill` or write a description |
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-debug
|
|
3
|
-
description: >
|
|
4
|
-
Disciplined diagnosis loop for hard bugs and performance regressions.
|
|
5
|
-
Reproduce → minimise → hypothesise → instrument → fix → regression-test.
|
|
6
|
-
Use when user says "diagnose this" / "debug this", reports a bug, says
|
|
7
|
-
something is broken/throwing/failing, or describes a performance regression.
|
|
8
|
-
user-invocable: true
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Code Debug
|
|
12
|
-
|
|
13
|
-
A discipline for hard bugs. Skip phases only when explicitly justified.
|
|
14
|
-
|
|
15
|
-
When exploring the codebase, use the project's domain glossary to get a clear
|
|
16
|
-
mental model of the relevant modules, and check ADRs in the area you're touching.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Phase 1 — Build a feedback loop
|
|
21
|
-
|
|
22
|
-
**This is the skill.** Everything else is mechanical. If you have a fast,
|
|
23
|
-
deterministic, agent-runnable pass/fail signal for the bug, you will find the
|
|
24
|
-
cause — bisection, hypothesis-testing, and instrumentation all just consume
|
|
25
|
-
that signal. If you don't have one, no amount of staring at code will save you.
|
|
26
|
-
|
|
27
|
-
Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to
|
|
28
|
-
give up.**
|
|
29
|
-
|
|
30
|
-
### Ways to construct one — try them in roughly this order
|
|
31
|
-
|
|
32
|
-
1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e.
|
|
33
|
-
2. **Curl / HTTP script** against a running dev server.
|
|
34
|
-
3. **CLI invocation** with a fixture input, diffing stdout against a known-good
|
|
35
|
-
snapshot.
|
|
36
|
-
4. **Headless browser script** (Playwright / Puppeteer) — drives the UI,
|
|
37
|
-
asserts on DOM/console/network.
|
|
38
|
-
5. **Replay a captured trace.** Save a real network request / payload / event
|
|
39
|
-
log to disk; replay it through the code path in isolation.
|
|
40
|
-
6. **Throwaway harness.** Spin up a minimal subset of the system (one service,
|
|
41
|
-
mocked deps) that exercises the bug code path with a single function call.
|
|
42
|
-
7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000
|
|
43
|
-
random inputs and look for the failure mode.
|
|
44
|
-
8. **Bisection harness.** If the bug appeared between two known states (commit,
|
|
45
|
-
dataset, version), automate "boot at state X, check, repeat" so you can
|
|
46
|
-
`git bisect run` it.
|
|
47
|
-
9. **Differential loop.** Run the same input through old-version vs new-version
|
|
48
|
-
(or two configs) and diff outputs.
|
|
49
|
-
10. **HITL bash script.** Last resort. If a human must click, drive _them_ with
|
|
50
|
-
a structured script so the loop is still structured. Captured output feeds
|
|
51
|
-
back to you.
|
|
52
|
-
|
|
53
|
-
Build the right feedback loop, and the bug is 90% fixed.
|
|
54
|
-
|
|
55
|
-
### Iterate on the loop itself
|
|
56
|
-
|
|
57
|
-
Treat the loop as a product. Once you have _a_ loop, ask:
|
|
58
|
-
|
|
59
|
-
- Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
|
|
60
|
-
- Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
|
|
61
|
-
- Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)
|
|
62
|
-
|
|
63
|
-
A 30-second flaky loop is barely better than no loop. A 2-second deterministic
|
|
64
|
-
loop is a debugging superpower.
|
|
65
|
-
|
|
66
|
-
### Non-deterministic bugs
|
|
67
|
-
|
|
68
|
-
The goal is not a clean repro but a **higher reproduction rate**. Loop the
|
|
69
|
-
trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps.
|
|
70
|
-
A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's
|
|
71
|
-
debuggable.
|
|
72
|
-
|
|
73
|
-
### When you genuinely cannot build a loop
|
|
74
|
-
|
|
75
|
-
Stop and say so explicitly. List what you tried. Ask the user for:
|
|
76
|
-
(a) access to whatever environment reproduces it,
|
|
77
|
-
(b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or
|
|
78
|
-
(c) permission to add temporary production instrumentation.
|
|
79
|
-
|
|
80
|
-
Do **not** proceed to hypothesise without a loop.
|
|
81
|
-
|
|
82
|
-
**Do not proceed to Phase 2 until you have a loop you believe in.**
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Phase 2 — Reproduce
|
|
87
|
-
|
|
88
|
-
Run the loop. Watch the bug appear.
|
|
89
|
-
|
|
90
|
-
Confirm:
|
|
91
|
-
|
|
92
|
-
- [ ] The loop produces the failure mode the **user** described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
|
|
93
|
-
- [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
|
|
94
|
-
- [ ] You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.
|
|
95
|
-
|
|
96
|
-
**Do not proceed until you reproduce the bug.**
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Phase 3 — Hypothesise
|
|
101
|
-
|
|
102
|
-
Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis
|
|
103
|
-
generation anchors on the first plausible idea.
|
|
104
|
-
|
|
105
|
-
Each hypothesis must be **falsifiable**: state the prediction it makes.
|
|
106
|
-
|
|
107
|
-
> Format: "If `<X>` is the cause, then `<changing Y>` will make the bug disappear / `<changing Z>` will make it worse."
|
|
108
|
-
|
|
109
|
-
If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.
|
|
110
|
-
|
|
111
|
-
**Show the ranked list to the user before testing.** They often have domain
|
|
112
|
-
knowledge that re-ranks instantly ("we just deployed a change to #3"), or know
|
|
113
|
-
hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't
|
|
114
|
-
block on it — proceed with your ranking if the user is AFK.
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Phase 4 — Instrument
|
|
119
|
-
|
|
120
|
-
Each probe must map to a specific prediction from Phase 3. **Change one variable
|
|
121
|
-
at a time.**
|
|
122
|
-
|
|
123
|
-
Tool preference:
|
|
124
|
-
|
|
125
|
-
1. **Debugger / REPL inspection** if the env supports it. One breakpoint beats ten logs.
|
|
126
|
-
2. **Targeted logs** at the boundaries that distinguish hypotheses.
|
|
127
|
-
3. Never "log everything and grep".
|
|
128
|
-
|
|
129
|
-
**Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup at
|
|
130
|
-
the end becomes a single grep. Untagged logs survive; tagged logs die.
|
|
131
|
-
|
|
132
|
-
**Perf branch.** For performance regressions, logs are usually wrong. Instead:
|
|
133
|
-
establish a baseline measurement (timing harness, `performance.now()`, profiler,
|
|
134
|
-
query plan), then bisect. Measure first, fix second.
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Phase 5 — Fix + regression test
|
|
139
|
-
|
|
140
|
-
Write the regression test **before the fix** — but only if there is a
|
|
141
|
-
**correct seam** for it.
|
|
142
|
-
|
|
143
|
-
A correct seam is one where the test exercises the **real bug pattern** as it
|
|
144
|
-
occurs at the call site. If the only available seam is too shallow (single-caller
|
|
145
|
-
test when the bug needs multiple callers, unit test that can't replicate the
|
|
146
|
-
chain that triggered the bug), a regression test there gives false confidence.
|
|
147
|
-
|
|
148
|
-
**If no correct seam exists, that itself is the finding.** Note it. The codebase
|
|
149
|
-
architecture is preventing the bug from being locked down. Flag this for the
|
|
150
|
-
next phase.
|
|
151
|
-
|
|
152
|
-
If a correct seam exists:
|
|
153
|
-
|
|
154
|
-
1. Turn the minimised repro into a failing test at that seam.
|
|
155
|
-
2. Watch it fail.
|
|
156
|
-
3. Apply the fix.
|
|
157
|
-
4. Watch it pass.
|
|
158
|
-
5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Phase 6 — Cleanup + post-mortem
|
|
163
|
-
|
|
164
|
-
Required before declaring done:
|
|
165
|
-
|
|
166
|
-
- [ ] Original repro no longer reproduces (re-run the Phase 1 loop)
|
|
167
|
-
- [ ] Regression test passes (or absence of seam is documented)
|
|
168
|
-
- [ ] All `[DEBUG-...]` instrumentation removed (`grep` the prefix)
|
|
169
|
-
- [ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location)
|
|
170
|
-
- [ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
|
|
171
|
-
|
|
172
|
-
**Then ask: what would have prevented this bug?**
|
|
173
|
-
|
|
174
|
-
If the answer involves architectural change (no good test seam, tangled callers,
|
|
175
|
-
hidden coupling) flag this as a codebase health finding for the team.
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## References
|
|
180
|
-
|
|
181
|
-
- **Language-specific tools** → `references/language-tools.md`
|
|
182
|
-
- **Common bug patterns** → `references/bug-patterns.md`
|
|
183
|
-
- **Logging & techniques** → `references/techniques.md`
|
|
184
|
-
|
|
185
|
-
## Output Format
|
|
186
|
-
|
|
187
|
-
After each debugging session, summarise:
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
## Debug Summary
|
|
191
|
-
|
|
192
|
-
**Problem:** [One sentence]
|
|
193
|
-
**Root Cause:** [What actually was wrong]
|
|
194
|
-
**Fix:** [How you fixed it]
|
|
195
|
-
**Verification:** [Test results]
|
|
196
|
-
**Prevention:** [Regression test added? Architectural finding?]
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
This helps future-you understand what happened.
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-docs
|
|
3
|
-
description: >
|
|
4
|
-
Documentation generation for code projects. Use when updating docs, writing README, generating
|
|
5
|
-
API docs, creating changelog, or when the user mentions documentation, docs, readme, api docs,
|
|
6
|
-
or any documentation task.
|
|
7
|
-
user-invocable: false
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Code Docs
|
|
11
|
-
|
|
12
|
-
Documentation generation and maintenance for code projects.
|
|
13
|
-
|
|
14
|
-
## When to Document
|
|
15
|
-
|
|
16
|
-
**Always update docs when:**
|
|
17
|
-
- Adding new features
|
|
18
|
-
- Changing existing behavior
|
|
19
|
-
- Updating configuration
|
|
20
|
-
- Breaking changes
|
|
21
|
-
|
|
22
|
-
**Docs should live:**
|
|
23
|
-
- Near the code (docstrings, comments)
|
|
24
|
-
- In the repo (README, docs folder)
|
|
25
|
-
- Generated (API docs, type docs)
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Doc Types
|
|
30
|
-
|
|
31
|
-
### README
|
|
32
|
-
|
|
33
|
-
Project overview, setup, usage. See references/readme-structure.md
|
|
34
|
-
|
|
35
|
-
**Template:**
|
|
36
|
-
```markdown
|
|
37
|
-
# Project Name
|
|
38
|
-
|
|
39
|
-
Brief description (one line).
|
|
40
|
-
|
|
41
|
-
## Quick Start
|
|
42
|
-
|
|
43
|
-
3-5 commands to get running.
|
|
44
|
-
|
|
45
|
-
## Installation
|
|
46
|
-
|
|
47
|
-
Detailed setup steps.
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
|
|
51
|
-
Code examples.
|
|
52
|
-
|
|
53
|
-
## API
|
|
54
|
-
|
|
55
|
-
Link to full API docs.
|
|
56
|
-
|
|
57
|
-
## Contributing
|
|
58
|
-
|
|
59
|
-
How to contribute.
|
|
60
|
-
|
|
61
|
-
## License
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### API Documentation
|
|
65
|
-
|
|
66
|
-
See references/api-docs.md for:
|
|
67
|
-
- TypeDoc (JavaScript/TypeScript)
|
|
68
|
-
- Sphinx (Python)
|
|
69
|
-
- godoc (Go)
|
|
70
|
-
- JSDoc (JavaScript)
|
|
71
|
-
|
|
72
|
-
### Changelog
|
|
73
|
-
|
|
74
|
-
See references/changelog.md for Keep a Changelog format.
|
|
75
|
-
|
|
76
|
-
**Sections:**
|
|
77
|
-
- Added
|
|
78
|
-
- Changed
|
|
79
|
-
- Deprecated
|
|
80
|
-
- Removed
|
|
81
|
-
- Fixed
|
|
82
|
-
- Security
|
|
83
|
-
|
|
84
|
-
### Architecture Docs
|
|
85
|
-
|
|
86
|
-
See references/architecture-docs.md for:
|
|
87
|
-
- ADRs (Architecture Decision Records)
|
|
88
|
-
- Diagrams
|
|
89
|
-
- System overviews
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Generation Commands
|
|
94
|
-
|
|
95
|
-
### TypeScript/JavaScript
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# TypeDoc
|
|
99
|
-
npx typedoc --out docs src/index.ts
|
|
100
|
-
|
|
101
|
-
# JSDoc
|
|
102
|
-
npx jsdoc src/ -d docs/
|
|
103
|
-
|
|
104
|
-
# API Extractor (monorepos)
|
|
105
|
-
npx api-extractor run
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Python
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# Sphinx
|
|
112
|
-
sphinx-build -b html docs docs/_build
|
|
113
|
-
|
|
114
|
-
# pdoc
|
|
115
|
-
pdoc --output-dir docs src/
|
|
116
|
-
|
|
117
|
-
# mkdocs
|
|
118
|
-
mkdocs serve
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Go
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# godoc
|
|
125
|
-
godoc -http=:6060
|
|
126
|
-
|
|
127
|
-
# swag (OpenAPI from comments)
|
|
128
|
-
swag init -g cmd/server/main.go
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Workflow
|
|
134
|
-
|
|
135
|
-
### 1. Identify what needs docs
|
|
136
|
-
|
|
137
|
-
- New files/features → update relevant doc
|
|
138
|
-
- Breaking change → update CHANGELOG
|
|
139
|
-
- New public API → update API docs
|
|
140
|
-
|
|
141
|
-
### 2. Generate/Update
|
|
142
|
-
|
|
143
|
-
- Run doc generators
|
|
144
|
-
- Update manual docs
|
|
145
|
-
- Verify examples work
|
|
146
|
-
|
|
147
|
-
### 3. Verify
|
|
148
|
-
|
|
149
|
-
- Links work
|
|
150
|
-
- Examples run
|
|
151
|
-
- Build passes
|
|
152
|
-
|
|
153
|
-
### 4. Commit
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
docs: update API documentation
|
|
157
|
-
|
|
158
|
-
Generated via typedoc.
|
|
159
|
-
Added: new /users endpoint
|
|
160
|
-
Changed: authentication section
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## Best Practices
|
|
166
|
-
|
|
167
|
-
1. **Write docs in the code** - Docstrings, comments
|
|
168
|
-
2. **Generate where possible** - Don't duplicate
|
|
169
|
-
3. **Keep README minimal** - Link to detailed docs
|
|
170
|
-
4. **Version with code** - Docs in same repo/PR
|
|
171
|
-
5. **Test examples** - Ensure they run
|