@rasensio/aidlc-content 1.56.0 → 1.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/docs/index.yaml CHANGED
@@ -42,7 +42,7 @@ entries:
42
42
  title: The lifecycle
43
43
  file: lifecycle.md
44
44
  source: packages/cli/src/core
45
- commands: [init, start, continue, status, transition, gate, menu, amend, templates, spec, cross-check]
45
+ commands: [init, start, continue, status, transition, gate, menu, amend, templates, spec, cross-check, revert]
46
46
 
47
47
  - id: state-and-concurrency
48
48
  kind: topic
package/docs/lifecycle.md CHANGED
@@ -181,6 +181,23 @@ carry `(wave: <n>)` in `tasks.md`; a wave must be a run of consecutive tasks, an
181
181
  the task and warns rather than dropping it from gate coverage. The whole loop is one rule file,
182
182
  `.aidlc/resources/rules/task-agents.md`, so a session that runs its tasks itself never reads it.
183
183
 
184
+ **Undoing a task.** Each commit made for a task ends with a `Task: <instance>/T<n>` git trailer. `aidlc revert <instance> --task T3` reads those trailers on the commits since the branch left `main`, prints
185
+ the commits it would undo — newest first, marking any that also belong to another task as shared — and
186
+ asks first:
187
+
188
+ ```
189
+ Plan: undo T3 of add-export — 2 commits on feat/add-export since main, newest first:
190
+ 4f1c2ab feat: csv writer handles quotes [T3, T4] — shared: also T4
191
+ 9e0d311 feat: csv writer [T3]
192
+ Tasks reset to open in tasks.md (if done): T3, T4
193
+ ```
194
+
195
+ On a yes it adds one commit that undoes them, leaves `.aidlc/state/` as it was except those checkboxes,
196
+ and abandons cleanly if the undo conflicts with later work. A clash inside `.aidlc/state/` alone — the
197
+ next task's checkbox on the line below — is not such a conflict. `--phase implementation` undoes every task
198
+ commit at once; `--dry-run` only prints the plan; without a terminal it needs `--yes`. It works only
199
+ during implementation and never on `main`.
200
+
184
201
  ## Where the code lives
185
202
 
186
203
  - `packages/cli/src/core` — templates, scope resolution, and the gate engine.
@@ -197,6 +214,11 @@ the task and warns rather than dropping it from gate coverage. The whole loop is
197
214
  leave the corpus untouched.
198
215
  - `packages/cli/src/crosscheck` — `aidlc cross-check`, a pure comparison of one instance's three
199
216
  planning artifacts. Nothing but its own command imports it, and a test keeps it that way.
217
+ - `packages/cli/src/revert` — `aidlc revert`: reads `Task:` trailers over `main..HEAD`, builds the plan
218
+ (pure), and applies it as one commit, returning to the recorded `HEAD` on any failure. It reads
219
+ `git log -z` with NUL between fields because NUL is the one byte a commit message cannot carry; git
220
+ keeps every other control character, and a body carrying the first separators chosen forged a
221
+ commit from `main` into the plan.
200
222
  - `packages/cli/src/menu` — the interactive picker. It reads no lifecycle state by design, because
201
223
  "what should I do next?" belongs to the skill, not the menu.
202
224
  - `packages/content/templates` — the five templates, as data.
@@ -37,6 +37,14 @@ project, so there is no second version to drift.
37
37
  `init` installs skills for the platforms listed in `.aidlc/config.yaml`. `update` refreshes them after
38
38
  the framework changes, and also rewrites the managed block in `CLAUDE.md`.
39
39
 
40
+ **A version bump alone changes no generated file.** Each embedded skill body opens with
41
+ `<!-- aidlc:generated version=… sha256=… -->`, and the version is the CLI version at which that body
42
+ last changed, not the one that last wrote it: when the emitted body hashes to the recorded `sha256`,
43
+ `update` keeps the line as it is. Stamping the running version instead restamped 42–44 identical files
44
+ on every release, and every branch that ran `update` then conflicted with every other on files nobody
45
+ edited. So an older version in a marker is normal. `aidlc doctor` reports a body only when it no longer
46
+ matches its hash (a hand edit) or names a CLI newer than the one running (upgrade the CLI first).
47
+
40
48
  **Anything you write inside that managed block is lost on the next update.** Put project instructions
41
49
  above the start marker or below the end marker. This repo's own `CLAUDE.md` says so at the top, and the
42
50
  "Lessons That Keep Costing Us" section sits deliberately outside the block for exactly that reason.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc-content",
3
- "version": "1.56.0",
3
+ "version": "1.58.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -53,7 +53,7 @@ Then the source files that task touches. See **The context rule** (`.aidlc/resou
53
53
  - Infrastructure changes (provisioning, configuration)
54
54
  - Permission or access control modifications
55
55
  - Credential or secret handling
56
- 7. **Commit incrementally.** Produce working code at each step; avoid large uncommittable diffs.
56
+ 7. **Commit incrementally, one task per commit where you can.** Produce working code at each step; avoid large uncommittable diffs. End every commit made for a task with a git trailer naming it — `Task: <instance>/T<n>` on its own line in the last paragraph of the message, one line per task when a commit spans two. The trailer is what lets `aidlc revert <instance> --task T<n>` find that task's commits later and undo them in one step, after showing the plan; a commit without it is invisible to the command.
57
57
  8. **Update the knowledge graph.** After modifying code, record what changed with `aidlc knowledge add` / `relate` / `update`: new or restructured modules, decisions taken, debt introduced or paid down. Keep the graph in sync with the code you just changed.
58
58
  9. **Update state.** As implementation artifacts are produced, mark them in `phase-implementation.yaml`.
59
59