@sabaiway/agent-workflow-memory 8.0.2 → 8.1.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,23 @@
2
2
 
3
3
  All notable changes to the memory substrate. Versions are this **package's** npm versions;
4
4
  they are distinct from the **deployment-lineage** stamp written into a project's
5
- `docs/ai/.memory-version` (which tracks the shared `agent-workflow` lineage, head `3.0.0`).
5
+ `docs/ai/.memory-version` (which tracks the shared `agent-workflow` lineage, head `4.0.0`).
6
+
7
+ ## 8.1.1 — the gate-migration's checker screen takes an argument tail (AD-158)
8
+
9
+ `references/scripts/migrate-gates.mjs`: the guarded `checker-claim canon` region is byte-identical to the kit's
10
+ `tools/checker-claim.mjs` again. `checkerClaimTool` gains an optional third parameter, the exact argument tail
11
+ (default `--check`), matched as literal space-separated tokens at the end of the command; every existing call passes
12
+ two arguments and matches exactly as before. The kit's new declare verb (kit 14.12.0) uses the tail for
13
+ `--check --in-flight` and `--all`. PATCH: no migration result changes.
14
+
15
+ ## 8.1.0 — the deployment-lineage head moves to 4.0.0 (AD-157)
16
+
17
+ `scripts/stamp-takeover.mjs`: `LINEAGE_HEAD` is `4.0.0`, so a memory bootstrap stamps `docs/ai/.memory-version` with
18
+ `4.0.0`, and a stamp of `4.0.0` is no longer refused as newer than the head. The kit's step `4.0.0` offers the epic
19
+ and task settings and the epic store (kit 14.11.0); this package gains no `4.0.0` migration note, since its own
20
+ re-stamp needs none. `SKILL.md`, `README.md`, `migrations/README.md` and `migrations/legacy-stamp-takeover.md` name
21
+ the new head. MINOR: the stamp a bootstrap writes changes.
6
22
 
7
23
  ## 8.0.2 — the rules template gains the Story sessions section (AD-152)
8
24
 
package/README.md CHANGED
@@ -45,7 +45,7 @@ Open your agent inside a project and run the skill:
45
45
 
46
46
  Two independent axes: this package's **npm version** vs the **deployment-lineage** stamp the
47
47
  substrate writes into a project. They are not the same number. `.memory-version` tracks the
48
- shared `agent-workflow` deployment lineage (head `3.0.0` today), **not** this package's
48
+ shared `agent-workflow` deployment lineage (head `4.0.0` today), **not** this package's
49
49
  version. A project bootstrapped by the kit's fallback carries a `.workflow-version`; when this
50
50
  substrate is later installed, `migrations/legacy-stamp-takeover.md` copies that value verbatim
51
51
  into `.memory-version` and never deletes the legacy stamp. See `migrations/README.md`.
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: agent-workflow-memory
3
3
  description: Deploy or upgrade a portable AI-agent memory substrate in any project — an entry-point `AGENTS.md` (+ `CLAUDE.md` alias) and a structured `docs/ai/` context store with cap/archive/index enforcement. Use when the user wants to bootstrap `docs/ai/`, set up the Memory Map and session protocols, install the docs-rotation pre-commit hook, or run `/agent-workflow-memory` / `/agent-workflow-memory upgrade`. Triggers on "set up the memory system", "deploy the AI memory here", "bootstrap docs/ai", "upgrade the memory substrate". This is the substrate only — the workflow methodology (plan→execute→review, queue, Cleanup) is owned elsewhere and injected into AGENTS.md by the family composition root.
4
4
  disable-model-invocation: true
5
5
  metadata:
6
- version: '8.0.2'
6
+ version: '8.1.1'
7
7
  ---
8
8
 
9
9
  # agent-workflow-memory
@@ -146,7 +146,7 @@ bootstrapping over a live system, but the user makes the final call.
146
146
  append-only (never duplicate an existing line), then **verify `git status` shows them ignored**.
147
147
  Never the machine-global excludes; never edit `package.json`.
148
148
  10. **Stamp the deployment lineage.** Write the **deployment-lineage head** into
149
- `docs/ai/.memory-version` (one semver line). The lineage head is **`3.0.0`** (the
149
+ `docs/ai/.memory-version` (one semver line). The lineage head is **`4.0.0`** (the
150
150
  `LINEAGE_HEAD` constant in `scripts/stamp-takeover.mjs`) — the shared `agent-workflow`
151
151
  lineage, a **separate axis** from this package's npm version (the two may even coincide by
152
152
  accident; see *Stamp = lineage head, not package version*). Use the atomic writer in
@@ -185,7 +185,7 @@ Fill strategy:
185
185
  `scripts/stamp-takeover.mjs` decides the action per state; the Markdown migration is the
186
186
  no-Node manual fallback. If **no** stamp exists at all, offer a conservative re-bootstrap.
