@sabaiway/agent-workflow-kit 1.8.1 → 1.8.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 +27 -0
- package/SKILL.md +7 -2
- package/capability.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ Semantically versioned ([semver](https://semver.org)), newest first. The `versio
|
|
|
4
4
|
is the current release. `upgrade` mode reads a project's `docs/ai/.workflow-version` and applies
|
|
5
5
|
every `migrations/<version>-<slug>.md` newer than it, in semver order.
|
|
6
6
|
|
|
7
|
+
## 1.8.2 — Upgrade DX: graceful, plain-language handling when the methodology slot can't fit the cap
|
|
8
|
+
|
|
9
|
+
On a real `upgrade`, a project whose `AGENTS.md` was already over its 100-line cap hit the
|
|
10
|
+
methodology-slot `reconcile`'s **cap refusal** (adding the bounded pointer would push the file to 109
|
|
11
|
+
lines). The tool behaved correctly — it refused and left the file byte-for-byte unchanged — but the
|
|
12
|
+
upgrade procedure had **no instruction for this exit path**, so the agent improvised: it surfaced a
|
|
13
|
+
confusing, kit-internal multiple-choice prompt to the user (ADR ids, tool / operation names, marker
|
|
14
|
+
terminology) that a third-party user has no vocabulary to answer.
|
|
15
|
+
|
|
16
|
+
- **Defined the cap-refusal path in `SKILL.md` (upgrade step 3):** a cap-exceeded `reconcile` refusal
|
|
17
|
+
is now a **soft, explicitly-reported skip — not a STOP** (a malformed slot / missing-or-duplicate
|
|
18
|
+
anchor still STOPs, unchanged). The upgrade continues without the slot; the skip is reported in
|
|
19
|
+
plain language in the final report — the methodology is already documented in
|
|
20
|
+
`docs/ai/agent_rules.md`, and trimming the entry point then re-running adds the pointer. It is
|
|
21
|
+
**not** silent (Hard Constraint — no silent failures). The reported line count is the file's
|
|
22
|
+
**current** size, not the tool's would-be post-injection number, and any remaining mandatory
|
|
23
|
+
`AGENTS.md` edit must keep the file ≤100 lines rather than bust the cap to land a migration.
|
|
24
|
+
- **No-Node manual path:** count the lines before pasting the slot by hand — skip + report if it
|
|
25
|
+
would take the file over the cap.
|
|
26
|
+
- **New Gotcha — communication firewall:** never surface ADR ids, tool / function / operation names,
|
|
27
|
+
marker / slot / fragment / anchor terminology, or verbatim tool stderr to the user; translate every
|
|
28
|
+
tool outcome into plain language.
|
|
29
|
+
|
|
30
|
+
Agent-procedure / documentation change only — no `inject-methodology.mjs` behavior change (the tool
|
|
31
|
+
was already correct), no `docs/ai` structural change, deployment-lineage head stays **`1.3.0`**, no
|
|
32
|
+
migration.
|
|
33
|
+
|
|
7
34
|
## 1.8.1 — Fix: `npx … init` ran nothing (the installer's own run-guard mis-fired under npx)
|
|
8
35
|
|
|
9
36
|
1.8.0 set out to fix "`npx <pkg> init` quietly did nothing" — and shipped a *second*, unrelated
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: agent-workflow-kit
|
|
|
3
3
|
description: Deploy or upgrade a portable AI-agent memory-and-workflow system in any project. Use when the user wants to bootstrap `docs/ai/` + an entry-point `AGENTS.md` (+ `CLAUDE.md` alias) + cap/archive/index enforcement in a new or existing repo, set up the Memory Map and session protocols, install the docs-rotation pre-commit hook, or run `/agent-workflow-kit` / `/agent-workflow-kit upgrade`. Triggers on phrases like "set up the memory system", "deploy the AI workflow here", "bootstrap docs/ai", "upgrade the workflow".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata:
|
|
6
|
-
version: '1.8.
|
|
6
|
+
version: '1.8.2'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-kit
|
|
@@ -145,7 +145,11 @@ Fill strategy:
|
|
|
145
145
|
|
|
146
146
|
1. Read `docs/ai/.workflow-version` (the project's stamped lineage). If missing, treat as a pre-versioned deployment and offer to re-bootstrap conservatively.
|
|
147
147
|
2. **Never-downgrade gate — FIRST, before any write.** Compare the stamp to the **deployment-lineage head** (`1.3.0` — NOT this kit's package version). If the stamp is **greater than the head** or unparseable → **STOP and report**; do not touch a newer / unknown deployment at all (not even the methodology slot).
|
|
148
|
-
3. **Reconcile the methodology slot — stamp-independent, BEFORE the equal-head short-circuit.** Reached only when the stamp **≤ head**. Run `node ${CLAUDE_SKILL_DIR}/tools/inject-methodology.mjs reconcile <project>/AGENTS.md`. This ensures the `workflow:methodology` slot exists and is filled on **every** upgrade, idempotently (zero-diff when already present + filled) — so even a legacy / current **`1.3.0`** deployment gains the slot **without a lineage-head bump** (the head stays `1.3.0`; **no `agent-workflow-memory` change**). It inserts an empty slot at the Session-Protocols anchor if absent, preserves a customized slot verbatim, and STOPs (never edits) on a malformed slot or a missing / duplicate anchor.
|
|
148
|
+
3. **Reconcile the methodology slot — stamp-independent, BEFORE the equal-head short-circuit.** Reached only when the stamp **≤ head**. Run `node ${CLAUDE_SKILL_DIR}/tools/inject-methodology.mjs reconcile <project>/AGENTS.md`. This ensures the `workflow:methodology` slot exists and is filled on **every** upgrade, idempotently (zero-diff when already present + filled) — so even a legacy / current **`1.3.0`** deployment gains the slot **without a lineage-head bump** (the head stays `1.3.0`; **no `agent-workflow-memory` change**). It inserts an empty slot at the Session-Protocols anchor if absent, preserves a customized slot verbatim, and STOPs (never edits) on a malformed slot or a missing / duplicate anchor.
|
|
149
|
+
|
|
150
|
+
**Cap-refusal is a soft, reported skip — not a STOP.** If — and ONLY if — `reconcile` exits non-zero because filling the slot would exceed the deployed `AGENTS.md` 100-line cap (the entry point is already at / over budget), leave the file byte-for-byte unchanged (the tool already did) and **continue** the upgrade without the slot. A malformed slot or a missing / duplicate anchor is a *different* non-zero exit and still **STOPs** (above) — never soft-skip those. This is **not** a silent skip (Hard Constraint — no silent failures): report it explicitly in the final report (step 8), in plain language, e.g. *"The workflow-methodology pointer wasn't added — `AGENTS.md` is N lines, over its 100-line limit. The methodology is already documented in `docs/ai/agent_rules.md`; to add the pointer, trim the entry point (move detail into `docs/ai/`) and re-run upgrade."* N is the file's **current** line count — never the tool's number (that is the would-be post-injection size). Because the entry point is already over cap, ensure the rest of the upgrade does not push it further: any mandatory `AGENTS.md` edit must keep it ≤100 lines or pause for an explicit trim — never bust the cap to land a migration.
|
|
151
|
+
|
|
152
|
+
**No-Node project:** open `AGENTS.md`; if there is no `<!-- workflow:methodology:start/end -->` pair, **count the lines first** — if pasting the pair + the fragment from `tools/methodology-slot.md` would take the file over 100 lines, **skip it and report the skip** (as above — the methodology is already in `docs/ai/agent_rules.md`; trim to add the pointer). Otherwise paste the pair right after the *Read it before any code change.* line and fill it from `tools/methodology-slot.md`.
|
|
149
153
|
4. **Equal-head short-circuit.** If the stamp **equals** the head → the lineage is up to date: **stop here** (the slot was already reconciled in step 3).
|
|
150
154
|
5. Show the relevant `${CLAUDE_SKILL_DIR}/CHANGELOG.md` diff (entries newer than the project's stamp).
|
|
151
155
|
6. Apply `${CLAUDE_SKILL_DIR}/migrations/<version>-<slug>.md` in **semver order**, only those newer than the project's stamp. Migrations are **idempotent** — safe to re-run.
|
|
@@ -196,6 +200,7 @@ The non-obvious traps — scan these before bootstrapping or upgrading. Each is
|
|
|
196
200
|
- **No Node runtime → skip enforcement.** If the project has no Node (recon step 1), skip bootstrap steps 8–9 (scripts + hook) and follow the cap/archive/index policy manually, or port the scripts to the project's language.
|
|
197
201
|
- **Conversational language never translates artifacts.** It governs *dialogue only*. Code, identifiers, paths, commands, log output, abbreviations, and every deployed `docs/ai/` / `AGENTS.md` file stay in their source language. See [Communication contract](references/contracts.md#communication-contract).
|
|
198
202
|
- **Never auto-commit.** Report quality-gate results and wait for explicit approval — in both modes.
|
|
203
|
+
- **Never leak kit internals to the user.** No ADR ids, tool / function / operation names (`reconcile`, `inject`, `ensureSlot`), marker / slot / fragment / anchor terminology, or verbatim tool stderr in anything the user reads. Translate every tool outcome into plain language a third-party user — who has never read this `SKILL.md` — can understand and act on (e.g. the cap-refusal report in *Mode: upgrade* step 3).
|
|
199
204
|
|
|
200
205
|
---
|
|
201
206
|
|
package/capability.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-kit",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Portable, cross-agent memory & workflow for AI coding agents — Claude Code, Codex, Cursor, Devin Desktop. One command deploys an AGENTS.md entry point + docs/ai context with cap/archive/index enforcement into any repo.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|