@martinffx/atelier 1.2.1 → 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 +27 -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
|
@@ -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: true
|
|
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
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# API Documentation Tools
|
|
2
|
-
|
|
3
|
-
## TypeScript/JavaScript
|
|
4
|
-
|
|
5
|
-
### TypeDoc
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install --save-dev typedoc
|
|
9
|
-
|
|
10
|
-
# Generate
|
|
11
|
-
npx typedoc --out docs src/index.ts
|
|
12
|
-
|
|
13
|
-
# Options
|
|
14
|
-
--entryPoints src/
|
|
15
|
-
--out docs/
|
|
16
|
-
--name "My Project"
|
|
17
|
-
--theme default
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### JSDoc
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install --save-dev jsdoc
|
|
24
|
-
|
|
25
|
-
# Generate
|
|
26
|
-
npx jsdoc src/ -d docs/
|
|
27
|
-
|
|
28
|
-
# Config (jsdoc.json)
|
|
29
|
-
{
|
|
30
|
-
"source": {
|
|
31
|
-
"includePattern": ".+\\.js(doc)?$"
|
|
32
|
-
},
|
|
33
|
-
"opts": {
|
|
34
|
-
"destination": "./docs/"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Python
|
|
42
|
-
|
|
43
|
-
### Sphinx
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
pip install sphinx
|
|
47
|
-
|
|
48
|
-
# Initialize
|
|
49
|
-
sphinx-quickstart
|
|
50
|
-
|
|
51
|
-
# Build
|
|
52
|
-
make html
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### pdoc
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
pip install pdoc
|
|
59
|
-
|
|
60
|
-
# Generate
|
|
61
|
-
pdoc --output-dir docs src/
|
|
62
|
-
pdoc --logo logo.png src/ # With logo
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Go
|
|
68
|
-
|
|
69
|
-
### godoc
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Install
|
|
73
|
-
go install golang.org/x/tools/cmd/godoc@latest
|
|
74
|
-
|
|
75
|
-
# Run locally
|
|
76
|
-
godoc -http=:6060
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### swag (OpenAPI)
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
go install github.com/swaggo/swag/cmd/swag@latest
|
|
83
|
-
|
|
84
|
-
# Generate from annotations
|
|
85
|
-
swag init -g cmd/server/main.go
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## OpenAPI/Swagger
|
|
91
|
-
|
|
92
|
-
### tools
|
|
93
|
-
|
|
94
|
-
- swagger-cli validate
|
|
95
|
-
- @apidevtools/swagger-cli
|
|
96
|
-
- redoc CLI
|
|
97
|
-
|
|
98
|
-
### Annotations Example
|
|
99
|
-
|
|
100
|
-
```javascript
|
|
101
|
-
/**
|
|
102
|
-
* @openapi
|
|
103
|
-
* /users:
|
|
104
|
-
* get:
|
|
105
|
-
* summary: List users
|
|
106
|
-
* responses:
|
|
107
|
-
* 200:
|
|
108
|
-
* description: User list
|
|
109
|
-
* content:
|
|
110
|
-
* application/json:
|
|
111
|
-
* schema:
|
|
112
|
-
* type: array
|
|
113
|
-
* items:
|
|
114
|
-
* $ref: '#/components/schemas/User'
|
|
115
|
-
*/
|
|
116
|
-
```
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Changelog Format
|
|
2
|
-
|
|
3
|
-
## Keep a Changelog
|
|
4
|
-
|
|
5
|
-
Follow: https://keepachangelog.com
|
|
6
|
-
|
|
7
|
-
## Format
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
# Changelog
|
|
11
|
-
|
|
12
|
-
All notable changes to this project will be documented in this file.
|
|
13
|
-
|
|
14
|
-
## [Unreleased]
|
|
15
|
-
|
|
16
|
-
### Added
|
|
17
|
-
- New feature
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
- Changed behavior
|
|
21
|
-
|
|
22
|
-
### Deprecated
|
|
23
|
-
- Soon-to-be removed feature
|
|
24
|
-
|
|
25
|
-
### Removed
|
|
26
|
-
- Now removed feature
|
|
27
|
-
|
|
28
|
-
### Fixed
|
|
29
|
-
- Bug fix
|
|
30
|
-
|
|
31
|
-
### Security
|
|
32
|
-
- Security improvement
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Version Template
|
|
36
|
-
|
|
37
|
-
```markdown
|
|
38
|
-
## [1.0.0] - 2024-01-15
|
|
39
|
-
|
|
40
|
-
### Added
|
|
41
|
-
- Users can now authenticate via OAuth
|
|
42
|
-
- New /api/users/:id endpoint
|
|
43
|
-
|
|
44
|
-
### Changed
|
|
45
|
-
- Authentication now uses JWT tokens
|
|
46
|
-
|
|
47
|
-
### Fixed
|
|
48
|
-
- Fixed race condition in user creation
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Rules
|
|
52
|
-
|
|
53
|
-
1. One version per section
|
|
54
|
-
2. Chronological order (newest first)
|
|
55
|
-
3. Link to issues/pr
|
|
56
|
-
4. Mention breaking changes
|
|
57
|
-
5. Use imperative mood
|
|
58
|
-
|
|
59
|
-
## Example Entry
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
### Added
|
|
63
|
-
- Add user profile endpoint (#123, @username)
|
|
64
|
-
```
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# README Structure
|
|
2
|
-
|
|
3
|
-
## Quick Template
|
|
4
|
-
|
|
5
|
-
```markdown
|
|
6
|
-
# Project Name
|
|
7
|
-
|
|
8
|
-
One-sentence description.
|
|
9
|
-
|
|
10
|
-
[](link)
|
|
11
|
-
[](link)
|
|
12
|
-
[](link)
|
|
13
|
-
|
|
14
|
-
## Features
|
|
15
|
-
|
|
16
|
-
- Feature 1
|
|
17
|
-
- Feature 2
|
|
18
|
-
- Feature 3
|
|
19
|
-
|
|
20
|
-
## Quick Start
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install package-name
|
|
24
|
-
npm start
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Installation
|
|
28
|
-
|
|
29
|
-
### Prerequisites
|
|
30
|
-
|
|
31
|
-
- Node.js 18+
|
|
32
|
-
- npm 9+
|
|
33
|
-
|
|
34
|
-
### Steps
|
|
35
|
-
|
|
36
|
-
1. Clone repo
|
|
37
|
-
2. Install deps: npm install
|
|
38
|
-
3. Configure: cp .env.example .env
|
|
39
|
-
4. Run: npm run dev
|
|
40
|
-
|
|
41
|
-
## Usage
|
|
42
|
-
|
|
43
|
-
```javascript
|
|
44
|
-
const pkg = require('package-name');
|
|
45
|
-
|
|
46
|
-
pkg.doSomething();
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## API
|
|
50
|
-
|
|
51
|
-
See [API Documentation](docs/api.md).
|
|
52
|
-
|
|
53
|
-
## Configuration
|
|
54
|
-
|
|
55
|
-
| Env | Description | Default |
|
|
56
|
-
|-----|-------------|---------|
|
|
57
|
-
| PORT | Server port | 3000 |
|
|
58
|
-
| DB_URL | Database connection | localhost |
|
|
59
|
-
|
|
60
|
-
## Development
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npm run dev # Start dev server
|
|
64
|
-
npm test # Run tests
|
|
65
|
-
npm run lint # Lint
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Contributing
|
|
69
|
-
|
|
70
|
-
1. Fork
|
|
71
|
-
2. Branch: feature/my-feature
|
|
72
|
-
3. Commit
|
|
73
|
-
4. PR
|
|
74
|
-
|
|
75
|
-
## License
|
|
76
|
-
|
|
77
|
-
MIT
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Sections to Include
|
|
81
|
-
|
|
82
|
-
| Section | Required | Description |
|
|
83
|
-
|---------|----------|-------------|
|
|
84
|
-
| Title + Badges | Yes | Project name, version, status |
|
|
85
|
-
| Description | Yes | What it does |
|
|
86
|
-
| Features | Yes | Key capabilities |
|
|
87
|
-
| Quick Start | Yes | 3-5 commands |
|
|
88
|
-
| Installation | No | Detailed setup |
|
|
89
|
-
| Usage | No | Code examples |
|
|
90
|
-
| API | No | For libraries |
|
|
91
|
-
| Configuration | No | Env vars, settings |
|
|
92
|
-
| Development | No | Dev commands |
|
|
93
|
-
| Contributing | No | How to contribute |
|
|
94
|
-
| License | Yes | Open source license |
|