187
187
  2. **Never-downgrade gate FIRST, then the stamp-independent hidden-mode reconcile (D14).** Compare the
188
- stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `3.0.0`). **Greater than the head, or
188
+ stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `4.0.0`). **Greater than the head, or
189
189
  unparseable → STOP and report immediately, before ANY write** (never downgrade or guess, and never
190
190
  touch `.git/info/exclude`). This STOP is one of the only two places the number is shown (see
191
191
  *Version disclosure* below): tell the user **the `docs/ai` structure version** their deployment
@@ -216,7 +216,7 @@ Fill strategy:
216
216
  orchestration `_README` note in place on an existing file is the **composition root's** job on
217
217
  its own reconcile — this substrate is standalone and only seeds-or-preserves; it owns no
218
218
  cross-package refresh helper. The gates declaration gets no note-refresh at all — authored
219
- content, seed-or-preserve only.) This is why an equal-head (`3.0.0`) deployment still gains the
219
+ content, seed-or-preserve only.) This is why an equal-head (`4.0.0`) deployment still gains the
220
220
  config seeds **without a lineage-head bump or a migration file** (the
221
221
  stamp-independent-reconcile precedent — like the pointer slots + the hidden-mode footprint).
222
222
  **Same gate, also stamp-independent: ensure the ADR-store enforcement pair** — copy
@@ -330,7 +330,7 @@ memory substrate has none, so it relies on the STOP + the explicit ask — never
330
330
  - **Source vs target directory.** Templates/scripts are read from the skill's own dir; the
331
331
  **working directory is the target project** — never write substrate files back into the skill.
332
332
  - **Stamp = lineage head, not package version.** `.memory-version` carries the **deployment-lineage
333
- head** (`3.0.0`, the shared `agent-workflow` lineage) — a **separate axis** from this package's npm
333
+ head** (`4.0.0`, the shared `agent-workflow` lineage) — a **separate axis** from this package's npm
334
334
  version (the two may even coincide by accident). They move independently.
335
335
  - **All three pointer slots ship empty and stay the user's.** Never author methodology,
336
336
  orchestration or autonomy text into them; on upgrade, preserve their content byte-for-byte. The
package/capability.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "schema": 1,
4
4
  "name": "agent-workflow-memory",
5
5
  "kind": "memory-substrate",
6
- "version": "8.0.2",
6
+ "version": "8.1.1",
7
7
  "provides": ["context"],
8
8
  "roles": {},
