@ersbeth/codelife 0.0.0-bootstrap.0 → 0.11.1

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.
Files changed (214) hide show
  1. package/.claude-plugin/plugin.json +19 -0
  2. package/LICENSE +21 -0
  3. package/README.md +66 -0
  4. package/agents/evaluate.md +97 -0
  5. package/agents/ground.md +49 -0
  6. package/agents/implementer.md +49 -0
  7. package/agents/judge.md +128 -0
  8. package/agents/planner.md +45 -0
  9. package/agents/prerequisites.md +62 -0
  10. package/agents/reader.md +40 -0
  11. package/agents/reproduce.md +65 -0
  12. package/bin/codelife +4 -0
  13. package/package.json +40 -1
  14. package/presets/tsconfig.json +14 -0
  15. package/presets/vite.config.d.mts +3 -0
  16. package/presets/vite.config.mjs +49 -0
  17. package/scripts/audit/cadence.mjs +24 -0
  18. package/scripts/audit/close.mjs +57 -0
  19. package/scripts/audit/file.mjs +70 -0
  20. package/scripts/audit/fold.mjs +48 -0
  21. package/scripts/audit/lib.mjs +93 -0
  22. package/scripts/audit/prepare.mjs +180 -0
  23. package/scripts/audit/table.mjs +65 -0
  24. package/scripts/brainstorm/decided.mjs +6 -0
  25. package/scripts/brainstorm/lib.mjs +33 -0
  26. package/scripts/brainstorm/named.mjs +9 -0
  27. package/scripts/changelog.mjs +100 -0
  28. package/scripts/check-tag.mjs +19 -0
  29. package/scripts/checks.mjs +53 -0
  30. package/scripts/codelife.mjs +42 -0
  31. package/scripts/commit-msg.mjs +43 -0
  32. package/scripts/contract.mjs +179 -0
  33. package/scripts/former-form.mjs +170 -0
  34. package/scripts/git/branches.mjs +6 -0
  35. package/scripts/git/commit.mjs +40 -0
  36. package/scripts/git/diff.mjs +17 -0
  37. package/scripts/git/diff_lines.mjs +5 -0
  38. package/scripts/git/held.mjs +53 -0
  39. package/scripts/git/is_ancestor.mjs +28 -0
  40. package/scripts/git/lib.mjs +20 -0
  41. package/scripts/git/log_since.mjs +27 -0
  42. package/scripts/git/parent.mjs +51 -0
  43. package/scripts/git/show.mjs +4 -0
  44. package/scripts/git/status.mjs +25 -0
  45. package/scripts/git/submodules.mjs +5 -0
  46. package/scripts/init.mjs +21 -0
  47. package/scripts/install.mjs +32 -0
  48. package/scripts/lenses/A11Y.md +91 -0
  49. package/scripts/lenses/ARCH.md +90 -0
  50. package/scripts/lenses/BUG.md +52 -0
  51. package/scripts/lenses/BUILD.md +40 -0
  52. package/scripts/lenses/COMPAT.md +67 -0
  53. package/scripts/lenses/CONF.md +49 -0
  54. package/scripts/lenses/DEPS.md +43 -0
  55. package/scripts/lenses/DOC.md +73 -0
  56. package/scripts/lenses/FAIL.md +57 -0
  57. package/scripts/lenses/GOV.md +56 -0
  58. package/scripts/lenses/GUARD.md +47 -0
  59. package/scripts/lenses/INTENT.md +52 -0
  60. package/scripts/lenses/LEAN.md +49 -0
  61. package/scripts/lenses/LINES.md +48 -0
  62. package/scripts/lenses/PERF.md +61 -0
  63. package/scripts/lenses/PKG.md +58 -0
  64. package/scripts/lenses/SEC.md +49 -0
  65. package/scripts/lenses/STANDARDS.md +62 -0
  66. package/scripts/lenses/TYPE.md +56 -0
  67. package/scripts/lenses/VERIF.md +81 -0
  68. package/scripts/link.mjs +40 -0
  69. package/scripts/methods/cause.md +21 -0
  70. package/scripts/methods/comments.md +157 -0
  71. package/scripts/methods/description.md +67 -0
  72. package/scripts/methods/message.md +24 -0
  73. package/scripts/methods/red-green.md +28 -0
  74. package/scripts/methods/refusal.md +22 -0
  75. package/scripts/mr/open.mjs +219 -0
  76. package/scripts/node-floor.mjs +19 -0
  77. package/scripts/onboard/prep.mjs +93 -0
  78. package/scripts/overview/codelife-line.mjs +33 -0
  79. package/scripts/overview/next.mjs +76 -0
  80. package/scripts/overview/overview.mjs +308 -0
  81. package/scripts/package-manager.mjs +20 -0
  82. package/scripts/port/item.mjs +94 -0
  83. package/scripts/port/lib.mjs +194 -0
  84. package/scripts/port/prep.mjs +33 -0
  85. package/scripts/port/version.mjs +50 -0
  86. package/scripts/pre-commit.mjs +43 -0
  87. package/scripts/pre-push.mjs +53 -0
  88. package/scripts/prepare-lib.mjs +81 -0
  89. package/scripts/read-roadmap/lib.mjs +116 -0
  90. package/scripts/read-roadmap/moved.mjs +70 -0
  91. package/scripts/read-roadmap/range.mjs +15 -0
  92. package/scripts/release/cut.mjs +120 -0
  93. package/scripts/release/entry.mjs +52 -0
  94. package/scripts/release/lib.mjs +136 -0
  95. package/scripts/release/prep.mjs +58 -0
  96. package/scripts/review-mr/prepare.mjs +163 -0
  97. package/scripts/roadmap/assemble.mjs +269 -0
  98. package/scripts/roadmap/cut.mjs +88 -0
  99. package/scripts/roadmap/prepare.mjs +249 -0
  100. package/scripts/roadmap/roadmap.md +30 -0
  101. package/scripts/roadmap/write.mjs +53 -0
  102. package/scripts/search.mjs +29 -0
  103. package/scripts/setup/contract.mjs +25 -0
  104. package/scripts/setup/item.mjs +166 -0
  105. package/scripts/setup/lib.mjs +205 -0
  106. package/scripts/setup/prep.mjs +106 -0
  107. package/scripts/spec-form.mjs +444 -0
  108. package/scripts/spec.mjs +56 -0
  109. package/scripts/tags.mjs +27 -0
  110. package/scripts/target/target-app.md +134 -0
  111. package/scripts/target/target-base.md +127 -0
  112. package/scripts/target/target-lib.md +143 -0
  113. package/scripts/target/templates/audit/README.md +21 -0
  114. package/scripts/target/templates/characterisation/bundle.test.ts +43 -0
  115. package/scripts/target/templates/characterisation/declarations.test.ts +44 -0
  116. package/scripts/target/templates/characterisation/entries.ts +50 -0
  117. package/scripts/target/templates/characterisation/examples.test.ts +18 -0
  118. package/scripts/target/templates/characterisation/import.test.ts +22 -0
  119. package/scripts/target/templates/characterisation/surface.test.ts +68 -0
  120. package/scripts/target/templates/cliff.toml +61 -0
  121. package/scripts/target/templates/githooks/commit-msg +9 -0
  122. package/scripts/target/templates/githooks/pre-commit +9 -0
  123. package/scripts/target/templates/githooks/pre-push +9 -0
  124. package/scripts/target/templates/playground/index.html +11 -0
  125. package/scripts/target/templates/playground/main.ts +9 -0
  126. package/scripts/target/templates/spec/README.md +35 -0
  127. package/scripts/target/templates/spec/capability.md +36 -0
  128. package/scripts/target/templates/spec/glossary.md +5 -0
  129. package/scripts/target/templates/spec/journey.md +29 -0
  130. package/scripts/target/templates/spec/principles.md +15 -0
  131. package/scripts/target/templates/spec/users.md +15 -0
  132. package/scripts/target/templates/tsconfig.json +9 -0
  133. package/scripts/target/templates/vite.config.ts +4 -0
  134. package/scripts/text.mjs +6 -0
  135. package/scripts/tracker/account.mjs +5 -0
  136. package/scripts/tracker/auth.mjs +9 -0
  137. package/scripts/tracker/cli.version.mjs +5 -0
  138. package/scripts/tracker/close.mjs +20 -0
  139. package/scripts/tracker/create.mjs +47 -0
  140. package/scripts/tracker/issue.section.mjs +25 -0
  141. package/scripts/tracker/issue.update.mjs +13 -0
  142. package/scripts/tracker/issue.view.mjs +16 -0
  143. package/scripts/tracker/lib.mjs +130 -0
  144. package/scripts/tracker/list.mjs +14 -0
  145. package/scripts/tracker/list.whole.mjs +20 -0
  146. package/scripts/tracker/lot.row.mjs +42 -0
  147. package/scripts/tracker/mr.checkout_command.mjs +5 -0
  148. package/scripts/tracker/mr.comments.mjs +50 -0
  149. package/scripts/tracker/mr.create.mjs +12 -0
  150. package/scripts/tracker/mr.description.mjs +8 -0
  151. package/scripts/tracker/mr.fetch_head.mjs +5 -0
  152. package/scripts/tracker/mr.find_for_branch.mjs +9 -0
  153. package/scripts/tracker/mr.post.mjs +40 -0
  154. package/scripts/tracker/mr.update_description.mjs +8 -0
  155. package/scripts/tracker/mr.verdict.mjs +34 -0
  156. package/scripts/tracker/mr.view.mjs +20 -0
  157. package/scripts/tracker/none.mjs +79 -0
  158. package/scripts/tracker/note.mjs +12 -0
  159. package/scripts/tracker/reopen.mjs +8 -0
  160. package/scripts/tracker/search.mjs +8 -0
  161. package/scripts/tracker/search_id.mjs +18 -0
  162. package/scripts/tracker/templates/bug.md +35 -0
  163. package/scripts/tracker/templates/feature.md +40 -0
  164. package/scripts/tracker/templates/lot.md +46 -0
  165. package/scripts/tracker/title.join.mjs +6 -0
  166. package/scripts/tracker/title.leave.mjs +7 -0
  167. package/scripts/tracker/title.lot_of.mjs +8 -0
  168. package/scripts/tracker/title.search_id_filter.mjs +17 -0
  169. package/scripts/tracker/title.sentence_of.mjs +5 -0
  170. package/scripts/tracker/view.mjs +25 -0
  171. package/scripts/verbs.mjs +579 -0
  172. package/scripts/verify/BUILD.mjs +33 -0
  173. package/scripts/verify/DEPS.mjs +15 -0
  174. package/scripts/verify/GOV.mjs +34 -0
  175. package/scripts/verify/GUARD.mjs +34 -0
  176. package/scripts/verify/LINES.mjs +22 -0
  177. package/scripts/verify/PKG.mjs +56 -0
  178. package/scripts/verify/TYPE.mjs +34 -0
  179. package/scripts/verify/cut.mjs +73 -0
  180. package/scripts/verify/history.mjs +32 -0
  181. package/scripts/verify/lib.mjs +129 -0
  182. package/scripts/verify/report.mjs +104 -0
  183. package/scripts/verify/timing.mjs +19 -0
  184. package/scripts/verify.mjs +29 -0
  185. package/scripts/work/branch.mjs +81 -0
  186. package/scripts/work/close.mjs +74 -0
  187. package/scripts/work/member.mjs +73 -0
  188. package/scripts/work/prepare.mjs +116 -0
  189. package/scripts/work/reopen.mjs +40 -0
  190. package/scripts/work-feedback/prepare.mjs +96 -0
  191. package/skills/audit/SKILL.md +110 -0
  192. package/skills/audit/templates/index.md +36 -0
  193. package/skills/audit/templates/lens.md +44 -0
  194. package/skills/brainstorm/SKILL.md +144 -0
  195. package/skills/brainstorm/references/exit.md +57 -0
  196. package/skills/brainstorm/templates/note.md +79 -0
  197. package/skills/commit/SKILL.md +68 -0
  198. package/skills/mr/SKILL.md +82 -0
  199. package/skills/new-issue/SKILL.md +87 -0
  200. package/skills/onboard/SKILL.md +103 -0
  201. package/skills/onboard/templates/CLAUDE.md +31 -0
  202. package/skills/onboard/templates/CONTRIBUTING.md +34 -0
  203. package/skills/onboard/templates/README.md +30 -0
  204. package/skills/onboard/templates/SKILL.md +24 -0
  205. package/skills/onboard/templates/package-CLAUDE.md +15 -0
  206. package/skills/overview/SKILL.md +59 -0
  207. package/skills/port-toolchain/SKILL.md +127 -0
  208. package/skills/release/SKILL.md +78 -0
  209. package/skills/review-mr/SKILL.md +106 -0
  210. package/skills/review-mr/templates/pass.md +29 -0
  211. package/skills/roadmap/SKILL.md +137 -0
  212. package/skills/setup/SKILL.md +112 -0
  213. package/skills/work/SKILL.md +139 -0
  214. package/skills/work-feedback/SKILL.md +113 -0
