@sabaiway/agent-workflow-memory 1.1.1 → 1.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 CHANGED
@@ -4,6 +4,18 @@ 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 `1.3.0`).
6
6
 
7
+ ## 1.1.2 — Entry-point template headroom for the orchestration pointer
8
+
9
+ A **docs/prose** release (no new executable, the `1.1.1`/`1.9.1` precedent). The bundled entry-point
10
+ template (`references/templates/AGENTS.md`) ships a second empty marker pair — `workflow:orchestration`,
11
+ right under the methodology pair — which the family **composition root** fills live from the methodology
12
+ engine on deploy. To keep the deployed `AGENTS.md` inside its ≤100-line budget with **both** pointers
13
+ filled, the template trimmed non-essential slack (the Hard-Constraints intro blockquote + one
14
+ illustrative row a deploying agent adapts anyway). No behaviour change; the composition root remains the
15
+ only writer of the slots.
16
+
17
+ The deployment-lineage head stays **`1.3.0`** (no `docs/ai` structural change; no migration file).
18
+
7
19
  ## 1.1.1 — Installer hardening (Issue-004 parity)
8
20
 
9
21
  A patch release that applies the same two installer fixes shipped to the engine in 1.1.0, keeping the
package/README.md CHANGED
@@ -33,10 +33,11 @@ Open your agent inside a project and run the skill:
33
33
  - **`/agent-workflow-memory`** — bootstrap a new or empty project. Asks the three setup
34
34
  questions (visibility, conversational language, agent attribution), then writes `docs/ai/`,
35
35
  `AGENTS.md`, the enforcement scripts + pre-commit hook, and stamps
36
- `docs/ai/.memory-version`. The methodology slot in `AGENTS.md` is left **empty**.
36
+ `docs/ai/.memory-version`. The two pointer slots in `AGENTS.md` (the **methodology** and
37
+ **orchestration** pointers, filled later by the family composition root) are left **empty**.
37
38
  - **`/agent-workflow-memory upgrade`** — migrate an existing deployment to the skill's current
38
39
  version. Reads `docs/ai/.memory-version`, runs only newer migrations in semver order, and
39
- **preserves** anything already in the methodology slot (extract-and-reinsert — it never
40
+ **preserves** anything already in either pointer slot (extract-and-reinsert — it never
40
41
  regenerates `AGENTS.md` wholesale).
41
42
 
42
43
  ## Stamps & lineage
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: '1.1.1'
6
+ version: '1.1.2'
7
7
  ---
8
8
 
9
9
  # agent-workflow-memory
@@ -20,11 +20,12 @@ manually).
20
20
 
21
21
  This skill is the **memory layer** of the `agent-workflow` family. It **knows nobody else** in
22
22
  the family. In particular it does **not** own the **workflow methodology** (plan → execute →
23
- review vocabulary, lifecycle, `docs/plans/queue.md`, mandatory Cleanup, plan-then-execute)
24
- that is injected into a delimited slot in `AGENTS.md` by the family **composition root**, never by
25
- this skill. (This substrate does not name or depend on any specific sibling — it only honours the
26
- slot contract.) This skill only ever ships the slot **empty** and **preserves** whatever is already
27
- in it on upgrade.
23
+ review vocabulary, lifecycle, `docs/plans/queue.md`, mandatory Cleanup, plan-then-execute) **or the
24
+ orchestration recipes** — those are injected into **two delimited pointer slots** in `AGENTS.md`
25
+ (`workflow:methodology` + `workflow:orchestration`) by the family **composition root**, never by this
26
+ skill. (This substrate does not name or depend on any specific sibling it only honours the slot
27
+ contract.) This skill only ever ships **both** slots **empty** and **preserves** whatever is already
28
+ in them on upgrade.
28
29
 
29
30
  The substrate **artifacts** (this skill, the templates, the deployed `docs/ai/` files) stay in
30
31
  their **source language** — for cross-agent and cross-team portability. That is separate from the
@@ -35,8 +36,8 @@ contents).
35
36
 
36
37
  ## Ownership table
