@ersbeth/codelife 0.0.0-stage → 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 +65 -2
  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 +38 -4
  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,81 @@
1
+ # Lens VERIF — Verification
2
+
3
+ ## Objective
4
+
5
+ Say whether a verification would fail if a behaviour broke, and what the repository ships that
6
+ nothing would notice disappearing. A suite that always passes is worse than no suite: it buys
7
+ confidence without selling anything — and what an agent can break with nothing going red is the
8
+ same question asked of every shipped file.
9
+
10
+ ## Questions
11
+
12
+ - **Can each suite fail?** Would a test go red if what it asserts broke, or does its mock answer
13
+ whatever is asserted? A suite whose tests would pass against a broken subject asserts nothing.
14
+ - **What can be removed or corrupted with nothing going red?** A shipped file no suite names — a
15
+ reference, a template, a configuration the tooling reads — is what an agent can silently
16
+ destroy.
17
+ - What has **no test at all**? Name the modules, not a percentage: coverage figures hide which
18
+ half is covered.
19
+ - Are **fixed bugs pinned**? A defect fixed without a test that goes red for it will come back, and
20
+ nothing will say so.
21
+ - Does a behaviour reach **every place that should adopt it**? A new rule applied in one of the
22
+ three call sites that need it is a regression waiting for the other two.
23
+ - Do the tests assert **behaviour or implementation**? A test that mirrors the code line by line
24
+ fails on every refactor and catches nothing.
25
+ - Are there **skipped, `.only`, flaky or commented-out** tests?
26
+ - Is `test:one` usable on a single file, and does `test:all` run everything the repository has — or
27
+ only what the default configuration happened to match?
28
+
29
+ A test is code every lens reads: a `catch` that swallows inside a test is FAIL's, a wrong
30
+ assertion BUG's. VERIF asks whether the verification would *see* a break, not whether the test
31
+ code is correct.
32
+
33
+ ## Probes
34
+
35
+ - **The suites and what they match** — the `scripts` of `package.json`, and the baseline's output
36
+ you were handed: the suite as it ran, what it ran and what it reported. Not handed → a line of
37
+ `Limits`, the suite unread rather than run.
38
+ - **Tests that are not run** — `\.skip|\.only|xit\(|xdescribe\(` in the tracked `*.test.*` and
39
+ `*.spec.*` files.
40
+ - **What has no neighbour test**, where the repository keeps its tests in a mirror of its sources —
41
+ both directories read from the tracked files and named in *Method*, the sources whose name has no
42
+ counterpart among the suites' once `.test` or `.spec` is set aside. No mirror → the neighbour-test
43
+ question is not applicable, said under `Limits`.
44
+
45
+ **Two suspicions are candidates, never probes**: a lens runs nothing, and the lenses beside it read
46
+ the same tree.
47
+
48
+ - **An assertion that would stay green inverted** — a mock that answers whatever is asserted, a
49
+ matcher that accepts anything. The candidate names the assertion's `file:line` and why the suite
50
+ would stay green with it inverted.
51
+ - **A shipped file nothing tests** — a tracked file whose basename no suite carries. The candidate
52
+ names the file and why the suite would stay green without it.
53
+
54
+ A suspicion you cannot say why of is not one to return.
55
+
56
+ ## For a change
57
+
58
+ A behaviour a change adds has a test that fails without it, and no test it changes is weakened — no
59
+ widened matcher, no removed assertion, no skip, no snapshot regenerated without its reason in the
60
+ commit's message. A place outside the files it touches that owes the behaviour too — a sibling of
61
+ the touched function, a second caller — adopts it, or the plan says why not.
62
+
63
+ ## Signals learned
64
+
65
+ - **Reviews most often find defects in the tests themselves.** The Kappa project's kept review
66
+ findings were about the tests more than about the code they test — an assertion that cannot fail,
67
+ a fixture that hides the case, a test that passes for the wrong reason. Read a test as hard as
68
+ the code it guards.
69
+ - **A shipped file nothing tests is the sharpest question here.** Measured on codelife: 39
70
+ `references/` files shipped, no assertion touched any of them, and removing a lens reference left
71
+ the suite green — after which `/audit` reported that lens as *not implemented* and carried on.
72
+ An agent could delete a measuring instrument and nothing objected.
73
+ - **Coverage is uneven in a way the counts hide.** The same repository asserted every skill's
74
+ frontmatter and anatomy, so `SKILL.md` was well guarded, while the `references/` and `templates/`
75
+ beside it were guarded by nothing. Report the *shape* of the gap, not a percentage.
76
+ - A repository whose `test:all` is `echo 'nothing to run'` has a *not ported* state, not an empty
77
+ suite — say which, they are different findings.
78
+ - A suite that only runs on the developer's machine, never in a hook, is a GUARD finding as much as
79
+ a VERIF one: file it once, on the lens whose reference explains it best.
80
+ - Snapshot suites drift silently, and when a snapshot was last regenerated against the code it
81
+ covers is per-file history no lens is handed: a snapshot suite is a line of *Limits*, not a date.
@@ -0,0 +1,40 @@
1
+ // The link a repository's install makes: `.claude/skills/codelife`, to the package in its
2
+ // `node_modules/` (R-272) — a symbolic link, a junction on Windows, which needs no administrator
3
+ // right. Imported by `install.mjs` and `init.mjs`. Git is told to ignore it through the clone's
4
+ // `.git/info/exclude`, so no tracked file changes.
5
+ import './node-floor.mjs'
6
+ import { existsSync, lstatSync, mkdirSync, readFileSync, appendFileSync, readlinkSync, rmSync, symlinkSync } from 'node:fs'
7
+ import { dirname, join, resolve } from 'node:path'
8
+ import { spawnSync } from 'node:child_process'
9
+
10
+ export const LINK = '.claude/skills/codelife'
11
+
12
+ // Links <repo>'s LINK to its installed package; says so, and fails nothing, when there is none;
13
+ // returns whether it made the link.
14
+ export function link(repo) {
15
+ const pkg = join(repo, 'node_modules/@ersbeth/codelife')
16
+ const at = join(repo, LINK)
17
+ if (!existsSync(pkg)) return console.log(`codelife: no ${pkg}, so no ${LINK} link — install the package first`)
18
+ const target = process.platform === 'win32' ? resolve(pkg) : '../../node_modules/@ersbeth/codelife'
19
+ let st = null
20
+ try { st = lstatSync(at) } catch { /* absent */ }
21
+ if (st && !st.isSymbolicLink()) {
22
+ console.error(`codelife: ${at} exists and is not a link, left untouched — move it aside and install again`)
23
+ process.exit(1)
24
+ }
25
+ if (st && resolve(dirname(at), readlinkSync(at)) === resolve(dirname(at), target)) return false
26
+ if (st) rmSync(at, { force: true })
27
+ mkdirSync(dirname(at), { recursive: true })
28
+ symlinkSync(target, at, 'junction') // the type is read on Windows only
29
+ exclude(repo)
30
+ return true
31
+ }
32
+
33
+ function exclude(repo) {
34
+ const g = (...a) => spawnSync('git', a, { cwd: repo, encoding: 'utf8' })
35
+ if (g('rev-parse', '--git-dir').status !== 0 || g('check-ignore', '-q', LINK).status === 0) return
36
+ const file = resolve(repo, g('rev-parse', '--git-path', 'info/exclude').stdout.trim())
37
+ mkdirSync(dirname(file), { recursive: true })
38
+ const had = existsSync(file) ? readFileSync(file, 'utf8') : ''
39
+ appendFileSync(file, `${had && !had.endsWith('\n') ? '\n' : ''}/${LINK}\n`)
40
+ }
@@ -0,0 +1,21 @@
1
+ codelife help method cause — locate a defect's cause before a fix is planned
2
+
3
+ 1. **See it happen first.** Run what the report says shows the symptom, with the cheapest
4
+ instrument that can answer — a command, a test run, a log — never a browser unless nothing else
5
+ can. Not observed, or the attempt fails → stop: `not located`, quoting what you ran and what it
6
+ printed. A failed attempt says the attempt failed, not that the problem is absent. A report
7
+ that could mean two behaviours: ask which, or, when nobody can answer, take the likelier and
8
+ say so.
9
+ 2. **State one hypothesis that can be false**: a mechanism an observation can come out against —
10
+ *the cache is not invalidated when the key changes, so the second call returns the first's
11
+ value*, not *the value is stale*. A report naming a `file:line` gives the first hypothesis.
12
+ 3. **Say, before observing, what result would refute it**, then observe: a throwaway probe in a
13
+ scratch directory, never in the repository. A probe inside a source file copies the file aside
14
+ first and restores from that copy with a `trap` armed before the edit — never from the index or
15
+ `HEAD`.
16
+ 4. **Refuted** → note it with what refuted it, never try it again, back to 2. **Survived** → refine
17
+ it until a fix can be planned against it. The third refuted hypothesis is the cap: stop there,
18
+ `not located`.
19
+ 5. **Report** the cause, or `not located` with every hypothesis ruled out and what ruled it out —
20
+ never a guess promoted to a cause because the run was long. A probe is not a proof: throw it
21
+ away; the regression case is written later, by the red-green method.
@@ -0,0 +1,157 @@
1
+ codelife help method comments — the records the plugin posts on an issue, each opening on its line
2
+
3
+ Plugin-owned, never parameterised by a contract. Each opens with **one recognisable line**:
4
+
5
+ ```markdown
6
+ codelife: <kind> — <skill> — <date>
7
+ ```
8
+
9
+ That line is the whole mechanism: it is how `/overview` finds an approved plan months later, how
10
+ `/work` knows a plan has no closing comment yet, and how a human scanning an issue sees at a
11
+ glance which comments came from a skill and which from a person. A review's pass on a merge request
12
+ reads `codelife: review — pass <k> — <sha>` instead, its number and head standing for the skill and
13
+ the date. `codelife issue view <n>` reads an issue's records back, oldest first.
14
+
15
+ ## `plan` — written by `/work`, before implementation starts
16
+
17
+ ```markdown
18
+ codelife: plan — /work — <date>
19
+
20
+ <the planner's report whole: `## What is wrong`, `## The cause` for a located `bug`,
21
+ `## The approach`, `## The cases` when the issue cites some, `## What proves it`, `## Objectives`,
22
+ `## Files`, `## Verification`, `## Commits`, `## Out of scope`, `## Difficulty`>
23
+
24
+ ## Go-ahead
25
+ <who gave this run its go-ahead, as its brief or its driver's brief stated it: you, typing the
26
+ command or answering the brief; your confirmed table in the driver it names; delegated, the command
27
+ you typed and each constraint the table carried for this issue, quoted; or relayed, the session that
28
+ relayed it and your words it quoted>
29
+ ```
30
+
31
+ `## Go-ahead` is in every plan, and informs: it delegates nothing, and a relayed go-ahead is not a
32
+ delegation. `/mr`'s lead is read from it.
33
+
34
+ The **resumption artefact**: a `plan` comment with no `closing` comment after it means the work
35
+ was started and not finished. It is posted **before** the code is written, so an interrupted
36
+ session leaves its thinking behind rather than its diff.
37
+
38
+ ## `closing` — written by `/work`, at the end
39
+
40
+ ```markdown
41
+ codelife: closing — /work — <date>
42
+
43
+ Fixed in `<hash>` — <the commit's subject>.
44
+ Proved by: <the proof the plan named, `<path>` for a test> — <what it proves>.
45
+ Verified: <the tier that ran, the guards the diff triggered, and each objective of the plan with its answer, or left to the review>.
46
+ <anything a number moved, with the baseline it was compared to>
47
+ ```
48
+
49
+ An issue already satisfied by an earlier commit, `#<earlier>` the issue its `Closes:` or `Refs:` footer names, opens its second line on `Already fixed
50
+ in <hash> (#<earlier>) — <that commit's subject>.` instead, the rest unchanged.
51
+
52
+ The issue is closed **by hand** with this comment; the `Closes:` footer its commit carries is a
53
+ cross-reference, never what closes: the closing is a statement about what was verified, not a
54
+ side effect of a branch landing.
55
+
56
+ **The STATUS** opens on the same first line and is what a delegated run posts when it stops: why
57
+ it stopped, what was tried, what remains. The issue stays open above it.
58
+
59
+ ## `lot-closing` — written by `/work`, or `codelife lot leave`, on a lot's umbrella with its last open member
60
+
61
+ ```markdown
62
+ codelife: lot-closing — </work, or codelife lot leave> — <date>
63
+
64
+ Branch: `<the branch it ran on>`.
65
+ Members closed: <#n, #n, … — each row of the umbrella, read from its issue>.
66
+ Merge request: not yet opened — `/work <umbrella>` opens it from the branch once every member's commit is there.
67
+ ```
68
+
69
+ The umbrella's own form: a member's `closing` fields — the hash, the proof, the tier — describe one
70
+ issue's fix, and each member carries its own. The umbrella closes with its last member, before
71
+ the merge; this says where the lot's work is and that the merge request is still to come. A leave
72
+ that takes the last open member writes the same comment without the `Branch:` and `Merge request:`
73
+ lines, since it runs on whatever branch and promises no merge request; when no row is left the
74
+ umbrella closes `wontfix`, its members closed `none`.
75
+
76
+ ## `finding` — written by `codelife audit file`, right after `create`
77
+
78
+ ```markdown
79
+ codelife: finding — /audit — <date>
80
+
81
+ <the finding as its file in the campaign folder carries it — the lead, What happens, Why it matters, Evidence
82
+ with the reproduction and its output, What to do with its `tried` / `untried` marker — without its
83
+ `Disposition` line, which would name the issue this comment sits on>
84
+ ```
85
+
86
+ The one copy of a finding that outlives the campaign: the report folder is deleted at the close,
87
+ so the comment is where `/work` reads the evidence and where a finding found wrong later is
88
+ corrected. The issue's body is the finding's lead and a *Where it comes from* naming the campaign
89
+ and the finding id, with no file anchor. On a repository not known to be private, an exploitable
90
+ reproduction is left out by the judge that wrote the finding, which says *withheld*.
91
+
92
+ ## `re-reported` — written by `codelife audit file`, on a still-open issue
93
+
94
+ ```markdown
95
+ codelife: re-reported — /audit — <date>
96
+
97
+ Campaign A<n> observed this again, as finding <id>: <the finding's lead>.
98
+ ```
99
+
100
+ What makes a recurring campaign compound instead of repeat: an issue is not filed twice, it is
101
+ annotated.
102
+
103
+ ## `duplicate` — written by `/new-issue`, on the open issue that already carries a subject
104
+
105
+ ```markdown
106
+ codelife: duplicate — /new-issue — <date>
107
+
108
+ Seen again from <the origin: this merge request, this issue, or "a subject typed from nowhere">: <what this run adds to the issue, or "nothing it lacks">.
109
+ ```
110
+
111
+ A run that is not a campaign has no `re-reported`'s "Campaign A<n>"; this says whose sighting it is.
112
+
113
+ ## `rewritten` — written by `/roadmap`, on an open issue a rule change made stale
114
+
115
+ ```markdown
116
+ codelife: rewritten — /roadmap — <date>
117
+
118
+ Rewritten to <R-n — heading> as it stands at <commit>, the commit `/roadmap` read.
119
+ <for a started issue: what its commits <hashes> already do>
120
+ ```
121
+
122
+ The body above is the confirmed one; this says why it changed, for whoever works the issue next.
123
+
124
+ ## `refused` — written by `/work`, on the issue whose held choice the user refused
125
+
126
+ ```markdown
127
+ codelife: refused — /work — <date>
128
+
129
+ The held choice of `<hash>` — `Held: <its trailer>` — is refused: <the user's reason, quoted>.
130
+ Later commits on its files: <the hashes its `held:` line names, or "none">.
131
+ ```
132
+
133
+ Posted by `codelife issue reopen`. The decision the member's new plan starts from: `/work` redoes
134
+ the work with this answer and closes the issue again. The later commits are named because they may have built on the refused choice.
135
+
136
+ ## `debt-link` — written by `/new-issue`
137
+
138
+ ```markdown
139
+ codelife: debt-link — /new-issue — <date>
140
+
141
+ Filed as #<n> — <its title, tag included>.
142
+ Noticed while <the origin: this merge request, this issue>.
143
+ ```
144
+
145
+ Posted on the **origin** — the issue or merge request the session was on, or the umbrella of a
146
+ member of an open lot, where `/work`'s table offers the join — so the trail from "noticed here" to
147
+ "filed there" survives the session. When `/new-issue` finds the subject already
148
+ carried, the first line is the same and the second reads `Already carried by #<n> —
149
+ <title>; noted there.`, so the trail ends at the issue that has it.
150
+
151
+ ## Never
152
+
153
+ - Write a comment without its first line, or change the line's shape: it is a lookup key.
154
+ - Post a `plan` after the implementation — it is the artefact that survives an interruption, and
155
+ posted late it is only a summary.
156
+ - Use these templates for a conversation with a person: they are records, and a discussion belongs
157
+ in a plain comment.
@@ -0,0 +1,67 @@
1
+ codelife help method description — a merge request's description, which `codelife mr open` checks
2
+
3
+ Copy from the begin marker to the end marker, fill it from the dry run of `codelife mr open` and
4
+ your sources, and give the file to the verb: it refuses a region or a heading missing or out of
5
+ order. A first line `# <title>` above the region titles a new merge request.
6
+
7
+ <!-- codelife:begin -->
8
+ <!-- For a reviewer who knows the language and the forge, not this repository: a term the project
9
+ coined is explained where it first appears and linked by the `links:` URL, never by a path.
10
+ Every section present, as long as a reviewer without context needs, and no longer. -->
11
+
12
+ <!-- The lead, no heading: one or two sentences that stand alone. When a linked issue's plan says
13
+ under `## Go-ahead` that the work was delegated or relayed, the lead says it ran without you
14
+ present, and how. -->
15
+
16
+ *Not reviewed by codelife* — <each `hand commit:` line, its hash and subject>
17
+
18
+ <!-- Absent when `hand commits: 0`. On a merge request /work opened, its review's account stays and
19
+ this line names the hand commits alone. -->
20
+
21
+ ## Why
22
+
23
+ <!-- The situation before this branch and what was wrong with it, with a concrete example, from the
24
+ linked issues. On a lot's branch, the umbrella's common cause, then one sentence per member. -->
25
+
26
+ ## What changes
27
+
28
+ <!-- What the branch does, grouped by subject and never by commit, with the choices made and the
29
+ alternatives set aside — a held choice among them, as its commit body names it. On a lot's
30
+ branch, one paragraph per member, opening on its number. A unit /work reviewed says what its
31
+ review found and what was fixed. -->
32
+
33
+ ## Reading the diff
34
+
35
+ <!-- Where to start, what can be skimmed, what deserves attention; on a small branch one sentence,
36
+ "one file, line 42"; on a lot's branch one reading order, naming the files several members
37
+ touch. A change repeated across files is one entry: the change, the count, one example. What
38
+ was not read line by line is listed by directory, with its files and changed lines. -->
39
+
40
+ ## How to test
41
+
42
+ <!-- One line per runnable thing, in this order: each regression test the diff adds, the push tier,
43
+ each manual step a plan names as its proof. /review-mr runs them as written. Reading one file
44
+ against another is no test: it goes under Reading the diff. A red proof is cited where the
45
+ issue's closing comment records it. A manual step: one action per numbered line, then a last
46
+ Expected line. `{{run}}` is the `run:` line. -->
47
+
48
+ - `{{run}} test:one <path>` — green; proved red before the fix, see #<n>'s closing comment
49
+ - `{{run}} verify:push`
50
+ - *manual* — <title>
51
+ 1. <one action>
52
+ 2. **Expected:** <the outcome>
53
+
54
+ ## Linked issues
55
+
56
+ <!-- The `linked:` lines, as printed. -->
57
+
58
+ - Closes #<n> — <title>
59
+
60
+ ## Debt noticed
61
+
62
+ <!-- What the work found and did not fix, each already filed: anything unfiled is /new-issue. Each
63
+ number is kept only if its `debt:` line names the issue its line describes. "None" is an
64
+ answer. -->
65
+
66
+ - #<n> — <one line>
67
+ <!-- codelife:end -->
@@ -0,0 +1,24 @@
1
+ codelife help method message — a commit message, whose first line the `commit-msg` hook checks
2
+
3
+ `<type>(<scope>)<!>: <subject>` — imperative, 72 characters at most. The type is chosen, never
4
+ guessed: `feat`, `fix` and `perf` reach the changelog; `refactor`, `test`, `docs`, `chore`, `ci`,
5
+ `build` and `style` do not, unless `!` marks a break, which reaches it whatever the type. The scope is the repository's own word:
6
+
7
+ ```bash
8
+ git log -200 --format=%s | sed -nE 's/^[a-z]+\(([^)]+)\).*/\1/p' | sort | uniq -c | sort -rn
9
+ ```
10
+
11
+ With none, the package name in a workspace; otherwise no scope.
12
+
13
+ The body says **why**: what was wrong, what constraint decided the approach — never what the diff
14
+ already shows.
15
+
16
+ The footer is the **last paragraph**, the session's `Co-Authored-By:` lines in it: git reads
17
+ trailers from that paragraph alone. It links, and never closes: `Refs: #<n>` for an issue that
18
+ stays open, `Closes: #<n>` for one closed by hand anyway; the finding id (`A3-PKG-1`) when there is
19
+ one; `Answers: pass <k>: <n>, …` on a commit answering a review's pass.
20
+
21
+ **In a delegated run** the body also names each choice the commit took alone — what, why, and what
22
+ it costs if wrong. A choice held for the user's validation is a commit of its own, saying the same,
23
+ ending on `Held: <what the user has to validate>`; the redo of one refused ends on one
24
+ `Replaces: <its hash>` line per hash.
@@ -0,0 +1,28 @@
1
+ codelife help method red-green — prove a behaviour's fix: a test red for its stated reason, then green
2
+
3
+ 0. **Prove the runner can fail.** Run `test:one` on the file you will write into. A script that
4
+ returns 0 on a file it cannot have run, or prints *nothing to run*, verifies nothing: stop and
5
+ say the runner cannot go red. No such script → the repository is not ported: stop.
6
+ 1. **Write the case** where the suite keeps its subject, named like its neighbours. Its title opens
7
+ on the specification's identifier it proves (`C-<n> …`), else cites the issue (`(#<n>)`).
8
+ 2. **Run it red**, narrowed to the new case. Read the failure: it must be the reason the plan
9
+ states — for a feature, *not implemented*: the symbol undefined, the old behaviour observed.
10
+ Another reason → **broken, not red**: quote it and stop. Green on the red run → nothing
11
+ to fix, or the case misses the defect: say which, and stop.
12
+ 3. **Fix**: the smallest change that makes it pass, inside the plan's files.
13
+ 4. **Run green**: `test:one` on the whole file, then `test:all`; report the runner's counts.
14
+ `test:all` red → the fix is not green, whatever `test:one` said.
15
+ 5. **Refactor** only with green, only inside the plan's files, then `test:all` again; red after a
16
+ refactor is reverted, not chased.
17
+
18
+ Every test run — step 0's, the red, the green, the run after a refactor — has its whole output
19
+ written to a file, never into the conversation: a pass prints the runner's count line, a failure
20
+ the exit status and the last 40 lines of that file.
21
+
22
+ A repair that leaves the red red, or a verification re-run that stays red, counts as an attempt:
23
+ three, and stop, no fourth tried. A run that could not measure — the runner does not start, the
24
+ failure is environmental — spends none and stops at once. Quote failures, never summarise them; never change an
25
+ assertion or a snapshot to match what was observed. Prose or structure has no red: it is proved by the guard that
26
+ would have caught it, named — or, prose an agent follows at run time, by a run played by hand in
27
+ the merge request's *How to test*. Never a grep on the sentence just written, nor a guard
28
+ over a file nothing will edit again.
@@ -0,0 +1,22 @@
1
+ codelife help method refusal — one line of `## Rejected`, what a decision not to do something leaves
2
+
3
+ A refusal is a decision whose rejected option is doing the thing, so it leaves one line of the
4
+ specification's memory of refusals — what `codelife search` finds when the idea comes back — and no
5
+ note:
6
+
7
+ ```markdown
8
+ - <address> — <what is not done> — <why, and what doing it would have cost> — <YYYY-MM-DD>
9
+ ```
10
+
11
+ - **Where** — the `## Rejected` of the capability whose rule the refused change would have touched,
12
+ found by `codelife search`; that of `principles.md` when it concerns none.
13
+ - **The address** — `R-<n>` or `K-<n>`, or `§ <heading>` for a heading of that file with no
14
+ identifier.
15
+ - **The reason** — the evidence that carried it, verbatim, and the cost of doing it. *Not now* is
16
+ no refusal: it is an issue left open.
17
+ - **The date** — `date +%F`, never from memory.
18
+
19
+ Append the line to the section as it stands and edit nothing else; the pre-commit hook holds it.
20
+ Every later reference to the refusal — a closing comment, a reply, a disposition — quotes the line
21
+ and its file. A specification not in the form (`codelife form spec` says so) takes no line: the
22
+ reason goes into the tracker's closing comment alone, and the result block says why.