@@ -0,0 +1,44 @@
1
+ <!-- generated by codelife — /audit -->
2
+ # Lens {{ID}} — {{name}}
3
+
4
+ *A **domain lens**: specific to this repository, versioned with it in `docs/audit/lenses/{{ID}}.md`, and
5
+ grown by every campaign that runs it. The plugin's own lenses live in the plugin; this one lives
6
+ here because nobody else has this domain.*
7
+
8
+ *Its `{{ID}}` is the shortest uppercase word or acronym that reads on its own — `GUARD`, `DEPS`,
9
+ `A11Y` — and never a single letter: every finding this lens files carries the id in the tracker's
10
+ list, where a letter tells a reader nothing.*
11
+
12
+ ## Objective
13
+
14
+ {{Two sentences, copied into the report by /audit. What this lens is for, and what it refuses to
15
+ be about — a lens whose objective is "quality" finds nothing.}}
16
+
17
+ ## Questions
18
+
19
+ {{What a reader who knows this domain would ask of the code. Written as questions, not as a
20
+ checklist of rules: a question survives a refactor, a rule does not.}}
21
+
22
+ - {{…}}
23
+
24
+ ## Probes
25
+
26
+ {{What to search and list — a pattern, over which files — and which of `verify`'s outputs to read,
27
+ with what each answer means. A lens runs no command, and a probe someone else cannot repeat next
28
+ campaign from these lines is not a probe, it is a memory.}}
29
+
30
+ - {{…}}
31
+
32
+ ## For a change
33
+
34
+ {{What a change to this domain must hold — or **No** — <why the lens does not bear on a change>,
35
+ a legitimate answer for a lens that only makes sense over a whole tree. `/work`'s plan draws its
36
+ objectives from the plugin's lenses alone, never from this file.}}
37
+
38
+ ## Signals learned
39
+
40
+ {{Defects actually met in this repository, worth looking for by default from now on. This section
41
+ is the reason a domain lens is versioned rather than improvised: it is where a campaign's
42
+ experience survives the campaign.}}
43
+
44
+ - {{…}}
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: brainstorm
3
+ description: Think a topic through with the user, one question at a time — the options rejected and why, the decisions — then write them into the specification.
4
+ argument-hint: "<topic>"
5
+ ---
6
+
7
+ # /brainstorm
8
+
9
+ Settles **one topic** with you, keeping a dated note under `docs/brainstorm/` as the session's
10
+ working memory, then writes its decisions into `docs/spec/` and deletes the note in one
11
+ `docs(spec)` commit. It files nothing — `/roadmap` does — decides nothing alone and implements
12
+ nothing.
13
+
14
+ ## Preconditions
15
+
16
+ - `docs/brainstorm/` exists; absent, stop and name `/setup`, which creates it.
17
+ - `git status --porcelain docs/spec` prints nothing: a hand edit would be swept into the exit's
18
+ commit. Name the files and stop — unless it is a cut exit's own writing (Parameters).
19
+ - `codelife form spec` holds the specification in the form. A `docs/spec/` with nothing but its
20
+ `README.md` stops, naming `/setup`, which writes the seven entries. Any other one not in the form
21
+ takes one topic, the adoption — the personas, the journeys, the domain names and the table *old
22
+ document → new paths* — whose note is committed settled, with no exit, for the lot that writes it;
23
+ a committed one waits for that lot: say so and stop. Every other topic stops, quoting the script.
24
+
25
+ ## Brief
26
+
27
+ **Who gave the go-ahead**, and from what, opens it: you, typing the command or answering this
28
+ brief; your confirmed table in a driver, which answers what it named — ask only the rest; the word
29
+ `delegate`; or a session that relayed your words, quoted here — relayed is not delegated. Typed or
30
+ tabled, this brief is an announcement; otherwise the run **stops here** for your go-ahead, after
31
+ nothing but a preparation that only reads.
32
+
33
+ The **topic and where it came from** — the argument, or inferred and stated: a root cause an audit
34
+ listed, the lead `/review-mr` just filed, the conclusion two messages above. Never invented.
35
+
36
+ **What is already known**: the topic's terms in a scratchpad file, one per line — the identifiers
37
+ it cites first, then its distinctive words — and `codelife search <file>`. Write the terms and the
38
+ candidates that matter in your reply — a tool's output is not one —, each with its verdict:
39
+
40
+ - **settled** — a rule or a refusal that answers the topic: show it with `codelife spec <id>`, its
41
+ date and its rejected options, and **stop** to ask whether to supersede it — a yes starts the
42
+ note that reverses it, a no ends the run;
43
+ - **constrains** — a decision that bounds the topic without answering it, cited in *Context*;
44
+ - **pending** — a note on this topic: resume it. On another topic, one line, and go on.
45
+
46
+ **Whether it holds a decision**: a question of fact, or one the code answers once read, is answered
47
+ here, with no note. **Whether it holds one result**: several independent ones are split — the first
48
+ is worked, each other written as a pending note, its *Context* one paragraph saying which note set
49
+ it aside and why, its question its **Open** item.
50
+
51
+ ## Parameters
52
+
53
+ With the brief, only what applies:
54
+
55
+ - **resume** a note on the topic — from its **Open** items, or fresh under a new slug. Its
56
+ decisions are never asked again; a `For spec` item it carries is written as recommended. A note
57
+ with no **Open** item goes straight to the exit when it is committed, or when `docs/spec/`
58
+ already holds its partial writing; otherwise to *Before the stop*.
59
+ - **supersede**, asked when a decision settled the topic.
60
+
61
+ ## Steps
62
+
63
+ **The premise first**, silently, before any question about a solution — proof, counterfactual,
64
+ attachment, simplifier, riskiest assumption, durability — asking only where a gap is real. An
65
+ assumption a read can test is read before asking; one only a run or a measurement can test is not
66
+ run: the decision resting on it names that test. A premise that holds is decision 1 — *do this*,
67
+ rejected *do nothing, and what it costs*. One that fails ends the run on one refusal line,
68
+ `codelife help method refusal`, naming the assumption and what showed it, its `docs(spec)` commit
69
+ deleting the note.
70
+
71
+ **Questions, one at a time**, the code and the artefacts read first: a question the tree answers is
72
+ not asked. Each carries the situation in two sentences, the options with their consequence and your
73
+ **recommendation first**; one option **removes** — a mechanism, a rule, a file or a step that exists
74
+ and could go, *nothing changed* only when nothing can; a question of a name invents none. On a
75
+ structuring topic, one outside voice inferred from the tree — the maintainer in two years, GPU
76
+ performance — objects in one line beside your recommendation. Wait for the answer, then record the
77
+ decision **with the options it rejected**.
78
+
79
+ - Only a question put and answered is a decision: an "ok" to a passing remark records nothing.
80
+ - A choice imposed with no option examined gets **one** argued challenge; if it stands, the
81
+ challenge's option is its rejected one.
82
+ - "As you like" is no answer: restate the recommendation in one line with what it costs if wrong,
83
+ and ask for a yes. "I can't judge", or a second "as you like": offer to map the territory's
84
+ decisions with their realistic options; refused, write the recommendation *Assumed, not
85
+ evaluated* under *What stays open*.
86
+ - A question with no answer is an **Open** item. Never decide for the user.
87
+
88
+ **The note** — `docs/brainstorm/<date +%F>-<slug>.md` from `templates/note.md`, in English, on disk
89
+ from the first decision and rewritten at each: it is what survives a compaction. The slug is two to
90
+ four words of the subject; a filename that collides is that note's topic. Resuming writes into the
91
+ existing note.
92
+
93
+ **Before the stop**, once no question is left:
94
+
95
+ 1. **Edges, silently** — the empty, the huge, the concurrent, the interrupted and the repeated, on
96
+ each decision that changes a behaviour: a question only where one has no case. Then **three
97
+ ordeals, in your reply**, picked for the topic among pre-mortem, inversion, second-order effects,
98
+ failure modes and steelmanning — one line each, what it found and what it changes: a rejected
99
+ option, a case, nothing. A finding that would change a decision is a question.
100
+ 2. **Claims** — what the note asserts about the tree, one numbered per line with the `file:line` it
101
+ cites, in a file outside the repository; dispatch `codelife:ground` with its path and `HEAD`'s
102
+ sha, never a word of the conversation. Open each `file:line` it returns: *confirmed* goes into
103
+ the note, *refuted* reopens its decision as a question, *unverifiable* is written *(unverified)*.
104
+ 3. **Ready** — `codelife form note <the note>` is green: a decision whose cases span two rules is
105
+ split, each part put to you as a decision of its own. No decision contradicts another, nor a rule
106
+ in force it does not name in its **Target.**; one result; the *Worked case* walks every
107
+ decision. A gap that changes no decision is fixed in place; one that would is a question.
108
+ 4. **The stop, in your reply** — the note's path, one line per decision, then two questions: a
109
+ point to add, which reopens the questions and the ordeals on what it changes; and whether to
110
+ write here or in a fresh session, recommended from the context's load — after a compaction, or a
111
+ long session, fresh. Fresh: commit the note, `docs(design): <title>`; `/brainstorm <slug>` there
112
+ goes to the exit.
113
+
114
+ **The exit**, on your go — `references/exit.md`. A topic left unfinished, or a run you stop, is
115
+ committed as its note, `docs(design): <what this session settled>`, with an **Open** item naming
116
+ where it stopped: only the stop's own commit leaves none.
117
+
118
+ ## Never
119
+
120
+ - Implement anything, start the work because it looks small, or file it.
121
+ - Decide for the user, or fold an unanswered question into a decision.
122
+ - Run a lens: a code question that needs one is `/audit targeted <lens>` first.
123
+ - Work two topics in one run; the pieces the brief set aside are the one exception.
124
+ - Commit anything but what `references/exit.md` names, or the note and the pieces set aside —
125
+ with the file a guard requires to accept them, named; never bypass a guard. Whatever else is
126
+ pending is named and left alone.
127
+ - Check out, switch, stash or add a worktree.
128
+ - Answer in a language the user did not write in, or write anything but English into the
129
+ repository or the tracker.
130
+
131
+ ## Output
132
+
133
+ The run ends on this block, under this exact heading:
134
+
135
+ ```markdown
136
+ ### brainstorm result
137
+ - Produced: the documents written under `docs/spec/` and the commit — or the note with its path
138
+ and its commit; each piece the brief set aside — or *nothing to decide, no note written*.
139
+ - Decided: the decisions, by number, each with what it rejected.
140
+ - Left open: the note's **Open** items; the files outside `docs/spec/` and `docs/brainstorm/`
141
+ still citing a path the writing moved or the note it deleted.
142
+ - Next: `/roadmap` to file what the exit wrote — right away for a small feature, or at the end of
143
+ a specification phase; `/brainstorm <slug>` when the note is pending.
144
+ ```
@@ -0,0 +1,57 @@
1
+ # The exit — a settled note written into the specification
2
+
3
+ Loaded once the stop is passed: no **Open** item, the ordeals and the claims done. **The writing
4
+ copies**: each rule, case and rejected option in the note's words. What it composes — a rule's text,
5
+ *Internal design*, *What it is for*, a renamed heading, a rewritten link — is what you show, since
6
+ no script compares it.
7
+
8
+ ## Where each part goes
9
+
10
+ Each decision's **Target.** names a document and, per verb, what it *creates*, *changes*, *retires*
11
+ or *renames* there; it edits them all. An existing target is found by its identifier,
12
+ `codelife spec <id>`. A created capability or journey is drafted from
13
+ `codelife help template capability` or `journey`, at the path the note gives, with its line in `docs/spec/README.md`
14
+ under its domain; a persona is a `##` of `users.md`.
15
+
16
+ | In the note | In the specification |
17
+ |---|---|
18
+ | *Context* | nothing — but who the capability is for goes to *What it is for*, and **Terms.** to `glossary.md` |
19
+ | a rule and its **Cases.** | *Behaviour*: `### <rule>`, each `#### <case>` in Given / When / Then, as written |
20
+ | how it is built | *Internal design* |
21
+ | a **Rejected.** line | `- <address> — <the line> — <the note's date>`, in the target's `## Rejected` |
22
+ | a state it replaces, *in force since <date>; <cost>* | `- <address> — <the state>, in force <from> → <the note's date> — <the cost> — <the note's date>` |
23
+ | a rule or case it retires | out of *Behaviour*, its identifier on its own `## Rejected` line with the note's cost — a missing cost is a question, never invented |
24
+ | *Worked case* | nothing |
25
+ | *What stays open* | *What stays open*, less what the note answered |
26
+ | a `For spec` item | its recommendation, written as the state |
27
+
28
+ The `<address>` is the identifier, or `§ <heading>` for what carries none; a refusal concerning no
29
+ capability goes to `principles.md`. *Behaviour* and *Internal design* say what holds, in the present
30
+ tense — never *was changed* or *to implement*. What the writing creates opens on the **next number
31
+ of its letter**, the highest under `docs/spec/` — `## Rejected` lines included — plus one; a moved
32
+ case keeps its number, a retired one is never reused.
33
+
34
+ A **rename or a move** rewrites every link and `<path> § <heading>` address to it inside
35
+ `docs/spec/`. The note is **deleted**, and each citation of its filename in `docs/spec/` and
36
+ `docs/brainstorm/` rewritten to where what it cited now stands; a file elsewhere is not touched, and
37
+ the result block names it.
38
+
39
+ ## Then
40
+
41
+ 1. `codelife form spec`, then `codelife form fold <the note>`, the note still on disk. A red is the
42
+ copy's: correct it — never the note, never the script. A red that needs a decision — a decision
43
+ with no rejected option, a target that resolves to nothing — is a question, its answer written
44
+ into the note first. An `orphan:` line is a report.
45
+ 2. **Show, in your reply**, for one answer: the prose you composed, in full, document by document;
46
+ the cases and refusal lines you copied, by their headings. Then **stop** for that answer —
47
+ the go given at the stop was for the writing, and nothing is committed before this one. A
48
+ correction is rewritten, the checks run again, and only what it changed shown again. A contradiction with a rule in force the note
49
+ does not name, met while writing, is asked now, and its answer becomes a decision naming that
50
+ rule in its **Target.**
51
+ 3. **Commit**: `codelife commit <message file> <paths>` — the documents written, every file a
52
+ rename, a move or the deletion rewrote, and the note when git tracks it; nothing else. The
53
+ message is `docs(spec): <the note's title>`, the title cut at the last whole word within 72
54
+ characters, and then written whole as the body's first line.
55
+
56
+ A cut exit resumed — the note on disk, `docs/spec/` already partly written — reads that diff as its
57
+ own and completes it; `codelife form fold` says when it is whole.
@@ -0,0 +1,79 @@
1
+ <!-- generated by codelife — /brainstorm -->
2
+ # {{title}}
3
+
4
+ *{{date}}. Builds on {{the documents and notes this one reads, by filename}}. Worked case: {{what it was tried on}}.*
5
+
6
+ ## Context
7
+
8
+ What made this topic worth a session, in two or three paragraphs: the state of the repository, what
9
+ the earlier notes already fix, and the question that is genuinely open. A reader who was not in the
10
+ conversation has to be able to reconstruct why the decisions below were even a choice. A claim about
11
+ the tree carries its status where it is written — here or in a decision — `file:line`, or
12
+ *(unverified)*.
13
+
14
+ **Terms.** Only when the session fixed any; the exit's writing copies them into the glossary.
15
+
16
+ - **{{term}}** — {{its definition}} — avoid: {{the synonyms not to use}}
17
+
18
+ ## Decisions
19
+
20
+ ### 1. {{The decision, stated as a sentence}}
21
+
22
+ **Target.** `{{the document the decision is about}}`
23
+
24
+ - {{one line per address, opening on one of the four verbs — the exit writes where these say and
25
+ nowhere else. What exists is named by its identifier, what is created by `<path> § <heading>`,
26
+ never by a number: the writing assigns it. A heading is created once in a note, and a decision with
27
+ **Cases.** names exactly one rule — changed, renamed or created — to write them under, and never
28
+ lists its cases here.}}
29
+ - creates `{{path}} § {{heading}}`
30
+ - changes R-{{n}} — {{its heading}}
31
+ - retires C-{{n}} — {{its heading}}
32
+ - renames C-{{n}} — {{its heading}} → {{the new heading}}
33
+
34
+ **Decision.** What was decided, and the reasoning that decided it — the constraint that made this
35
+ option the one, not a summary of the option.
36
+
37
+ **Rejected.** One line per option that was not taken, already in the form the writing copies. This
38
+ list is why the note is worth writing: in six months the alternatives look attractive again, and
39
+ only their recorded cost stops the topic being re-opened from scratch.
40
+
41
+ - {{option}} — {{what it would have cost}}
42
+ - {{a former state this decision replaces}} — in force since {{date}}; {{what it cost}}
43
+
44
+ **Cases.** Only when the decision creates or changes a behaviour; the writing copies them as written.
45
+ Each names the values it runs on — a file, a number, a message: a branch of 2 400 changed lines,
46
+ not a large branch — as the *Worked case* does, so that it transcribes almost as is into a test.
47
+
48
+ #### {{The case, a heading unique in this note}}
49
+
50
+ Given {{the situation}}
51
+ When {{what is done}}
52
+ Then {{what is observed}}
53
+
54
+ ### 2. {{The next one}}
55
+
56
+ **Target.** …
57
+
58
+ **Decision.** …
59
+
60
+ **Rejected.**
61
+
62
+ - … — …
63
+
64
+ ## Worked case
65
+
66
+ One concrete case run end to end against the decisions above — a real file, a real command, a real
67
+ sequence. A decision that cannot be walked through on a case is not finished being decided.
68
+
69
+ ## What stays open
70
+
71
+ - **Open —** {{a question that blocks a decision and has no answer}} — answered by {{a read, a run,
72
+ or the user}}. Prefixed `Open` because a resumed run reads exactly these: they are what the next
73
+ session asks first. A note with any of them reaches no exit.
74
+ - {{what no conversation can settle today}} — settled by {{a case, a measurement, an event}}. No
75
+ prefix: it is not blocking. An item whose trigger cannot be named is not written here but put to
76
+ the user in the session; another topic is never a line here, since it lives in its own unfinished
77
+ note.
78
+ - Assumed, not evaluated: {{what a blindspot the user declined to map leaves standing}} — no
79
+ prefix either.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: commit
3
+ description: Group the working tree's changes by intention and write one Conventional Commit per intention, each approved before anything is staged.
4
+ ---
5
+
6
+ # /commit
7
+
8
+ Turns the working tree into commits that say something, for work no skill committed: the hand
9
+ path, whose commits `/mr` names *Not reviewed by codelife*. One commit per **intention** — the
10
+ issue worked, the typo noticed in passing — each shown with its files and its full message before
11
+ anything is staged. It never pushes: that is `/mr`'s, or yours.
12
+
13
+ ## Preconditions
14
+
15
+ A git repository with something to commit; a clean tree ends the run in one line. The commits go
16
+ on the branch checked out.
17
+
18
+ ## Brief
19
+
20
+ **Who gave the go-ahead**, and from what, opens it: you, typing the command or answering this
21
+ brief; your confirmed table in a driver, which answers what it named — ask only the rest; the word
22
+ `delegate`; or a session that relayed your words, quoted here — relayed is not delegated. Typed or
23
+ tabled, this brief is an announcement; otherwise the run **stops here** for your go-ahead, after
24
+ nothing but a preparation that only reads.
25
+
26
+ What `git status` shows — the branch and its upstream, the files staged, modified and untracked —
27
+ and the intentions this session named, stated before grouping, so a missing one is caught before
28
+ the proposal.
29
+
30
+ ## Parameters
31
+
32
+ None: the intentions are the conversation's, and every choice is put to you in the proposal.
33
+
34
+ ## Steps
35
+
36
+ 1. **Group by intention.** The intentions are the conversation's, in its words; the tree only
37
+ attaches files to them. A test goes with the module it mirrors, an output of `generated[]` in
38
+ `.claude/codelife.md` with its source, a manifest with the change that needed it. A file
39
+ matching two intentions is asked about; one matching none is left unstaged and named with its
40
+ reason; nothing attaching at all is a question — what is this change? — never a diff narrated
41
+ back. When one group must land first — a rename before its callers — say so.
42
+ 2. **Propose**, all at once: each group's exact files and its full message, written as
43
+ `codelife help method message` prints it, then the leftovers with their reason.
44
+ *Exit: you agree, or correct a group or a message.*
45
+ 3. **Commit**, group by group in that order: the message in a file in the scratchpad, then
46
+ `codelife commit <message file> '<path>' …`, each `'` in a path written `'\''`. What it prints
47
+ as `left unstaged` or `not committed` stays so. A refusal — a hook's, or a file staged
48
+ beforehand — is reported as printed and stops the run: the fix is the code or the message.
49
+
50
+ ## Never
51
+
52
+ - Sweep a leftover into the nearest group, or invent an intention the conversation never named.
53
+ - Split one intention because its diff is large, or merge two because each is small.
54
+ - Stage before you agreed; bypass a hook; amend, check out, switch, stash, rebase or push.
55
+ - Answer in a language the user did not write in, or write anything but English into the
56
+ repository or the tracker.
57
+
58
+ ## Output
59
+
60
+ The run ends on this block, under this exact heading:
61
+
62
+ ```markdown
63
+ ### commit result
64
+ - Produced: one line per commit: hash and subject.
65
+ - Decided: the grouping, and any message you rewrote.
66
+ - Left open: every file left unstaged or not committed, with its reason.
67
+ - Next: `/mr` on a work branch; nothing on `main`, `develop` or a `support/` line.
68
+ ```
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: mr
3
+ description: Open the merge request of work committed by hand, or update the one the branch has, its description written from the linked issues, the commit bodies and the diff.
4
+ ---
5
+
6
+ # /mr
7
+
8
+ Opens the merge request of the current branch, or updates the one it has, for work committed by
9
+ hand: `/work` opens its own. The description is written from the linked issues, the commit bodies
10
+ and the diff, so a fresh session writes the same one; everything else is `codelife mr open`'s, which
11
+ derives the target — the branch's parent, never asked — and pushes only once you confirm what it
12
+ prints.
13
+
14
+ ## Preconditions
15
+
16
+ `codelife mr open` checks them and prints a `- stop:` line naming the first that fails: a contract
17
+ whose tracker is a forge; a work branch, not `main`, `develop` or a support line, its work not yet
18
+ merged; a parent it can derive.
19
+
20
+ ## Brief
21
+
22
+ **Who gave the go-ahead**, and from what, opens it: you, typing the command or answering this
23
+ brief; your confirmed table in a driver, which answers what it named — ask only the rest; the word
24
+ `delegate`; or a session that relayed your words, quoted here — relayed is not delegated. Typed or
25
+ tabled, this brief is an announcement; otherwise the run **stops here** for your go-ahead, after
26
+ nothing but a preparation that only reads.
27
+
28
+ Made from the dry run of `codelife mr open` alone: the branch and its target, how far behind it,
29
+ the commits leaving, and whether a merge request opens or `!n` is updated.
30
+
31
+ ## Parameters
32
+
33
+ None: the target is derived. No `delegate`: nothing leaves the machine before you confirm what will.
34
+
35
+ ## Steps
36
+
37
+ 1. **Prepare** — `codelife mr open`, which sends nothing. A `- stop:` line ends the run, its reason
38
+ said. A `held:` line ends it too: a held choice is a delegated `/work`'s, validated by
39
+ `/work <n>` — the umbrella's number for a lot. Each question a line names is put to you; on a
40
+ yes to merging the target in, `git merge origin/<target>`, then the dry run again.
41
+ 2. **Draft the description** — skipped when the dry run says it is kept. As
42
+ `codelife help method description` prints it, from:
43
+ - the issues the `linked:` lines name — `codelife issue section <n> <heading>`, and
44
+ `codelife issue section <n> plan` for its `## Go-ahead` and its proof;
45
+ - the commit bodies, `git log origin/<target>..HEAD`;
46
+ - the diff: `git diff --numstat origin/<target>...HEAD`, then file by file
47
+ `git diff origin/<target>...HEAD -- <file>` — never a deletion, a pure rename, a binary, a
48
+ lockfile or a `generated:` path; the files the issues or the bodies name first, then the most
49
+ changed, while they fit 2 000 changed lines, one that does not fit skipped for the next.
50
+
51
+ The conversation adds what these do not carry, and is never the only source. On an update, read
52
+ the description the dry run wrote to a file first, and rewrite only its region; one with no
53
+ region is a question — wrap and rewrite it, or append below it — answered as `--wrap` or `--append`.
54
+ 3. **Confirm** — the description in a file in the scratchpad, `codelife mr open <file>`: what it
55
+ prints and the draft are the confirmation, never a bare *ready to push?* A `debt:` line whose
56
+ title is not the issue its line describes: fix or drop the line, and run it again.
57
+ 4. **Send** — on your yes, `codelife mr open <file> --send`, with no file when the description is
58
+ kept. A `- stop:` line is reported as it reads: nothing was sent.
59
+
60
+ ## Never
61
+
62
+ - Validate, push or refuse a held choice: that is `/work <n>`'s.
63
+ - Write outside the description's region, or guess who wrote a description that has none.
64
+ - List under *Debt noticed* what is not filed: that is `/new-issue`.
65
+ - Run `--send` before you confirmed what `codelife mr open <file>` printed.
66
+ - Check out, switch, stash, add a worktree, force-push or squash.
67
+ - Answer in a language the user did not write in, or write anything but English into the
68
+ repository or the tracker.
69
+
70
+ ## Output
71
+
72
+ The run ends on this block, under this exact heading:
73
+
74
+ ```markdown
75
+ ### mr result
76
+ - Produced: the merge request, its number and link, and the branch pushed.
77
+ - Decided: the target merged in or not, the description — written, or kept when only that merge
78
+ was new — and the push.
79
+ - Left open: the debt listed, and what the push tier reported without failing on.
80
+ - Next: the merge on the forge, `/mr` again first if the target moves; `/work <n>` when a held
81
+ choice stopped the run.
82
+ ```
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: new-issue
3
+ description: File one issue — from a subject or from the conversation — after a search of the open issues and of what the specification decided, stopping rather than re-litigating a decision.
4
+ argument-hint: "[subject]"
5
+ ---
6
+
7
+ # /new-issue
8
+
9
+ Files **one** issue, after searching what is already known: a subject that is two things is two
10
+ runs. What makes it a skill rather than a command: **a subject the specification decided against
11
+ stops it** — reversing a decision is `/brainstorm`'s `supersede`, never an issue. Work already done
12
+ is still filed, its body in the past and left open for the skill that lands it: its number is what
13
+ the branch is named from.
14
+
15
+ ## Preconditions
16
+
17
+ A contract. Under `tracker.kind: none` the issue is a new file under `issues/`, left for `/commit`;
18
+ the run says so in one line.
19
+
20
+ ## Brief
21
+
22
+ **Who gave the go-ahead**, and from what, opens it: you, typing the command or answering this
23
+ brief; your confirmed table in a driver, which answers what it named — ask only the rest; the word
24
+ `delegate`; or a session that relayed your words, quoted here — relayed is not delegated. Typed or
25
+ tabled, this brief is an announcement; otherwise the run **stops here** for your go-ahead, after
26
+ nothing but a preparation that only reads.
27
+
28
+ The subject and **where it came from** — the argument, or the conversation: a lead noticed during
29
+ `/work` or a review, the last ten words — stated, never silently assumed. Then the **origin** its
30
+ title will name: `issue:#<n>` or `mr:!<n>` for the issue or merge request the session is on, none
31
+ for a subject typed from nowhere. A subject about a file of another repository — a submodule —
32
+ stops here, naming that repository: `/new-issue` runs there.
33
+
34
+ ## Parameters
35
+
36
+ One batch, each with a recommendation: the **nature** — `bug` when the behaviour breaks a promise,
37
+ `feature` when it is defensible but something is missing — and the **severity**, from the impact
38
+ described.
39
+
40
+ ## Steps
41
+
42
+ 1. **Search** — the subject's terms in a file in the scratchpad, one per line: the identifiers it
43
+ cites first — a function, a script, an error message, a file's basename —, then its distinctive
44
+ words, never the whole sentence; then `codelife search <file>`. Write its terms and at most five
45
+ candidates in your reply — a tool's output is not one —, and conclude:
46
+ - **decided** — a refusal line, or a rule that already answers the subject: show it with
47
+ `codelife spec <id>`, its date and its rejected options, and **stop**, naming any open
48
+ candidate beside it. A rule the subject asks to be honoured stops nothing: step 2 cites it;
49
+ - **duplicate**, on your answer — the `duplicate` comment of `codelife help method comments`
50
+ in a file, posted by `codelife issue note <n> <file>`; then the origin's link of step 3, its
51
+ *Already carried by* form, and stop;
52
+ - **related** — cited in the body, *Related to #n*, or a pending note as the design under way;
53
+ or nothing: go on.
54
+ 2. **Draft** — as `codelife help template bug` or `feature` prints an issue, in a file in the
55
+ scratchpad whose first line is `# <sentence>`, the symptom in one short sentence; *Where it
56
+ comes from* names the origin, linked, and the rule it concerns. On a public repository an
57
+ exploitable reproduction stays in this conversation, the body saying *reproduction withheld*.
58
+ *Exit: the draft, whole, in your reply, and your agreement or correction — save in a run your
59
+ confirmed table started, which agreed to it.*
60
+ 3. **File** — `codelife issue create <nature> <severity> <origin|-> <file>`. Then, with an origin,
61
+ its link: the `debt-link` comment of `codelife help method comments` in a file — its first line
62
+ `codelife: debt-link — /new-issue — <date>`, the title it names `[<origin>] <sentence>` —, posted by
63
+ `codelife issue note <n> <file>` on an issue — on its **umbrella** when the origin is a member
64
+ of an open lot, where `/work`'s table offers the join — or `codelife mr post <mr> <file>` on a
65
+ merge request.
66
+
67
+ ## Never
68
+
69
+ - File two issues in one run, close the one filed, or refuse it because the work is done.
70
+ - File what a decision of the specification settled, or a near-duplicate of it.
71
+ - Write the issue or its file yourself: `codelife issue create` numbers it, under `none` too.
72
+ - Commit an exploitable reproduction to a public repository.
73
+ - Answer in a language the user did not write in, or write anything but English into the
74
+ repository or the tracker.
75
+
76
+ ## Output
77
+
78
+ The run ends on this block, under this exact heading:
79
+
80
+ ```markdown
81
+ ### new-issue result
82
+ - Produced: the issue, its number and link, and the link on the origin — or the `duplicate`
83
+ comment on the issue that already carries the subject.
84
+ - Decided: the nature, the severity, and the search's conclusion.
85
+ - Left open: the candidates found and not merged into it; a decision that stands.
86
+ - Next: `/work <n>` — `/commit` first under `tracker.kind: none`; nothing when the run stopped.
87
+ ```