@sabaiway/agent-workflow-memory 1.0.0 → 1.1.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 CHANGED
@@ -4,6 +4,22 @@ 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.0 — Hidden mode writes project-local, not global, excludes
8
+
9
+ Memory's **hidden** visibility now targets the **project-local** `.git/info/exclude` (its own footprint
10
+ only — `/AGENTS.md`, `/CLAUDE.md`, `/docs/ai/`, the added `/scripts/*.mjs`, `/docs/plans/`, both
11
+ `/.claude/settings*.json` — in canonical anchored form, idempotently), **never** the machine-global
12
+ `core.excludesFile`. Hiding a deployment no longer affects every other repo on the host (visibility is
13
+ a project setting). This is a **docs/prose** release (memory's hide was always prose-driven; no new
14
+ executable code); the tested superset path is the family composition root's hide tool, which absorbs
15
+ memory's project-local lines into one canonical managed block and adds the external footprint. The
16
+ deployment-lineage head stays **`1.3.0`** (no `docs/ai` structural change; no migration file).
17
+
18
+ ### Changed
19
+ - `references/contracts.md` Visibility contract + `SKILL.md` step 9 retarget the hide to project-local.
20
+ - The upgrade flow moves an older machine-global hide to project-local — **after** the never-downgrade
21
+ gate and **before** the equal-head short-circuit, so even an at-head hidden deployment is migrated.
22
+
7
23
  ## 1.0.0
8
24
 
9
25
  Initial standalone release. The **memory substrate** extracted into its own package as Plan 1
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.0.0'
6
+ version: '1.1.0'
7
7
  ---
8
8
 
9
9
  # agent-workflow-memory
@@ -73,7 +73,8 @@ bootstrapping over a live system, but the user makes the final call.
73
73
  `AGENTS.md`/`CLAUDE.md`, CI / linter configs; `git log --oneline -30` + `git status`; `src/`
74
74
  2–3 levels deep; tests + linter rules. Record stack, package manager, daily commands, layers.
75
75
  2. **Choose visibility — ASK explicitly and wait.** `visible` (committed — canonical,
76
- recommended) or `hidden` (in-tree, hidden via `~/.gitignore_global`). See
76
+ recommended) or `hidden` (in-tree, git-ignored via the **project-local** `.git/info/exclude`
77
+ never the machine-global excludes). See
77
78
  [Visibility contract](references/contracts.md#visibility-contract).
78
79
  3. **Choose conversational language — ASK explicitly and wait.** Which language the agent
79
80
  *talks to them* in. Offer the language they're already writing in as the default. Carry it
@@ -99,11 +100,15 @@ bootstrapping over a live system, but the user makes the final call.
99
100
  follow the cap/archive/index policy manually.
100
101
  9. **Wire / hide** per visibility (see contract). Install the pre-commit hook (Node projects):
101
102
  `node scripts/install-git-hooks.mjs`. If it reports a pre-existing non-marker hook, stop and
102
- ask the user to merge it manually.
103
+ ask the user to merge it manually. **Hidden** → add memory's own artifact paths (the canonical
104
+ anchored list in the [Visibility contract](references/contracts.md#visibility-contract)) to the
105
+ **project-local** `.git/info/exclude` (resolve via `git rev-parse --git-path info/exclude`),
106
+ append-only (never duplicate an existing line), then **verify `git status` shows them ignored**.
107
+ Never the machine-global excludes; never edit `package.json`.
103
108
  10. **Stamp the deployment lineage.** Write the **deployment-lineage head** into
104
109
  `docs/ai/.memory-version` (one semver line). The lineage head is **`1.3.0`** (the
105
110
  `LINEAGE_HEAD` constant in `scripts/stamp-takeover.mjs`) — the shared `agent-workflow`
106
- lineage, **not** this package's npm version (`1.0.0`). Use the atomic writer in
111
+ lineage, **not** this package's npm version (`1.1.0`). Use the atomic writer in
107
112
  `scripts/stamp-takeover.mjs` (write-temp + rename).
108
113
  11. **Report & ask.** Show `tree docs/ai/`, 2–3 lines on filled-vs-TODO, then **ask before
109
114
  committing** — never auto-commit. **Exception — delegated mode (below): skip this gate.**
@@ -135,9 +140,22 @@ Fill strategy:
135
140
  `.memory-version` (and never deletes the legacy stamp). The pure state machine in
136
141
  `scripts/stamp-takeover.mjs` decides the action per state; the Markdown migration is the
137
142
  no-Node manual fallback. If **no** stamp exists at all, offer a conservative re-bootstrap.
138
- 2. **Compare** the stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `1.3.0`). Equal
139
- report "up to date" and stop. **Greater than the head, or unparseable → STOP and report**
140
- (never downgrade or guess).
143
+ 2. **Never-downgrade gate FIRST, then the stamp-independent hidden-mode reconcile (D14).** Compare the
144
+ stamp to the **deployment-lineage head** (`LINEAGE_HEAD`, `1.3.0`). **Greater than the head, or
145
+ unparseable → STOP and report immediately, before ANY write** (never downgrade or guess, and never
146
+ touch `.git/info/exclude`). Otherwise (stamp **≤ head**) reconcile the hidden-mode footprint — but
147
+ first **infer this deployment's OWN visibility from its git state** (NOT from whether the machine-global
148
+ excludes list these paths — another repo on the host may have added them): if `AGENTS.md` (or
149
+ `docs/ai/`) is **tracked / committed** → **VISIBLE** → do nothing (never write `.git/info/exclude`);
150
+ if it is **untracked AND currently git-ignored** → **HIDDEN** → move memory's own footprint to the
151
+ **project-local** `.git/info/exclude` (the canonical anchored list from the Visibility contract,
152
+ append-only and idempotent — a clean re-run changes nothing), leaving the machine-global lines for the
153
+ user to remove (in a family upgrade the composition root's hide tool detects + reports that residual
154
+ block and removes it only after the user's explicit consent — never by default); if it is
155
+ **untracked AND not ignored** → **AMBIGUOUS** → **ASK** the user before writing. This visibility check
156
+ runs on **every** in-range upgrade, even at head — it is not gated by the stamp delta, but it is gated
157
+ **behind** the never-downgrade STOP above. **Then**, if the stamp **equals** the head → report "up to
158
+ date" (plus any footprint move just made) and stop.
141
159
  3. Show the relevant `${CLAUDE_SKILL_DIR}/CHANGELOG.md` context (entries newer than the stamp).
142
160
  4. Apply `${CLAUDE_SKILL_DIR}/migrations/<version>-<slug>.md` in **semver order**, only those
143
161
  newer than the stamp. Migrations are **idempotent**.
@@ -163,13 +181,15 @@ Fill strategy:
163
181
  - **Source vs target directory.** Templates/scripts are read from the skill's own dir; the
164
182
  **working directory is the target project** — never write substrate files back into the skill.
165
183
  - **Stamp = lineage head, not package version.** `.memory-version` carries `1.3.0` (the shared
166
- `agent-workflow` lineage), not the npm `1.0.0`. They are independent axes.
184
+ `agent-workflow` lineage), not the npm `1.1.0`. They are independent axes.
167
185
  - **The methodology slot ships empty and stays the user's.** Never author methodology text into
