@sabaiway/agent-workflow-kit 18.0.0 → 19.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 +57 -0
- package/SKILL.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/advisor-writers.md +1 -1
- package/references/contracts.md +9 -2
- package/references/modes/jev.md +1 -1
- package/references/modes/recommendations.md +3 -3
- package/references/modes/upgrade.md +8 -7
- package/references/shared/composition-handoff.md +5 -3
- package/references/templates/agent_rules.md +1 -1
- package/tools/apply-danger-check.mjs +8 -4
- package/tools/jev-facts.mjs +4 -1
- package/tools/jev-skill.mjs +7 -5
- package/tools/lens-region.mjs +37 -32
- package/tools/recommendations.mjs +26 -16
- package/tools/upgrade-runlist.mjs +1 -1
- package/tools/write-lanes.mjs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,63 @@ 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
|
+
## 19.1.0 — the kit sections of the agent rules file are written current with no question; a differing body is named with its route (AD-211)
|
|
8
|
+
|
|
9
|
+
**Your upgrade now writes the kit's three sections of `docs/ai/agent_rules.md` current, with no question and no copy
|
|
10
|
+
kept.** Before, the `lens` step refreshed Communication (user-facing messages), Story sessions and the planning/review
|
|
11
|
+
lens only when a section matched a body the kit had shipped; any other body was preserved verbatim with a note, so an
|
|
12
|
+
edited section stayed on old wording for good. Now a current section is left, a known earlier one refreshed, and any
|
|
13
|
+
other body is written with the canon at the file's own heading number, in the file's own newline form, its trailing
|
|
14
|
+
blank lines kept and every byte outside the section unchanged. Its line names where your own text goes:
|
|
15
|
+
|
|
16
|
+
`[lens-region] the planning/review lens section differed from the current canon — written with it; text of your own goes under a ### heading of its own, titled unlike the kit's sections.`
|
|
17
|
+
|
|
18
|
+
From engine 5.12.2 on, the lens section's own intro says it is written current; with an earlier engine that ships the
|
|
19
|
+
lens canon, the step writes that engine's canon, whose intro still says a custom edit is preserved.
|
|
20
|
+
|
|
21
|
+
- **A `### 2.<N>.` heading that opens with a section's title words is that section.** Alone, `### 2.6. Planning,
|
|
22
|
+
review & process-fidelity invariants: my additions` is written over too; beside the kit's own heading the two are
|
|
23
|
+
doubled and neither is changed. A section of your own needs a title of its own.
|
|
24
|
+
- **A section with doubled headings is left.** With more than one heading for a section, the step prints `none of them
|
|
25
|
+
was changed` for it, still reconciles the other sections, and asks you to retitle every heading but one, then re-run.
|
|
26
|
+
- **A target the step cannot rewrite safely is left alone.** A link or any other node that is not a regular file at
|
|
27
|
+
the target, or a file that is not valid UTF-8, prints one line and nothing is written.
|
|
28
|
+
- **The line cap still guards every write where the file declares `maxLines`**: a section whose write would pass it
|
|
29
|
+
is refused and left as it stands, exit 0; a file with no `maxLines` skips the guard with a note.
|
|
30
|
+
- **The texts say the same.** `upgrade.md` (the `lens` row, its relay and the report), `composition-handoff.md`, the
|
|
31
|
+
run-list's `lens` outcome `differing body written` in place of `custom edit preserved`, the Recommendations remedy
|
|
32
|
+
(a prior or any other body → the upgrade's `lens` reconcile), the rules template, and the guide's *Reserved names and
|
|
33
|
+
channels*, which names the three sections as the kit's and gains the eighth channel: text of your own under a `###`
|
|
34
|
+
heading of its own, titled unlike the kit's sections.
|
|
35
|
+
|
|
36
|
+
## 19.0.0 — the Jev copy is written current with no question beside a copy at a kit pin; `jev-skill.earlier` retires (AD-210)
|
|
37
|
+
|
|
38
|
+
**MAJOR: the advisor's `jev-skill.earlier` item is gone, and `apply-danger-check --variant jev-skill.earlier` is a
|
|
39
|
+
usage refusal, exit 2.** Before, the vendor's Jev skill copy in the agent skill roots was never updated silently: a copy
|
|
40
|
+
at an earlier pin was replaced only on your yes to `jev-skill.earlier`, and an absent root was filled only on your yes
|
|
41
|
+
to the `jev-skill` offer, both shown only once `TYPESAFE_API_KEY` was set. Now a copy whose two files match a pin the
|
|
42
|
+
kit shipped is the kit's, and beside one such copy in any of the three roots (`~/.agents/skills`, the Claude Code skills
|
|
43
|
+
dir, `~/.gemini/config/skills`) every root absent or behind the kit's pin is written with no question. A copy matching
|
|
44
|
+
no pin, a link or any other node there is yours: left untouched and named.
|
|
45
|
+
|
|
46
|
+
- **A new kit item, `jev-skill.not-current`.** Beside a copy at a kit pin the advisor renders this `lane: kit` item,
|
|
47
|
+
which the agent applies with no question by the kit route, whatever the key and whatever decline you recorded. Its
|
|
48
|
+
text reads `Jev's vendor skill is absent or behind the kit's pin in {n} agent skill root(s) beside a copy at a kit
|
|
49
|
+
pin — written with no question`, and its `recipe:` line names every root its apply writes and each foreign copy it
|
|
50
|
+
leaves.
|
|
51
|
+
- **The offer is for a first install only.** Where no root holds a copy at a kit pin, the `jev-skill` offer is
|
|
52
|
+
unchanged — the key gate, the decline, your yes — and its text now reads `a skill root the kit fills is absent`.
|
|
53
|
+
- **The danger check** for the kit item admits the skill roots only while it judges the component accepted itself;
|
|
54
|
+
over a home with no copy at a kit pin it admits nothing, so each planned write prints `refused:`, exit 1, and the
|
|
55
|
+
no-question apply installs nothing there. A copy at a kit pin removed between the check and the writer's own read is
|
|
56
|
+
not seen: the writer still fills every root it plans. A copy the vendor's `skills` CLI wrote with the same bytes
|
|
57
|
+
counts as a copy at a kit pin.
|
|
58
|
+
- **The skill command's line.** `jev-skill.mjs --apply` prints `leftover: <path> — <cause>` where it printed
|
|
59
|
+
`kept aside:`; its plan, argv and exit codes are unchanged. A script that read `kept aside:` reads `leftover:`.
|
|
60
|
+
- **The texts say the same.** The skill command's header, which now names the four routes that apply it; the jev and
|
|
61
|
+
recommendations modes; `references/advisor-writers.md`; the guide's *Reserved names and channels*, which names the
|
|
62
|
+
vendor skill copy at a kit pin as the kit's.
|
|
63
|
+
|
|
7
64
|
## 18.0.0 — the kit's two hook files are written current within a hook you wired; `gate-hook --reseed` and three advisor items retire (AD-209)
|
|
8
65
|
|
|
9
66
|
**MAJOR: `gate-hook.mjs --reseed` is removed, and the advisor's `gate-hook.marker-stale`, `read-lane.stale` and
|
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". New to the epic, story and task tier? Run `/agent-workflow-kit tier`. A typed decision with a confidence from Jev? Run `/agent-workflow-kit jev`.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata:
|
|
6
|
-
version: '
|
|
6
|
+
version: '19.1.0'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-kit
|
package/capability.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.1.0",
|
|
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",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
| profile-gap | chat | rules-insert.mjs, tier-preview.mjs, checker-gates.mjs |
|
|
49
49
|
| jev-connect | user | user step |
|
|
50
50
|
| jev-skill | harness | jev-skill.mjs |
|
|
51
|
-
| jev-skill.
|
|
51
|
+
| jev-skill.not-current | kit | jev-skill.mjs |
|
|
52
52
|
| spec-adoption.adopting | chat | ack-write.mjs |
|
package/references/contracts.md
CHANGED
|
@@ -101,9 +101,14 @@ files (the five the kit bundles for `.claude/agents/` — `changelog-skeleton.md
|
|
|
101
101
|
`gate-triage.md`, `mechanical-sweep.md`, `review-lens.md` — and each configured
|
|
102
102
|
`review-lens-<model>-<effort>.md`) and, within a hook you wired, the kit hook files
|
|
103
103
|
`.claude/hooks/agent-workflow-gates.mjs` and `.claude/hooks/state-block-guard.mjs` are written over
|
|
104
|
-
by the next upgrade with no question and no copy kept.
|
|
104
|
+
by the next upgrade with no question and no copy kept.
|
|
105
|
+
Also the kit's: the vendor skill copy the kit installs into the three agent skill roots
|
|
106
|
+
when it matches a pin the kit shipped, written with no question beside a copy at a kit pin;
|
|
107
|
+
a copy matching none is the user's, left and named. Also the kit's: the three kit sections of
|
|
108
|
+
`docs/ai/agent_rules.md` (Communication, Story sessions and the planning/review lens), each
|
|
109
|
+
written current on every upgrade with no question and no copy kept. A declaration seeded once from a template and never
|
|
105
110
|
replaced by the upgrade's ensures (a migration rewrites one only on the user's explicit yes) is the
|
|
106
|
-
user's own file. A customization goes into one of
|
|
111
|
+
user's own file. A customization goes into one of eight channels instead:
|
|
107
112
|
|
|
108
113
|
- **Your own commit checks** go in the local hook file `scripts/pre-commit.local`: the managed
|
|
109
114
|
pre-commit hook runs it first, once the installer has run.
|
|
@@ -114,6 +119,8 @@ user's own file. A customization goes into one of seven channels instead:
|
|
|
114
119
|
- **A vehicle of your own** goes in `.claude/agents/<name>.local.md` with a `name:` of its own, which
|
|
115
120
|
no review roster names; a lens of your own in a review slot keeps a stem of its own.
|
|
116
121
|
- **A hook of your own** goes in `.claude/hooks/<name>.local.mjs`, which you wire.
|
|
122
|
+
- **Your own text in the agent rules file**: text of your own goes under a ### heading of its own,
|
|
123
|
+
titled unlike the kit's sections.
|
|
117
124
|
|
|
118
125
|
No path segment of a file the kit bundles and places as its own has a dot-separated part exactly
|
|
119
126
|
`local`; a path of that form is the user's, and no kit tool writes one on its own. Outside that rule:
|
package/references/modes/jev.md
CHANGED
|
@@ -9,7 +9,7 @@ Run `node ${CLAUDE_SKILL_DIR}/tools/jev-guide.mjs --dir <project> --json`.
|
|
|
9
9
|
|
|
10
10
|
Render the returned envelope compactly in the user's conversational language. Never paste the JSON. Keep every path and every command verbatim, each command on its own line so it runs as printed; translate only the prose around them. Keep the one vendor-quoted text verbatim and in quotes, never translated or reflowed: the not-a-replacement sentence. The `Run it in <place>:` line, when the guide printed one, stays directly before the connect line and is never folded into it; the restart step is relayed whole.
|
|
11
11
|
|
|
12
|
-
The connect line is the user's own step — hand it over as printed; it asks for the key in their terminal, so the key never reaches the agent or the chat; the connect command refuses without a terminal, and a terminal is not consent. The agent applies the skill only through the advisor's `jev-skill`
|
|
12
|
+
The connect line is the user's own step — hand it over as printed; it asks for the key in their terminal, so the key never reaches the agent or the chat; the connect command refuses without a terminal, and a terminal is not consent. The agent applies the skill only through the advisor's `jev-skill` items: the offer's check line, and on the user's yes on that result its apply line, or, beside a copy at a kit pin, the kit item `jev-skill.not-current` by the kit route with no question (spec kit/install/init-project); where the advisor shows no `jev-skill` item, STEP 2's line is the user's own step. The guide's line is the user's command for a terminal of their own. The vendor's install lines are the user's own step too. Only when the user asks to see the plan, run the skill command without `--apply` yourself: a read-only dry run that writes nothing.
|
|
13
13
|
|
|
14
14
|
Keep this order: the fixed text (WHAT, WHY HERE, NOT, SOURCES); then the two steps — the key with its connect line and its mark, the vendor skill with its install lines, its mark and its first prompt; then the three prompts where it pays.
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@ Run `node ${CLAUDE_SKILL_DIR}/tools/recommendations.mjs --cwd <project-root> [--
|
|
|
22
22
|
|
|
23
23
|
The **consent route** for a harness item: run its `check:` line in the sandbox and show its result. On the check's `masked:` line, say so and run that same check line once more outside the sandbox, so it re-judges in the apply's own environment; the yes is taken on the outside result. Take the user's yes on that result and run its `apply:` line with that result's digest once, outside the sandbox at once, so the harness asks at the point of action (with the apply ask rule seeded, its own dialog); never another line, never unseen. When velocity-core, kit-tools-tier or bridge-tier is among the user's picks (velocity-core preferred), check, confirm and apply it, or leave it pending, before any other pick's check runs, so its apply seeds the ask rule before the other harness applies. When the harness's auto mode refuses the check or the apply, say so and give the one plain step: leave auto mode for this one action (Shift+Tab in the terminal, the mode indicator in an editor) and say yes, or run `npx @sabaiway/agent-workflow-kit@latest init` in a terminal of your own. On the user's word, run the same line once more when they left auto mode, never another, never unseen; when they ran `init` instead, run the advisor again and offer only what is still pending, each through this route from its check (after a restart `init` asked for, the next session's upgrade does it). When that refusal hits the velocity-core, kit-tools-tier or bridge-tier pick taken first, run no other pick's check until the user answers the plain step. A check that refuses (exit 1) leaves the item unapplied and pending, its result shown; a changed digest (exit 5) applies nothing, shows the new result and asks a new yes. A no, a harness refusal and any other failure of a harness apply leave the item pending with its output shown, and the agent continues. `init`, run in a console from the project's folder, is the route the user may take instead.
|
|
24
24
|
|
|
25
|
-
**The kit route** for a `lane: kit` item, which writes a kit file of a component the project already has: ask no question and wait for no pick. Before offering the other items, run each kit item's `check:` line in the sandbox and show its result, then at once run its `apply:` line with that result's digest once, outside the sandbox; the harness's own dialog there is its consent, which the kit cannot remove. A changed digest (exit 5) re-runs the check once and applies with its new digest, still with no question; every other outcome leaves the item pending with its output shown, and the agent goes on; an auto-mode refusal gets the one plain step above. `init` checks and applies it on its one y, as a harness item.
|
|
25
|
+
**The kit route** for a `lane: kit` item, which writes a kit file of a component the project already has or the host already accepted: ask no question and wait for no pick. Before offering the other items, run each kit item's `check:` line in the sandbox and show its result, then at once run its `apply:` line with that result's digest once, outside the sandbox; the harness's own dialog there is its consent, which the kit cannot remove. A changed digest (exit 5) re-runs the check once and applies with its new digest, still with no question; every other outcome leaves the item pending with its output shown, and the agent goes on; an auto-mode refusal gets the one plain step above. `init` checks and applies it on its one y, as a harness item.
|
|
26
26
|
|
|
27
27
|
**The `executor-vehicle` item (the carrier the project already CONFIGURED — beside the `agents` offer, never the same item).** It fires on ONE pair of facts: a slot in `docs/ai/orchestration.json` names `subagent` while the executor vehicle (`.claude/agents/executor.md`) is `missing` or `unusable` — so every such slot silently degrades to solo. That is a configured declaration that is broken, hence **`attention`**, not an offer; its text names the state, its reason and how many configured slots are affected across the six activities (`plan-authoring`, `plan-execution`, `routine`, `feedback-triage`, `epic`, `task`), covering the subagent-capable slots `plan-authoring.author`, `plan-authoring.fold`, `plan-execution.execute`, `routine.carrier`, `epic.author`, `task.author` and `task.execute`. **`placed` renders NOTHING** (a working vehicle is not a recommendation); it yields to `agents.not-current`, the kit item the agent applies with no question, which writes a regular executor whose bytes differ, the check failing or not, in a placed component; a config naming no `subagent` slot renders no base item, and a config the validated reader refuses is a stated **skip**, never an item computed over a shape nothing accepted. It is deliberately DISTINCT from the `agents` offer and the review-recipe probe, neither of which can observe this state. The agent applies it on the chat yes after the check; `init` previews the agents writer's own `cheap-agents.mjs` and applies it with `--apply` on the terminal yes as a route the user may take instead. Its `recipe:` line carries each precondition the advisor observes beside the apply slot, followed by the hidden-mode reconcile follow-up (`hide-footprint --reconcile`), for a hidden deployment only. Honest limit on convergence: the apply places an ABSENT vehicle, so it clears `missing`; it STOPs on a symlink, so on `unusable` the `recipe:` line names each refusal as a precondition; an executor whose frontmatter is invalid is written by the apply itself. Risk profile: writes under `.claude/agents/` only — every kit agent file written current with no question, the executor's and the review lens's bodies derived from `docs/ai/vehicles.json` — never `settings.json`, never a commit.
|
|
28
28
|
|
|
@@ -46,9 +46,9 @@ A variant's posture note, where its key has one, is printed by `init` from this
|
|
|
46
46
|
- `mcp-channel` — the offer is to REGISTER the kit's read-only stdio MCP server in this project on the harness lane: a registration is a command your MCP client will RUN. The agent applies it on the chat yes after the check; `init` previews the exact entry and applies it on the terminal y as the route the user may take instead. What the registration buys: path questions and literal searches become typed tool calls whose arguments are named JSON fields instead of a string handed to a shell, so a pipe, a redirect or a quote inside a pattern or a path stays DATA and is never interpreted. Posture: the server is a **read-only child of your client** (path/type/size/line facts and literal search over this project root; no write and no exec API), and like the client itself it runs **outside the Bash sandbox** — the sandbox is not what bounds it, the server's own root containment is. The two allow rules it adds make those two tools promptless and nothing else. The **`.differing`** arm is also a harness item: an `agent-workflow` entry already stands in `.mcp.json` and **structurally differs** from what this kit copy would write (another kit copy, a hand-edited path, an added `env`; the comparison ignores key order, so re-serialized identical bytes are the same registration). The check shows the entry standing in `.mcp.json` and the entry it would write; the chat yes confirms the replacement. `init` previews `mcp --replace` and replaces only on the terminal y. Stated limit: this item does **not** detect a `disabledMcpjsonServers` veto, so a converged `mcp-channel` means *what the mode writes is in place*, not *the client will load it* — see `${CLAUDE_SKILL_DIR}/references/modes/mcp.md`. Risk profile: a new read-only channel your client will launch; no write or exec exposure; a differing registration is replaced only on the checked chat yes or the terminal y and every other declaration is kept.
|
|
47
47
|
- ADDITIONAL `gates-inert` arms (the third outcomes) — two further arms, and they differ in whether anything is BROKEN. **`producer-unrecognized`** — a checker with no producer anywhere in the declaration, on a tracked tree the changed-line coverage domain cannot reach (`.ts`/`.tsx`/`.jsx`/`.mts`/`.cts` strictly outnumber `.mjs`/`.cjs`/`.js`): the dead pair is real, so this arm is a user item, the user's own step, and the two remedies are marking the real producer with `"lcovProducer": true` or dropping the checker. Never a `node --test` prescription, the fill preview or an acknowledgement — a dead pair is broken, not narrow. **`coverage-domain-narrow`** — the producer/checker pair IS live and the tree is still dominated by what the domain excludes: nothing is broken, and the honest sentence is that certification covers the assessable minority. Its apply is the consent-gated **ack writer** preview (a NEUTRAL fingerprint into `docs/ai/acks.json` as `coverageDomainAck`, never a security key); after the SAME confirmation you run the `--apply` it prints. The fingerprint binds the FACT — the verdict plus the unsupported extensions present, never the file counts — so an acknowledged project stays quiet as it grows and re-fires when a new unsupported language arrives or the verdict flips. The census reads the TRACKED tree with a read-only `git ls-files`; a tree it cannot read (a non-git deployment) becomes a stated skip. Risk profile: no enforcement change of any kind — one acknowledgement recorded in a family-owned file, and one edit that is the user's own step.
|
|
48
48
|
- `spec-adoption` — the feature-spec layer's ADOPTION STATE, judged from `docs/ai/specs/` alone through the same census `spec-check --all` runs, so a store the checker would refuse to observe is never counted here either. Both arms are OFFERS (`optional`) — the layer is opt-in, and `attention` stays reserved for a configured declaration that is broken. **`not-adopted`** (no store): every plan then cites zero governing specs by default and nothing says adoption never started; its apply is the spec-layer ensure one-liner (`ensure-configs --reconcile --only specs`, the same seed `upgrade` runs — it seeds the reader/checker pairs and the store root, and skips with a stated reason where no Node evidence exists), and its `recipe:` line carries the decline alternative — the DECLINE preview (`ack-write --lane spec-adoption`, a dry-run that prints the exact `--apply`), which records `specAdoptionAck` in the family-owned `docs/ai/acks.json`. **The two are exclusive, and the order is part of the contract:** ask which the user wants, apart, BEFORE the confirmation; on "seed" run the apply; on "decline" the agent records it — the preview line, then on that same answer its printed `--apply`; never run the seed after a decline, nor the decline after the seed. **`adopting`** (a store with no live contract): an optional item naming the draft count; its apply is that same decline preview (a dry-run; after the SAME confirmation you run the `--apply` it prints), and the honest remedy is authoring a contract from the skill's `SPEC_TEMPLATE.md`. A recorded decline silences BOTH arms and shows on `status` as ` — declined`; one live contract makes the decline moot. An unreadable store is a stated skip, never `flow optimal`. Risk profile: the seed writes create-only files under `scripts/` and `docs/ai/specs/` and refreshes a script body a release shipped; it writes an edited spec-layer file with the bundled body with no question, its line naming where an edit meant to last goes; the decline writes one key into the ack store; nothing here authors a spec or blocks a plan.
|
|
49
|
-
- `profile-gap` — each item's apply is a PREVIEW that writes nothing, and consent takes two steps: the confirmed pick runs the preview and you relay every line it prints (the environment-resolved slot values, each checker `entry:` line with its trust-chain disclosure, a Communication region the insert plans in the same run); the same line with ` --apply` appended runs only on a SECOND yes over those lines, never carried by the first. Items whose apply lines are byte-equal are one writer and take one answer: the tier preview's `--apply` writes the absent slots, the store seed and the queue seed together; the checker verb writes only its own entries; the insert writes every region it plans, all or nothing, so a `communication-absent` skip beside a declined `story-sessions-section` gets its own ask after the insert's full preview. A no records nothing and the item stays on the screen. A DECLINE is asked apart from later, before anything runs, and runs `node ${CLAUDE_SKILL_DIR}/tools/tier-preview.mjs --decline --cwd <project-root>` only when the user refuses EVERY item the tier preview then reports offered: it records each of them at the shipped lineage, and a declined item leaves the screen until a lineage step changes the profile. An undecidable entry is a stated skip naming its reason, the remedy by reason: a prior → the upgrade's `lens` reconcile
|
|
49
|
+
- `profile-gap` — each item's apply is a PREVIEW that writes nothing, and consent takes two steps: the confirmed pick runs the preview and you relay every line it prints (the environment-resolved slot values, each checker `entry:` line with its trust-chain disclosure, a Communication region the insert plans in the same run); the same line with ` --apply` appended runs only on a SECOND yes over those lines, never carried by the first. Items whose apply lines are byte-equal are one writer and take one answer: the tier preview's `--apply` writes the absent slots, the store seed and the queue seed together; the checker verb writes only its own entries; the insert writes every region it plans, all or nothing, so a `communication-absent` skip beside a declined `story-sessions-section` gets its own ask after the insert's full preview. A no records nothing and the item stays on the screen. A DECLINE is asked apart from later, before anything runs, and runs `node ${CLAUDE_SKILL_DIR}/tools/tier-preview.mjs --decline --cwd <project-root>` only when the user refuses EVERY item the tier preview then reports offered: it records each of them at the shipped lineage, and a declined item leaves the screen until a lineage step changes the profile. An undecidable entry is a stated skip naming its reason, the remedy by reason: a prior or any other body → the upgrade's `lens` reconcile, which writes the region current or names the line cap that refused the write; an absent region → the insert. Risk profile: the tier preview's `--apply` rewrites `docs/ai/orchestration.json` in canonical form with the `_README` note and creates `docs/ai/epics/.gitkeep` and `docs/plans/queue.md` create-only; the insert adds regions to `docs/ai/agent_rules.md`; the checker verb adds entries to the PRIVILEGED `docs/ai/gates.json`; the decline writes `docs/ai/profile-declines.json`; nothing here commits.
|
|
50
50
|
- `jev-connect` — the lane is user and env-dependent: the connect command is the user's own step in a terminal of their own, where it asks for the key; the key never reaches the agent or the chat (the command refuses without a terminal, and a terminal is not consent). When the recipe line opens with `run the apply in <place>`, that place is the terminal to run it in; `init`, run there, offers the command on its own consent line. The command reads the key with no echo, makes one network call to api.typesafe.ai with the vendor's sample text only on the user's own run, and writes the key in plain text — as managed export lines in the shell's startup files (bash: ~/.bashrc and the login file, created as ~/.bash_profile when none exists; zsh: ~/.zshrc), as the kit's own file ~/.config/fish/conf.d/typesafe-api-key.fish for fish, or on Windows as the user environment variable TYPESAFE_API_KEY, stored in the Windows user environment; a process already running at the save can keep its old environment and hand it to what it starts — the guide's key mark confirms the agent sees it (a file is readable by any process running as that user, and by other local accounts when one is world-readable in a traversable home); the vendor keeps data under its processing agreement and offers zero retention only to enterprise accounts. The item reads the environment the agent's commands run in: a host setting that filters it shows the item while the key is set in the user's shell. The decline alternative rides the recipe line, asked apart BEFORE the confirmation (the `spec-adoption` order): on "connect" hand over the apply line; on "decline" the agent records it — the recipe line's preview, then its printed `--apply` — per project as `jevConnectAck` in `docs/ai/acks.json`. Risk profile: a plain-text key in the user's startup files or the Windows user environment, written by a command the user runs; one network call from that run.
|
|
51
|
-
- `jev-skill` —
|
|
51
|
+
- `jev-skill` — two arms, both env-dependent. The offer `jev-skill`, lane harness, shows once `TYPESAFE_API_KEY` is set and no decline is recorded, while no skill root holds a copy at a kit pin and a root the kit fills is absent: the agent applies it on the chat yes after the check, showing the files it would write; it changes no harness setting. `init` applies it on the batch terminal yes as the route the user may take instead. When the recipe line opens with `run the apply in <place>`, that place is where a user who prefers their own terminal runs it. The kit item `jev-skill.not-current`, lane kit, shows beside a copy at a kit pin in any root: the kit route applies it with no question, writing every root absent or behind the kit's pin. The skill is third-party text — the vendor's, MIT — that the kit ships pinned and installs as a verified copy into three agent skill roots: `~/.agents/skills`, the Claude Code skills dir (`CLAUDE_CONFIG_DIR` or `~/.claude`) and `~/.gemini/config/skills`. The copy is written current with no question beside a copy at a kit pin; a foreign copy is left untouched and named on the recipe line. A copy the vendor's `skills` CLI wrote with the same bytes reads current, accepts the component and is written at a later pin like a kit copy; a vendor plugin install is invisible to the file check, so the Claude Code root may read absent while the plugin serves it. Only when the user asks to see the plan does the agent run the command without `--apply` (a read-only dry run). The decline alternative rides the offer's recipe line, asked apart BEFORE the confirmation: on "install" run the check line and, on the yes given on its result, the apply line by the consent route; on "decline" the agent records it — the recipe line's preview, then its printed `--apply` — per project as `jevSkillAck` in `docs/ai/acks.json`. Risk profile: third-party text written into the user's agent skill roots by the kit's skill command; no network.
|
|
52
52
|
|
|
53
53
|
**Sandbox lanes (what to DO with the bridge surfaces, per host class):**
|
|
54
54
|
|
|
@@ -15,7 +15,7 @@ Requires: ${CLAUDE_SKILL_DIR}/references/shared/report-footer.md · ${CLAUDE_SKI
|
|
|
15
15
|
3. `configs` — `node ${CLAUDE_SKILL_DIR}/tools/ensure-configs.mjs --reconcile --cwd <project>` → one line per ensure: `seeded` / `note-refreshed` / `refreshed` / `regenerated` / `pending` / `already-current` / `customized-preserved` / `malformed-preserved` / `already-present` / `not-placed` / `skipped-no-node-evidence` / `failed`.
|
|
16
16
|
4. `gates-migration` — `node ${CLAUDE_SKILL_DIR}/references/scripts/migrate-gates.mjs --kit-tools ${CLAUDE_SKILL_DIR}/tools --cwd <project>` → the preview plan · INERT checker · CUSTOMIZED entries, each named — consent: apply only on an explicit yes, re-run with `--apply`.
|
|
17
17
|
5. `bridges` — `node ${CLAUDE_SKILL_DIR}/tools/setup-backends.mjs --refresh-placed` → per-bridge lines: refreshed · already current · skipped — with its stated reason (not placed / newer than the bundle / unsupported host) · `skipped-readonly` · could not refresh.
|
|
18
|
-
6. `lens` — `node ${CLAUDE_SKILL_DIR}/tools/lens-region.mjs reconcile <project>/docs/ai/agent_rules.md` → per section: refreshed · already current ·
|
|
18
|
+
6. `lens` — `node ${CLAUDE_SKILL_DIR}/tools/lens-region.mjs reconcile <project>/docs/ai/agent_rules.md` → per section: refreshed · already current · differing body written · file absent / engine too old — skipped · over the line cap — refused · section absent — noted · a fully absent/invalid engine → hard STOP.
|
|
19
19
|
7. `tier` — `node ${CLAUDE_SKILL_DIR}/tools/tier-preview.mjs --cwd <project>` → per gap: present · offered · declined · undecidable · applied · recorded · refused — consent: one ask, only when offered.
|
|
20
20
|
8. `bridge-settings` — `node ${CLAUDE_SKILL_DIR}/tools/bridge-settings.mjs --reconcile` → outcome line(s), pasted verbatim: ok · absent · flagged · duplicates · unusable.
|
|
21
21
|
|
|
@@ -77,18 +77,19 @@ Requires: ${CLAUDE_SKILL_DIR}/references/shared/report-footer.md · ${CLAUDE_SKI
|
|
|
77
77
|
|
|
78
78
|
**`lens` — agent-rules lens refresh.** Relay the outcome in plain
|
|
79
79
|
language: the planning/review lens section was **refreshed** to
|
|
80
|
-
the current canon ·
|
|
81
|
-
|
|
80
|
+
the current canon · had a **differing body — written** with the canon, its line naming the
|
|
81
|
+
route: text of your own goes under a ### heading of its own, titled unlike the kit's sections ·
|
|
82
|
+
the **file is absent — skipped** · the **engine is too old — skipped**
|
|
82
83
|
(refresh it with `npx @sabaiway/agent-workflow-engine@latest init`, then re-run) · **over the
|
|
83
84
|
file's line cap — refused** (trim the file, re-run). The section is found by its heading — no
|
|
84
|
-
markers; a renamed heading
|
|
85
|
+
markers; a renamed heading, no longer opening with the title words, is noted. A fully absent/invalid engine is the same hard
|
|
85
86
|
STOP as (c). Exit 0 covers every soft outcome; only the STOP is non-zero. The same invocation
|
|
86
87
|
also reconciles the **Communication (user-facing messages)** and **story-sessions** sections
|
|
87
88
|
from the kit's own bundled template canon (no engine involved) — relay each section's line:
|
|
88
|
-
*refreshed* / *already current* / *
|
|
89
|
+
*refreshed* / *already current* / *differing body written* / *section absent — noted* /
|
|
89
90
|
*over the file's line cap — refused*; an unreadable bundled template canon is its own loud STOP
|
|
90
91
|
naming the kit reinstall command.
|
|
91
|
-
A doubled heading in any of the three sections
|
|
92
|
+
A doubled heading in any of the three sections has nothing written.
|
|
92
93
|
The **Communication and story-sessions** absent-section notes already carry the preview
|
|
93
94
|
command: relay the printed note verbatim as the offer.
|
|
94
95
|
Run the insert with `--apply` only on the user's explicit yes (the `tier` ask while `tier`
|
|
@@ -113,7 +114,7 @@ Requires: ${CLAUDE_SKILL_DIR}/references/shared/report-footer.md · ${CLAUDE_SKI
|
|
|
113
114
|
**The LATE navigator finalizer — the AUTHORITATIVE run, after the last `docs/ai` mutation.** `lens` above rewrites `docs/ai/agent_rules.md`, so the step-3 index ensure is already behind by the time the run-list ends. Re-run that ONE op here, before the step-4 report: `node ${CLAUDE_SKILL_DIR}/tools/ensure-configs.mjs --reconcile --only index --cwd <project>`. Relay **this** line in the report (it supersedes the early one; an untouched tree changes nothing, a failure STOPs the upgrade like any other ensure). On the migrated path the same rung runs again at the END of step 7 — after the migrations, before the step-8 re-stamp.
|
|
114
115
|
4. **Equal-head exit — a real successful-exit report, not a bare stop.** If the stamp **equals** the head, the lineage is up to date — but step 3 (the stamp-independent reconciles) ran first and may have changed things, so this is a proper exit report, not a no-op:
|
|
115
116
|
- **A skip line that contradicts the observed tree is a FINDING, never pasted as neutral.** Every ensure skip names the fact it proved (the probes that answered absent); if the tree you can see disproves that reason — a "no Node" skip beside deployed Node scripts, a "not deployed" skip beside a stamped `docs/ai` — do not relay the line as an outcome: raise it in the report as a defect of the tool, with the contradicting fact named, and stop short of any step that would build on the skip.
|
|
116
|
-
- **Report step 3's outcome in plain language** — for **each** `pointers` slot (workflow-methodology, orchestration-recipes and autonomy-policy) whether it was *added*, was *already present* (nothing changed), or was *skipped* (the soft-skip from step 3, with its reason — over the line limit / engine too old / the autonomy pointer's anchor absent), and each Memory Map row the same way (or *refreshed*); the **nine project-configuration ensure** (`configs`) lines exactly as the one ensure run composed them (the ensures and their outcome tokens are enumerated in step 3), each rendered in plain language: what was created, what was left exactly as the user wrote it, and — for a `failed` line — what stopped it; for the navigator, relay the **late** `--only index` line, not the early one; the **`gates-migration`** result — *nothing to migrate*, the shown plan *applied* on your explicit yes, or the plan *left unapplied* (consent not given), with any INERT checker or CUSTOMIZED entries named; the **placed-bridge refresh** (`bridges`) outcome — paste the tool's per-bridge lines verbatim (they are already plain: *refreshed* / *already current* / *skipped — not placed* / `skipped-readonly` with its re-scan verdict / *could not refresh* + recovery); the **agent-rules lens** (`lens`) outcome (*refreshed* / *already current* / *
|
|
117
|
+
- **Report step 3's outcome in plain language** — for **each** `pointers` slot (workflow-methodology, orchestration-recipes and autonomy-policy) whether it was *added*, was *already present* (nothing changed), or was *skipped* (the soft-skip from step 3, with its reason — over the line limit / engine too old / the autonomy pointer's anchor absent), and each Memory Map row the same way (or *refreshed*); the **nine project-configuration ensure** (`configs`) lines exactly as the one ensure run composed them (the ensures and their outcome tokens are enumerated in step 3), each rendered in plain language: what was created, what was left exactly as the user wrote it, and — for a `failed` line — what stopped it; for the navigator, relay the **late** `--only index` line, not the early one; the **`gates-migration`** result — *nothing to migrate*, the shown plan *applied* on your explicit yes, or the plan *left unapplied* (consent not given), with any INERT checker or CUSTOMIZED entries named; the **placed-bridge refresh** (`bridges`) outcome — paste the tool's per-bridge lines verbatim (they are already plain: *refreshed* / *already current* / *skipped — not placed* / `skipped-readonly` with its re-scan verdict / *could not refresh* + recovery); the **agent-rules lens** (`lens`) outcome (*refreshed* / *already current* / *differing body written*, its line naming the route: text of your own goes under a ### heading of its own, titled unlike the kit's sections / *file absent* / *engine too old* / *over the line cap*; a doubled heading has nothing written) and the **Communication-section** and **story-sessions section** outcomes (each its own set: refreshed / already current / differing body written / section absent — noted / over the file's line cap — refused); the **full-flow offer** (`tier`) lines; the **bridge-settings reconcile** (`bridge-settings`) outcome (paste the tool's line(s) verbatim); and, for a hidden deployment, whether the hidden-mode footprint (`footprint`) was *moved to project-local*, was *already project-local* (nothing changed), or needed a question (ambiguous visibility). Plain wording only — never the reconcile/slot/anchor/marker terms (the never-leak-kit-internals Gotcha — `${CLAUDE_SKILL_DIR}/references/shared/deploy-tail.md`).
|
|
117
118
|
- **Never surface the structure number on this exit.** Whatever step 3 did, do **not** recite the `docs/ai` structure version, the internal versioning vocabulary, or the two-axes note here — the number is inert on an equal-head exit; it belongs to *Version disclosure* in `${CLAUDE_SKILL_DIR}/references/shared/report-footer.md` (shown at the never-downgrade STOP, the explicit status view, or on an explicit ask). Frame the success itself per the final bullet: if step 3 changed anything, say **what changed** in plain human terms; only a pure zero-diff no-op is *settings already current — no update needed*.
|
|
118
119
|
- **Render the mandatory Recommendations section — on this exit too, BEFORE the footer.** Run `node ${CLAUDE_SKILL_DIR}/tools/recommendations.mjs --cwd <project-root>` and PRESENT its output — from the `## Recommendations (agent-workflow)` header — in the user's conversational language: every fact, count and item from the tool, nothing added or dropped; commands, paths, hosts and rule strings byte-exact; show the raw tool block on request. The section is present-even-when-empty (with everything optimal the body is exactly `no recommendations — flow optimal.`) and VERDICT-FIRST — the composed verdict line renders from the frozen templates `{K} item(s) need attention` / `nothing is broken` / `{N} optional recommendation(s), apply any you want` / `optimality NOT attested — {M} probe check(s) skipped`. Then apply each kit item by the kit route, with no question: its check line in the sandbox, then at once its apply line once outside it. Then OFFER the consent route: the user picks items in plain language; surface each picked item's posture note and get the explicit confirm; run its lane's rendered lines — chat: the one-liner; harness: the check line, then on the yes to its result the apply line; user: the user's own step — per the full consent route in `${CLAUDE_SKILL_DIR}/references/modes/recommendations.md`. Pinned order on this exit: Recommendations block → optional applies → report footer → the commit ask (the advisor/apply lane never lands after the commit ask).
|
|
119
120
|
- **Recommendations lanes — both exits.** The four lanes (`chat`, `harness`, `kit`, `user`), the consent route and the kit route live in `${CLAUDE_SKILL_DIR}/references/modes/recommendations.md`; `init` stays a route the user may take.
|
|
@@ -51,13 +51,15 @@ only after `<project>/docs/ai/agent_rules.md` exists: after the substrate deploy
|
|
|
51
51
|
This is what converges a substrate seeded by an older memory — a lens section matching a known
|
|
52
52
|
prior canonical body is refreshed from the installed engine; a current seed reports *already
|
|
53
53
|
current* (zero-diff). Relay its outcome in plain language (*refreshed* / *already current* /
|
|
54
|
-
*
|
|
54
|
+
*differing body written* / *file absent — skipped* / *engine too old — skipped* / *over the
|
|
55
55
|
line cap — refused*); a fully absent/invalid engine is the same loud STOP + one-line install
|
|
56
56
|
command as the pointer reconcile. The same invocation also reconciles the **Communication
|
|
57
57
|
(user-facing messages)** and **story-sessions** sections from the kit's own bundled template canon (no engine involved):
|
|
58
58
|
a body matching the current canon is reported *already current*; a body matching a known prior
|
|
59
|
-
is refreshed;
|
|
60
|
-
|
|
59
|
+
is refreshed; any other differing body is written with the canon, its line naming the route: text
|
|
60
|
+
of your own goes under a ### heading of its own, titled unlike the kit's sections; a doubled
|
|
61
|
+
heading has nothing written; an absent section is a stated note;
|
|
62
|
+
an over-cap write is refused; and an unreadable bundled template canon is its own
|
|
61
63
|
loud STOP naming the kit reinstall command. Relay both sections' outcome lines.
|
|
62
64
|
The printed absent-section note already carries the preview command: relaying it is the offer.
|
|
63
65
|
Run the insert with `--apply` only on the user's explicit yes.
|
|
@@ -76,7 +76,7 @@ Apply this as part of §2 before any user-facing summary:
|
|
|
76
76
|
- **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.
|
|
77
77
|
|
|
78
78
|
### 2.6. Planning, review & process-fidelity invariants
|
|
79
|
-
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
|
|
79
|
+
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 written current on every upgrade; text of your own goes under a ### heading of its own, titled unlike the kit's sections.)
|
|
80
80
|
- **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
|
|
81
81
|
- **Finding scope (plan-execution) — name the invariant BEFORE the edit.** During EXECUTION only — a spec and its plan under authoring have no shipped behaviour to call a live defect in, so the spec review carries none of this. Every finding names the invariant its fix would enforce, and where that invariant already lives decides the disposition: already an acceptance criterion of the phase → **fold here**; it would have to be ADDED → ship the **narrow fix** for the found site (red first, then green) and queue ONLY the generalization — a deferral row carries the invariant, the origin `file:line`, the narrow fix, its proof and a residual exposure declared NOT live; no correct narrow fix → **blocking**: the phase does not close, and it is **never queued**. Two bars declared before each round: a finding counts only if it changes a **WRITE/REMOVE decision** or is a false statement in shipped text; a repeat finding in one subarea **routes to SUBTRACTION**, not a fourth patch.
|
|
82
82
|
- **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
|
|
@@ -21,7 +21,7 @@ import { writeMcp } from './mcp.mjs';
|
|
|
21
21
|
import { ENABLED_KEY, MCP_JSON_REL, SERVERS_KEY, SERVER_NAME, allowRulesFor, buildServerEntry } from './mcp-registration.mjs';
|
|
22
22
|
import { AGENTS_DIR, agentsAccepted, kitAgentNames, writeCheapAgents } from './cheap-agents.mjs';
|
|
23
23
|
import { planFor } from './jev-skill.mjs';
|
|
24
|
-
import { SKILL_FILES, claudeDirOf, skillTargets } from './jev-facts.mjs';
|
|
24
|
+
import { SKILL_FILES, claudeDirOf, skillAccepted, skillState, skillTargets } from './jev-facts.mjs';
|
|
25
25
|
import { findOnPath } from './detect-backends.mjs';
|
|
26
26
|
import { consoleArgv } from './write-lanes.mjs';
|
|
27
27
|
import { BUNDLED_SCRIPT_NAMES, INSTALLER_REL, SCRIPTS_REL, formatPlan, planGitHooks } from './git-hooks.mjs';
|
|
@@ -31,7 +31,8 @@ import { isDirectRun } from './direct-run.mjs';
|
|
|
31
31
|
import { dirCovers as covers } from './declared-paths.mjs';
|
|
32
32
|
|
|
33
33
|
const TOOLS = dirname(fileURLToPath(import.meta.url));
|
|
34
|
-
const
|
|
34
|
+
const SKILL_KIT = 'jev-skill.not-current';
|
|
35
|
+
const SKILL_VARIANTS = ['jev-skill', SKILL_KIT];
|
|
35
36
|
const VELOCITY_VARIANTS = ['velocity-core', 'kit-tools-tier', 'bridge-tier'];
|
|
36
37
|
const [GATE_KIT, STOP, STOP_KIT] = ['gate-hook.not-current', 'state-block', 'state-block.not-current'];
|
|
37
38
|
const [HOOK_VARIANTS, STOP_VARIANTS, KIT_HOOKS] = [['gate-hook', GATE_KIT], [STOP, STOP_KIT], [GATE_KIT, STOP_KIT]];
|
|
@@ -171,6 +172,7 @@ const unmaskedLstat = (facts) => (path, ...args) => {
|
|
|
171
172
|
return stat;
|
|
172
173
|
};
|
|
173
174
|
const kitHookWired = (variant, facts) => SETTINGS_FILES.some((rel) => (variant === GATE_KIT ? isHookWired : isStopHookWired)(readSettingsFile(join(facts.root, rel), { lstat: unmaskedLstat(facts), cwd: facts.root }).data));
|
|
175
|
+
const skillIo = (deps) => ({ lstat: deps.lstat ?? lstatSync, readdir: deps.readdir ?? readdirSync, readFile: deps.readFile ?? readFileSync, pins: deps.pins });
|
|
174
176
|
|
|
175
177
|
export const scopeOf = (variant, facts, deps = {}) => {
|
|
176
178
|
const allowed = {};
|
|
@@ -210,8 +212,10 @@ export const scopeOf = (variant, facts, deps = {}) => {
|
|
|
210
212
|
set(ENABLED_KEY, [SERVER_NAME]);
|
|
211
213
|
set('permissions.allow', allowRulesFor());
|
|
212
214
|
}
|
|
213
|
-
const
|
|
215
|
+
const judged = SKILL_VARIANTS.includes(variant) ? skillTargets({ home: facts.home,
|
|
214
216
|
claudeDir: facts.claudeDir ?? claudeDirOf(facts.env, facts.home, facts.platform).dir }) : [];
|
|
217
|
+
// The kit skill variant's scope holds only while the check's own judgement accepts the component, never read from the plan.
|
|
218
|
+
const targets = variant !== SKILL_KIT || skillAccepted(judged.map((target) => ({ ...target, ...skillState(target, skillIo(deps)) }))) ? judged : [];
|
|
215
219
|
const accepted = !KIT_HOOKS.includes(variant) || kitHookWired(variant, facts);
|
|
216
220
|
const filePaths = !accepted ? [] : HOOK_VARIANTS.includes(variant) ? [join(facts.root, HOOK_FILE_REL)] : STOP_VARIANTS.includes(variant) ? [join(facts.root, STATE_BLOCK_HOOK_FILE_REL)] : [];
|
|
217
221
|
const directories = !accepted || SKILL_VARIANTS.includes(variant) || variant === FOOTPRINT ? [] : [join(facts.root, CLAUDE_DIR)];
|
|
@@ -313,7 +317,7 @@ export const plannedChange = (variant, facts, deps = {}) => {
|
|
|
313
317
|
writes.push({ path: item.abs, bytes: item.content });
|
|
314
318
|
}
|
|
315
319
|
} else if (SKILL_VARIANTS.includes(variant)) {
|
|
316
|
-
const plan = planFor({ ...writerDeps, lstat: lstatSync, readdir: readdirSync, readFile: readFileSync });
|
|
320
|
+
const plan = (deps.planFor ?? planFor)({ ...writerDeps, lstat: lstatSync, readdir: readdirSync, readFile: readFileSync });
|
|
317
321
|
for (const target of plan.targets.filter(({ action }) => ['install', 'replace'].includes(action))) {
|
|
318
322
|
const stem = basename(target.path);
|
|
319
323
|
const bytes = Object.keys(SKILL_FILES).sort().map((name) => [name,
|
package/tools/jev-facts.mjs
CHANGED
|
@@ -61,7 +61,7 @@ export const JEV_ERROR_MEANINGS = Object.freeze({
|
|
|
61
61
|
|
|
62
62
|
// ── the vendor skill (part jev-skill) ─────────────────────────────────────────────────────────────
|
|
63
63
|
// Each target file name -> the name the kit ships it under. The shipped SKILL.md is renamed so no agent
|
|
64
|
-
// walking the kit's own tree (a skill folder itself) loads the vendor's text before
|
|
64
|
+
// walking the kit's own tree (a skill folder itself) loads the vendor's text before an --apply places it.
|
|
65
65
|
export const SKILL_FILES = Object.freeze({ 'SKILL.md': 'SKILL.md.pinned', LICENSE: 'LICENSE' });
|
|
66
66
|
// Newest first; a release that moves the pin puts the new entry first and removes none.
|
|
67
67
|
export const SKILL_PINS = Object.freeze([Object.freeze({
|
|
@@ -144,6 +144,9 @@ export const skillState = (target, io) => {
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
+
// The component is accepted exactly when a judged target reads current or earlier: a copy at a kit pin.
|
|
148
|
+
export const skillAccepted = (judged) => judged.some(({ state }) => state === 'current' || state === 'earlier');
|
|
149
|
+
|
|
147
150
|
// The skill command's apply line, always with the Claude Code dir its caller resolved; '' when a path holds a control byte.
|
|
148
151
|
export const skillLine = (toolsDir, platform, claudeDir) => {
|
|
149
152
|
if ([...`${toolsDir}${claudeDir}`].some(isControl)) return '';
|
package/tools/jev-skill.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// spec:jev-guide — docs/ai/specs/kit/jev-guide/jev-skill.md
|
|
3
3
|
// The one command that installs the vendor's Jev skill, pinned and digest-checked, as a verified COPY into
|
|
4
|
-
// the three agent skill roots.
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// the three agent skill roots. Its --apply comes by four routes: the advisor's kit item, with no question
|
|
5
|
+
// beside a copy at a kit pin; the offer, on the chat yes after the danger check; init, on its terminal y;
|
|
6
|
+
// and the user's own terminal. Without --apply it is a read-only dry run. It reads no secret, needs no
|
|
7
|
+
// terminal, opens no connection, never writes through a link below a base, and never removes a leftover it
|
|
8
|
+
// did not mint this run.
|
|
7
9
|
import { createHash } from 'node:crypto';
|
|
8
10
|
import { lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
9
11
|
import { homedir } from 'node:os';
|
|
@@ -125,7 +127,7 @@ export const applyTarget = (entry, io) => {
|
|
|
125
127
|
io.rm(aside, { recursive: true, force: true });
|
|
126
128
|
} catch (error) { kept = codeOf(error); }
|
|
127
129
|
}
|
|
128
|
-
if (kept !== null) lines.push(`
|
|
130
|
+
if (kept !== null) lines.push(`leftover: ${printable(join(aside, 'typesafe-ai'))} — ${kept}`);
|
|
129
131
|
}
|
|
130
132
|
return { lines, outcome: 'refused' };
|
|
131
133
|
};
|
|
@@ -168,7 +170,7 @@ export const applyTarget = (entry, io) => {
|
|
|
168
170
|
const old = { base: aside, path: join(aside, 'typesafe-ai') };
|
|
169
171
|
const verified = skillState(old, io);
|
|
170
172
|
if (verified.state === 'earlier') io.rm(aside, { recursive: true, force: true });
|
|
171
|
-
else lines.push(`
|
|
173
|
+
else lines.push(`leftover: ${printable(old.path)} — it reads ${verified.state}`);
|
|
172
174
|
lines.unshift(`replaced: ${path} (${entry.tag} → ${io.pins[0].tag})`);
|
|
173
175
|
return { lines, outcome: 'replaced' };
|
|
174
176
|
} catch (error) {
|
package/tools/lens-region.mjs
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// The only mutation of a deployed rules file the composition root runs WITHOUT a consent ask.
|
|
3
3
|
import { isDirectRun } from './direct-run.mjs';
|
|
4
4
|
import { normalizeCanonical } from './orchestration-config.mjs';
|
|
5
|
-
import { RULES_REGIONS, extractRegionBy, readTemplateSpan, frontmatterMaxLines, exceedsCap, buildInsertPreview } from './rules-regions.mjs';
|
|
5
|
+
import { RULES_REGIONS, extractRegionBy, readTemplateSpan, frontmatterMaxLines, exceedsCap, buildInsertPreview, decodeUtf8Strict } from './rules-regions.mjs';
|
|
6
6
|
|
|
7
7
|
export { frontmatterMaxLines } from './rules-regions.mjs';
|
|
8
|
+
export const REGION_ROUTE = "text of your own goes under a ### heading of its own, titled unlike the kit's sections";
|
|
8
9
|
const [COMMUNICATION, STORY, LENS] = RULES_REGIONS;
|
|
9
10
|
export const LENS_HEADING_RE = LENS.headingRe;
|
|
10
11
|
export const COMMS_HEADING_RE = COMMUNICATION.headingRe;
|
|
@@ -88,13 +89,13 @@ export const replaceLensRegion = (text, region, renderedBody) => {
|
|
|
88
89
|
const reconcileRegionText = (text, fragment, priors, { extract, normalize, render }) => {
|
|
89
90
|
const region = extract(text);
|
|
90
91
|
if (!region.found) return { status: 'no-region', text };
|
|
91
|
-
if (region.count > SINGLE_HEADING) return { status: '
|
|
92
|
+
if (region.count > SINGLE_HEADING) return { status: 'doubled', text };
|
|
92
93
|
const current = normalize(region.body);
|
|
93
94
|
const canon = normalize(fragment);
|
|
94
95
|
if (current === canon) return { status: 'current', text };
|
|
95
96
|
const known = priors.map((prior) => normalize(prior));
|
|
96
|
-
|
|
97
|
-
return { status
|
|
97
|
+
const status = known.includes(current) ? 'refreshed' : 'custom';
|
|
98
|
+
return { status, text: replaceLensRegion(text, region, render(fragment, region.number)) };
|
|
98
99
|
};
|
|
99
100
|
export const reconcileLensText = (text, fragment, priors) =>
|
|
100
101
|
reconcileRegionText(text, fragment, priors, { extract: extractLensRegion, normalize: normalizeLensBody, render: renderLens });
|
|
@@ -104,20 +105,22 @@ export const reconcileStoryText = (text, fragment, priors) =>
|
|
|
104
105
|
reconcileRegionText(text, fragment, priors, { extract: extractStoryRegion, normalize: normalizeStoryBody, render: renderStory });
|
|
105
106
|
const RECONCILERS = Object.freeze({ communication: reconcileCommsText, 'story-sessions': reconcileStoryText, lens: reconcileLensText });
|
|
106
107
|
|
|
108
|
+
const writtenLine = (section) => `[lens-region] the ${section} differed from the current canon ${EM_DASH} written with it; ${REGION_ROUTE}.`;
|
|
109
|
+
const capRefusedLine = (section, target, count, cap, capWord = 'cap') => `[lens-region] refused ${EM_DASH} writing the current ${section} would push ${oneLine(target)} to ${count} lines (${capWord} ${cap}); trim the file and re-run. The ${section} was not changed.`;
|
|
110
|
+
|
|
107
111
|
export const OUTCOME_LINES = Object.freeze({
|
|
108
112
|
errorDetail,
|
|
109
113
|
targetAbsent: (target) => `[lens-region] ${oneLine(target)} is absent ${EM_DASH} skipped (nothing to update; the file is seeded at bootstrap).`,
|
|
114
|
+
targetNotRegular: (target) => `[lens-region] ${oneLine(target)} is a link or not a regular file ${EM_DASH} left as it stands; nothing written.`,
|
|
115
|
+
targetUndecodable: (target) => `[lens-region] ${oneLine(target)} is not valid UTF-8 ${EM_DASH} nothing written; fix its encoding and re-run.`,
|
|
110
116
|
commsNoRegion: (target, command) => [
|
|
111
117
|
`[lens-region] no "${COMMUNICATION.label}" section in ${spanFree(target)} ${EM_DASH} left untouched.`,
|
|
112
118
|
...insertNote(command),
|
|
113
119
|
],
|
|
114
120
|
commsCurrent: () => `[lens-region] Communication section already current ${EM_DASH} nothing to do (zero-diff).`,
|
|
115
|
-
|
|
116
|
-
`[lens-region] Communication section carries a custom edit ${EM_DASH} preserved verbatim.`,
|
|
117
|
-
`[lens-region] note: the canonical Communication section has changed since this section was edited ${EM_DASH} compare it with the current template when convenient; your wording is never overwritten.`,
|
|
118
|
-
],
|
|
121
|
+
commsWritten: () => writtenLine('Communication section'),
|
|
119
122
|
capSkipNote: () => '[lens-region] note: no `maxLines` frontmatter on the target ' + EM_DASH + ' the line-cap guard is skipped.',
|
|
120
|
-
commsCapRefused: (target, count, cap) =>
|
|
123
|
+
commsCapRefused: (target, count, cap) => capRefusedLine('Communication section', target, count, cap),
|
|
121
124
|
commsRefreshed: () => '[lens-region] refreshed the Communication section to the current canon.',
|
|
122
125
|
templateCanonStop: () => `[lens-region] STOP ${EM_DASH} the kit's bundled agent_rules.md template canon is unreadable; reinstall the kit: npx @sabaiway/agent-workflow-kit@latest init`,
|
|
123
126
|
storyNoRegion: (target, command) => [
|
|
@@ -125,15 +128,12 @@ export const OUTCOME_LINES = Object.freeze({
|
|
|
125
128
|
...insertNote(command),
|
|
126
129
|
],
|
|
127
130
|
storyCurrent: () => `[lens-region] Story sessions section already current ${EM_DASH} nothing to do (zero-diff).`,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
`[lens-region] note: this body differs from the bundled template's Story sessions section ${EM_DASH} compare the two when convenient; your wording is never overwritten.`,
|
|
131
|
-
],
|
|
132
|
-
storyCapRefused: (target, count, cap) => `[lens-region] refused ${EM_DASH} refreshing the Story sessions section would push ${oneLine(target)} to ${count} lines (maxLines ${cap}); trim the file and re-run. The Story sessions section was not changed.`,
|
|
131
|
+
storyWritten: () => writtenLine('Story sessions section'),
|
|
132
|
+
storyCapRefused: (target, count, cap) => capRefusedLine('Story sessions section', target, count, cap, 'maxLines'),
|
|
133
133
|
storyRefreshed: () => '[lens-region] refreshed the Story sessions section to the current canon.',
|
|
134
134
|
regionHeadingTwice: (label, target) => [
|
|
135
|
-
`[lens-region] more than one "${oneLine(label)}" section in ${oneLine(target)} ${EM_DASH}
|
|
136
|
-
|
|
135
|
+
`[lens-region] more than one "${oneLine(label)}" section in ${oneLine(target)} ${EM_DASH} none of them was changed.`,
|
|
136
|
+
"[lens-region] note: retitle every one of these headings but one so it no longer opens with the section's title words, then re-run.",
|
|
137
137
|
],
|
|
138
138
|
lensNoRegion: (target) => [
|
|
139
139
|
`[lens-region] no "${LENS.label}" section in ${oneLine(target)} ${EM_DASH} left untouched.`,
|
|
@@ -145,11 +145,8 @@ export const OUTCOME_LINES = Object.freeze({
|
|
|
145
145
|
return err?.reason ? [human, errorDetail(err.reason)] : [human];
|
|
146
146
|
},
|
|
147
147
|
lensCurrent: () => `[lens-region] lens section already current ${EM_DASH} nothing to do (zero-diff).`,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
`[lens-region] note: the canonical planning/review lens has changed since this section was edited ${EM_DASH} compare it with the project methodology canon when convenient; your wording is never overwritten.`,
|
|
151
|
-
],
|
|
152
|
-
lensCapRefused: (target, count, cap) => `[lens-region] refused ${EM_DASH} refreshing would push ${oneLine(target)} to ${count} lines (cap ${cap}); trim the file and re-run. The planning/review lens section was not changed.`,
|
|
148
|
+
lensWritten: () => writtenLine('planning/review lens section'),
|
|
149
|
+
lensCapRefused: (target, count, cap) => capRefusedLine('planning/review lens section', target, count, cap),
|
|
153
150
|
lensRefreshed: () => '[lens-region] refreshed the planning/review lens section to the current canon.',
|
|
154
151
|
});
|
|
155
152
|
|
|
@@ -195,16 +192,28 @@ export const runCli = async (argv, deps = {}) => {
|
|
|
195
192
|
const targetPath = resolve(argv[1]);
|
|
196
193
|
const served = targetPath.endsWith(sep + SERVED_TARGET.join(sep));
|
|
197
194
|
const command = served ? buildInsertPreview(resolve(targetPath, '..', '..', '..')) : '';
|
|
198
|
-
const
|
|
195
|
+
const stat = await fs.lstat(targetPath).catch((err) => {
|
|
196
|
+
if (err.code === 'ENOENT') return null;
|
|
197
|
+
throw err;
|
|
198
|
+
});
|
|
199
|
+
if (stat === null) {
|
|
200
|
+
log(OUTCOME_LINES.targetAbsent(argv[1]));
|
|
201
|
+
return EXIT_OK;
|
|
202
|
+
}
|
|
203
|
+
if (stat.isSymbolicLink() || !stat.isFile()) {
|
|
204
|
+
log(OUTCOME_LINES.targetNotRegular(argv[1]));
|
|
205
|
+
return EXIT_OK;
|
|
206
|
+
}
|
|
207
|
+
const bytes = await fs.readFile(targetPath);
|
|
208
|
+
const text = (() => {
|
|
199
209
|
try {
|
|
200
|
-
return
|
|
201
|
-
} catch
|
|
202
|
-
|
|
203
|
-
throw err;
|
|
210
|
+
return decodeUtf8Strict(bytes);
|
|
211
|
+
} catch {
|
|
212
|
+
return null;
|
|
204
213
|
}
|
|
205
214
|
})();
|
|
206
215
|
if (text === null) {
|
|
207
|
-
log(OUTCOME_LINES.
|
|
216
|
+
log(OUTCOME_LINES.targetUndecodable(argv[1]));
|
|
208
217
|
return EXIT_OK;
|
|
209
218
|
}
|
|
210
219
|
const templatePath = join(dirname(fileURLToPath(import.meta.url)), '..', 'references', 'templates', 'agent_rules.md');
|
|
@@ -255,10 +264,6 @@ export const runCli = async (argv, deps = {}) => {
|
|
|
255
264
|
log(OUTCOME_LINES[`${prefix}Current`]());
|
|
256
265
|
return state;
|
|
257
266
|
}
|
|
258
|
-
if (result.status === 'custom') {
|
|
259
|
-
for (const line of OUTCOME_LINES[`${prefix}Custom`]()) log(line);
|
|
260
|
-
return state;
|
|
261
|
-
}
|
|
262
267
|
const cap = frontmatterMaxLines(state.text);
|
|
263
268
|
const decision = exceedsCap(result.text, cap);
|
|
264
269
|
if (decision.skipped) log(OUTCOME_LINES.capSkipNote());
|
|
@@ -267,7 +272,7 @@ export const runCli = async (argv, deps = {}) => {
|
|
|
267
272
|
return state;
|
|
268
273
|
}
|
|
269
274
|
await atomicWrite(result.text);
|
|
270
|
-
log(OUTCOME_LINES[`${prefix}Refreshed`]());
|
|
275
|
+
log(OUTCOME_LINES[`${prefix}${result.status === 'custom' ? 'Written' : 'Refreshed'}`]());
|
|
271
276
|
return { text: result.text, code: EXIT_OK };
|
|
272
277
|
}, Promise.resolve({ text, code: EXIT_OK }));
|
|
273
278
|
return outcome.code;
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
import { ADOPTION, STORE_DIR_REL as SPEC_STORE_DIR_REL, SPEC_ADOPTION_LANE, declineFingerprint, readDeclineAck, surveySpecAdoption } from './spec-adoption.mjs';
|
|
106
106
|
import { ENSURE_OPS } from './ensure-vocabulary.mjs';
|
|
107
107
|
import { composeProfileGapScreen } from './profile-gap-screen.mjs';
|
|
108
|
-
import { NO_APPLY_LINE, SKILL_PINS, claudeDirOf, keySet, placeOf, printable, skillLine, skillState, skillTargets } from './jev-facts.mjs';
|
|
108
|
+
import { NO_APPLY_LINE, SKILL_PINS, claudeDirOf, keySet, placeOf, printable, skillAccepted, skillLine, skillState, skillTargets } from './jev-facts.mjs';
|
|
109
109
|
|
|
110
110
|
// The upgrade ensure that seeds the spec store — the not-adopted item's apply; pinned to the vocabulary.
|
|
111
111
|
const SPEC_LAYER_ENSURE = ENSURE_OPS.includes('specs') ? 'specs' : null;
|
|
@@ -226,7 +226,7 @@ export const SEVERITIES = Object.freeze({
|
|
|
226
226
|
'profile-gap': SEVERITY_OPTIONAL,
|
|
227
227
|
'jev-connect': SEVERITY_OPTIONAL,
|
|
228
228
|
'jev-skill': SEVERITY_OPTIONAL,
|
|
229
|
-
'jev-skill.
|
|
229
|
+
'jev-skill.not-current': SEVERITY_OPTIONAL,
|
|
230
230
|
'spec-adoption.adopting': SEVERITY_OPTIONAL,
|
|
231
231
|
});
|
|
232
232
|
// The per-item render tags (frozen presentation data, same language contract as the templates).
|
|
@@ -311,8 +311,8 @@ export const WHATS = Object.freeze({
|
|
|
311
311
|
'spec-adoption': 'feature-spec store absent (docs/ai/specs) — no feature contract can govern a plan here yet; seed the store, or record the decline',
|
|
312
312
|
'profile-gap': '{what}',
|
|
313
313
|
'jev-connect': 'Jev (TypeSafe) is not connected: TYPESAFE_API_KEY is not in the environment the agent\'s commands run in',
|
|
314
|
-
'jev-skill': 'Jev\'s vendor skill is not installed for every agent here: a skill root the kit fills is absent
|
|
315
|
-
'jev-skill.
|
|
314
|
+
'jev-skill': 'Jev\'s vendor skill is not installed for every agent here: a skill root the kit fills is absent',
|
|
315
|
+
'jev-skill.not-current': 'Jev\'s vendor skill is absent or behind the kit\'s pin in {n} agent skill root(s) beside a copy at a kit pin — written with no question',
|
|
316
316
|
'spec-adoption.adopting': 'feature-spec store: {n} draft spec(s), no live contract — nothing governs a plan through it yet; land a live contract, or record the decline',
|
|
317
317
|
});
|
|
318
318
|
|
|
@@ -384,6 +384,7 @@ export const VARIANT_BENEFITS = Object.freeze({
|
|
|
384
384
|
'agents.not-current': 'currency — each kit agent file carries the body the kit writes for it today, model and effort where docs/ai/vehicles.json names them',
|
|
385
385
|
'gate-hook.not-current': HOOK_CURRENCY_BENEFIT,
|
|
386
386
|
'state-block.not-current': HOOK_CURRENCY_BENEFIT,
|
|
387
|
+
'jev-skill.not-current': "currency — every agent skill root the kit fills holds the vendor skill at the kit's pin once a copy is placed",
|
|
387
388
|
'source-size.layout': 'layout — piles past the layout limits become recorded, reasoned debt, so the commit hook can judge new ones once its layout line is armed',
|
|
388
389
|
});
|
|
389
390
|
|
|
@@ -1472,34 +1473,43 @@ export const probeJevConnect = ({ root, deps, add, skip }) => {
|
|
|
1472
1473
|
}
|
|
1473
1474
|
};
|
|
1474
1475
|
|
|
1475
|
-
// The Jev skill
|
|
1476
|
-
//
|
|
1476
|
+
// The Jev skill (contract: kit/jev-guide, parts jev-offer and jev-copy). The targets are judged whatever the key; a
|
|
1477
|
+
// component a copy at a kit pin accepts renders the kit item, written with no question, and reads no key and no ack;
|
|
1478
|
+
// otherwise the offer, only once the key is set, so the offer and jev-connect never show together. The apply is the lane leaf's checked slot.
|
|
1477
1479
|
export const probeJevSkill = ({ root, deps, add, skip }) => {
|
|
1478
1480
|
try {
|
|
1479
1481
|
const env = deps.getenv ?? {};
|
|
1480
|
-
if (deps.keySet !== true && !keySet(env)) return;
|
|
1481
1482
|
const host = deps.jevHost ?? {};
|
|
1482
1483
|
if (typeof host.home !== 'string' || host.home === '') return;
|
|
1483
1484
|
const pins = deps.jevPins ?? SKILL_PINS;
|
|
1484
1485
|
const { dir, note } = claudeDirOf(env, host.home, host.platform);
|
|
1485
1486
|
const io = { lstat: deps.lstat ?? lstatSync, readdir: deps.readdir ?? readdirSync, readFile: deps.readFile ?? readFileSync, pins };
|
|
1486
1487
|
const judged = skillTargets({ home: host.home, claudeDir: dir }).map((target) => ({ ...target, ...skillState(target, io) }));
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
if (
|
|
1488
|
+
const accepted = skillAccepted(judged);
|
|
1489
|
+
const planned = judged.filter(({ state }) => state === 'absent' || state === 'earlier');
|
|
1490
|
+
if (planned.length === 0) return;
|
|
1491
|
+
let decline = null;
|
|
1492
|
+
if (!accepted) {
|
|
1493
|
+
if (deps.keySet !== true && !keySet(env)) return;
|
|
1494
|
+
decline = factFingerprint(`${JEV_SKILL_DECLINED}${pins[0].tag}`);
|
|
1495
|
+
if (readAckValue(root, deps, ACKS_JEV_SKILL_KEY) === decline) return;
|
|
1496
|
+
}
|
|
1490
1497
|
const line = skillLine(HERE, host.platform, dir);
|
|
1491
1498
|
if (line === '') {
|
|
1492
1499
|
skip('jev-skill', new Error(NO_APPLY_LINE));
|
|
1493
1500
|
return;
|
|
1494
1501
|
}
|
|
1502
|
+
const foreign = judged.filter(({ state }) => state === 'foreign');
|
|
1503
|
+
if (accepted) {
|
|
1504
|
+
const recipe = [`writes: ${planned.map(({ path }) => printable(path)).join(', ')}`,
|
|
1505
|
+
...foreign.map(({ path, reason }) => `left untouched: ${printable(path)} — ${printable(reason)}`), ...(note ? [note] : [])];
|
|
1506
|
+
add('jev-skill', fillTemplate(WHATS['jev-skill.not-current'], { n: planned.length }), line, 'jev-skill.not-current', recipe.join('; '));
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1495
1509
|
const place = placeOf({ env, platform: host.platform, hostname: host.hostname, container: host.container });
|
|
1496
|
-
const
|
|
1497
|
-
const what = behind.length ? fillTemplate(WHATS['jev-skill.earlier'], { old: pins[Math.max(...behind)].tag, new: pins[0].tag })
|
|
1498
|
-
: WHATS['jev-skill'];
|
|
1499
|
-
const untouched = judged.filter(({ state }) => state === 'foreign')
|
|
1500
|
-
.map(({ path, reason }) => `left untouched: ${printable(path)} — ${printable(reason)}; `).join('');
|
|
1510
|
+
const untouched = foreign.map(({ path, reason }) => `left untouched: ${printable(path)} — ${printable(reason)}; `).join('');
|
|
1501
1511
|
const record = `node ${q(toolPath('ack-write.mjs'))} --lane jev-skill --fingerprint ${decline} --cwd ${q(root)}`;
|
|
1502
|
-
add('jev-skill',
|
|
1512
|
+
add('jev-skill', WHATS['jev-skill'], line, 'jev-skill',
|
|
1503
1513
|
`${place ? `run the apply in ${place}; ` : ''}${untouched}${note ? `${note}; ` : ''}${DECLINE_ALTERNATIVE}${record}`);
|
|
1504
1514
|
} catch (err) {
|
|
1505
1515
|
skip('jev-skill', err);
|
package/tools/write-lanes.mjs
CHANGED
|
@@ -58,7 +58,7 @@ export const VARIANT_LANES = Object.freeze({
|
|
|
58
58
|
'profile-gap': LANE_CHAT,
|
|
59
59
|
'jev-connect': LANE_USER,
|
|
60
60
|
'jev-skill': LANE_HARNESS,
|
|
61
|
-
'jev-skill.
|
|
61
|
+
'jev-skill.not-current': LANE_KIT,
|
|
62
62
|
'spec-adoption.adopting': LANE_CHAT,
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -168,7 +168,7 @@ const FORMS = Object.freeze({
|
|
|
168
168
|
(facts, argv) => 'your own step (a sudo install; the doctor prints the --apply line to run next) — '
|
|
169
169
|
+ `${TERMINAL_STEP}cd ${quoteArg(facts.root)} && ${formatCommand(argv.preview)}`),
|
|
170
170
|
'jev-skill': SKILL_FORM,
|
|
171
|
-
'jev-skill.
|
|
171
|
+
'jev-skill.not-current': SKILL_FORM,
|
|
172
172
|
'jev-connect': createForm('jev-connect.mjs', null, [], getStartupPaths, true,
|
|
173
173
|
(facts, argv) => `${OWN_STEP}it asks for the key in your terminal and the key never goes into the chat — `
|
|
174
174
|
+ `${TERMINAL_STEP}${formatCommand(argv.apply)}`),
|