@sabaiway/agent-workflow-memory 8.1.0 → 8.1.2
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 +18 -0
- package/SKILL.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/scripts/migrate-gates.mjs +11 -9
- package/references/templates/agent_rules.md +2 -1
- package/references/templates/changelog.md +1 -0
- package/references/templates/handover.md +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ All notable changes to the memory substrate. Versions are this **package's** npm
|
|
|
4
4
|
they are distinct from the **deployment-lineage** stamp written into a project's
|
|
5
5
|
`docs/ai/.memory-version` (which tracks the shared `agent-workflow` lineage, head `4.0.0`).
|
|
6
6
|
|
|
7
|
+
## 8.1.2 — the templates carry the session close for the user (AD-159)
|
|
8
|
+
|
|
9
|
+
`references/templates/agent_rules.md`: §2.5 Communication gains the last bullet `Two blocks for the user`, and §2.7
|
|
10
|
+
Story sessions gains one closing sentence on one task per carrier session; both regions stay byte-identical to the
|
|
11
|
+
kit's copies, which are their one source. `references/templates/handover.md` gains a `## For the user` section with
|
|
12
|
+
the labels `What was done, and for what` and `What is next, and why`, each with one bootstrap line;
|
|
13
|
+
`references/templates/changelog.md`'s bootstrap entry gains a `**For the user:**` line after its Goal. The kit's
|
|
14
|
+
`tools/session-close-check.mjs` (kit 14.13.0) judges the handover section. No script changed. PATCH: only a new
|
|
15
|
+
bootstrap's text changes.
|
|
16
|
+
|
|
17
|
+
## 8.1.1 — the gate-migration's checker screen takes an argument tail (AD-158)
|
|
18
|
+
|
|
19
|
+
`references/scripts/migrate-gates.mjs`: the guarded `checker-claim canon` region is byte-identical to the kit's
|
|
20
|
+
`tools/checker-claim.mjs` again. `checkerClaimTool` gains an optional third parameter, the exact argument tail
|
|
21
|
+
(default `--check`), matched as literal space-separated tokens at the end of the command; every existing call passes
|
|
22
|
+
two arguments and matches exactly as before. The kit's new declare verb (kit 14.12.0) uses the tail for
|
|
23
|
+
`--check --in-flight` and `--all`. PATCH: no migration result changes.
|
|
24
|
+
|
|
7
25
|
## 8.1.0 — the deployment-lineage head moves to 4.0.0 (AD-157)
|
|
8
26
|
|
|
9
27
|
`scripts/stamp-takeover.mjs`: `LINEAGE_HEAD` is `4.0.0`, so a memory bootstrap stamps `docs/ai/.memory-version` with
|
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.1.
|
|
6
|
+
version: '8.1.2'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-memory
|
package/capability.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-memory",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.2",
|
|
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`
|
|
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
|
|
199
|
-
// command — `node` + ONE (quoted or bare) path token + the exact basename +
|
|
200
|
-
// masked form (`--check --help`, `--check || true`, a prefix
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
|
|
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}))
|
|
209
|
+
re: new RegExp(`^node +(?:"((?:[^"]*[/\\\\])?${safe})"|((?:[^\\s"]*[/\\\\])?${safe})) +${args}$`),
|
|
208
210
|
canonical: canonicalPath,
|
|
209
211
|
});
|
|
210
212
|
};
|
|
@@ -75,6 +75,7 @@ Apply this as part of §2 before any user-facing summary:
|
|
|
75
75
|
- **Live host/session facts are tool-composed only.** Any claim about the current host or session state (prompts fired, sandbox scope, whether a bypass was needed, network reachability, approval counts) must trace to **live tool output** from **this session**; a memory/handover snapshot is **context, never report facts**, and a claim with no live signal is **omitted or explicitly marked unverified** — never asserted from recollection.
|
|
76
76
|
- **The closing state block answers three DIFFERENT questions.** Close a user-facing message with three labelled slots — *now* · *what I need from you* · *what's next*. The slot LABELS stay ENGLISH — an English label is what lets a state-block checker FIND the block and its slots at all; everything written INTO a slot is in the project's dialogue language; when that language is not English, the checker's English phrase sets do not judge those values. **Now** = the state at this instant: what is RUNNING, or what the work is stopped on. It is **never a report of finished work** — what you completed goes in the message BODY, above the block. **From you** = the real unblocker, named; a turn that is ENDING always has one. **Next** = what follows. A *now* slot that opens with what was completed buries the one fact the reader opened the message for, and the three slots collapse into one restatement.
|
|
77
77
|
- **A skip that contradicts the tree is a finding.** A tool-composed `skipped-*` line whose stated reason the observed tree disproves (a "no Node" skip beside deployed Node scripts) is raised as a FINDING in the report, never pasted as a neutral outcome — and a tool may not emit a skip whose reason it could itself disprove.
|
|
78
|
+
- **Two blocks for the user.** At a plan's approval, at a release and at every session close, the message BODY — above the closing state block — carries two short blocks in the dialogue language. *What was done, and for what*: per item the user-facing problem, then what now exists; a command name is allowed, an internal id is not. *What is next, and why*: each proposal names its benefit, plus the one hand step if any. No internal ids, no review-round tallies. The same two blocks are the handover's `## For the user` section, which the kit's `session-close-check` checker judges at the close, where the kit is installed.
|
|
78
79
|
|
|
79
80
|
### 2.6. Planning, review & process-fidelity invariants
|
|
80
81
|
Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon. This section is rendered from that canon and refreshed on upgrade; a custom edit is preserved verbatim, but flagged.)
|
|
@@ -95,7 +96,7 @@ Apply these when authoring a plan, reviewing, folding a finding, or editing code
|
|
|
95
96
|
- **Cost lanes.** Route every step to the **cheapest adequate executor** — L0 deterministic script (the batched gate matrix over `gates.json`, the rotation `--check`s) · L1 cheap subagent (extraction/drafting only; the orchestrator verifies) · L2 subscription bridge · L3 frontier judgment. A step with **no named guardrail does not move down** a lane, and the **red lines never move down** (council review models · real code · ADR/handover/changelog-entry wording · persuasive copy · go/no-go · the approval asks). Own-error repair: salvage recorded state first (L0/L1, batched), never frontier re-derivation. **Prompt economy:** read-only fan-out (research/sweeps/extraction) runs ONLY on restricted-tool vehicles — a full-tool subagent for read-only work is a forbidden lane downgrade (invisible prompt-flood + blast radius), and a subagent is never told to shell out for facts obtainable read-only; the orchestrator's own shell form is ONE plain pipeline per call (a `;`/`&&` chain or env-prefixed invocation never matches a prefix allow rule); a fan-out launcher that gates per call yields to the agent-spawn lane — capability-gated: without restricted-tool vehicles (generic full-tool spawning does not count), read-only research stays in the orchestrator's own context, never a vehicle mandate a host cannot satisfy. Judgment, code, synthesis stay at the frontier lane (a task that genuinely runs/writes keeps a full-tool subagent); honest limit: no deterministic gate classifies a dispatch — canon at the point of use + placed vehicles + the retro loop. **Writer economy:** a stage's repeated WRITER commands batch — evidence declarations ride consecutive plain invocations of ONE allow-listed tool, other stage writers combine via one launcher per stage; never an unbatched writer scatter (each gated write is its own prompt).
|
|
96
97
|
|
|
97
98
|
### 2.7. Story sessions
|
|
98
|
-
A story — one row of an epic's ledger, carried by one plan — runs as five sessions, each ending at its own review checkpoint: **spec** (the contract under `docs/ai/specs/`, drafted and reviewed on the `plan-authoring` recipe), **plan** (the ledger, same recipe), **tests** (one task per ledger row, red first), **code** (one task per row, to green), and **diff review, release and record** (the review of the staged tree on the `plan-execution` recipe, the release where the story ships one, then the changelog and handover entries and the plan's Phase: Cleanup). Tests and code never share a session, and a spec and its plan never share one either. A storyless plan runs the same five. **Exception — a split:** moving code and its existing cases into modules, with no new logic and no new case, is one session: a short spec (the Module list), the split, the diff review, the release, Cleanup.
|
|
99
|
+
A story — one row of an epic's ledger, carried by one plan — runs as five sessions, each ending at its own review checkpoint: **spec** (the contract under `docs/ai/specs/`, drafted and reviewed on the `plan-authoring` recipe), **plan** (the ledger, same recipe), **tests** (one task per ledger row, red first), **code** (one task per row, to green), and **diff review, release and record** (the review of the staged tree on the `plan-execution` recipe, the release where the story ships one, then the changelog and handover entries and the plan's Phase: Cleanup). Tests and code never share a session, and a spec and its plan never share one either. A storyless plan runs the same five. **Exception — a split:** moving code and its existing cases into modules, with no new logic and no new case, is one session: a short spec (the Module list), the split, the diff review, the release, Cleanup. Inside the tests and code sessions it is one task per session: each task runs as its own carrier session — one brief, one run, never one run for a whole wave — and the orchestrator's session briefs, checks, verifies and folds.
|
|
99
100
|
|
|
100
101
|
---
|
|
101
102
|
|
|
@@ -17,6 +17,7 @@ maxLines: 700
|
|
|
17
17
|
## {{DATE}} — Bootstrap
|
|
18
18
|
|
|
19
19
|
**Goal:** Initialise the AI-agent memory system.
|
|
20
|
+
**For the user:** what was done, and for what — the project now has an AI-agent memory, so each session starts from the last one's record; what is next, and why — the first real task, whose entry says what it did for you.
|
|
20
21
|
**Changes:**
|
|
21
22
|
- Created `AGENTS.md` (entry point) + `CLAUDE.md` symlink.
|
|
22
23
|
- Created `docs/ai/` with the spec files + `pages/`.
|
|
@@ -16,6 +16,14 @@ maxLines: 80
|
|
|
16
16
|
**Branch:** {{BRANCH}}
|
|
17
17
|
**Active recipes:** not recorded yet — paste the configured-recipe line (composed from `docs/ai/orchestration.json`) and refresh it whenever the config changes.
|
|
18
18
|
|
|
19
|
+
## For the user
|
|
20
|
+
|
|
21
|
+
**What was done, and for what:**
|
|
22
|
+
- Bootstrap — the project now has an AI-agent memory, so each session starts from what the last one left.
|
|
23
|
+
|
|
24
|
+
**What is next, and why:**
|
|
25
|
+
- The first real task — its close replaces these two lines with what it did for you and what comes next.
|
|
26
|
+
|
|
19
27
|
## What was done last session
|
|
20
28
|
|
|
21
29
|
- Bootstrap — AI-agent memory system initialised.
|