37
38
 
38
- What this substrate owns vs what it only points at. The methodology pointer is the empty slot
39
- the composition root fills — never author methodology text here.
39
+ What this substrate owns vs what it only points at. The methodology + orchestration pointers are the
40
+ **two empty slots** the composition root fills — never author that text here.
40
41
 
41
42
  | Concern | Owner | In the deployed `AGENTS.md` |
42
43
  |---|---|---|
@@ -45,6 +46,7 @@ the composition root fills — never author methodology text here.
45
46
  | Visibility / conversational-language / agent-attribution contracts | **memory** | the three `AGENTS.md` blocks |
46
47
  | Deployment-lineage stamp | **memory** | `docs/ai/.memory-version` |
47
48
  | Plan→Phase→Step vocabulary, lifecycle, `queue.md`, mandatory Cleanup | **methodology** (not this skill) | the empty `workflow:methodology` slot — filled by the composition root |
49
+ | Orchestration recipes (Solo / Reviewed / Council / Delegated) | **methodology engine** (not this skill) | the empty `workflow:orchestration` slot — filled by the composition root |
48
50
 
49
51
  ---
50
52
 
@@ -90,8 +92,8 @@ bootstrapping over a live system, but the user makes the final call.
90
92
  5. **Entry-point doc.** If `AGENTS.md` / `CLAUDE.md` already exist (recon), do **not**
91
93
  overwrite — show the user and ask whether to merge or replace. Otherwise create `AGENTS.md`
92
94
  from `${CLAUDE_SKILL_DIR}/references/templates/AGENTS.md` and symlink `CLAUDE.md -> AGENTS.md`
93
- (`ln -s AGENTS.md CLAUDE.md`). **Leave the `workflow:methodology` slot exactly as shipped —
94
- empty.** Filling it is the composition root's job.
95
+ (`ln -s AGENTS.md CLAUDE.md`). **Leave BOTH pointer slots (`workflow:methodology` +
96
+ `workflow:orchestration`) exactly as shipped — empty.** Filling them is the composition root's job.
95
97
  6. **Deploy `docs/ai/`.** Create the files + `pages/` from
96
98
  `${CLAUDE_SKILL_DIR}/references/templates/`. Keep each file's frontmatter.
97
99
  7. **Fill templates** per the table below.
@@ -117,7 +119,7 @@ bootstrapping over a live system, but the user makes the final call.
117
119
  > When the family composition root drives this substrate as part of a family bootstrap **or
118
120
  > upgrade**, do the write steps (bootstrap 1–10 / upgrade 1–7: write `docs/ai/` + `AGENTS.md` +
119
121
  > `.memory-version`) but **do NOT** run **any** commit gate and **do NOT** ask to commit — the
120
- > composition root owns the **single** commit gate, raised after it injects the methodology slot.
122
+ > composition root owns the **single** commit gate, raised after it injects the two pointer slots.
121
123
  > The three setup answers and the target dir are passed in by the composition root; you perform no
122
124
  > commit and no slot injection. **Standalone** invocation keeps its own commit gate (bootstrap step
123
125
  > 11 / upgrade step 7).
@@ -164,12 +166,12 @@ Fill strategy:
164
166
  pre-1.1.0 deployment with no *Communication language* block, ask + insert
165
167
  (`migrations/1.1.0-communication-language.md`); pre-1.2.0 with no *Attribution* block, ask +
166
168
  insert defaulting to `off` (`migrations/1.2.0-agent-attribution.md`).