168
186
  it; on upgrade, preserve its content byte-for-byte. The composition root is its only writer.
169
187
  - **The `Co-Authored-By` trailer is added by the harness, not by prose.** When attribution is
170
188
  `off` + Claude Code, also set `"includeCoAuthoredBy": false` in `.claude/settings.json`.
171
- - **Hidden mode must never touch `package.json`.** It also ignores `docs/ai/.memory-version`
172
- (and any kit-fallback `.workflow-version`). After hiding, verify `git status` shows the
189
+ - **Hidden mode is project-local, never machine-global.** Memory's hide writes to the repo's
190
+ `.git/info/exclude` (one per-project ignore list), never `core.excludesFile`. `/docs/ai/`
191
+ subsumes `docs/ai/.memory-version` (and any kit-fallback `.workflow-version`) — list neither
192
+ separately. **Never touch `package.json`.** After hiding, verify `git status` shows the
173
193
  artifacts as ignored.
174
194
  - **`CLAUDE.md` is a symlink, not a copy.** `ln -s AGENTS.md CLAUDE.md`.
175
195
  - **Never overwrite an existing entry point or hook.** Stop and ask to merge vs replace.
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.0.0",
6
+ "version": "1.1.0",
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.0.0",
3
+ "version": "1.1.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",
@@ -17,7 +17,7 @@ The user chooses at bootstrap whether the AI artifacts are visible in the repo o
17
17
  diverge:
18
18
 
19
19
  - **visible** — artifacts are committed. Wire the project's `package.json` scripts (`docs:check` / `docs:index` / `docs:index:check` / `docs:archive` / `docs:archive:check` / `docs:archive:issues` / `docs:archive:issues:check` / `prepare: node scripts/install-git-hooks.mjs`) and add a minimal `.gitignore` (`docs/plans/`, `.claude/settings.local.json`). This is the canonical model.
20
- - **hidden** (in-tree) — same files on disk, but the repo "looks normal": append the artifact paths (`AGENTS.md`, `CLAUDE.md`, `docs/ai/`, `docs/plans/`, `scripts/*.mjs` you added, `docs/ai/.memory-version`, and if a kit fallback bootstrap stamped one — `docs/ai/.workflow-version`) to the global excludes file git **already uses** (`git config --get core.excludesFile`); if none is set, point it at `~/.gitignore_global` (`git config --global core.excludesFile ~/.gitignore_global`) and append there. **Verify `git status` shows the artifacts as ignored** afterwards. **Do not edit `package.json`** — that is a tracked change and would leak; the pre-commit hook (always untracked in `.git/hooks/`) calls the scripts via `node scripts/<x>.mjs` directly.
20
+ - **hidden** (in-tree) — same files on disk, but the repo "looks normal": add memory's OWN artifact paths to **one project-local ignore list, the repo's `.git/info/exclude`** — resolve it with `git rev-parse --git-path info/exclude` (worktree-safe) and **never** the machine-global `core.excludesFile`, which would silently affect every repo on the host (visibility is a *project* setting). Write each path **once**, in the **canonical anchored form** — `/AGENTS.md`, `/CLAUDE.md`, `/docs/ai/` (this subsumes `docs/ai/.memory-version` and any kit-fallback `docs/ai/.workflow-version` do **not** list the stamps separately), the `/scripts/*.mjs` you added, `/docs/plans/`, `/.claude/settings.local.json`, and `/.claude/settings.json` (step-4 attribution can create it; a standalone hidden memory hides it too). Append only never duplicate a line that is already present. **Verify `git status` shows the artifacts as ignored** afterwards. **Do not edit `package.json`** — that is a tracked change and would leak; the pre-commit hook (always untracked in `.git/hooks/`) calls the scripts via `node scripts/<x>.mjs` directly. *(In a family deploy the composition root then runs its hide tool, which absorbs these project-local lines into one canonical managed block and adds the external AI/agent footprint; memory writes no machine-global excludes at any step.)*
21
21
 
22
22
  Not in this version: a fully-external hidden mode (artifacts relocated outside the repo tree).
23
23
  Deferred to a later release + migration.