9
9
  "detect": {
@@ -13,7 +13,7 @@ releases add files/templates, which `upgrade` reconciles without a migration.
13
13
  `.memory-version` verbatim — see that migration.
14
14
  2. Select every migration whose `<version>` is **strictly newer** than the stamp.
15
15
  3. Apply them in **ascending semver order**.
16
- 4. Re-stamp `docs/ai/.memory-version` to the deployment-lineage head (`3.0.0` today — the shared
16
+ 4. Re-stamp `docs/ai/.memory-version` to the deployment-lineage head (`4.0.0` today — the shared
17
17
  lineage sequence, **not** this package's npm version). The legacy `.workflow-version`, if present,
18
18
  is never deleted.
19
19
 
@@ -13,13 +13,13 @@ any other migration.
13
13
 
14
14
  The deployment stamp moved from `.workflow-version` (owned by the kit) to `.memory-version`
15
15
  (owned by this substrate). They track the **same** shared deployment-lineage sequence — never
16
- their package versions. The current lineage head is **`3.0.0`** (`LINEAGE_HEAD`). This migration
16
+ their package versions. The current lineage head is **`4.0.0`** (`LINEAGE_HEAD`). This migration
17
17
  adopts an existing legacy stamp into the new file **without** changing the lineage value and
18
18
  **without** deleting the legacy stamp (both may coexist; each tool migrates from its own stamp).
19
19
 
20
20
  ## State table (idempotent)
21
21
 
22
- Look at `docs/ai/` and act by row. `V` is the legacy stamp's value; `head` = `3.0.0`.
22
+ Look at `docs/ai/` and act by row. `V` is the legacy stamp's value; `head` = `4.0.0`.
23
23
 
24
24
  | `docs/ai/` state | Action |
25
25
  |---|---|
@@ -42,7 +42,7 @@ Look at `docs/ai/` and act by row. `V` is the legacy stamp's value; `head` = `3.
42
42
  done
43
43
  ```
44
44
  2. **Validate** each value that exists: it must be `MAJOR.MINOR.PATCH`, non-empty, and **not** greater
45
- than `3.0.0`. If any present stamp is empty, unparseable, or in the future → **STOP and report**;
45
+ than `4.0.0`. If any present stamp is empty, unparseable, or in the future → **STOP and report**;
46
46
  do nothing else.
47
47
  3. **Apply** the matching row above. For the "only `.workflow-version=V`" row, copy verbatim and
48
48
  write **atomically** — create an exclusive randomized temp in `docs/ai/` (so a planted temp-name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sabaiway/agent-workflow-memory",
3
- "version": "8.0.2",
3
+ "version": "8.1.1",
4
4
  "description": "Portable, cross-agent memory substrate for AI coding agents — an AGENTS.md entry point + docs/ai context with cap/archive/index enforcement, deployable standalone or as part of the agent-workflow family. The memory layer of the agent-workflow family.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -157,7 +157,7 @@ export const isCoverageProducerGate = (gate) => {
157
157
  // A cmd makes exactly ONE of three claims about a given tool, and collapsing them into a boolean is
158
158
  // what makes a VENDORED copy of the tool read as "the tool is not declared at all" — a false
159
159
  // absence, with a remedy (adopt it) that then collides with the entry already there:
160
- // • canonical — this tool's `--check` invocation, resolving to THIS copy of it
160
+ // • canonical — this tool's invocation with its tail (`--check` by default), resolving to THIS copy
161
161
  // • tool-elsewhere — the same invocation shape, resolving to a DIFFERENT real copy
162
162
  // • not-the-tool — anything else: another command, a masked form, an inadmissible token, or a
163
163
  // path nothing can resolve
@@ -195,16 +195,18 @@ const bareTokenSafe = (text) => text.length > 0 && ![...text].some((ch) => {
195
195
 
196
196
  const RE_META = /[.*+?^${}()|[\]\\]/g;
197
197
 
198
- // checkerClaimTool(basename, canonicalPath) → the screen for ONE tool. The shape is the STRICT full
199
- // command — `node` + ONE (quoted or bare) path token + the exact basename + ` --check` + END — so a
200
- // masked form (`--check --help`, `--check || true`, a prefix command) is never any claim at all.
201
- // Separators are PLAIN SPACES, not \s: a newline between the tokens is not a command a runner would
202
- // execute as written. The basename is regex-escaped here, never by the caller — a caller-escaped
203
- // literal is one forgotten backslash away from a dot matching any byte.
204
- export const checkerClaimTool = (basename, canonicalPath) => {
198
+ // checkerClaimTool(basename, canonicalPath, tail) → the screen for ONE tool. The shape is the STRICT
199
+ // full command — `node` + ONE (quoted or bare) path token + the exact basename + the exact argument
200
+ // tail (`--check` by default) + END — so a masked form (`--check --help`, `--check || true`, a prefix
201
+ // command) or a reordered tail is never any claim at all. Separators are PLAIN SPACES, not \s: a
202
+ // newline between the tokens is not a command a runner would execute as written. The basename and
203
+ // every tail token are regex-escaped here, never by the caller — a caller-escaped literal is one
204
+ // forgotten backslash away from a dot matching any byte.
205
+ export const checkerClaimTool = (basename, canonicalPath, tail = '--check') => {
205
206
  const safe = basename.replace(RE_META, '\\$&');
207
+ const args = tail.split(' ').map((token) => token.replace(RE_META, '\\$&')).join(' +');
206
208
  return Object.freeze({
207
- re: new RegExp(`^node +(?:"((?:[^"]*[/\\\\])?${safe})"|((?:[^\\s"]*[/\\\\])?${safe})) +--check$`),
209
+ re: new RegExp(`^node +(?:"((?:[^"]*[/\\\\])?${safe})"|((?:[^\\s"]*[/\\\\])?${safe})) +${args}$`),
208
210
  canonical: canonicalPath,
209
211
  });
210
212
  };
@@ -6,7 +6,7 @@
6
6
  // The deployment lineage is a SINGLE shared sequence; its current head is LINEAGE_HEAD.
7
7
  // Both `.memory-version` and the kit-fallback `.workflow-version` track THAT sequence —
8
8
  // never their package versions. So this substrate's package may be 1.0.0 while the stamp
9
- // it writes is the lineage head (3.0.0 today).
9
+ // it writes is the lineage head (4.0.0 today).
10
10
  //
11
11
  // `decideTakeover` is a PURE function (stamp state in → action out) so the state machine is
12
12
  // unit-testable per row. `applyTakeover` is the thin fs wrapper; stamp writes are ATOMIC
@@ -23,7 +23,7 @@ import { fileURLToPath } from 'node:url';
23
23
 
24
24
  // The shared agent-workflow deployment-lineage head. Bumped only when a project-migration
25
25
  // changes the deployed docs/ai structure — NOT on a packaging-only release.
26
- export const LINEAGE_HEAD = '3.0.0';
26
+ export const LINEAGE_HEAD = '4.0.0';
27
27
 
28
28
  const SEMVER_RE = /^v?(\d+)\.(\d+)\.(\d+)$/;
29
29