167
- 6. **Preserve the methodology slot.** If `AGENTS.md` has the `workflow:methodology` markers,
168
- **never regenerate the file wholesale** — extract any bytes between the markers and reinsert
169
- them unchanged. If the markers are absent (a legacy `AGENTS.md`), gracefully **no-op** on the
170
- slot (adding the slot to already-deployed files is a separate methodology migration). On any
171
- malformed marker state (single, reversed, nested, or duplicate pair), **no-op with an error**
172
- — never edit.
169
+ 6. **Preserve BOTH pointer slots.** If `AGENTS.md` has the `workflow:methodology` and/or
170
+ `workflow:orchestration` markers, **never regenerate the file wholesale** — extract any bytes
171
+ between each pair and reinsert them unchanged. If a pair is absent (a legacy `AGENTS.md`),
172
+ gracefully **no-op** on that slot (adding a slot to already-deployed files is the composition
173
+ root's reconcile, not this substrate's job). On any malformed marker state (single, reversed,
174
+ nested, or duplicate pair), **no-op with an error** — never edit.
173
175
  7. **Re-stamp** `docs/ai/.memory-version` to the lineage head (atomic write). Report changes;
174
176
  **ask before committing** — **except in delegated mode** (see the *Delegated mode* note above),
175
177
  where the composition root owns the single gate and this step raises none.
@@ -182,8 +184,9 @@ Fill strategy:
182
184
  **working directory is the target project** — never write substrate files back into the skill.
183
185
  - **Stamp = lineage head, not package version.** `.memory-version` carries `1.3.0` (the shared
184
186
  `agent-workflow` lineage), not the npm `1.1.0`. They are independent axes.
185
- - **The methodology slot ships empty and stays the user's.** Never author methodology text into
186
- it; on upgrade, preserve its content byte-for-byte. The composition root is its only writer.
187
+ - **Both pointer slots ship empty and stay the user's.** Never author methodology or orchestration
188
+ text into them; on upgrade, preserve their content byte-for-byte. The composition root is their only
189
+ writer.
187
190
  - **The `Co-Authored-By` trailer is added by the harness, not by prose.** When attribution is
188
191
  `off` + Claude Code, also set `"includeCoAuthoredBy": false` in `.claude/settings.json`.
189
192
  - **Hidden mode is project-local, never machine-global.** Memory's hide writes to the repo's
@@ -209,8 +212,8 @@ The three setup choices each have a full contract in
209
212
  ## References
210
213
 
211
214
  - [`references/contracts.md`](references/contracts.md) — the three setup contracts in full.
212
- - [`references/templates/`](references/templates/) — stack-agnostic `AGENTS.md` (with the empty
213
- methodology slot), `agent_rules.md`, and all `docs/ai/` files to deploy.
215
+ - [`references/templates/`](references/templates/) — stack-agnostic `AGENTS.md` (with the two empty
216
+ pointer slots — methodology + orchestration), `agent_rules.md`, and all `docs/ai/` files to deploy.
214
217
  - [`references/scripts/`](references/scripts/) — the Node enforcement scripts (caps + staleness +
215
218
  index-freshness gate, 3-tier archive, hook installer) and their unit tests.
216
219
  - [`scripts/stamp-takeover.mjs`](scripts/stamp-takeover.mjs) — the upgrade-time lineage state
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": "1.1.1",
6
+ "version": "1.1.2",
7
7
  "provides": ["context"],
8
8
  "roles": {},
9
9
  "detect": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sabaiway/agent-workflow-memory",
