crumbs-spec 0.1.0 → 0.2.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/README.ko.md +58 -27
- package/README.md +117 -86
- package/dist/src/check.js +7 -5
- package/dist/src/check.js.map +1 -1
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/config.js +16 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/dates.js +7 -0
- package/dist/src/dates.js.map +1 -1
- package/dist/src/graph.js +75 -13
- package/dist/src/graph.js.map +1 -1
- package/dist/src/init.js +22 -6
- package/dist/src/init.js.map +1 -1
- package/dist/src/markdown.js +155 -25
- package/dist/src/markdown.js.map +1 -1
- package/dist/src/messages.js +38 -13
- package/dist/src/messages.js.map +1 -1
- package/dist/src/model.js +2 -3
- package/dist/src/model.js.map +1 -1
- package/dist/src/report.js +1 -1
- package/dist/src/report.js.map +1 -1
- package/dist/src/rules/broken-link.js +4 -1
- package/dist/src/rules/broken-link.js.map +1 -1
- package/dist/src/rules/duplicate-policy.js +11 -2
- package/dist/src/rules/duplicate-policy.js.map +1 -1
- package/dist/src/rules/log-body.js +3 -3
- package/dist/src/rules/log-body.js.map +1 -1
- package/dist/src/rules/log-format.js +6 -0
- package/dist/src/rules/log-format.js.map +1 -1
- package/dist/src/rules/missing-backlink.js +4 -1
- package/dist/src/rules/missing-backlink.js.map +1 -1
- package/dist/src/rules/missing-section.js +14 -2
- package/dist/src/rules/missing-section.js.map +1 -1
- package/dist/src/rules/unreachable.js +1 -1
- package/dist/src/rules/unreachable.js.map +1 -1
- package/dist/src/rules/unterminated-comment.js +13 -0
- package/dist/src/rules/unterminated-comment.js.map +1 -0
- package/dist/src/skills.js +12 -1
- package/dist/src/skills.js.map +1 -1
- package/dist/src/templates/en.js +5 -5
- package/dist/src/templates/ko.js +1 -1
- package/dist/src/templates/skills-en.js +14 -13
- package/dist/src/templates/skills-en.js.map +1 -1
- package/dist/src/templates/skills-ko.js +7 -6
- package/dist/src/templates/skills-ko.js.map +1 -1
- package/dist/src/version.js +7 -0
- package/dist/src/version.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,60 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
[한국어](README.ko.md) · **English**
|
|
4
4
|
|
|
5
|
-
crumbs-spec
|
|
5
|
+
[](https://github.com/Sienna94/crumbs-spec/actions/workflows/ci.yml) [](https://www.npmjs.com/package/crumbs-spec)
|
|
6
|
+
|
|
7
|
+
crumbs-spec leaves breadcrumbs (links) on every document so an agent never gets lost, and keeps a **living spec** that leads from the index to the detail document in one path. It describes how the repository behaves *right now* in responsibility-sized documents, checks with one command that those documents are properly linked, and ships the procedures an agent follows to write, find, ask about and ingest them as skills.
|
|
6
8
|
|
|
7
9
|
## Why we built it
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
While we ran dozens of spec documents with agents on a real app repository, the same three things kept happening.
|
|
10
12
|
|
|
11
13
|
1. Specs only survived as change units (per-feature `spec.md`, tickets), so months later there was no document that answered "what is the rule right now?".
|
|
12
14
|
2. Piling them up like a wiki put the same rule into several documents with slightly different wording, and nobody knew which one was right. A later benchmark had an agent find three such contradictions.
|
|
13
15
|
3. When agents read documents they leaned on folder structure and search, so they wandered into other areas or fell back to grep. One question cost eight documents.
|
|
14
16
|
|
|
15
|
-
"Write better documents" did not fix it. We needed **a tool that enforces structure by machine**.
|
|
17
|
+
"Write better documents" did not fix it. We needed **a tool that enforces structure by machine**. When every policy has exactly one owner, the link graph is checked by a machine, and the unknown is written as a question instead of a guess, agents and people reach the document by the same path. So we started scattering breadcrumbs.
|
|
16
18
|
|
|
17
19
|
## How it differs from other tools
|
|
18
20
|
|
|
19
|
-
Spec Kit is good at pre-implementation planning and LLM Wiki at accumulating sources. crumbs-spec
|
|
21
|
+
Spec Kit is good at pre-implementation planning and LLM Wiki at accumulating sources. crumbs-spec fills the gap between them: **the current state that must survive after implementation**. It complements them rather than replacing them.
|
|
20
22
|
|
|
21
23
|
| | GitHub Spec Kit | OpenSpec | Karpathy's LLM Wiki | **crumbs-spec** |
|
|
22
24
|
|---|---|---|---|---|
|
|
23
25
|
| Document unit | One change (feature): `spec.md`, `plan.md`, `tasks.md` | Current-state spec + change deltas | Entity, concept and source-summary pages | **One responsibility (user flow)**. Each policy is owned by exactly one document |
|
|
24
|
-
| Point in time | Before implementation | Before and after | When a source is ingested | **Current
|
|
25
|
-
| Existing code | States that it "does not infer" | Has onboarding, but no code-to-spec drafting | Targets sources, not code | **
|
|
26
|
+
| Point in time | Before implementation | Before and after | When a source is ingested | **Current behavior after implementation** |
|
|
27
|
+
| Existing code | States that it "does not infer" | Has onboarding, but no code-to-spec drafting | Targets sources, not code | **The crumbs-writer skill drafts from code and tests; the unknown becomes a `[needs confirmation]` question** |
|
|
26
28
|
| Navigation | Folders and file names | Folders and file names | Index first | **Index → overview → detail by links only**. No IDs, no front matter |
|
|
27
|
-
| Machine checks | Consistency across spec, plan and tasks |
|
|
28
|
-
| Sync after implementation | The team picks a maintenance model | `archive`/`sync` for the change in hand | Feeds query results back into the wiki | **Agent rule ("update the owning document in the same change, even unasked")
|
|
29
|
+
| Machine checks | Consistency across spec, plan and tasks | `openspec validate` (structure) and delta merge on archive | Orphan page and broken link lint (with LLM judgment) | **16 structural rules**: links, anchors, reachability, backlinks, duplicate policy names, evidence paths, section order, flow diagrams, log format, unterminated comments |
|
|
30
|
+
| Sync after implementation | The team picks a maintenance model | `archive`/`sync` for the change in hand | Feeds query results back into the wiki | **Agent rule ("update the owning document in the same change, even unasked") and a decision log** |
|
|
29
31
|
| Human readability | Prose | Prose | Prose | **Flow diagrams (Mermaid) and branch tables in the template** |
|
|
30
|
-
| Measurement | None | None | None | **Compares navigation cost of two document systems with the same questions** |
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
Kiro specs and BMAD sit close to Spec Kit (per-feature, before implementation) and are not listed separately; the Korean plan document compares all five.
|
|
34
|
+
|
|
35
|
+
From LLM Wiki we kept the raw/wiki/schema split, index-first navigation, the append-only log and human-supervised ingest. Three things are deliberately different: documents are organized by responsibility rather than entity (only concepts that several flows branch on get a page under `concepts/`), documents are maintained by agents but owned by people, and lint is deterministic with no LLM judgment. See section 1 of [docs/IMPLEMENTATION_PLAN.md](docs/IMPLEMENTATION_PLAN.md) (Korean) for the full comparison.
|
|
33
36
|
|
|
34
37
|
## What we cared about
|
|
35
38
|
|
|
36
39
|
- **A single source of truth for the current state.** No change directories. Documents explain "how it behaves now", not "what changed".
|
|
37
|
-
- **No guessing.** A rule not confirmed by code, tests or approved sources is written only as "right now it behaves like this" plus a `[확인 필요]`
|
|
40
|
+
- **No guessing.** A rule not confirmed by code, tests or approved sources is written only as "right now it behaves like this" plus a `[needs confirmation]` (`[확인 필요]` with `lang: ko`) question. `check` reports one `open-question` warning per document that still has questions. Whether a statement is a guess is the skill's rule and the reviewer's job; `check` cannot tell.
|
|
41
|
+
- **One owner per policy, checked at the name level.** `check` rejects the same policy name in two documents (or twice in one). Two policies that say the same thing under different names are not detected; the writer skill's naming rules exist for that.
|
|
38
42
|
- **People-first prose.** No IDs, no status tables, no enforced grammar. Navigation lives in links and headings only.
|
|
39
|
-
- **Deterministic checks, human
|
|
43
|
+
- **Deterministic checks, human judgment.** `check` looks at structure only. Style, content and staleness are for skill guidance and people.
|
|
40
44
|
- **Decisions in one place.** When a question gets its answer, a `decision` entry goes into the log and the document points at it with a single dated link.
|
|
41
45
|
- **Two languages.** `lang` in `crumbs.json` selects the language of the templates, skills, messages and AGENTS block for the whole repository. It defaults to English (`en`); `ko` gives Korean. This README is the English guide.
|
|
42
46
|
|
|
43
|
-
## What happened when we used it
|
|
47
|
+
## What happened when we used it (one run, self-reported)
|
|
48
|
+
|
|
49
|
+
Read this as an anecdote, not a benchmark. It was a single run with 18 questions, graded by the author, the questions were drawn from the existing spec system, the two corpora differ in size (38 documents against about 127), and the raw data comes from a private repository and cannot be published. The roadmap's example app and benchmark runner exist to replace it.
|
|
44
50
|
|
|
45
51
|
We rewrote three areas of a real app repository (about 40,000 lines of code) with the crumbs-writer skill without showing it any existing spec document. Then we asked the same 18 questions of the existing spec system and the crumbs system and let an agent answer from documents only.
|
|
46
52
|
|
|
47
53
|
**Cost of writing from zero** (one agent per domain, three in parallel)
|
|
48
54
|
|
|
49
|
-
| Domain | Code | Documents | Policies
|
|
50
|
-
|
|
51
|
-
| Payment | ~20k lines | 19 | 100
|
|
52
|
-
| Viewer | ~23k lines | 40 | 194
|
|
53
|
-
| Auth | ~10k lines | 35 | 195
|
|
55
|
+
| Domain | Code | Documents | Policies (confirmed / open questions) | Agent tokens | Writing time |
|
|
56
|
+
|---|---|---|---|---|---|
|
|
57
|
+
| Payment | ~20k lines | 19 | 100 (5 / 95) | 570k | 1 h 7 min |
|
|
58
|
+
| Viewer | ~23k lines | 40 | 194 (29 / 165) | 850k | 1 h 7 min |
|
|
59
|
+
| Auth | ~10k lines | 35 | 195 (64 / 131) | 790k | 1 h 13 min |
|
|
54
60
|
|
|
55
|
-
Writing time is the actual working time from the agent transcripts' timestamps, excluding idle gaps longer than ten minutes. With the three domains in parallel everything finished in about 1 h 15 min.
|
|
61
|
+
Writing time is the actual working time from the agent transcripts' timestamps, excluding idle gaps longer than ten minutes. With the three domains in parallel everything finished in about 1 h 15 min. In our own review of the output we found no invented policy, and the six places where the existing spec disagreed with the code were written as the code behaves; that review was done by the author, not independently. The documents were later regrouped by user flow into 38.
|
|
56
62
|
|
|
57
63
|
**Navigation cost on the same 18 questions** (documents only; reading code was forbidden)
|
|
58
64
|
|
|
65
|
+
crumbs-spec answered fewer questions correctly (15 against 17) and read fewer files and tokens.
|
|
66
|
+
|
|
59
67
|
| | Existing spec system | crumbs-spec |
|
|
60
68
|
|---|---|---|
|
|
61
69
|
| Correct answers | 17 / 18 (1 partial) | 15 / 18 (3 partial) |
|
|
@@ -63,7 +71,7 @@ Writing time is the actual working time from the agent transcripts' timestamps,
|
|
|
63
71
|
| Fell back to grep | 3 | 1 |
|
|
64
72
|
| Tokens in total | 2.32M | 1.89M (−18%) |
|
|
65
73
|
|
|
66
|
-
The existing system's partial answer came from failing to find the owning document; the three crumbs partials all reached the owning document in 3–5 files but the writer had dropped details such as screen numbers and channel branches.
|
|
74
|
+
The existing system's partial answer came from failing to find the owning document; the three crumbs partials all reached the owning document in 3–5 files but the writer had dropped details such as screen numbers and channel branches. We added a skill rule for this ("do not drop values that carry a condition"); the benchmark has not been re-run. Note the bias: the questions were drawn from the existing specs, which favors the existing system.
|
|
67
75
|
|
|
68
76
|
## Install and quick start
|
|
69
77
|
|
|
@@ -77,7 +85,7 @@ npx crumbs-spec check # check the link graph and structure
|
|
|
77
85
|
|
|
78
86
|
Korean repositories: pass `--lang ko`.
|
|
79
87
|
|
|
80
|
-
`init` creates these
|
|
88
|
+
`init` creates these files and never overwrites one that exists. With `--skills all` it also writes eight SKILL.md files, and in AGENTS.md it only ever replaces its own block between `<!-- crumbs:start -->` and `<!-- crumbs:end -->`.
|
|
81
89
|
|
|
82
90
|
```
|
|
83
91
|
crumbs.json configuration
|
|
@@ -89,7 +97,9 @@ docs/raw/README.md raw sources directory (read-only)
|
|
|
89
97
|
AGENTS.md crumbs block (agent rules)
|
|
90
98
|
```
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
If `crumbs.json` already exists, `init` keeps its settings and ignores `--spec-dir` and `--lang` (it says so). The last line of `init` is the next command to run: `npx crumbs-spec check`.
|
|
101
|
+
|
|
102
|
+
The package is on npm as [`crumbs-spec`](https://www.npmjs.com/package/crumbs-spec). To run it from a clone instead, use `npm run build` and then `node dist/src/cli.js <command>`.
|
|
93
103
|
|
|
94
104
|
## Adding it to an existing project
|
|
95
105
|
|
|
@@ -105,18 +115,18 @@ The order for a repository that already has code and documents. Start with one d
|
|
|
105
115
|
|
|
106
116
|
3. **Do not migrate existing documents.** The writer treats code and tests as the only sources and does not read existing wikis, design notes or READMEs unless you name them as sources, because there is no way to know whether they still match the code. Copy the ones worth using as evidence (plans, contracts, decision records) into `docs/raw/` and ingest them one at a time with `crumbs-ingest`.
|
|
107
117
|
|
|
108
|
-
4. **Write the first domain from code.** Pick the area people ask about most and hand it to the writer's "document existing code" mode. The `[
|
|
118
|
+
4. **Write the first domain from code.** Pick the area people ask about most and hand it to the writer's "document existing code" mode. The `[needs confirmation]` questions in the result become the list of things a person has to decide for that area.
|
|
109
119
|
|
|
110
120
|
```
|
|
111
121
|
Document the code under src/billing/ with crumbs-writer in "document existing code" mode.
|
|
112
122
|
The domain directory is docs/crumbs/billing/. Leave unconfirmed policies as questions and finish the whole thing.
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
5. **Put `check` in CI.** Fail only on errors (broken links and anchors, unreachable documents, missing backlinks, missing code paths, duplicate policy names) and
|
|
125
|
+
5. **Put `check` in CI.** Fail only on errors (broken links and anchors, unreachable documents, missing backlinks, missing code paths, duplicate policy names) and ignore warnings. Markdown under the spec root that is not a crumbs document yet goes into `exclude` in `crumbs.json`: entries are paths relative to the spec root, an entry ending in `/` excludes that directory, there are no glob patterns, and `check` tells you when a document has none of the required sections.
|
|
116
126
|
|
|
117
127
|
6. **Change the document in the same change as the code.** The AGENTS block tells the agent to "update the owning document in the same change, even when nobody asked", so every PR brings `check` and a log entry with it. The index fills in as domains are added one by one.
|
|
118
128
|
|
|
119
|
-
If you already have a spec system, try asking both systems the same questions. Files read and correct answers show at once which one is easier to navigate
|
|
129
|
+
If you already have a spec system, try asking both systems the same questions. Files read and correct answers show at once which one is easier to navigate.
|
|
120
130
|
|
|
121
131
|
## How a spec gets written
|
|
122
132
|
|
|
@@ -126,10 +136,10 @@ The order the writer skill follows in "document existing code" mode. In "reflect
|
|
|
126
136
|
flowchart TD
|
|
127
137
|
A["Read the index and templates"] --> B["Follow code and tests from the entry point"]
|
|
128
138
|
B --> C["Draw the responsibility boundary: one user flow = one document"]
|
|
129
|
-
C --> D["Write
|
|
139
|
+
C --> D["Write the Current behavior section, steps as ### subheadings"]
|
|
130
140
|
D --> E{"Is the rule confirmed by a test"}
|
|
131
141
|
E -->|yes| F["Write it as a policy"]
|
|
132
|
-
E -->|no| G["Statement of current
|
|
142
|
+
E -->|no| G["Statement of current behavior + [needs confirmation] question"]
|
|
133
143
|
F --> H["Flow diagram and branch tables"]
|
|
134
144
|
G --> H
|
|
135
145
|
H --> I["Evidence paths and mutual related-document links"]
|
|
@@ -154,62 +164,62 @@ docs/specs/concepts/ concepts shared by several domains (optional)
|
|
|
154
164
|
docs/raw/ immutable sources such as contracts and plans
|
|
155
165
|
```
|
|
156
166
|
|
|
157
|
-
The sections of a detail document are fixed. Headings follow `lang` (English by default, Korean with `lang: ko`) and can be renamed through `headings` in `crumbs.json`.
|
|
167
|
+
The sections of a detail document are fixed. Headings follow `lang` (English by default, Korean with `lang: ko`) and can be renamed through `headings` in `crumbs.json`. With `lang: ko` the headings are 목적, 현재 동작, 흐름, 정책, 근거, 확인 필요 사항, 관련 문서.
|
|
158
168
|
|
|
159
169
|
| Section | Content |
|
|
160
170
|
|---|---|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
171
|
+
| Purpose | The one responsibility this document owns and what it does not cover |
|
|
172
|
+
| Current behavior | As the user experiences it, in the present tense; three or more steps become `###` subheadings |
|
|
173
|
+
| Flow | A Mermaid diagram for two or more steps; a table when there are two or more comparison axes |
|
|
174
|
+
| Policies | `### policy name` (unique across the repository) and the rule; if unconfirmed, a statement of current behavior followed by a `[needs confirmation]` question |
|
|
175
|
+
| Evidence | Backticked paths that contain a `/`, each with a description; `check` verifies the path exists |
|
|
176
|
+
| Open questions | `- [needs confirmation] [policy name](#anchor) — question` |
|
|
177
|
+
| Related | Link to the overview and neighboring documents; backlinks must be mutual |
|
|
168
178
|
|
|
169
|
-
Example (`docs/specs/shopping
|
|
179
|
+
Example (`docs/specs/shopping/cart.md`):
|
|
170
180
|
|
|
171
181
|
````markdown
|
|
172
|
-
#
|
|
173
|
-
<!-- ../index.md
|
|
182
|
+
# Cart
|
|
183
|
+
<!-- Read ../index.md first. After changing this document, add an entry to ../log.md -->
|
|
174
184
|
|
|
175
|
-
##
|
|
176
|
-
|
|
185
|
+
## Purpose
|
|
186
|
+
Owns the flow from adding an item to changing its quantity and emptying the cart. Coupon application is owned by [Coupon discount](coupon-discount.md).
|
|
177
187
|
|
|
178
|
-
##
|
|
179
|
-
-
|
|
180
|
-
-
|
|
188
|
+
## Current behavior
|
|
189
|
+
- When the user adds the same item again, the app adds the quantities.
|
|
190
|
+
- When the quantity would exceed 99, the app shows "You can add up to 99 of this item." and does not add it.
|
|
181
191
|
|
|
182
|
-
##
|
|
192
|
+
## Flow
|
|
183
193
|
```mermaid
|
|
184
194
|
flowchart TD
|
|
185
|
-
A["
|
|
186
|
-
B
|
|
187
|
-
B
|
|
188
|
-
C --> E{"99
|
|
189
|
-
E
|
|
195
|
+
A["Add item"] --> B{"Already in cart?"}
|
|
196
|
+
B -->|yes| C["Add quantities"]
|
|
197
|
+
B -->|no| D["New line"]
|
|
198
|
+
C --> E{"More than 99?"}
|
|
199
|
+
E -->|yes| F["Show notice, do not add"]
|
|
190
200
|
```
|
|
191
201
|
|
|
192
|
-
##
|
|
193
|
-
###
|
|
194
|
-
|
|
202
|
+
## Policies
|
|
203
|
+
### Quantity cap
|
|
204
|
+
A cart line holds at most 99 of one item.
|
|
195
205
|
|
|
196
|
-
###
|
|
197
|
-
|
|
198
|
-
[
|
|
206
|
+
### Minimum order amount
|
|
207
|
+
Right now the checkout button is disabled when the total is under 10,000 KRW.
|
|
208
|
+
[needs confirmation] Where does the 10,000 KRW threshold come from?
|
|
199
209
|
|
|
200
|
-
##
|
|
201
|
-
- `src/cart/cart.ts:12-48` —
|
|
202
|
-
- `test/cart/cart.test.ts` —
|
|
210
|
+
## Evidence
|
|
211
|
+
- `src/cart/cart.ts:12-48` — adding and quantity merge
|
|
212
|
+
- `test/cart/cart.test.ts` — quantity cap
|
|
203
213
|
|
|
204
|
-
##
|
|
205
|
-
- [
|
|
214
|
+
## Open questions
|
|
215
|
+
- [needs confirmation] [Minimum order amount](#minimum-order-amount) — Where does the 10,000 KRW threshold come from?
|
|
206
216
|
|
|
207
|
-
##
|
|
208
|
-
- [
|
|
209
|
-
- [
|
|
217
|
+
## Related
|
|
218
|
+
- [Shopping overview](overview.md)
|
|
219
|
+
- [Coupon discount](coupon-discount.md)
|
|
210
220
|
````
|
|
211
221
|
|
|
212
|
-
The overview's
|
|
222
|
+
The overview's "Terms" section is a list of aliases linked to the owning policy (`- Subscription pass(flat-rate pass) — [Pass active check](pass.md#pass-active-check)`). A term that is only a definition stops there; only concepts that several flows branch on (channel, currency, member state) get an owning document under `concepts/`.
|
|
213
223
|
|
|
214
224
|
## Commands
|
|
215
225
|
|
|
@@ -224,28 +234,32 @@ Common options are `--root <dir>` (repository root, default: current directory),
|
|
|
224
234
|
`check` prints one line per finding as `file:line severity rule: message`, and a summary last.
|
|
225
235
|
|
|
226
236
|
```
|
|
227
|
-
docs/specs/shopping
|
|
228
|
-
docs/specs/shopping
|
|
237
|
+
docs/specs/shopping/cart.md:34 error broken-anchor: anchor not found: coupon-discount.md#application-order
|
|
238
|
+
docs/specs/shopping/cart.md:20 warning open-question: 1 open question(s)
|
|
229
239
|
|
|
230
|
-
crumbs check:
|
|
240
|
+
crumbs check: 4 documents, 1 error, 1 warning
|
|
231
241
|
```
|
|
232
242
|
|
|
243
|
+
**Supported Markdown.** Headings must be ATX (`#` to `######`); setext headings are not recognized. Inline links and reference links (`[text][label]`, and `[label][]` with a `[label]: path` definition) are checked; a shortcut reference such as `[label]` alone is not a link. Heading anchors follow github-slugger: each space becomes `-`, punctuation other than `-` and `_` is dropped, and nothing is collapsed, so `### Quantity & limits` becomes `#quantity--limits`. Symlinked files and directories under the spec root are followed. An evidence path must contain a `/`, so a repository-root file is written `./package.json`; line suffixes such as `:12`, `:12-48`, `:12:5` and `:12-48,60-70` are accepted. Entries in `exclude` are paths relative to the spec root, and an entry ending in `/` excludes that directory. Every finding carries a `line` (1 when there is no better position), so JSON output always includes it.
|
|
244
|
+
|
|
233
245
|
### Check rules
|
|
234
246
|
|
|
235
247
|
| Rule | Severity | What it catches |
|
|
236
248
|
|---|---|---|
|
|
237
249
|
| `index-missing` | error | The index document is missing (no other rule runs) |
|
|
238
250
|
| `missing-title` | error | The first heading is not an H1 |
|
|
239
|
-
| `broken-link`
|
|
251
|
+
| `broken-link` | error | The link target file does not exist, or its spelling differs from the file on disk |
|
|
252
|
+
| `broken-anchor` | error | The link points to a heading that does not exist |
|
|
240
253
|
| `unreachable` | error | A document that cannot be reached from the index by links |
|
|
241
254
|
| `missing-section` | error | A required section for the role is missing |
|
|
242
255
|
| `missing-backlink` | error | No link back to the parent (overview or index), or a detail A→B link without B→A |
|
|
243
256
|
| `missing-code-path` | error | An evidence code path does not exist |
|
|
244
|
-
| `duplicate-policy` | error | The same policy name appears in two documents |
|
|
245
|
-
| `log-format` | error | A log entry is not in the form `## [YYYY-MM-DD] kind \| title
|
|
246
|
-
| `
|
|
257
|
+
| `duplicate-policy` | error | The same policy name appears in two documents, or twice in one |
|
|
258
|
+
| `log-format` | error | A log entry is not in the form `## [YYYY-MM-DD] kind \| title`, or the date is more than a day in the future |
|
|
259
|
+
| `unterminated-comment` | error | An HTML comment is opened and never closed, hiding the rest of the document |
|
|
260
|
+
| `open-question` | warning | One warning per document that still has open questions (the count is the number of questions) |
|
|
247
261
|
| `log-order` | warning | Log dates are out of order |
|
|
248
|
-
| `missing-flow` | warning | Current
|
|
262
|
+
| `missing-flow` | warning | Current behavior has six or more steps but no diagram or table |
|
|
249
263
|
| `section-order` | warning | Sections are not in template order |
|
|
250
264
|
| `log-body` | warning | A `decision` entry has no document link |
|
|
251
265
|
|
|
@@ -254,20 +268,22 @@ crumbs check: 문서 4개, 오류 1개, 경고 1개
|
|
|
254
268
|
The log is appended in one place (`docs/specs/log.md`) in chronological order. The title is **one sentence about the user outcome**, not the task name, and the body has three lines.
|
|
255
269
|
|
|
256
270
|
```bash
|
|
257
|
-
npx crumbs-spec log add --kind change "
|
|
258
|
-
--body "
|
|
271
|
+
npx crumbs-spec log add --kind change "Cart quantity cap raised to 99" \
|
|
272
|
+
--body "Result: a cart line holds up to 99. Reason: request SHOP-42. Document: [Quantity cap](shopping/cart.md#quantity-cap)"
|
|
259
273
|
```
|
|
260
274
|
|
|
261
|
-
|
|
275
|
+
`log add` refuses titles or bodies that contain `<!--`.
|
|
276
|
+
|
|
277
|
+
When a `[needs confirmation]` question gets its answer, add a `decision` entry and put one decision link at the end of the confirmed policy. Instead of change-history tables inside documents, decisions accumulate in the log and documents only point at them. The slug drops the brackets, `|`, comma and colon, so the `|` leaves a double dash in the anchor.
|
|
262
278
|
|
|
263
279
|
```markdown
|
|
264
|
-
## [2026-11-02] decision |
|
|
265
|
-
|
|
280
|
+
## [2026-11-02] decision | Minimum order amount: 10,000 KRW comes from the shipping fee policy
|
|
281
|
+
Result: the checkout button is disabled below 10,000 KRW. Reason: 2026-11-02 planning review. Document: [Minimum order amount](shopping/cart.md#minimum-order-amount)
|
|
266
282
|
```
|
|
267
283
|
|
|
268
284
|
```markdown
|
|
269
|
-
###
|
|
270
|
-
|
|
285
|
+
### Minimum order amount
|
|
286
|
+
The checkout button is disabled when the total is under 10,000 KRW. (decision: [2026-11-02](../log.md#2026-11-02-decision--minimum-order-amount-10000-krw-comes-from-the-shipping-fee-policy))
|
|
271
287
|
```
|
|
272
288
|
|
|
273
289
|
The kinds are `ingest` (a source was applied), `query` (an answer fed back), `lint`, `drift`, `change` (a document changed) and `decision` (a question was settled).
|
|
@@ -276,6 +292,8 @@ The kinds are `ingest` (a source was applied), `query` (an answer fed back), `li
|
|
|
276
292
|
|
|
277
293
|
`init --skills` installs the procedures an agent follows into `.claude/skills/<name>/SKILL.md` (Claude Code) and `.agents/skills/<name>/SKILL.md` (Codex). An existing `SKILL.md` is never overwritten; delete it and run `init --skills` again to upgrade. Claude Code reads the crumbs block only when `CLAUDE.md` contains `@AGENTS.md`.
|
|
278
294
|
|
|
295
|
+
Each generated SKILL.md starts with a comment naming the crumbs-spec version that produced it. Skills and templates follow the package version: a minor release may change their text, a patch release does not. To upgrade, delete the file and run `init --skills` again.
|
|
296
|
+
|
|
279
297
|
| Skill | What it does |
|
|
280
298
|
|---|---|
|
|
281
299
|
| `crumbs-writer` | Writes or updates documents in two modes: "reflect a change" (changed code → owning document) and "document existing code" (first draft from code and tests only). Carries the rules for responsibility size, style, question format, flow diagrams and concept pages |
|
|
@@ -292,13 +310,13 @@ Document the code under src/cart/ with crumbs-writer in "document existing code"
|
|
|
292
310
|
The domain directory is docs/specs/shopping/. Leave unconfirmed policies as questions and finish the whole thing.
|
|
293
311
|
```
|
|
294
312
|
|
|
295
|
-
The agent reads the index and templates, follows code and tests from the entry point, and produces `shopping/overview.md` plus the detail documents. Rules confirmed by tests become policies; rules that exist only in code become "right now …" statements with `[
|
|
313
|
+
The agent reads the index and templates, follows code and tests from the entry point, and produces `shopping/overview.md` plus the detail documents. Rules confirmed by tests become policies; rules that exist only in code become "right now …" statements with `[needs confirmation]` questions. It ends by running `check`, clearing errors and adding a log entry.
|
|
296
314
|
|
|
297
315
|
```
|
|
298
|
-
crumbs check:
|
|
316
|
+
crumbs check: 5 documents, 0 errors, 3 warnings
|
|
299
317
|
```
|
|
300
318
|
|
|
301
|
-
The warnings are the
|
|
319
|
+
The three warnings are the three documents that still have open questions. Skimming their "Open questions" sections is enough to see what has to be decided.
|
|
302
320
|
|
|
303
321
|
### 2. Reflect a code change
|
|
304
322
|
|
|
@@ -306,7 +324,7 @@ The warnings are the questions left behind. Skimming the open-questions section
|
|
|
306
324
|
I raised the cart quantity limit from 99 to 199. Update the docs.
|
|
307
325
|
```
|
|
308
326
|
|
|
309
|
-
The writer finds the owning document with `grep -rl 'src/cart/cart.ts' docs/specs` (the evidence section names the path), fixes the current-
|
|
327
|
+
The writer finds the owning document with `grep -rl 'src/cart/cart.ts' docs/specs` (the evidence section names the path), fixes the current-behavior section and the `### Quantity cap` policy, updates the value in the flow diagram, and logs `change | Cart quantity cap raised to 199`. If two documents look like owners it stops and asks which one is.
|
|
310
328
|
|
|
311
329
|
### 3. Ask about what is unknown and record the answer as a decision
|
|
312
330
|
|
|
@@ -330,12 +348,21 @@ The ingest skill reads the source, finds the affected documents through the inde
|
|
|
330
348
|
How many items can go into the cart?
|
|
331
349
|
```
|
|
332
350
|
|
|
333
|
-
The finder goes index → shopping overview → cart document and answers with `###
|
|
351
|
+
The finder goes index → shopping overview → cart document and answers with `### Quantity cap` as the source. For term or concept questions it checks the terms section of `concepts/overview.md` first. If the documents do not answer, it says "not in the documents" and names the closest one.
|
|
334
352
|
|
|
335
353
|
### 6. Check in CI
|
|
336
354
|
|
|
355
|
+
A GitHub Actions job that fails on errors:
|
|
356
|
+
|
|
337
357
|
```yaml
|
|
338
|
-
|
|
358
|
+
jobs:
|
|
359
|
+
specs:
|
|
360
|
+
runs-on: ubuntu-latest
|
|
361
|
+
steps:
|
|
362
|
+
- uses: actions/checkout@v4
|
|
363
|
+
- uses: actions/setup-node@v4
|
|
364
|
+
with: { node-version: 20 }
|
|
365
|
+
- run: npx crumbs-spec check --format json > crumbs-report.json
|
|
339
366
|
```
|
|
340
367
|
|
|
341
368
|
Exit code 1 means there are errors. Warnings (`open-question`, `missing-flow` and so on) do not fail the build.
|
|
@@ -353,7 +380,11 @@ Exit code 1 means there are errors. Warnings (`open-question`, `missing-flow` an
|
|
|
353
380
|
- Requirement IDs, front matter and enforced grammar such as EARS. Navigation lives in links and headings only.
|
|
354
381
|
- Change-history tables inside documents and one file per decision. Decisions go into the single log and documents point at them.
|
|
355
382
|
- Definition-only term pages. The overview's terms section is enough.
|
|
356
|
-
- Style and content
|
|
383
|
+
- Style and content judgment in `check`. Style is handled by the skill guidance and the markdownlint sample under [docs/lint/](docs/lint/README.md).
|
|
384
|
+
|
|
385
|
+
## Tests and compatibility
|
|
386
|
+
|
|
387
|
+
`npm test` runs the node:test suite on Linux and macOS in CI (see `.github/workflows/ci.yml`). Changes are listed in [CHANGELOG.md](CHANGELOG.md). Until 1.0, a minor version may change check rules, templates and skill text; a patch version only fixes bugs.
|
|
357
388
|
|
|
358
389
|
## Roadmap
|
|
359
390
|
|
package/dist/src/check.js
CHANGED
|
@@ -14,21 +14,23 @@ import { missingSection } from './rules/missing-section.js';
|
|
|
14
14
|
import { openQuestion } from './rules/open-question.js';
|
|
15
15
|
import { sectionOrder } from './rules/section-order.js';
|
|
16
16
|
import { unreachable } from './rules/unreachable.js';
|
|
17
|
+
import { unterminatedComment } from './rules/unterminated-comment.js';
|
|
17
18
|
import { finding } from './model.js';
|
|
18
|
-
// 모든 문서는 첫 제목이 H1이어야 한다.
|
|
19
|
+
// 모든 문서는 첫 제목이 H1이어야 한다. 제목이 없는 문서는 1줄을 가리킨다.
|
|
19
20
|
function missingTitle(graph) {
|
|
20
21
|
return graph.docs
|
|
21
22
|
.filter((doc) => doc.headings[0]?.level !== 1)
|
|
22
|
-
.map((doc) => finding('missing-title', 'error', doc.file, MESSAGES[graph.lang].h1Title, doc.headings[0]?.line));
|
|
23
|
+
.map((doc) => finding('missing-title', 'error', doc.file, MESSAGES[graph.lang].h1Title, doc.headings[0]?.line ?? 1));
|
|
23
24
|
}
|
|
24
25
|
function checkGraph(graph) {
|
|
25
26
|
if (graph.index === undefined) {
|
|
26
27
|
const indexPath = relPath(graph.root, graph.indexAbs);
|
|
27
28
|
// 인덱스가 없으면 다른 규칙은 돌리지 않는다.
|
|
28
|
-
return [finding('index-missing', 'error', indexPath, MESSAGES[graph.lang].indexMissing(indexPath))];
|
|
29
|
+
return [finding('index-missing', 'error', indexPath, MESSAGES[graph.lang].indexMissing(indexPath), 1)];
|
|
29
30
|
}
|
|
30
31
|
return [
|
|
31
32
|
...missingTitle(graph),
|
|
33
|
+
...unterminatedComment(graph),
|
|
32
34
|
...brokenLink(graph),
|
|
33
35
|
...brokenAnchor(graph),
|
|
34
36
|
...unreachable(graph),
|
|
@@ -45,10 +47,10 @@ function checkGraph(graph) {
|
|
|
45
47
|
];
|
|
46
48
|
}
|
|
47
49
|
const compareText = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
48
|
-
// file, line
|
|
50
|
+
// file, line, rule, message 순으로 정렬한다.
|
|
49
51
|
function sortFindings(findings) {
|
|
50
52
|
return [...findings].sort((a, b) => compareText(a.file, b.file) ||
|
|
51
|
-
|
|
53
|
+
a.line - b.line ||
|
|
52
54
|
compareText(a.rule, b.rule) ||
|
|
53
55
|
compareText(a.message, b.message));
|
|
54
56
|
}
|
package/dist/src/check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0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AAC;AAED,sFAAsF;AACtF,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,UAAmB,EAAE,QAAe;IAC1E,OAAO,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/src/cli.js
CHANGED
|
@@ -116,6 +116,8 @@ function logAdd(root, values, args, lang) {
|
|
|
116
116
|
const body = values.body === undefined ? undefined : normalizeLogBody(values.body);
|
|
117
117
|
if (body !== undefined && hasHeadingLine(body))
|
|
118
118
|
throw new UsageError(m.bodyHeading, lang);
|
|
119
|
+
if (rawTitle.includes('<!--') || (body ?? '').includes('<!--'))
|
|
120
|
+
throw new UsageError(m.commentForbidden, lang);
|
|
119
121
|
const config = loadRepoConfig(root, values.config, lang);
|
|
120
122
|
assertLogDocument(root, config);
|
|
121
123
|
rejectForeignOptions(values, LOG_ADD_OPTIONS, config.lang);
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAa,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAiB,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,UAA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AG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;YAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;QACpF,CAAC;aAAM,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;YACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9F,CAAC;QACD,IAAI,GAAG,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/src/config.js
CHANGED
|
@@ -10,6 +10,17 @@ const TOP_LEVEL_KEYS = ['version', 'specDir', 'index', 'overview', 'log', 'lang'
|
|
|
10
10
|
function normRel(path) {
|
|
11
11
|
return posix.normalize(path).replace(/\/+$/, '') || '.';
|
|
12
12
|
}
|
|
13
|
+
// 저장소 루트 밖을 가리키는 값(.., 절대 경로, 드라이브 문자)인지 본다.
|
|
14
|
+
function isOutsideRoot(rel) {
|
|
15
|
+
return rel === '..' || rel.startsWith('../') || posix.isAbsolute(rel) || /^[A-Za-z]:/.test(rel);
|
|
16
|
+
}
|
|
17
|
+
// exclude 항목을 스펙 루트 기준 정규화 경로로 만든다. 끝의 "/"는 디렉터리 항목이라는 뜻이므로 남긴다.
|
|
18
|
+
function normExclude(m, entry) {
|
|
19
|
+
const path = posix.normalize(entry).replace(/^(\.\/)+/, '');
|
|
20
|
+
if (path === '' || path === '.' || isOutsideRoot(path))
|
|
21
|
+
fail(m, 'exclude', m.reasonRelativePath);
|
|
22
|
+
return path;
|
|
23
|
+
}
|
|
13
24
|
export function defaultConfig(specDir, lang = 'en') {
|
|
14
25
|
return {
|
|
15
26
|
version: 1,
|
|
@@ -63,6 +74,8 @@ function validate(raw, fallback) {
|
|
|
63
74
|
const specDir = normRel(optString(m, raw, 'specDir', 'docs/specs'));
|
|
64
75
|
if (specDir === '.')
|
|
65
76
|
fail(m, 'specDir', m.reasonDot);
|
|
77
|
+
if (isOutsideRoot(specDir))
|
|
78
|
+
fail(m, 'specDir', m.reasonInsideRoot);
|
|
66
79
|
const index = optString(m, raw, 'index', 'index.md');
|
|
67
80
|
const overview = optString(m, raw, 'overview', 'overview.md');
|
|
68
81
|
const log = optString(m, raw, 'log', 'log.md');
|
|
@@ -88,12 +101,14 @@ function validate(raw, fallback) {
|
|
|
88
101
|
if (!Array.isArray(value) || !value.every((item) => typeof item === 'string')) {
|
|
89
102
|
fail(m, 'exclude', m.reasonStringArray);
|
|
90
103
|
}
|
|
91
|
-
exclude = value;
|
|
104
|
+
exclude = value.map((entry) => normExclude(m, entry));
|
|
92
105
|
}
|
|
93
106
|
const codeRoot = optString(m, raw, 'codeRoot', '.');
|
|
94
107
|
const rawDir = normRel(optString(m, raw, 'rawDir', 'docs/raw'));
|
|
95
108
|
if (rawDir === '.')
|
|
96
109
|
fail(m, 'rawDir', m.reasonDot);
|
|
110
|
+
if (isOutsideRoot(rawDir))
|
|
111
|
+
fail(m, 'rawDir', m.reasonInsideRoot);
|
|
97
112
|
if (rawDir === specDir || rawDir.startsWith(`${specDir}/`))
|
|
98
113
|
fail(m, 'rawDir', m.reasonInsideSpec);
|
|
99
114
|
return {
|
package/dist/src/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":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