@erclx/aitk 0.56.0 → 0.58.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/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/claude-groundwork/SKILL.md +4 -14
- package/claude/skills/claude-intake/SKILL.md +5 -37
- package/docs/agents/scripting.md +21 -9
- package/governance/rules/claude/556-groundwork.md +16 -0
- package/governance/rules/claude/557-intake.md +16 -0
- package/governance/stacks/base.toml +3 -1
- package/package.json +1 -1
- package/scripts/core/regen-hero.sh +25 -5
- package/scripts/core/verify.sh +55 -0
- package/src/commands/gov.ts +79 -4
- package/src/gov/install.ts +32 -15
- package/src/gov/list.ts +106 -0
- package/src/gov/stacks.ts +55 -6
- package/standards/groundwork.md +199 -0
- package/standards/index.md +2 -0
- package/{claude/skills/claude-intake/references/folder-format.md → standards/intake.md} +92 -9
- package/standards/rule.md +9 -0
- package/claude/skills/claude-groundwork/references/folder-format.md +0 -107
- package/scripts/gov/list.sh +0 -234
package/src/gov/stacks.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs'
|
|
2
|
-
import { join } from 'node:path'
|
|
1
|
+
import { existsSync, readFileSync, statSync } from 'node:fs'
|
|
2
|
+
import { basename, join } from 'node:path'
|
|
3
|
+
import { listRuleSourcePaths, rulesSourceDir } from '@/gov/install'
|
|
3
4
|
|
|
4
5
|
export interface GovStack {
|
|
5
6
|
readonly name: string
|
|
@@ -64,11 +65,33 @@ export function loadGovStack(
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Expands one stack entry. An entry naming a directory under
|
|
70
|
+
* `governance/rules/` resolves to every rule inside it, sorted, and any other
|
|
71
|
+
* entry resolves to itself, so a folder and a slug reach the caller as one
|
|
72
|
+
* shape rather than two the caller has to tell apart.
|
|
73
|
+
*
|
|
74
|
+
* The directory wins over a rule file of the same name. They cannot collide
|
|
75
|
+
* while `standards/rule.md` requires a numeric prefix on a rule slug, since a
|
|
76
|
+
* band folder carries none.
|
|
77
|
+
*/
|
|
78
|
+
export function expandStackEntry(root: string, entry: string): string[] {
|
|
79
|
+
const dir = join(rulesSourceDir(root), entry)
|
|
80
|
+
if (!existsSync(dir) || !statSync(dir).isDirectory()) return [entry]
|
|
81
|
+
|
|
82
|
+
return [...new Bun.Glob('**/*.md').scanSync({ cwd: dir, onlyFiles: true })]
|
|
83
|
+
.sort()
|
|
84
|
+
.map((rel) => basename(rel, '.md'))
|
|
85
|
+
}
|
|
86
|
+
|
|
67
87
|
/**
|
|
68
88
|
* Walks `extends` ancestors first, then the stack's own rules, deduped by
|
|
69
89
|
* first appearance. Tooling's `resolveChain` returns full manifests nearest
|
|
70
90
|
* first and carries `skipStack` truncation, so the two walks stay separate
|
|
71
91
|
* rather than fitting one shape to both.
|
|
92
|
+
*
|
|
93
|
+
* Dedupe runs on expanded names rather than on the entries, so a stack naming
|
|
94
|
+
* a folder and an ancestor naming a rule inside it yield that rule once.
|
|
72
95
|
*/
|
|
73
96
|
export function resolveRules(root: string, stack: string): RuleResolution {
|
|
74
97
|
const rules: string[] = []
|
|
@@ -87,10 +110,12 @@ export function resolveRules(root: string, stack: string): RuleResolution {
|
|
|
87
110
|
if (missing !== undefined) return missing
|
|
88
111
|
}
|
|
89
112
|
|
|
90
|
-
for (const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
113
|
+
for (const entry of loaded.rules) {
|
|
114
|
+
for (const rule of expandStackEntry(root, entry)) {
|
|
115
|
+
if (seen.has(rule)) continue
|
|
116
|
+
seen.add(rule)
|
|
117
|
+
rules.push(rule)
|
|
118
|
+
}
|
|
94
119
|
}
|
|
95
120
|
|
|
96
121
|
return undefined
|
|
@@ -102,6 +127,30 @@ export function resolveRules(root: string, stack: string): RuleResolution {
|
|
|
102
127
|
return { ok: true, rules }
|
|
103
128
|
}
|
|
104
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Names every rule no stack reaches, sorted. A rule outside every stack still
|
|
132
|
+
* installs through `--add`, so this reports an opt-in library and an oversight
|
|
133
|
+
* alike and leaves telling them apart to the reader.
|
|
134
|
+
*
|
|
135
|
+
* A stack whose `extends` does not resolve contributes nothing rather than
|
|
136
|
+
* aborting the sweep, or one broken stack would report the whole catalog as
|
|
137
|
+
* unreferenced.
|
|
138
|
+
*/
|
|
139
|
+
export function unreferencedRules(root: string): string[] {
|
|
140
|
+
const reached = new Set<string>()
|
|
141
|
+
|
|
142
|
+
for (const stack of listGovStacks(root)) {
|
|
143
|
+
const resolution = resolveRules(root, stack)
|
|
144
|
+
if (!resolution.ok) continue
|
|
145
|
+
for (const rule of resolution.rules) reached.add(rule)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return listRuleSourcePaths(root)
|
|
149
|
+
.map((rel) => basename(rel, '.md'))
|
|
150
|
+
.filter((rule) => !reached.has(rule))
|
|
151
|
+
.sort()
|
|
152
|
+
}
|
|
153
|
+
|
|
105
154
|
/**
|
|
106
155
|
* Layers `--add` names on top of a resolved stack. The bash trimmed a single
|
|
107
156
|
* leading and trailing space per entry; trimming fully is the same result for
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Groundwork reference
|
|
3
|
+
description: Folder layout, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Groundwork reference
|
|
7
|
+
|
|
8
|
+
Applies to a groundwork track at `.claude/groundwork/<slug>/`. A track measures one question that has to be settled before anyone can plan against it. The numbering is the table of contents, so a reader opens the folder and knows where to start and what follows without an index maintained inside each file.
|
|
9
|
+
|
|
10
|
+
The folder is gitignored and unbacked. No check reaches its contents and no history recovers a deleted one, so every rule here holds only while a session reads it, and the handoff file has to be self-contained.
|
|
11
|
+
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
Governs a groundwork track under `.claude/groundwork/<slug>/`: folder layout, reserved numbering, frontmatter and dating, what each required file holds, and the conventions a track keeps.
|
|
15
|
+
|
|
16
|
+
Does not govern:
|
|
17
|
+
|
|
18
|
+
- A dump of many findings filed by domain, each carrying its own verdict: `intake.md`
|
|
19
|
+
- The task file a closing track writes, and the origin line pointing back at the folder: `tasks.md`
|
|
20
|
+
- Voice and word choice: `prose.md`
|
|
21
|
+
- Headings, punctuation, and file references: `markdown.md`
|
|
22
|
+
- When a project opens a track at all, and the procedure that runs one, which belong to the surface driving it
|
|
23
|
+
|
|
24
|
+
## What a working track looks like
|
|
25
|
+
|
|
26
|
+
A track works when a session that has never seen it re-enters from the folder alone and can answer each of these:
|
|
27
|
+
|
|
28
|
+
- Which single question is being measured, and why is it running now?
|
|
29
|
+
- What is the current state, measured during this pass rather than carried in from an earlier one?
|
|
30
|
+
- Which questions are still open, where does the evidence point, and what would overturn that?
|
|
31
|
+
- What was decided, and what was considered and dropped?
|
|
32
|
+
|
|
33
|
+
A track failing these is non-conforming even when it satisfies every shape rule below.
|
|
34
|
+
|
|
35
|
+
## Frontmatter and dating
|
|
36
|
+
|
|
37
|
+
Every file carries `title` and `description`. `README.md` carries one field the others do not.
|
|
38
|
+
|
|
39
|
+
- `title` (required): the track subject in sentence case
|
|
40
|
+
- `description` (required): one line naming what the track measures
|
|
41
|
+
- `date` (required, `README.md` only): the day the folder opened, as `YYYY-MM-DD`
|
|
42
|
+
|
|
43
|
+
Carry the opening date as a frontmatter field rather than a sentence in the body. A date written into prose is readable by a person and by nothing that walks the folder, and the two spellings drift once both are permitted. State it once and remove the body sentence rather than leaving the pair in place.
|
|
44
|
+
|
|
45
|
+
Date the folder once rather than every file. A per-file date leaves every other file stale the first time one is edited, while the opening date never rots. The checkable half is the commit each measurement was taken against, which the file holding that measurement names.
|
|
46
|
+
|
|
47
|
+
## Reserved numbers
|
|
48
|
+
|
|
49
|
+
Five slots carry a fixed meaning. The rest are free, which is what lets the middle of a folder follow its subject.
|
|
50
|
+
|
|
51
|
+
| Number | Holds | Required |
|
|
52
|
+
| ------------ | ----------------------------------------------- | --------------------------- |
|
|
53
|
+
| `00` | Scope: constraints, risks, question list | Large tracks only |
|
|
54
|
+
| `01` | Current state, measured | Always |
|
|
55
|
+
| `02` to `05` | Topic files, whatever the subject demands | As needed |
|
|
56
|
+
| `06` | Decision | To close |
|
|
57
|
+
| `07` | Handoff, self-contained | To close |
|
|
58
|
+
| `08` | Spikes: method, result, and cost per experiment | Tracks that run experiments |
|
|
59
|
+
|
|
60
|
+
A folder missing `06` and `07` is live. That is the only status marker, and no separate tracking is needed.
|
|
61
|
+
|
|
62
|
+
`08` sits after the closing files because it is an appendix. It holds evidence rather than a topic, so folding it into the `02` to `05` range buries it, and a track closes with or without one.
|
|
63
|
+
|
|
64
|
+
## README.md
|
|
65
|
+
|
|
66
|
+
Orients. Holds no findings.
|
|
67
|
+
|
|
68
|
+
- A one-line definition of the investigation
|
|
69
|
+
- A `## Why` section stating why the track is running now
|
|
70
|
+
- A file-map table of filename and what it holds, kept current as files are added or retired
|
|
71
|
+
- A `## Method` section splitting internal sources from external ones, naming which were used and which were not yet done, and listing under a leads heading any external source found but not opened
|
|
72
|
+
- A `## Prior art` section
|
|
73
|
+
- A `## Source citation` section stating the rule below, so a returning session picks it up from the folder
|
|
74
|
+
- The phase stated out loud in the first three lines, in the form `Groundwork phase. Nothing here is a feature plan.`
|
|
75
|
+
|
|
76
|
+
The file map is how a returning reader re-enters. After the decision, it is the highest-value thing in the folder.
|
|
77
|
+
|
|
78
|
+
Every claim about a source outside the project carries a link to it, wherever the claim appears in the folder. A sentence asserting that a vendor documents something reads the same whether it came from a fetched page or from recall, and a later reader can neither check it nor tell the two apart.
|
|
79
|
+
|
|
80
|
+
A source found and not read is listed as a lead and is never cited. That half is what keeps the rule from producing citation theater, because a link attached to a page nobody opened is worse than no link. Listing it still pays, since it stops a later pass re-searching for what this one already surfaced.
|
|
81
|
+
|
|
82
|
+
Where the track supersedes an earlier plan or an earlier folder, name it and say not to go looking for it. Without that, the old reasoning keeps circulating.
|
|
83
|
+
|
|
84
|
+
## 01-current-state.md
|
|
85
|
+
|
|
86
|
+
Facts before opinion. Verified measurement only, taken during this pass.
|
|
87
|
+
|
|
88
|
+
- Never carry a figure from a previous session without re-measuring. Stale ratios survive a sunset that invalidates them, and every number built on one is quietly wrong.
|
|
89
|
+
- Mark an inference as an inference where one is unavoidable.
|
|
90
|
+
- Measure only what an open question needs. A number with no question attached is the mechanism by which the groundwork becomes the work.
|
|
91
|
+
|
|
92
|
+
## 00-scope.md
|
|
93
|
+
|
|
94
|
+
Written when the subject is large enough to run away. Holds constraints, risks, the open question list, and the downstream surfaces a decision would touch. A small track skips it and carries its questions inside the topic files.
|
|
95
|
+
|
|
96
|
+
## 06-decision.md
|
|
97
|
+
|
|
98
|
+
Closes the folder. Everything above it is input.
|
|
99
|
+
|
|
100
|
+
- The problem stated once
|
|
101
|
+
- The goal
|
|
102
|
+
- The items to do
|
|
103
|
+
- What was considered and dropped
|
|
104
|
+
|
|
105
|
+
The dropped list pays off later. It is what stops a future session re-proposing something already rejected.
|
|
106
|
+
|
|
107
|
+
## 07-next-session.md
|
|
108
|
+
|
|
109
|
+
Written to survive a compaction that loses the conversation. It repeats facts held elsewhere in the folder rather than pointing at them. That duplication is correct here and wrong everywhere else.
|
|
110
|
+
|
|
111
|
+
## 08-spikes.md
|
|
112
|
+
|
|
113
|
+
Evidence by experiment, sitting beside the evidence by measurement that `01-current-state.md` holds. Optional, and most tracks never open it, because measuring what is already there settles most questions.
|
|
114
|
+
|
|
115
|
+
Each spike carries four things:
|
|
116
|
+
|
|
117
|
+
- The open question it answers, named by file and number. A spike attached to no question is the same runaway the current-state file is capped against.
|
|
118
|
+
- The method, stated fully enough for a later reader to re-run it. Name the fixture and where it lived, the exact command, and how many repetitions were run. An arm pointed at a fixture inside the project measured the project, so the fixture location is part of whether the result stands.
|
|
119
|
+
- The result, and which question it closes. A spike that settles nothing is still recorded, so a later pass does not pay to learn the same thing twice.
|
|
120
|
+
- The measured cost, and the caveats bounding what the result proves.
|
|
121
|
+
|
|
122
|
+
Cost is a report rather than a limit, and it is what makes the next spike estimable before anyone commits to it. Record it even when it comes to a single read.
|
|
123
|
+
|
|
124
|
+
Reach for a test harness the project already carries before building one. A track needing an experiment no existing harness can express has found a finding, and it belongs in the folder rather than in a new abstraction.
|
|
125
|
+
|
|
126
|
+
One method error is worth naming, because it is made rather than imagined. Counting matches in a transcript overstates whether a file was read, since an instruction naming a path puts that path in the transcript whether or not anything opened it. The check is the tool call.
|
|
127
|
+
|
|
128
|
+
## Open questions
|
|
129
|
+
|
|
130
|
+
Every open question carries a lean, wherever it appears. A bare numbered list hands the reader a quiz and defers the judgment the track exists to inform.
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
1. <question>
|
|
134
|
+
- Leaning: <where the evidence currently points>
|
|
135
|
+
- Overturned by: <the finding that would change it>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- Pair every lean with what would overturn it. A lean with no falsifier is an opinion.
|
|
139
|
+
- On a measurement rather than a judgment, write `- Leaning: none, needs measuring` and drop the overturn line. A guess at a number is worse than an admission.
|
|
140
|
+
- Mark each question open or answered, and repeat the open ones at the end of the file they belong to. That gives the decision file its agenda for free.
|
|
141
|
+
|
|
142
|
+
A lean is weaker than the suggestion a plan file carries. It records the current read on a question still open by definition, not a decision to accept by default at execution time.
|
|
143
|
+
|
|
144
|
+
## Conventions
|
|
145
|
+
|
|
146
|
+
- State a number with what it settles. The strongest sections are the ones where a measurement answers a named question and says so.
|
|
147
|
+
- Send a finding that would change an existing standard or rule to a backlog. Only a demonstrated failure changes one.
|
|
148
|
+
- Let the file count follow the number of genuinely separable questions, not the importance of the topic. A large topic with one question is a small folder.
|
|
149
|
+
|
|
150
|
+
## Anti-patterns
|
|
151
|
+
|
|
152
|
+
- **The groundwork becomes the work.** Gathering expands until the measuring costs more than the change it justifies. Cap it, and drop any thread with no question attached.
|
|
153
|
+
- **Deciding by omission.** Closing a track while an unresolved question quietly fails an outcome. Resolve it or record it as knowingly accepted.
|
|
154
|
+
- **Recording a constraint discovered while defending a decision.** Check a constraint against the alternative design before writing it down, or a fact about the current shape gets written up as inherent to the problem.
|
|
155
|
+
- **A plan written before the groundwork.** Every track that has done this had to supersede the plan it wrote.
|
|
156
|
+
- **The date left in the body.** A frontmatter field and a sentence both claiming the opening date resolve to whichever a reader happens to hit, and only one of them is readable by a walker.
|
|
157
|
+
|
|
158
|
+
## Template
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
---
|
|
162
|
+
title: <Track subject>
|
|
163
|
+
description: <one line naming what the track measures>
|
|
164
|
+
date: <YYYY-MM-DD>
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
# <Track subject>
|
|
168
|
+
|
|
169
|
+
Groundwork phase. Nothing here is a feature plan.
|
|
170
|
+
|
|
171
|
+
<One line defining the investigation.>
|
|
172
|
+
|
|
173
|
+
## Why
|
|
174
|
+
|
|
175
|
+
<Why the track is running now.>
|
|
176
|
+
|
|
177
|
+
## Files
|
|
178
|
+
|
|
179
|
+
| File | Holds |
|
|
180
|
+
| --------------------- | --------------- |
|
|
181
|
+
| `01-current-state.md` | <what it holds> |
|
|
182
|
+
|
|
183
|
+
## Method
|
|
184
|
+
|
|
185
|
+
<Internal sources used, external sources used, and what is not yet done.>
|
|
186
|
+
|
|
187
|
+
### Leads
|
|
188
|
+
|
|
189
|
+
- <external source found but not opened>
|
|
190
|
+
|
|
191
|
+
## Prior art
|
|
192
|
+
|
|
193
|
+
<Earlier plans, folders, or decisions this track supersedes or builds on.>
|
|
194
|
+
|
|
195
|
+
## Source citation
|
|
196
|
+
|
|
197
|
+
Every claim about a source outside the project carries a link. A source found
|
|
198
|
+
and not read is listed as a lead and is never cited.
|
|
199
|
+
```
|
package/standards/index.md
CHANGED
|
@@ -11,6 +11,8 @@ Reference docs for consistent authoring across the toolkit and target projects.
|
|
|
11
11
|
- [Context entry reference](context.md): Shape and content rules for .claude/context/<domain>.md entries
|
|
12
12
|
- [Design reference](design.md): Shape and content rules for .claude/DESIGN.md
|
|
13
13
|
- [Diagram reference](diagrams.md): Shape and content rules for .claude/diagrams/<kind>.md files
|
|
14
|
+
- [Groundwork reference](groundwork.md): Folder layout, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
|
|
15
|
+
- [Intake reference](intake.md): Folder layout, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
|
|
14
16
|
- [Markdown reference](markdown.md): Headings, paragraph and list structure, code spans, punctuation, emphasis, and file references
|
|
15
17
|
- [Prose reference](prose.md): Voice, language, and frontmatter wording for reference markdown
|
|
16
18
|
- [Publish reference](publish.md): Scan run against finished text leaving through a channel no automated check covers
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Intake
|
|
3
|
-
description:
|
|
2
|
+
title: Intake reference
|
|
3
|
+
description: Folder layout, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Intake
|
|
6
|
+
# Intake reference
|
|
7
7
|
|
|
8
|
-
Applies to an intake folder at `.claude/intake/<slug>/`. One folder holds one dump, filed by domain, and every finding in it is an item carrying a measured problem and a verdict.
|
|
8
|
+
Applies to an intake folder at `.claude/intake/<slug>/`. One folder holds one dump, filed by domain, and every finding in it is an item carrying a measured problem, one proposed fix, and a verdict.
|
|
9
9
|
|
|
10
10
|
The folder is gitignored and unbacked. No check reaches its contents, so the shape below survives only by being read.
|
|
11
11
|
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
Governs an intake folder under `.claude/intake/<slug>/`: folder layout, the reserved index number, frontmatter and dating, the item format, the answer contract, and retrieval.
|
|
15
|
+
|
|
16
|
+
Does not govern:
|
|
17
|
+
|
|
18
|
+
- One question measured in depth before anyone can plan against it: `groundwork.md`
|
|
19
|
+
- The task file promoting an item onto the board, and the origin line pointing back at the folder: `tasks.md`
|
|
20
|
+
- Voice and word choice: `prose.md`
|
|
21
|
+
- Headings, punctuation, and file references: `markdown.md`
|
|
22
|
+
- Which findings belong in a dump at all, and the procedure that files one, which belong to the surface driving it
|
|
23
|
+
|
|
24
|
+
## What a working intake looks like
|
|
25
|
+
|
|
26
|
+
An intake works when a reader returning weeks later can act on it from the folder alone:
|
|
27
|
+
|
|
28
|
+
- Which items are ready to promote, and what does shipping each one cost?
|
|
29
|
+
- What measurement stands behind each problem line, and against which commit was it taken?
|
|
30
|
+
- Which items has the operator answered, and which has nobody reached?
|
|
31
|
+
- Which live board task does an item already overlap?
|
|
32
|
+
|
|
33
|
+
An intake failing these is non-conforming even when it satisfies every shape rule below.
|
|
34
|
+
|
|
12
35
|
## Files
|
|
13
36
|
|
|
14
37
|
| File | Holds | Required |
|
|
@@ -19,13 +42,19 @@ The folder is gitignored and unbacked. No check reaches its contents, so the sha
|
|
|
19
42
|
|
|
20
43
|
`00` is the only reserved number. Everything else is read order, and the domain rides in the filename so a reader knows what `07-tooling.md` holds without opening it.
|
|
21
44
|
|
|
22
|
-
Do not reserve mid-range numbers. Clusters differ per dump, so a contract over `06` would force every future intake into one dump's shape.
|
|
45
|
+
Do not reserve mid-range numbers. Clusters differ per dump, so a contract over `06` would force every future intake into one dump's shape. A folder whose shape is fixed can reserve its numbers, and that half of the convention does not transfer.
|
|
23
46
|
|
|
24
47
|
Let the file count follow the number of separable domains. A large dump with two domains is a small folder.
|
|
25
48
|
|
|
26
49
|
## Frontmatter and dating
|
|
27
50
|
|
|
28
|
-
Every file carries `title` and `description
|
|
51
|
+
Every file carries `title` and `description`. `00-overview.md` carries one field the others do not.
|
|
52
|
+
|
|
53
|
+
- `title` (required): the dump subject in sentence case
|
|
54
|
+
- `description` (required): one line naming what the dump covers
|
|
55
|
+
- `date` (required, `00-overview.md` only): the day the folder opened, as `YYYY-MM-DD`
|
|
56
|
+
|
|
57
|
+
Carry the opening date as a frontmatter field rather than a sentence in the body. A date written into prose is readable by a person and by nothing that walks the folder, and the two spellings drift once both are permitted.
|
|
29
58
|
|
|
30
59
|
Date the folder once rather than every file. Twelve dated files leave eleven stale the first time one cluster is edited, and the opening date never rots. The checkable half is the commit, which the overview body names as what the claims were measured against.
|
|
31
60
|
|
|
@@ -44,7 +73,7 @@ The index carries no answer slot. One question in two answerable places has no r
|
|
|
44
73
|
|
|
45
74
|
Where an item touches a task already on the board, say so in the index rather than only inside the item. A reader deciding what to promote reads the index first.
|
|
46
75
|
|
|
47
|
-
## Item
|
|
76
|
+
## Item format
|
|
48
77
|
|
|
49
78
|
```markdown
|
|
50
79
|
### N. Short title stating the defect
|
|
@@ -58,11 +87,23 @@ Where an item touches a task already on the board, say so in the index rather th
|
|
|
58
87
|
- **You:**
|
|
59
88
|
```
|
|
60
89
|
|
|
61
|
-
`Problem:`, `Fix:`, `Worth it:`, and the empty `You:` slot ship on every item.
|
|
90
|
+
- `Problem:`, `Fix:`, `Worth it:`, and the empty `You:` slot ship on every item. The other two are conditional.
|
|
91
|
+
- `Suggested:` is required whenever `Open:` is present. A bare question invites a bare answer, and `ok` against two defensible options carries no information. Where the answer is the operator's preference rather than a technical call, say so in that form rather than inventing a default.
|
|
92
|
+
- `Overlaps:` never replaces `Worth it:`. The items where a live board task might be the thing that is wrong are exactly the ones whose verdict matters most.
|
|
62
93
|
|
|
63
94
|
Two heading levels is the right depth inside a cluster file. A third means the cluster should have been its own file.
|
|
64
95
|
|
|
65
|
-
An item may carry a bolded standalone line between the bullets where a finding needs a name of its own. Keep it rare. Everything
|
|
96
|
+
An item may carry a bolded standalone line between the bullets where a finding needs a name of its own. Keep it rare. Everything fitting the four bullets belongs in them.
|
|
97
|
+
|
|
98
|
+
## The answer contract
|
|
99
|
+
|
|
100
|
+
`You:` belongs to the operator and ships empty on every item.
|
|
101
|
+
|
|
102
|
+
Empty means unread. It never means agreement. Accepting a verdict is typed as one token, `- **You:** ok`.
|
|
103
|
+
|
|
104
|
+
That inverts the plan file's contract, where a blank answer slot means accept the suggestion, and the inversion is deliberate. A plan is read in one sitting with every question already surfaced in conversation. An intake folder is read over weeks, so an empty slot is ambiguous between accepting the verdict and never having reached the item, and the second reading is far more likely. Acting on silence as consent ships a change nobody approved.
|
|
105
|
+
|
|
106
|
+
Never fill a `You:` slot, and never infer a disposition from an empty one. On a resume pass, report unread items by count rather than deciding them.
|
|
66
107
|
|
|
67
108
|
## Retrieval
|
|
68
109
|
|
|
@@ -95,3 +136,45 @@ Both walk `###` headings, which is the mechanical reason an answer typed anywher
|
|
|
95
136
|
- **The overlap that ate the verdict.** Replacing `Worth it:` with `Overlaps:` drops the call on the items most likely to change what a live task should do.
|
|
96
137
|
- **A question in two places.** An open question answerable in the index and on the item resolves to whichever a reader happens to open.
|
|
97
138
|
- **The dump filed as one concern.** Forty findings under one heading is a folder nobody can promote from, and the split by domain is what makes each item liftable on its own.
|
|
139
|
+
- **The date left in the body.** A frontmatter field and a sentence both claiming the opening date resolve to whichever a reader happens to hit, and only one of them is readable by a walker.
|
|
140
|
+
|
|
141
|
+
## Template
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
---
|
|
145
|
+
title: <Dump subject>
|
|
146
|
+
description: <one line naming what the dump covers>
|
|
147
|
+
date: <YYYY-MM-DD>
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
# <Dump subject>
|
|
151
|
+
|
|
152
|
+
<One line on what the dump covers and the commit it was measured against.>
|
|
153
|
+
|
|
154
|
+
## Item format
|
|
155
|
+
|
|
156
|
+
<the item format block, copied so a returning session picks the shape up here>
|
|
157
|
+
|
|
158
|
+
## The answer contract
|
|
159
|
+
|
|
160
|
+
`You:` ships empty and empty means unread. Accepting a verdict is typed as
|
|
161
|
+
`- **You:** ok`. Nothing here is decided by silence.
|
|
162
|
+
|
|
163
|
+
## Clusters
|
|
164
|
+
|
|
165
|
+
| File | Holds | Items | Open |
|
|
166
|
+
| ---------------- | --------------- | ----- | ---- |
|
|
167
|
+
| `NN-<domain>.md` | <what it holds> | <n> | <n> |
|
|
168
|
+
|
|
169
|
+
## Verdicts
|
|
170
|
+
|
|
171
|
+
<counts across the folder>
|
|
172
|
+
|
|
173
|
+
## Ready
|
|
174
|
+
|
|
175
|
+
- <item, grouped by what shipping it costs>
|
|
176
|
+
|
|
177
|
+
## Open questions
|
|
178
|
+
|
|
179
|
+
1. [<question>](NN-<domain>.md#n-short-title-stating-the-defect)
|
|
180
|
+
```
|
package/standards/rule.md
CHANGED
|
@@ -33,6 +33,15 @@ Write both when both apply. A rule stating the directive and a skill stating how
|
|
|
33
33
|
- Subdirectories group by domain: `core/`, `lang/`, `framework/`, `lib/`, `ui/`, `claude/`
|
|
34
34
|
- `<n>` is a number in the subdirectory's band and `<slug>` is a one-to-three-word kebab topic
|
|
35
35
|
- Scaffold a rule with a number that collides with neither the project's rules nor any installed shared rule set
|
|
36
|
+
- Give every rule a numeric prefix. A bare-word filename reads as a folder name where a stack names its rules, so a rule without one is unreachable from a stack entry.
|
|
37
|
+
|
|
38
|
+
## Two sources numbering into one folder
|
|
39
|
+
|
|
40
|
+
A shared rule set and a project's own rules land in the same installed folder and draw from the same band, so the two need a division or they collide. Divide the band by source rather than by topic: one source takes the top of each band and the other takes the gaps between the tens. A rule set that ships to targets should take the tens, since it is the source a project cannot renumber.
|
|
41
|
+
|
|
42
|
+
The collision this prevents is silent. Two rules that resolve to the same `<n>-<slug>` path leave one file in the installed folder, and neither the install nor the session that reads it reports which source lost. Nothing checks the division, so it holds only while both sources follow it.
|
|
43
|
+
|
|
44
|
+
State the division where the rule sources are described, not in the rules themselves. A rule states its own topic, and a numbering convention spanning two sources belongs to whatever documents the pair.
|
|
36
45
|
|
|
37
46
|
## Frontmatter
|
|
38
47
|
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Groundwork folder reference
|
|
3
|
-
description: Reserved file numbers, required file contents, and anti-patterns for a .claude/groundwork/ folder
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Groundwork folder reference
|
|
7
|
-
|
|
8
|
-
Applies to a groundwork folder at `.claude/groundwork/<slug>/`. The numbering is the table of contents: a reader opens the folder and knows where to start and what follows, with no index maintained inside each file. Protect that first, because the instinct when adding a file mid-track is to name it for its topic instead.
|
|
9
|
-
|
|
10
|
-
The folder is gitignored and unbacked. It dies with the machine, which is why the handoff file has to be self-contained.
|
|
11
|
-
|
|
12
|
-
## Reserved numbers
|
|
13
|
-
|
|
14
|
-
Five slots carry a fixed meaning. The rest are free, which is what lets the middle of a folder follow its subject.
|
|
15
|
-
|
|
16
|
-
| Number | Holds | Required |
|
|
17
|
-
| ------------ | ----------------------------------------------- | --------------------------- |
|
|
18
|
-
| `00` | Scope: constraints, risks, question list | Large tracks only |
|
|
19
|
-
| `01` | Current state, measured | Always |
|
|
20
|
-
| `02` to `05` | Topic files, whatever the subject demands | As needed |
|
|
21
|
-
| `06` | Decision | To close |
|
|
22
|
-
| `07` | Handoff, self-contained | To close |
|
|
23
|
-
| `08` | Spikes: method, result, and cost per experiment | Tracks that run experiments |
|
|
24
|
-
|
|
25
|
-
A folder missing `06` and `07` is live. That is the only status marker, and no separate tracking is needed.
|
|
26
|
-
|
|
27
|
-
`08` sits after the closing files because it is an appendix. It holds evidence rather than a topic, so folding it into the `02` to `05` range buries it, and a track closes with or without one.
|
|
28
|
-
|
|
29
|
-
## README.md
|
|
30
|
-
|
|
31
|
-
Orients. Holds no findings.
|
|
32
|
-
|
|
33
|
-
- A one-line definition of the investigation
|
|
34
|
-
- The date opened
|
|
35
|
-
- A `## Why` section stating why the track is running now
|
|
36
|
-
- A file-map table of filename and what it holds, kept current as files are added or retired
|
|
37
|
-
- A `## Method` section splitting internal sources from external ones, naming which were used and which were not yet done, and listing under a leads heading any external source found but not opened
|
|
38
|
-
- A `## Prior art` section
|
|
39
|
-
- A `## Source citation` section stating the rule below, so a returning session picks it up from the folder
|
|
40
|
-
- The phase stated out loud in the first three lines, in the form `Groundwork phase. Nothing here is a feature plan.`
|
|
41
|
-
|
|
42
|
-
The file map is how a returning reader re-enters. After the decision, it is the highest-value thing in the folder.
|
|
43
|
-
|
|
44
|
-
Every claim about a source outside the project carries a link to it, wherever the claim appears in the folder. A sentence asserting that the vendor documents something reads the same whether it came from a fetched page or from recall, and a later reader can neither check it nor tell the two apart.
|
|
45
|
-
|
|
46
|
-
A source found and not read is listed as a lead and is never cited. That half is what keeps the rule from producing citation theater, because a link attached to a page nobody opened is worse than no link. Listing it still pays, since it stops a later pass re-searching for what this one already surfaced.
|
|
47
|
-
|
|
48
|
-
Where the track supersedes an earlier plan or an earlier folder, name it and say not to go looking for it. Without that, the old reasoning keeps circulating.
|
|
49
|
-
|
|
50
|
-
## 01-current-state.md
|
|
51
|
-
|
|
52
|
-
Facts before opinion. Verified measurement only, taken during this pass.
|
|
53
|
-
|
|
54
|
-
- Never carry a figure from a previous session without re-measuring. Stale ratios survive a sunset that invalidates them, and every number built on top of one is quietly wrong.
|
|
55
|
-
- Mark an inference as an inference where one is unavoidable.
|
|
56
|
-
- Measure only what an open question needs. A number with no question attached is the mechanism by which the groundwork becomes the work.
|
|
57
|
-
|
|
58
|
-
## 00-scope.md
|
|
59
|
-
|
|
60
|
-
Written when the subject is large enough to run away. Holds constraints, risks, the open question list, and the downstream surfaces a decision would touch. A small track skips it and carries its questions inside the topic files.
|
|
61
|
-
|
|
62
|
-
## 06-decision.md
|
|
63
|
-
|
|
64
|
-
Closes the folder. Everything above it is input.
|
|
65
|
-
|
|
66
|
-
- The problem stated once
|
|
67
|
-
- The goal
|
|
68
|
-
- The items to do
|
|
69
|
-
- What was considered and dropped
|
|
70
|
-
|
|
71
|
-
The dropped list pays off later. It is what stops a future session re-proposing something already rejected.
|
|
72
|
-
|
|
73
|
-
## 07-next-session.md
|
|
74
|
-
|
|
75
|
-
Written to survive a compaction that loses the conversation. It repeats facts held elsewhere in the folder rather than pointing at them. That duplication is correct here and wrong everywhere else.
|
|
76
|
-
|
|
77
|
-
## 08-spikes.md
|
|
78
|
-
|
|
79
|
-
Evidence by experiment, sitting beside the evidence by measurement `01-current-state.md` holds. Optional, and most tracks never open it, because measuring what is already there settles most questions.
|
|
80
|
-
|
|
81
|
-
Each spike carries four things:
|
|
82
|
-
|
|
83
|
-
- The open question it answers, named by file and number. A spike attached to no question is the same runaway the current-state file is capped against.
|
|
84
|
-
- The method, stated fully enough for a later reader to re-run it. Name the fixture and where it lived, the exact command, and how many repetitions were run. A headless arm pointed at a fixture inside the repository measured the repository, so the fixture location is part of whether the result stands.
|
|
85
|
-
- The result, and which question it closes. A spike that settles nothing is still recorded, so a later pass does not pay to learn the same thing twice.
|
|
86
|
-
- The measured cost, and the caveats that bound what the result proves.
|
|
87
|
-
|
|
88
|
-
Cost is a report rather than a limit, and it is what makes the next spike estimable before anyone commits to it. Record it even when it comes to a single read.
|
|
89
|
-
|
|
90
|
-
Reach for a test harness the project already carries before building one. A track that needs an experiment no existing harness can express has found a finding, and it belongs in the folder rather than in a new abstraction.
|
|
91
|
-
|
|
92
|
-
One method error is worth naming here, because it was made and corrected rather than imagined. Counting matches in a transcript overstates whether a file was read, since an instruction that names a path puts that path in the transcript whether or not anything opened it. The check is the tool call.
|
|
93
|
-
|
|
94
|
-
## Conventions
|
|
95
|
-
|
|
96
|
-
- Questions carry an open or answered marker, and open ones repeat at the end of the file they belong to. That gives `06-decision.md` its agenda for free.
|
|
97
|
-
- Every open question carries a lean and what would overturn it, in the open question format in `SKILL.md`. A measurement question records that it needs measuring instead of guessing.
|
|
98
|
-
- State a number with what it settles. The strongest sections are the ones where a measurement answers a named question and says so.
|
|
99
|
-
- Send findings that would change an existing standard or rule to a backlog. Only a demonstrated failure changes one.
|
|
100
|
-
- Let the file count follow the number of genuinely separable questions, not the importance of the topic. A large topic with one question is a small folder.
|
|
101
|
-
|
|
102
|
-
## Anti-patterns
|
|
103
|
-
|
|
104
|
-
- **The groundwork becomes the work.** Gathering expands until the measuring costs more than the change it justifies. Cap it, and drop any thread with no question attached.
|
|
105
|
-
- **Deciding by omission.** Closing a track while an unresolved question quietly fails an outcome. Resolve it or record it as knowingly accepted.
|
|
106
|
-
- **Recording a constraint discovered while defending a decision.** Check a constraint against the alternative design before writing it down, or a fact about the current shape gets written up as inherent to the problem.
|
|
107
|
-
- **A plan written before the groundwork.** Every track that has done this had to supersede the plan it wrote.
|