@sabaiway/agent-workflow-memory 1.12.0 → 2.0.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/CHANGELOG.md +52 -1
- package/README.md +2 -2
- package/SKILL.md +35 -21
- package/bin/install.mjs +32 -0
- package/capability.json +1 -1
- package/migrations/README.md +1 -1
- package/migrations/legacy-stamp-takeover.md +3 -3
- package/package.json +1 -1
- package/references/scripts/archive-decisions.mjs +705 -320
- package/references/scripts/archive-decisions.test.mjs +652 -312
- package/references/scripts/check-docs-size.mjs +35 -5
- package/references/scripts/check-docs-size.test.mjs +55 -0
- package/references/templates/adr/log.md +25 -0
- package/references/templates/adr-record.md +72 -0
- package/references/templates/decisions.md +7 -18
- package/scripts/stamp-takeover.mjs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,58 @@
|
|
|
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 `
|
|
5
|
+
`docs/ai/.memory-version` (which tracks the shared `agent-workflow` lineage, head `2.0.0`).
|
|
6
|
+
|
|
7
|
+
## 2.0.0 — One-file-per-ADR store: the 3-tier decisions cascade retired (AD-051)
|
|
8
|
+
|
|
9
|
+
A **MAJOR** release (BREAKING; co-released with the workflow kit 1.42.0). The deployment-lineage
|
|
10
|
+
head bumps `1.3.0` → `2.0.0` — the first structural `docs/ai` change (a new `docs/ai/adr/` tree;
|
|
11
|
+
the WARM/COLD decisions-archive monolith tiers retired). **Nothing auto-migrates:** an existing
|
|
12
|
+
deployment keeps working on its old layout, old rotator included, until it opts in (below).
|
|
13
|
+
|
|
14
|
+
**Breaking.**
|
|
15
|
+
- `references/scripts/archive-decisions.mjs` is REPURPOSED in place (same path, same pre-commit
|
|
16
|
+
hook slot, same `decisions-rotation` gate id): instead of rotating HOT `decisions.md` → WARM
|
|
17
|
+
`history/decisions-archive.md` → a single COLD monolith whose cap was raised release after
|
|
18
|
+
release, the rotator now EXPLODES the oldest ADRs beyond the HOT cap into one immutable MADR
|
|
19
|
+
record per ADR at `docs/ai/adr/AD-NNN-slug.md` (body verbatim; inline 6-field frontmatter +
|
|
20
|
+
`status`/`date`/`supersedes`/`supersededBy` lifecycle keys; slug frozen at creation). A record
|
|
21
|
+
is O(1) forever — no archive cap is ever raised again, and there is no COLD tier to exhaust.
|
|
22
|
+
- A default or `--check` run that finds a legacy `history/decisions-archive*.md` monolith fails
|
|
23
|
+
LOUD ("run `--migrate` first") — the new rotator never half-explodes an un-migrated tree and
|
|
24
|
+
never reports green over one.
|
|
25
|
+
- The ADR id grammar widens to `AD-\d{3,}` with NUMERIC ordering everywhere (AD-200 precedes
|
|
26
|
+
AD-1000 — never lexical).
|
|
27
|
+
|
|
28
|
+
**Migration (opt-in, never automatic).**
|
|
29
|
+
- The one-time `--migrate` (dry-run by default; `--migrate --apply` to write) explodes the
|
|
30
|
+
monolith tiers into `adr/` records under a fail-loud conservation check: the full ADR corpus —
|
|
31
|
+
the union HOT ∪ monolith tiers ∪ any already-written `adr/` records (the crash-resumable core;
|
|
32
|
+
a same-id BODY CONFLICT across sources is refused) — must repartition EXACTLY into retained-HOT
|
|
33
|
+
∪ written records, nothing lost, added, double-counted, or edited. Before any destructive write
|
|
34
|
+
it stores a durable timestamped snapshot of `decisions.md` + both monoliths into the GIT DIR
|
|
35
|
+
(a stated out-of-tree fallback on a non-git deployment; fails loud if neither is writable).
|
|
36
|
+
`docs/ai` is commonly git-ignored, so git history alone can NOT recover a deleted monolith —
|
|
37
|
+
the snapshot is the recovery path. The apply is idempotent and crash-resumable; removal never
|
|
38
|
+
precedes conservation + the snapshot.
|
|
39
|
+
- On an upgrade crossing this major, `bin/install.mjs` prints a GENERIC one-time advisory: run
|
|
40
|
+
your workflow toolkit's ADR-store migration command in each already-deployed project (it
|
|
41
|
+
snapshots, refreshes the enforcement scripts, and migrates in one consent-gated step). This
|
|
42
|
+
installer targets the global skill dir and never touches a project itself.
|
|
43
|
+
|
|
44
|
+
**New.**
|
|
45
|
+
- `docs/ai/adr/log.md` — the ON-DEMAND active-set navigator: currently-governing heads
|
|
46
|
+
(supersession COMPUTED corpus-wide from the two-way `supersedes`/`supersededBy` chain — a new
|
|
47
|
+
superseding ADR needs no predecessor-file edit) + a recent window; a superseded record drops out
|
|
48
|
+
of the list but stays reachable by filename, grep, and the chain. `--write-navigator`
|
|
49
|
+
regenerates it AND re-triggers the docs-index regen. No committed full O(n) ledger.
|
|
50
|
+
- `references/scripts/check-docs-size.mjs` — `docs/ai/adr/` collapses to ONE aggregate `index.md`
|
|
51
|
+
row (`adr/ — N records (AD-001 … AD-NNN)`), while every record body stays individually
|
|
52
|
+
cap-checked; `docs/ai/index.md` stays bounded at O(1) as records accumulate.
|
|
53
|
+
- Seeded templates: the new-scheme `decisions.md` HOT-window seed, the `adr-record.md` MADR
|
|
54
|
+
authoring reference (a skill-side reference — never copied into a project's `docs/ai/`), and a
|
|
55
|
+
seed `adr/log.md` byte-equal to the generator over the seeded HOT — a fresh bootstrap is
|
|
56
|
+
`--check`-green on its first commit.
|
|
6
57
|
|
|
7
58
|
## 1.12.0 — Verification-profile template + the docs-index-on-rotation regen (BUGFREE-3, AD-049)
|
|
8
59
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ future agent — including a fresh session of yourself — can reconstruct proje
|
|
|
7
7
|
~60 seconds, find the current task, and avoid repeating past mistakes.
|
|
8
8
|
|
|
9
9
|
This is the **memory layer** of the `agent-workflow` family.
|
|
10
|
-
It owns the substrate only — `docs/ai/`, the entry point, caps /
|
|
10
|
+
It owns the substrate only — `docs/ai/`, the entry point, caps / rolling changelog archive / the one-file-per-ADR store / index gate,
|
|
11
11
|
the Node enforcement scripts, the pre-commit hook, the templates, and the three setup
|
|
12
12
|
contracts (visibility / conversational language / agent attribution). It deliberately **knows
|
|
13
13
|
nobody else** in the `agent-workflow` family: the **workflow methodology** (plan → execute →
|
|
@@ -44,7 +44,7 @@ Open your agent inside a project and run the skill:
|
|
|
44
44
|
|
|
45
45
|
Two independent axes: this package's **npm version** vs the **deployment-lineage** stamp the
|
|
46
46
|
substrate writes into a project. They are not the same number. `.memory-version` tracks the
|
|
47
|
-
shared `agent-workflow` deployment lineage (head `
|
|
47
|
+
shared `agent-workflow` deployment lineage (head `2.0.0` today), **not** this package's
|
|
48
48
|
version. A project bootstrapped by the kit's fallback carries a `.workflow-version`; when this
|
|
49
49
|
substrate is later installed, `migrations/legacy-stamp-takeover.md` copies that value verbatim
|
|
50
50
|
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: '
|
|
6
|
+
version: '2.0.0'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-memory
|
|
@@ -14,7 +14,7 @@ reconstruct project context in ~60 seconds, find the current task, and avoid rep
|
|
|
14
14
|
mistakes.
|
|
15
15
|
|
|
16
16
|
The substrate is **stack-agnostic memory** — `docs/ai/` structure, entry-point doc, session
|
|
17
|
-
protocols, frontmatter caps,
|
|
17
|
+
protocols, frontmatter caps, one-file-per-ADR archive, index-freshness gate. Enforcement ships as **Node
|
|
18
18
|
`.mjs` scripts** (the reference implementation; non-Node stacks follow the same policy
|
|
19
19
|
manually).
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ What this substrate owns vs what it only points at. The methodology + orchestrat
|
|
|
42
42
|
| Concern | Owner | In the deployed `AGENTS.md` |
|
|
43
43
|
|---|---|---|
|
|
44
44
|
| Entry point, Memory Map, session protocols (Start / During / Complete) | **memory** (this skill) | authored from templates |
|
|
45
|
-
| `docs/ai/` files, frontmatter caps,
|
|
45
|
+
| `docs/ai/` files, frontmatter caps, one-file-per-ADR archive, index-freshness gate | **memory** | `docs/ai/*` + scripts + hook |
|
|
46
46
|
| Visibility / conversational-language / agent-attribution contracts | **memory** | the three `AGENTS.md` blocks |
|
|
47
47
|
| Deployment-lineage stamp | **memory** | `docs/ai/.memory-version` |
|
|
48
48
|
| Plan→Phase→Step vocabulary, lifecycle, `queue.md`, mandatory Cleanup | **methodology** (not this skill) | the empty `workflow:methodology` slot — filled by the composition root |
|
|
@@ -99,15 +99,17 @@ bootstrapping over a live system, but the user makes the final call.
|
|
|
99
99
|
from `${CLAUDE_SKILL_DIR}/references/templates/AGENTS.md` and symlink `CLAUDE.md -> AGENTS.md`
|
|
100
100
|
(`ln -s AGENTS.md CLAUDE.md`). **Leave BOTH pointer slots (`workflow:methodology` +
|
|
101
101
|
`workflow:orchestration`) exactly as shipped — empty.** Filling them is the composition root's job.
|
|
102
|
-
6. **Deploy `docs/ai/`.** Create the files + `pages/` from
|
|
103
|
-
`${CLAUDE_SKILL_DIR}/references/templates/` (every non-`AGENTS.md` template
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
6. **Deploy `docs/ai/`.** Create the files + `pages/` + the seed `adr/` store from
|
|
103
|
+
`${CLAUDE_SKILL_DIR}/references/templates/` (every non-`AGENTS.md`, non-`adr-record.md` template —
|
|
104
|
+
the latter is a skill-home authoring reference, never deployed). This deploys the HOT ADR window
|
|
105
|
+
`docs/ai/decisions.md` **and** the seed navigator `docs/ai/adr/log.md` (its `adr/` subdir copies
|
|
106
|
+
in wholesale), plus the three seeded, **user-editable** strict-JSON configs:
|
|
107
|
+
`docs/ai/orchestration.json` — the per-project recipe defaults the composition root's `procedures`
|
|
108
|
+
advisor reads — `docs/ai/gates.json` — the project's gate declaration, an empty list to fill with
|
|
109
|
+
its own verification commands, consumed by the composition root's gate runner — and
|
|
110
|
+
`docs/ai/verification-profile.json` — the OPTIONAL fold-completeness verification profile (the
|
|
111
|
+
language-independence contract; the seeded default reproduces the composition root's default V8 +
|
|
112
|
+
node:test behaviour, delete it for exactly that). Keep each `.md` file's frontmatter.
|
|
111
113
|
7. **Fill templates** per the table below.
|
|
112
114
|
8. **Install enforcement (Node projects).** Copy `${CLAUDE_SKILL_DIR}/references/scripts/*.mjs`
|
|
113
115
|
(+ `*.test.mjs`) into the project's `scripts/`. **No Node runtime** → skip this + the hook;
|
|
@@ -120,7 +122,7 @@ bootstrapping over a live system, but the user makes the final call.
|
|
|
120
122
|
append-only (never duplicate an existing line), then **verify `git status` shows them ignored**.
|
|
121
123
|
Never the machine-global excludes; never edit `package.json`.
|
|
122
124
|
10. **Stamp the deployment lineage.** Write the **deployment-lineage head** into
|
|
123
|
-
`docs/ai/.memory-version` (one semver line). The lineage head is **`
|
|
125
|
+
`docs/ai/.memory-version` (one semver line). The lineage head is **`2.0.0`** (the
|
|
124
126
|
`LINEAGE_HEAD` constant in `scripts/stamp-takeover.mjs`) — the shared `agent-workflow`
|
|
125
127
|
lineage, a **separate axis** from this package's npm version (the two may even coincide by
|
|
126
128
|
accident; see *Stamp = lineage head, not package version*). Use the atomic writer in
|
|
@@ -146,7 +148,8 @@ Fill strategy:
|
|
|
146
148
|
| `current_state.md`, `architecture.md`, `env_commands.md`, `technical_specification.md`, `pages/index.md` | Fill with **real** recon data. |
|
|
147
149
|
| `tech_reference.md` | Carry over real configs/patterns found in deps. |
|
|
148
150
|
| `active_plan.md`, `handover.md` | TODO seed. |
|
|
149
|
-
| `decisions.md` |
|
|
151
|
+
| `decisions.md` | The HOT ADR window — seed `AD-001` (adopting this memory system), newest at the bottom. |
|
|
152
|
+
| `adr/log.md` | The seed navigator — deployed as-is (the generator over the seeded HOT); regenerated by `archive-decisions.mjs`, never hand-edited. |
|
|
150
153
|
| `known_issues.md`, `changelog.md`, `pages/shared-patterns.md` | Empty template / first bootstrap entry. |
|
|
151
154
|
|
|
152
155
|
### Mode: upgrade
|
|
@@ -158,7 +161,7 @@ Fill strategy:
|
|
|
158
161
|
`scripts/stamp-takeover.mjs` decides the action per state; the Markdown migration is the
|
|
159
162
|
no-Node manual fallback. If **no** stamp exists at all, offer a conservative re-bootstrap.
|
|
160
163
|
2. **Never-downgrade gate FIRST, then the stamp-independent hidden-mode reconcile (D14).** Compare the
|
|
161
|
-
stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `
|
|
164
|
+
stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `2.0.0`). **Greater than the head, or
|
|
162
165
|
unparseable → STOP and report immediately, before ANY write** (never downgrade or guess, and never
|
|
163
166
|
touch `.git/info/exclude`). This STOP is one of the only two places the number is shown (see
|
|
164
167
|
*Version disclosure* below): tell the user **the `docs/ai` structure version** their deployment
|
|
@@ -188,13 +191,23 @@ Fill strategy:
|
|
|
188
191
|
orchestration `_README` note in place on an existing file is the **composition root's** job on
|
|
189
192
|
its own reconcile — this substrate is standalone and only seeds-or-preserves; it owns no
|
|
190
193
|
cross-package refresh helper. The gates declaration gets no note-refresh at all — authored
|
|
191
|
-
content, seed-or-preserve only.) This is why an equal-head (`
|
|
194
|
+
content, seed-or-preserve only.) This is why an equal-head (`2.0.0`) deployment still gains the
|
|
192
195
|
config seeds **without a lineage-head bump or a migration file** (the
|
|
193
196
|
stamp-independent-reconcile precedent — like the pointer slots + the hidden-mode footprint).
|
|
194
|
-
**Same gate, also stamp-independent: ensure the ADR-
|
|
197
|
+
**Same gate, also stamp-independent: ensure the ADR-store enforcement pair** — copy
|
|
195
198
|
`archive-decisions.mjs` + `archive-decisions.test.mjs` from
|
|
196
199
|
`${CLAUDE_SKILL_DIR}/references/scripts/` into the project's `scripts/` **if missing**
|
|
197
|
-
(preserve an existing file byte-for-byte; skip on a No-Node project).
|
|
200
|
+
(preserve an existing file byte-for-byte; skip on a No-Node project). **Legacy-monolith
|
|
201
|
+
gate:** if a retired `docs/ai/history/decisions-archive*.md` monolith is still on disk, do
|
|
202
|
+
**NOT** copy the pair as a silent ensure — the new-scheme rotator must **never sit beside
|
|
203
|
+
un-migrated monoliths** (its default/`--check` runs refuse such a tree). Instead ASK the
|
|
204
|
+
user; with their explicit consent copy the pair AND run the one-time conservation-checked
|
|
205
|
+
migration in the same step (`node scripts/archive-decisions.mjs --migrate` preview, then
|
|
206
|
+
`--migrate --apply` — it writes a durable pre-delete snapshot first); if the preview or the
|
|
207
|
+
apply FAILS, remove the just-copied pair (the pair was copied only because it was missing, so
|
|
208
|
+
removal restores the exact pre-ensure state) and report — the forbidden state (the new-scheme
|
|
209
|
+
rotator beside un-migrated monoliths) must never persist; without consent leave
|
|
210
|
+
the tree untouched and report the pending migration. The deployed pre-commit
|
|
198
211
|
hook gains its `archive-decisions.mjs --check` line only when the hook is next refreshed via
|
|
199
212
|
`node scripts/install-git-hooks.mjs`; an old hook without the line stays consistent-safe (the
|
|
200
213
|
decisions gate is simply not enforced yet — never a broken hook). **Then**, if the stamp **equals** the head → the substrate is
|
|
@@ -264,7 +277,7 @@ memory substrate has none, so it relies on the STOP + the explicit ask — never
|
|
|
264
277
|
- **Source vs target directory.** Templates/scripts are read from the skill's own dir; the
|
|
265
278
|
**working directory is the target project** — never write substrate files back into the skill.
|
|
266
279
|
- **Stamp = lineage head, not package version.** `.memory-version` carries the **deployment-lineage
|
|
267
|
-
head** (`
|
|
280
|
+
head** (`2.0.0`, the shared `agent-workflow` lineage) — a **separate axis** from this package's npm
|
|
268
281
|
version (the two may even coincide by accident). They move independently.
|
|
269
282
|
- **Both pointer slots ship empty and stay the user's.** Never author methodology or orchestration
|
|
270
283
|
text into them; on upgrade, preserve their content byte-for-byte. The composition root is their only
|
|
@@ -296,9 +309,10 @@ The three setup choices each have a full contract in
|
|
|
296
309
|
- [`references/contracts.md`](references/contracts.md) — the three setup contracts in full.
|
|
297
310
|
- [`references/templates/`](references/templates/) — stack-agnostic `AGENTS.md` (with the two empty
|
|
298
311
|
pointer slots — methodology + orchestration), `agent_rules.md`, the seeded user-editable
|
|
299
|
-
`orchestration.json` config,
|
|
312
|
+
`orchestration.json` config, the `adr-record.md` ADR authoring reference + the seed `adr/log.md`
|
|
313
|
+
navigator, and all `docs/ai/` files to deploy.
|
|
300
314
|
- [`references/scripts/`](references/scripts/) — the Node enforcement scripts (caps + staleness +
|
|
301
|
-
index-freshness gate,
|
|
315
|
+
index-freshness gate, one-file-per-ADR archive, hook installer) and their unit tests.
|
|
302
316
|
- [`scripts/stamp-takeover.mjs`](scripts/stamp-takeover.mjs) — the upgrade-time lineage state
|
|
303
317
|
machine (`LINEAGE_HEAD`, atomic stamp writes) + tests.
|
|
304
318
|
- [`migrations/`](migrations/) — per-version upgrade steps, incl. `legacy-stamp-takeover.md`;
|
package/bin/install.mjs
CHANGED
|
@@ -71,6 +71,36 @@ const compareSemver = (a, b) => {
|
|
|
71
71
|
return firstDiff ?? 0;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
+
// The memory major that retired the 3-tier ADR cascade for the one-file-per-ADR store (AD-051).
|
|
75
|
+
const ADR_STORE_MAJOR = 2;
|
|
76
|
+
|
|
77
|
+
// A GENERIC, project-agnostic advisory is printed exactly once — when this runner crosses UP through
|
|
78
|
+
// the ADR-store major (installed below it → runner at or above it). The memory installer targets the
|
|
79
|
+
// GLOBAL skill dir and knows nothing about any project (the knows-nobody DAG), so it can never DETECT
|
|
80
|
+
// an old-layout deployment and must NEVER name a sibling package or a kit command — the kit's
|
|
81
|
+
// project-dir-aware surfaces (status / upgrade / the migration mode) own detection + the concrete
|
|
82
|
+
// command. A fresh install (installed === null) advises nothing (no prior deployment to migrate).
|
|
83
|
+
export const shouldAdviseAdrMigration = (installedVersion, runnerVersion) => {
|
|
84
|
+
const from = parseSemver(installedVersion);
|
|
85
|
+
const to = parseSemver(runnerVersion);
|
|
86
|
+
if (!from || !to) return false;
|
|
87
|
+
return from[0] < ADR_STORE_MAJOR && to[0] >= ADR_STORE_MAJOR;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// The advisory text is GENERIC and names NO sibling package or kit command (the knows-nobody DAG);
|
|
91
|
+
// the kit's project-aware surfaces own old-layout detection + the concrete migration command.
|
|
92
|
+
const ADR_MIGRATION_ADVISORY =
|
|
93
|
+
`[agent-workflow-memory] note: this major retired the 3-tier ADR archive for a one-file-per-ADR store.\n` +
|
|
94
|
+
` A project you already deployed on the OLDER decisions-archive layout must be migrated before its\n` +
|
|
95
|
+
` ADR rotation works again — run your workflow toolkit's ADR-store migration command in that project\n` +
|
|
96
|
+
` (its status/upgrade points you at it). New deployments already seed the new store.`;
|
|
97
|
+
|
|
98
|
+
// Print the advisory exactly on a major-crossing update (AD-051). Pure over an injectable log so the
|
|
99
|
+
// crossing path is unit-testable in-process (main runs only as a subprocess).
|
|
100
|
+
export const maybeAdviseAdrMigration = (installedVersion, runnerVersion, log = console.log) => {
|
|
101
|
+
if (shouldAdviseAdrMigration(installedVersion, runnerVersion)) log(ADR_MIGRATION_ADVISORY);
|
|
102
|
+
};
|
|
103
|
+
|
|
74
104
|
// Extract the version that is a DIRECT child of the top-level `metadata:` key — never a top-level or
|
|
75
105
|
// deeper-nested decoy `version:` (mirrors the manifest validator + the kit installer). Pure walk.
|
|
76
106
|
const metadataVersion = (frontmatter) => {
|
|
@@ -256,6 +286,8 @@ const main = async () => {
|
|
|
256
286
|
: 'installed';
|
|
257
287
|
console.log(`[agent-workflow-memory] ${verb} v${version} -> ${tildify(target)}`);
|
|
258
288
|
|
|
289
|
+
maybeAdviseAdrMigration(installedVersion, version); // generic major-crossing ADR-store advisory (AD-051)
|
|
290
|
+
|
|
259
291
|
// Same-version re-run: state observable facts only. The copy DID run (repair-on-rerun is a feature —
|
|
260
292
|
// it restores locally modified/deleted files), and whether npx served a cached build is NOT
|
|
261
293
|
// observable here (no network), so the note never claims it; the @latest hint is conditional.
|
package/capability.json
CHANGED
package/migrations/README.md
CHANGED
|
@@ -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 (`
|
|
16
|
+
4. Re-stamp `docs/ai/.memory-version` to the deployment-lineage head (`2.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 **`
|
|
16
|
+
their package versions. The current lineage head is **`2.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` = `
|
|
22
|
+
Look at `docs/ai/` and act by row. `V` is the legacy stamp's value; `head` = `2.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` = `1.
|
|
|
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 `
|
|
45
|
+
than `2.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": "
|
|
3
|
+
"version": "2.0.0",
|
|
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",
|