3
- "version": "1.1.1",
3
+ "version": "1.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",
@@ -55,19 +55,18 @@ Start-of-session, during-work, and task-completion procedures live in [`docs/ai/
55
55
 
56
56
  <!-- workflow:methodology:start -->
57
57
  <!-- workflow:methodology:end -->
58
+ <!-- workflow:orchestration:start -->
59
+ <!-- workflow:orchestration:end -->
58
60
 
59
61
  ---
60
62
 
61
63
  ## 🚫 Hard Constraints
62
64
 
63
- > Adapt to this stack — remove rows that don't apply. Style rules should be linter-enforced, not prose.
64
-
65
65
  | Rule | Enforcement |
66
66
  |------|-------------|
67
67
  | No `export default` (named exports only) | Linter |
68
68
  | No `any` / no unsafe casts | Linter / type-checker |
69
69
  | Functional style (no mutation in app code) | Linter |
70
- | No single-letter variables | Code review |
71
70
  | Interactive elements semantic (button/link, not div+onClick) | Linter / a11y |
72
71
  | No hardcoded colors — design tokens only | Code review |
73
72
  | No business logic in components → hooks/services | Architecture review |
@@ -35,6 +35,17 @@ const ENFORCEMENT = join(SKILL_ROOT, 'references', 'scripts');
35
35
  // from the composition root) so this substrate test stays self-contained and dependency-free.
36
36
  const SLOT_START = '<!-- workflow:methodology:start -->';
37
37
  const SLOT_END = '<!-- workflow:methodology:end -->';
38
+ const ORCH_START = '<!-- workflow:orchestration:start -->';
39
+ const ORCH_END = '<!-- workflow:orchestration:end -->';
40
+ // The deployed AGENTS.md line budget the composition root fills BOTH pointers inside (D-CAP). A
41
+ // representative single-line fragment per slot models what the composition root injects.
42
+ const AGENTS_MD_CAP = 100;
43
+ const lineCount = (text) => text.split('\n').length - (text.endsWith('\n') ? 1 : 0);
44
+ const extractPair = (text, start, end) => {
45
+ const a = text.indexOf(start);
46
+ const b = text.indexOf(end);
47
+ return a !== -1 && b !== -1 && b > a ? text.slice(a + start.length, b) : null;
48
+ };
38
49
 
39
50
  const tempDirs = [];
40
51
  const makeProject = () => {
@@ -98,14 +109,32 @@ describe('standalone substrate bootstrap (end-to-end, real temp project)', () =>
98
109
  assert.ok(!existsSync(join(docsAi, '.workflow-version')), 'no composition-root stamp in a standalone bootstrap');
99
110
  });
100
111
 
101
- it('ships the methodology slot present-but-empty', () => {
112
+ it('ships BOTH pointer slots present-but-empty (methodology + orchestration)', () => {
102
113
  const project = makeProject();
103
114
  bootstrap(project);
104
115
 
105
116
  const entry = readFileSync(join(project, 'AGENTS.md'), 'utf8');
106
- const start = entry.indexOf(SLOT_START);
107
- const end = entry.indexOf(SLOT_END);
108
- assert.ok(start !== -1 && end !== -1 && end > start, 'an ordered slot marker pair is present');
109
- assert.equal(entry.slice(start + SLOT_START.length, end).trim(), '', 'the slot is empty as shipped');
117
+ const meth = extractPair(entry, SLOT_START, SLOT_END);
118
+ const orch = extractPair(entry, ORCH_START, ORCH_END);
119
+ assert.notEqual(meth, null, 'an ordered methodology marker pair is present');
120
+ assert.equal(meth.trim(), '', 'the methodology slot is empty as shipped');
121
+ assert.notEqual(orch, null, 'an ordered orchestration marker pair is present');
122
+ assert.equal(orch.trim(), '', 'the orchestration slot is empty as shipped');
123
+ });
124
+
125
+ it('stays ≤ the cap when the composition root fills BOTH pointer slots (D-CAP headroom)', () => {
126
+ const project = makeProject();
127
+ bootstrap(project);
128
+ const entry = readFileSync(join(project, 'AGENTS.md'), 'utf8');
129
+ assert.ok(lineCount(entry) <= AGENTS_MD_CAP, `shipped (empty) AGENTS.md is ${lineCount(entry)} lines (cap ${AGENTS_MD_CAP})`);
130
+ // Fill each one-line pointer the way the composition root does (replace the empty body), then re-count.
131
+ const fill = (text, start, end, body) => {
132
+ const a = text.indexOf(start);
133
+ const b = text.indexOf(end);
134
+ return `${text.slice(0, a + start.length)}\n${body}\n${text.slice(b)}`;
135
+ };
136
+ let filled = fill(entry, SLOT_START, SLOT_END, '> methodology pointer (one line)');
137
+ filled = fill(filled, ORCH_START, ORCH_END, '> orchestration recipes pointer (one line)');
138
+ assert.ok(lineCount(filled) <= AGENTS_MD_CAP, `dual-filled AGENTS.md is ${lineCount(filled)} lines (cap ${AGENTS_MD_CAP})`);
110
139
  });
111
140
  });