@sabaiway/agent-workflow-kit 23.9.0 → 23.11.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 +49 -0
- package/README.md +1 -1
- package/SKILL.md +1 -1
- package/bridges/codex-cli-bridge/SKILL.md +5 -5
- package/bridges/codex-cli-bridge/bin/codex-exec-jev.test.mjs +3 -2
- package/bridges/codex-cli-bridge/bin/codex-exec.sh +6 -6
- package/bridges/codex-cli-bridge/bin/codex-exec.test.mjs +5 -5
- package/bridges/codex-cli-bridge/bin/codex-model-posture.test.mjs +29 -29
- package/bridges/codex-cli-bridge/bin/codex-review-jev.test.mjs +3 -2
- package/bridges/codex-cli-bridge/bin/codex-review.sh +6 -6
- package/bridges/codex-cli-bridge/bin/codex-review.test.mjs +6 -6
- package/bridges/codex-cli-bridge/capability.json +4 -4
- package/bridges/codex-cli-bridge/references/driving-codex.md +1 -1
- package/bridges/codex-cli-bridge/references/sandbox-and-flags.md +2 -2
- package/bridges/codex-cli-bridge/setup/README.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/modes/bridge-settings.md +2 -2
- package/references/modes/gates.md +1 -1
- package/references/modes/now.md +1 -1
- package/references/modes/procedures.md +1 -1
- package/references/modes/recommendations.md +2 -2
- package/tools/gates-init.mjs +3 -3
- package/tools/now-render.mjs +1 -1
- package/tools/procedures.mjs +5 -11
- package/tools/recommendations.mjs +4 -4
- package/tools/source-size/help.mjs +8 -7
- package/tools/source-size/index.mjs +1 -0
- package/tools/source-size/limits.mjs +8 -2
- package/tools/source-size/piles.mjs +2 -2
- package/tools/source-size/reason.mjs +0 -1
- package/tools/source-size/record.mjs +6 -13
- package/tools/source-size/setup.mjs +2 -2
- package/tools/source-size-config.mjs +29 -41
- package/tools/source-size-core.mjs +3 -2
- package/tools/source-size-judge.mjs +11 -28
- package/tools/source-size-refusal.mjs +1 -1
- package/tools/source-size-report.mjs +24 -27
- package/tools/source-size-runs.mjs +31 -24
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"name": "codex-cli-bridge",
|
|
5
5
|
"kind": "execution-backend",
|
|
6
|
-
"version": "6.0
|
|
7
|
-
"posture": { "model": "gpt-6.
|
|
6
|
+
"version": "6.1.0",
|
|
7
|
+
"posture": { "model": "gpt-6.2-sol", "effort": "high", "tier": null },
|
|
8
8
|
"provides": ["execute", "review"],
|
|
9
9
|
"roles": {
|
|
10
10
|
"execute": {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
{
|
|
191
191
|
"key": "CODEX_MODEL",
|
|
192
192
|
"kind": "posture",
|
|
193
|
-
"default": "gpt-6.
|
|
193
|
+
"default": "gpt-6.2-sol",
|
|
194
194
|
"appliesTo": ["codex-exec", "codex-review"],
|
|
195
195
|
"effect": "the codex model every run uses (the host posture); a set value is checked against the installed codex's catalog first. /agent-workflow-kit bridge-settings shows the models offered."
|
|
196
196
|
},
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"values": ["priority"],
|
|
208
208
|
"default": null,
|
|
209
209
|
"appliesTo": ["codex-exec", "codex-review"],
|
|
210
|
-
"effect": "codex service tier; 'priority' (catalog display name Fast) = \"2x speed, increased usage\" in the codex catalog's own words for gpt-6.
|
|
210
|
+
"effect": "codex service tier; 'priority' (catalog display name Fast) = \"2x speed, increased usage\" in the codex catalog's own words for gpt-6.2-sol (cache fetched 2026-11-18); it states no credit-rate figure — quality-neutral (same model). Unset/empty ⇒ no service_tier flag (standard tier). SPEND KNOB: enabling it is a consented per-host act, never a default. codex itself accepts any -c service_tier string silently, so the wrapper validates the value."
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"key": "CODEX_HARD_TIMEOUT",
|
|
@@ -21,7 +21,7 @@ judgment.
|
|
|
21
21
|
## Model & effort: the host posture
|
|
22
22
|
|
|
23
23
|
Delegated codex work runs on the host posture: `CODEX_MODEL` / `CODEX_EFFORT` from the bridge settings
|
|
24
|
-
file, else the built-in default `gpt-6.
|
|
24
|
+
file, else the built-in default `gpt-6.2-sol` / `high`, checked against the installed CLI's catalog
|
|
25
25
|
before any spend. `/agent-workflow-kit bridge-settings` shows the models the installed codex offers and
|
|
26
26
|
sets the host posture. An environment value off the host posture is a one-off and is **refused** (exit 2)
|
|
27
27
|
with the settings-file remedy unless `CODEX_PROBE=1` — do not "tune down" the model or effort per call;
|
|
@@ -78,7 +78,7 @@ failure is proven.
|
|
|
78
78
|
## Host posture (model & effort)
|
|
79
79
|
|
|
80
80
|
The wrappers run on the host posture: `CODEX_MODEL` / `CODEX_EFFORT` from the bridge settings file, else
|
|
81
|
-
the built-in default `gpt-6.
|
|
81
|
+
the built-in default `gpt-6.2-sol` / `high`, checked pre-spend against the installed CLI's catalog
|
|
82
82
|
(`codex debug models`); `/agent-workflow-kit bridge-settings` shows the models offered and sets one. A model or effort the catalog does not offer, and an environment value off the
|
|
83
83
|
host posture (a one-off), are **refused** (exit 2, loud) with the settings-file remedy; a weaker model
|
|
84
84
|
is the user's choice in the setting, never a per-call downgrade. (Whether the default is the strongest
|
|
@@ -240,7 +240,7 @@ exec` over the precomputed diff instead, keeping every invariant intact.
|
|
|
240
240
|
| `-o, --output-last-message <f>` | write ONLY the final message (clean capture) |
|
|
241
241
|
| `--json` | structured event stream (`thread.started` ⇒ session id) |
|
|
242
242
|
| `--output-schema <f>` | constrain output to a JSON schema (`CODEX_REVIEW_SCHEMA=1`) |
|
|
243
|
-
| `-m <model>` | model (the host posture: the `CODEX_MODEL` setting, else `gpt-6.
|
|
243
|
+
| `-m <model>` | model (the host posture: the `CODEX_MODEL` setting, else `gpt-6.2-sol`) |
|
|
244
244
|
| `-c model_reasoning_effort=<effort>` | reasoning effort (the host posture: the `CODEX_EFFORT` setting, else `high`) |
|
|
245
245
|
| `codex debug models` | the model catalog as JSON `models[]` (`slug`, `visibility`, `priority`, `supported_reasoning_levels`, `default_reasoning_level`) — the wrappers' pre-spend check; reads no stdin (probed on 0.160.0) |
|
|
246
246
|
| `--ignore-user-config` | do NOT load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME` |
|
|
@@ -74,7 +74,7 @@ if it reports a missing git work tree or root `AGENTS.md`, run it from a project
|
|
|
74
74
|
0.160.0 or newer, off a codex version and profile digest recorded as refused and, for `codex-exec`, from
|
|
75
75
|
a repository outside every temp root, both carry the permissions profile `jev`, whose network reaches the run hosts its service-facts.txt
|
|
76
76
|
lists; elsewhere the network stays off. They also run on the host posture — `CODEX_MODEL` / `CODEX_EFFORT` from the
|
|
77
|
-
bridge settings file, else `gpt-6.
|
|
77
|
+
bridge settings file, else `gpt-6.2-sol` / `high` — checked against the installed CLI's catalog,
|
|
78
78
|
and refuse a one-off model or effort unless `CODEX_PROBE=1` (see `../SKILL.md`), enforce a hard
|
|
79
79
|
timeout, capture only codex's final message, and block codex from writing git via a shim — see
|
|
80
80
|
[`../references/sandbox-and-flags.md`](../references/sandbox-and-flags.md) and the knob table in
|
package/capability.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-kit",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.11.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",
|
|
@@ -8,11 +8,11 @@ The reader + consent-gated **writer** for the **host-level** bridge settings fil
|
|
|
8
8
|
|
|
9
9
|
| key | bridge | values | note |
|
|
10
10
|
|---|---|---|---|
|
|
11
|
-
| `CODEX_MODEL` | codex | a model the installed codex offers | the host posture's model; default `gpt-6.
|
|
11
|
+
| `CODEX_MODEL` | codex | a model the installed codex offers | the host posture's model; default `gpt-6.2-sol`. |
|
|
12
12
|
| `CODEX_EFFORT` | codex | an effort that model offers | the host posture's reasoning effort; default `high`. |
|
|
13
13
|
| `AGY_MODEL` | agy | a display string the installed agy offers | the host posture's model; default `Gemini 3.8 Flash (High)`. |
|
|
14
14
|
| `JEV_MODEL` | the judge | a version its manifest offers | the judge's model; default the manifest's `posture.model`. |
|
|
15
|
-
| `CODEX_SERVICE_TIER` | codex | `priority` | **SPEND KNOB** — the "Fast" tier: "2x speed, **increased usage**" in the codex catalog's own words for gpt-6.
|
|
15
|
+
| `CODEX_SERVICE_TIER` | codex | `priority` | **SPEND KNOB** — the "Fast" tier: "2x speed, **increased usage**" in the codex catalog's own words for gpt-6.2-sol (cache fetched 2026-11-18); it states no credit-rate figure; quality-neutral (same model). Default unset ⇒ standard tier. |
|
|
16
16
|
| `CODEX_HARD_TIMEOUT` | codex | integer `1..86400` | hard wall-clock cap (seconds) via `timeout(1)`. |
|
|
17
17
|
| `CODEX_REVIEW_MAX_TOTAL_BYTES` | codex | integer `1..100000000` | codex-review payload size above which the diff rides a temp file (never truncated). |
|
|
18
18
|
| `AGY_HARD_TIMEOUT` | agy | duration `5m`/`30m`/`90s` (unit required, nonzero) | hard wall-clock cap via `timeout(1)`. |
|
|
@@ -21,7 +21,7 @@ Declared gates can also be **auto-approved** (no permission prompt on a byte-exa
|
|
|
21
21
|
|
|
22
22
|
**Candidate line — the review-receipt gate (opt-in, never auto-seeded; AD-021).** Projects that configure a reviewed/council `plan-execution.review` recipe can declare the review-state check as one more gate — the exact candidate `{ id, title, cmd }` line and its contract live under `${CLAUDE_SKILL_DIR}/references/modes/review-state.md` (step 3).
|
|
23
23
|
|
|
24
|
-
**Candidate line — the source-size gate (opt-in, never auto-seeded).** A project declaring the source-size practice (`docs/ai/source-size.json`) can declare its checker as one more gate, offered **only over a MINTED schema
|
|
24
|
+
**Candidate line — the source-size gate (opt-in, never auto-seeded).** A project declaring the source-size practice (`docs/ai/source-size.json`) can declare its checker as one more gate, offered **only over a MINTED practice past schema 1** — an absent config has nothing to offer, an authored-but-unminted one is withheld by name rather than declaring a gate that would refuse, and a minted schema-1 one is withheld naming its `--write-baseline` move. Adoption is ONE consented verb, `node ${CLAUDE_SKILL_DIR}/tools/source-size-check.mjs --adopt --reason "<text>" [--cwd <project>]`: it mints the record and declares this gate and NOTHING else, is idempotent once adopted, and with no config refuses with the exact file to author. The advisor surfaces it as the `source-size` item, reading a declared cmd as one of THREE claims rather than a yes/no — **canonical** (this copy — answered), **tool-elsewhere** (the same shape resolving to a DIFFERENT real copy — a vendored deployment, converging on a `source-size-copy` acknowledgement, never on `--adopt`, which would collide on the declared id), **not-the-tool** (a gate merely CARRYING the id is a squatter: rename it, or repoint its cmd at this `--check` form) — in that precedence. An unminted record stays the same attention outcome for either copy, and no acknowledgement silences it.
|
|
25
25
|
|
|
26
26
|
**Candidate lines — the kit's own checkers (opt-in, one consented verb).** `control-bytes`, `plan-shape`, `spec-check`, `spec-coverage` and `project-rules` can each be declared as a gate of your project: `node ${CLAUDE_SKILL_DIR}/tools/checker-gates.mjs --cwd <project>` previews them and writes nothing. Each is offered only over a state where its checker runs by design: `control-bytes` over a `.git` directory or gitfile at the project root, `plan-shape` and `project-rules` on any deployment, `spec-check` over a regular `docs/ai/specs/index.md`, `spec-coverage` over a regular `docs/ai/spec-coverage.json` beside that store root. An offered checker prints its paste-ready entry line; the upgrade's `tier` ask writes the offered entries on your explicit yes — add-only, placed by the rule below, not stamp-gated, after the preview printed the disclosure below. An entry it wrote is removed by hand from `docs/ai/gates.json`: the verb never un-declares. `epic-shape` and `queue-audit` take a project operand and `doc-parity` checks only the kit's own package, so none of them is offered.
|
|
27
27
|
|
package/references/modes/now.md
CHANGED
|
@@ -13,7 +13,7 @@ The four blocks keep this order:
|
|
|
13
13
|
1. **NOW** — every plan in flight, its derived phase, current and next step, then the tree fingerprint, clean state, review verdict lines, final run and red-proof currency. No plan and several plans are rendered states; never pick one silently.
|
|
14
14
|
2. **STEPS** — every ledger row with one of `landed`, `in progress`, `pending` or `unjudged`. The rows are the steps; invent no numbering.
|
|
15
15
|
3. **QUEUE** — every work-carrying row (live, parked, ambiguous) under the full line-numbered heading path it carries, with per-class counts covering every row of the bucket, terminal and record included, and names rather than ids. Only a path through `## Pending / backlog` calls its position priority; every other bucket is archive and calls it position.
|
|
16
|
-
4. **CAMPAIGN** — source-size config state (`absent`, `authored`, `
|
|
16
|
+
4. **CAMPAIGN** — source-size config state (`absent`, `authored`, `minted`), caps, roots and recorded over-cap files. An absent opt-in config is a rendered state.
|
|
17
17
|
|
|
18
18
|
Evidence alone sets a ledger status: the row's path and verb, then the path fact, changed set and exclusion fact. The plan's prose never sets a status. A checked box or terminal marker is only a claim; when evidence contradicts it, print the claim beside the evidence-derived status. Keep anomaly and current red-proof annotations beside the same status too. Every status line names its evidence source.
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ Run **`node ${CLAUDE_SKILL_DIR}/tools/procedures.mjs <activity> [--override <slo
|
|
|
31
31
|
|
|
32
32
|
**Flow armed-halves block (session-start read side).** When the config carries a `flow` block, the advisor also renders `Flow (schema 1) — armed halves (config · chain · bookkeeping):` — the **config half** (preset · councilRounds · kitMinVersion), the **chain half** (a light read-only probe of the flow store on the checker's fixed path: ARMED at an adoption record, UNARMED for an absent or unadopted store, fail-closed BROKEN wording for a malformed one), and the **bookkeeping half** (each declared path: declared non-excluded — the tracked-file floor verifies on the `set-flow` arming path — vs loudly DECLARED-EXCLUDED). A config with no `flow` block renders byte-identically to before and pays no store probe.
|
|
33
33
|
|
|
34
|
-
**Declared source-size practice block (upfront knowledge, D-17 U1).** When the project declares a source-size practice in `docs/ai/source-size.json`, the advisor also renders `Declared source-size practice (docs/ai/source-size.json) — known BEFORE the code is written:` — the caps, the five limits with their tolerances, whether layout is recorded, on schema 1 the `--write-baseline` move, what is recorded and the canonical WHY sentence (the plan-time layout itself is the planning canon's Module ledger). `--json` carries the SAME lines under **`declaredPractice`** (an empty array when nothing is declared), so the human and structured renders never diverge. The
|
|
34
|
+
**Declared source-size practice block (upfront knowledge, D-17 U1).** When the project declares a source-size practice in `docs/ai/source-size.json`, the advisor also renders `Declared source-size practice (docs/ai/source-size.json) — known BEFORE the code is written:` — the caps, the five limits with their tolerances, whether layout is recorded, on schema 1 the `--write-baseline` move, what is recorded and the canonical WHY sentence (the plan-time layout itself is the planning canon's Module ledger). `--json` carries the SAME lines under **`declaredPractice`** (an empty array when nothing is declared), so the human and structured renders never diverge. The three config states each read as themselves: **ABSENT** renders nothing at all (a project declaring no practice is handed no invented limits), **AUTHORED** is pre-mint (no file size is recorded yet), **MINTED** carries the recorded count. A declaration that cannot be read (malformed, unknown-keyed, a dangling symlink) renders ONE loud `UNREADABLE` line and the advisor **still exits 0** — the practice's own checker owns the exit code for its config (exit 2 there) and its declared gate reds the gate matrix. Read through the practice's pure read core, so this advisor never reaches its writer half.
|
|
35
35
|
|
|
36
36
|
**Readers-sweep block (`plan-authoring` only, unconditional).** Before the review-loop block the advisor renders `Readers sweep (before the first review) — …`: the search form for every config key, registry entry, exported constant, receipt field or canon sentence the plan changes, and the classification rule (a ledger row, a stated non-goal, or unchanged with its proof). The command line `run: node <kit>/tools/repo-search.mjs --pattern <the literal>` ALWAYS renders — bare wherever the `--kit-tools` tier could seed that path (the tier's own byte-form, the same predicate), and single-quoted otherwise (an unseedable path has no rule to match); `--pattern-file <f>` only for a pattern carrying a shell-significant byte; when the project's MCP registration is complete (`/agent-workflow-kit mcp`) a `use: repo_search {"pattern": "<the literal>"}` line renders ABOVE it — registration on disk, never a claim the tool is loaded in this session. `--json` carries the SAME lines under **`readersSweep`** (an empty array for the other activities).
|
|
37
37
|
|
|
@@ -37,10 +37,10 @@ A variant's posture note, where its key has one, is printed by `init` from this
|
|
|
37
37
|
|
|
38
38
|
- `gates-inert` — the gate matrix is DECLARED but verifies nothing, and the two causes have different remedies, so the item renders a different apply for each. **Cause A** — a canonical `coverage-check` gate with no producer gate declared BEFORE it (none at all, or one declared after it, which writes the lcov too late): the run certifies no coverage of its own — `coverage=not-run` when nothing wrote an lcov, or a verdict over STALE bytes an earlier run left in the git dir, which is worse because it reads as `coverage=certified`. The remedy needs the producer to run BEFORE the checker — declared or MOVED there. When the checker is the LAST declared gate and the project's own scripts yield an offerable producer, the fill PLACES that producer before it, so the apply is the ordinary `gates-init` dry-run preview. Otherwise — no offerable producer, or a checker that is not last — it is the user item `gates-inert.unfillable`: the user's own step is to edit `docs/ai/gates.json` (the exact producer form lives in `${CLAUDE_SKILL_DIR}/references/modes/gates.md`), because the fill never reorders entries it did not write. When the declaration carries, anywhere, a gate in a form an earlier kit wrote that the upgrade moves (one whose tail holds only test paths), or the fill withheld its `node --test` script because the kit folder does not hold this kit's command and reporter, the apply is `/agent-workflow-kit upgrade` in place of both: it moves an earlier kit's gate with no question, or a line of its report names what stops it. **Cause B** — every declared gate is one of the kit's own canonical checkers, so the matrix runs no project-verification command at all: the apply is the `gates-init` dry-run preview, the same consent-gated seeder the `gates-declaration` item renders, and after the SAME confirmation you run the `--apply` line it prints. Neither cause changes any gate result, exit code or receipt — the item adds no enforcement, only the offer. Risk profile: `docs/ai/gates.json` is a PRIVILEGED file (a declared gate is auto-approvable by the wired hook), so both causes land in the same place — where the fill can help, it declares a project-controlled command on your explicit yes; where it cannot, the edit is the user's own step.
|
|
39
39
|
|
|
40
|
-
- `source-size` — the arms differ by what the declared gate IS. **`adopted-elsewhere`** — the gate runs a DIFFERENT real copy of this checker (a vendored deployment): the practice runs, the advisor cannot resolve it as its own sibling, and the realpath anchor does not widen (that stops a lookalike). So the convergence is the ack writer's preview (`--lane source-size-copy` → `sourceSizeCopyAck`), never `--adopt`, which would mint and then be refused by the fill on the declared id. The fingerprint binds the declared claims AS AUTHORED, sorted, not resolved paths, so a second external copy re-fires it. **`id-squatter`** — a gate carries the `source-size` id and is not this checker under any reading: the gate matrix reads as running the size check while it runs none, so it is the user's own step (rename the id, or repoint the cmd at this `--check`). **`unminted`**, for both copies: a gate refusing every run over an authored
|
|
40
|
+
- `source-size` — the arms differ by what the declared gate IS. **`adopted-elsewhere`** — the gate runs a DIFFERENT real copy of this checker (a vendored deployment): the practice runs, the advisor cannot resolve it as its own sibling, and the realpath anchor does not widen (that stops a lookalike). So the convergence is the ack writer's preview (`--lane source-size-copy` → `sourceSizeCopyAck`), never `--adopt`, which would mint and then be refused by the fill on the declared id. The fingerprint binds the declared claims AS AUTHORED, sorted, not resolved paths, so a second external copy re-fires it. **`id-squatter`** — a gate carries the `source-size` id and is not this checker under any reading: the gate matrix reads as running the size check while it runs none, so it is the user's own step (rename the id, or repoint the cmd at this `--check`). **`unminted`**, for both copies: a gate refusing every run over an authored record (over an absent one the check judges layout alone), attention, and NO acknowledgement silences it; only the verb differs (with the gate declared elsewhere, `--write-baseline`); a line carrying the placeholder takes your own sentence, by the `recipe:` line. **`schema-1`** — the check stops on a minted schema-1 config, so this arm comes first: its `--write-baseline` line carries NO reason (a pinned one would launder a raise; a raise riding the move refuses, and the agent writes that raise's reason from what the run shows, with no question to the user), every run until the move. **`layout`** — on a config with no layout record, the record of the piles already there comes first, as its own item: a no writes nothing and the item returns every run; its `recipe:` line names the branch states, and `source-size.layout` is applied before the `hook-checks` check line runs, whose layout line follows that record. **`piles`** — each recorded pile with no queue row gets one, at the end of the queue's Later bucket; a write the queue's own declared check would refuse is not made and the stated skip says why. Risk profile: `docs/ai/gates.json` is a PRIVILEGED file, so every arm here either records an acknowledgement or hands you an edit — the kit declares nothing on its own.
|
|
41
41
|
- `gate-hook` — the offer wires the hook on the harness lane: the agent applies it on the chat yes after the check; `init` previews and applies it on the terminal yes as the route the user may take instead. Over a wired hook the key renders the kit item `gate-hook.not-current` instead: the placed hook file is absent or differs from the body the kit writes for it. An older body validates your declaration through its OWN baked copy and goes dark on a key it does not know, such as `lcovProducer` (present, whatever its value), so every gate prompts again with no error anywhere. The agent applies the kit item with no question after the check, whose result names the file with its new digest, and the old one too over a differing file; it writes only the hook file. Risk profile: the offer places a hook file and wires one settings entry; the kit item writes one hook file with the kit's body; the declaration is never touched.
|
|
42
42
|
- `enforcement` — copies the bundled runtime files of `references/scripts/` into the kit folder `scripts/agent-workflow/`, then runs the project's own hook installer, which installs the pre-commit hook. The lane is harness: the agent applies the item on the chat yes after the check, whose result shows each script the kit places with its bytes and the installer it runs with its bytes; `init` applies it on the batch terminal yes as the route the user may take instead. The copy is create-only: an existing file stands and nothing is written through a link, and the offer renders only on no Node evidence. The hook invokes `node` directly, so a committer without it on PATH gets a loud failure. The installer refuses to overwrite a pre-commit hook it did not write: an install it refuses removes the scripts this apply copied, and the item is offered again with the installer's output shown; over a pre-commit hook the installer did not write the item is not offered — its skip names the user's own step. Risk profile: local tooling and a Git hook are added on the chat yes after the check, or on init's y.
|
|
43
|
-
- `hook-checks` — the agent applies the item on the chat yes after the check; `init` applies it on the terminal y as the route the user may take instead. Risk profile: future commits stop on the rules check and, where judged, on the size check's findings — lines
|
|
43
|
+
- `hook-checks` — the agent applies the item on the chat yes after the check; `init` applies it on the terminal y as the route the user may take instead. Risk profile: future commits stop on the rules check and, where judged, on the size check's findings — lines and layout; over a clone with no pre-commit hook the installer writes its whole hook, so commits also stop on its docs and archive lines.
|
|
44
44
|
- `attribution` — the agent applies the item on the chat yes after the check, setting one key in the project `.claude/settings.json`; `init` applies it on the terminal y as the route the user may take instead. An existing "includeCoAuthoredBy": false already converges the item unless an "attribution" key sets a commit or PR text; a local-scope override is the user's own edit. Risk profile: one settings key, nothing widened.
|
|
45
45
|
- `footprint-global` — the agent applies the item on the chat yes after the check, which prints each line it removes; `init` applies it on the terminal y as the route the user may take instead. Another of the user's repositories may rely on the same lines: a no keeps the block, and the item returns at the next run. The apply prints the removed lines as a backup. Risk profile: lines removed from the machine-global excludes file.
|
|
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.
|
package/tools/gates-init.mjs
CHANGED
|
@@ -441,8 +441,8 @@ export const flowCheckCandidate = (cwd, deps = {}) => {
|
|
|
441
441
|
};
|
|
442
442
|
|
|
443
443
|
// The conditional SOURCE-SIZE candidate — keyed on the practice's own declaration rather than on a
|
|
444
|
-
// recipe: the gate is offered ONLY over a MINTED
|
|
445
|
-
//
|
|
444
|
+
// recipe: the gate is offered ONLY over a MINTED docs/ai/source-size.json past schema 1. Over an authored
|
|
445
|
+
// one the checker REFUSES by design, and a declared gate that refuses is a matrix
|
|
446
446
|
// this preview would have reddened on the user's behalf; a minted schema-1 one is withheld naming its
|
|
447
447
|
// --write-baseline move. A project that never declared the practice hears nothing here, while one
|
|
448
448
|
// that authored it and stopped short hears WHY the gate is not offered yet — the mint is the step it
|
|
@@ -468,7 +468,7 @@ export const sourceSizeCandidate = (cwd, deps = {}) => {
|
|
|
468
468
|
// The advice still follows the STATE: over an unminted record a hand-declared gate is red on
|
|
469
469
|
// every run, so pointing there would hand the reader their next failure as the way out.
|
|
470
470
|
const lane = state === 'minted'
|
|
471
|
-
? `${schema1 ? 'move the record
|
|
471
|
+
? `${schema1 ? 'move the record off schema 1 first — run source-size-check.mjs --write-baseline with the working directory set to this project, then ' : ''}declare the gate by hand`
|
|
472
472
|
: `mint the record first — run source-size-check.mjs --adopt --reason "${mintReasonOf(config)}" with the working directory set to this project, then declare the gate by hand`;
|
|
473
473
|
return {
|
|
474
474
|
candidate: null,
|
package/tools/now-render.mjs
CHANGED
|
@@ -133,7 +133,7 @@ const renderCampaignBlock = (block, color) => {
|
|
|
133
133
|
const lines = [getHeading(BLOCK_TITLE.campaign, color), ` state: ${block.state}`];
|
|
134
134
|
if (block.state !== 'absent') {
|
|
135
135
|
lines.push(` caps: ${block.maxLines} lines · ${block.maxLineBytes} bytes per line`);
|
|
136
|
-
lines.push(` roots: ${block.roots} · recorded files: ${getFigure(block.recordedFiles)}
|
|
136
|
+
lines.push(` roots: ${block.roots} · recorded files: ${getFigure(block.recordedFiles)}`);
|
|
137
137
|
}
|
|
138
138
|
return lines;
|
|
139
139
|
};
|
package/tools/procedures.mjs
CHANGED
|
@@ -536,9 +536,8 @@ const flowHalvesAdvice = (flow, probe) => {
|
|
|
536
536
|
// their reason ride EVERY named-activity render, so the plan's Module ledger is cut to them while the
|
|
537
537
|
// plan is being written. Composed from the project's live declaration, never from constants here.
|
|
538
538
|
// Each config state speaks as itself: ABSENT renders NOTHING (a project that declares no practice must
|
|
539
|
-
// not be handed invented limits); AUTHORED
|
|
540
|
-
//
|
|
541
|
-
// whole tree's debt); MINTED renders the recorded counts too.
|
|
539
|
+
// not be handed invented limits); AUTHORED renders the declared caps plus the honest "no file size is
|
|
540
|
+
// recorded yet" line; MINTED renders the recorded count too.
|
|
542
541
|
// A config that cannot be read renders ONE loud line carrying the reader's own message and the render
|
|
543
542
|
// still completes: the exit code for a broken source-size config belongs to the practice's own checker,
|
|
544
543
|
// while THIS tool's exit contract is about its own config and the engine.
|
|
@@ -554,14 +553,9 @@ const declaredPracticeAdvice = (cwd, readFile, lstat) => {
|
|
|
554
553
|
}
|
|
555
554
|
if (declaration.state === 'absent') return [];
|
|
556
555
|
const facts = practiceFacts(declaration.config);
|
|
557
|
-
// The two pre-mint states share a LANE (the ratchet holds nothing, the mint step is next) but not a
|
|
558
|
-
// FACT: an incomplete file carries half the machine record, so "no size is recorded" would be a
|
|
559
|
-
// plain untruth about it — it names the missing half instead. Neither ever prints minted counts.
|
|
560
556
|
// The mint step is named, not rendered: on a project path that does not survive double-quoting the
|
|
561
557
|
// checker deliberately withholds a paste-ready command, and this advisor never re-decides that.
|
|
562
|
-
const unmintedRecord =
|
|
563
|
-
? ` recorded: PARTIAL — the machine record is half-written (missing ${declaration.missingMachineKeys.map((key) => `"${key}"`).join(', ')}), so the ratchet holds nothing yet; run \`source-size-check.mjs --check\` for the mint step.`
|
|
564
|
-
: ' recorded: NOTHING YET — the caps are declared but no size is recorded, so the ratchet holds nothing; run `source-size-check.mjs --check` for the mint step.';
|
|
558
|
+
const unmintedRecord = ' recorded: NO FILE YET — the caps are declared but no file size is recorded, so the ratchet holds no file; run `source-size-check.mjs --check` for the mint step.';
|
|
565
559
|
// The five limits are the check's own lines, from the one function both renders read.
|
|
566
560
|
const { config } = declaration;
|
|
567
561
|
return [
|
|
@@ -571,9 +565,9 @@ const declaredPracticeAdvice = (cwd, readFile, lstat) => {
|
|
|
571
565
|
config.layout !== null
|
|
572
566
|
? ' layout: recorded — entries per directory, depth and files per root are judged by the size check.'
|
|
573
567
|
: ' layout: not recorded — `source-size-check.mjs --write-baseline --layout --reason "<text>"` starts it.',
|
|
574
|
-
...(config.schema === 1 ? [' schema 1: the check stops on it — `source-size-check.mjs --write-baseline` moves it
|
|
568
|
+
...(config.schema === 1 ? [' schema 1: the check stops on it — `source-size-check.mjs --write-baseline` moves it off schema 1.'] : []),
|
|
575
569
|
declaration.state === 'minted'
|
|
576
|
-
? ` recorded: ${facts.recordedFiles} file(s) carry a recorded size (debt, not permission)
|
|
570
|
+
? ` recorded: ${facts.recordedFiles} file(s) carry a recorded size (debt, not permission) — growth past a record takes a reasoned bump, and a record above the tree warns until the regeneration lowers it.`
|
|
577
571
|
: unmintedRecord,
|
|
578
572
|
` why: ${SOURCE_SIZE_WHY}`,
|
|
579
573
|
];
|
|
@@ -133,7 +133,7 @@ const HOOK_CHECKS_UNMANAGED_HOOK = 'an UNMANAGED pre-commit hook exists \u2014 t
|
|
|
133
133
|
const HOOK_CHECKS_WAIT = 'the layout line follows the source-size.layout record \u2014 apply that item first; this item\'s check line then arms the layout line too';
|
|
134
134
|
const HOOK_CHECKS_COMMAND = "the hook runs the kit's checks by flat paths this upgrade removes — once they are gone every commit stops until this item is applied";
|
|
135
135
|
const LAYOUT_RECORD_RECIPE = 'the hook is per clone and the config per branch: a branch or linked worktree with no size config is judged under the kit\'s values and stops on its piles until it takes the record (a hidden deployment\'s linked worktree carries none); one with an older config without layout is not judged on layout; one whose config is schema 1 or unminted stops every commit on that config\'s own stop until it takes the current config';
|
|
136
|
-
const REASON_AUTHOR_RECIPE = 'the reason is yours to write, with no question to the user: where you made the growth, say why this size is accepted; where an entry grew before this write (a
|
|
136
|
+
const REASON_AUTHOR_RECIPE = 'the reason is yours to write, with no question to the user: where you made the growth, say why this size is accepted; where an entry grew before this write (a raise after the schema move, a teammate\'s growth), write that it grew before this write and its cause was not recorded';
|
|
137
137
|
const SOURCE_SIZE_KEPT_WHAT = 'no source-size gate is declared — the size record is kept as it is; declaring the gate adds the size check to the gate matrix';
|
|
138
138
|
const LAYOUT_HELD = {
|
|
139
139
|
stops: () => 'the source-size check stops on this tree, so a layout record or layout line not yet in place waits \u2014 record that growth first with the reasoned --write-baseline its stop names, then re-run',
|
|
@@ -288,7 +288,7 @@ export const WHATS = Object.freeze({
|
|
|
288
288
|
'gates-inert.coverage-domain-narrow': 'certification covers the assessable minority only — {ext} dominate(s) the tracked tree, and the changed-line domain excludes them',
|
|
289
289
|
'source-size': 'no source-size gate is declared — the gate matrix runs no size check, so no gate run stops a file beyond its limits',
|
|
290
290
|
'source-size.unminted': 'the source-size gate is declared over an unminted record ({state}) — the check refuses it, or if absent judges layout alone, no line',
|
|
291
|
-
'source-size.schema-1': 'the source-size config is schema 1, which the check stops on — the writer moves it
|
|
291
|
+
'source-size.schema-1': 'the source-size config is schema 1, which the check stops on — the writer moves it off schema 1 in one write',
|
|
292
292
|
'source-size.layout': 'the layout record is not started — starting it records any directory already beyond the layout limits, so the commit hook can judge layout',
|
|
293
293
|
'source-size.piles': '{n} recorded pile(s) have no queue row planning their cleanup — one row each goes to the end of the queue\'s Later bucket',
|
|
294
294
|
'source-size.adopted-elsewhere': "the source-size gate runs a DIFFERENT copy of this checker ({n} declared) — adopted here, just not through this kit's own tool",
|
|
@@ -920,8 +920,8 @@ const probeSourceSize = ({ root, deps, add, skip, shared }) => {
|
|
|
920
920
|
const canonical = claims.filter((c) => c.claim === CHECKER_CLAIM.CANONICAL);
|
|
921
921
|
const elsewhere = claims.filter((c) => c.claim === CHECKER_CLAIM.ELSEWHERE);
|
|
922
922
|
if (canonical.length > 0 || elsewhere.length > 0) {
|
|
923
|
-
// A DECLARED gate is not the same fact as a working one: the checker refuses an authored
|
|
924
|
-
//
|
|
923
|
+
// A DECLARED gate is not the same fact as a working one: the checker refuses an authored
|
|
924
|
+
// record, so a gate declared over one reds the matrix on every run, and over an
|
|
925
925
|
// absent one it judges layout alone and no line. The declaration alone would report that deployment
|
|
926
926
|
// as adopted and say nothing about the one thing wrong with it. The split changes NOTHING here —
|
|
927
927
|
// the outcome, its attention class and its immunity to every ack are the same whichever copy runs.
|
|
@@ -31,16 +31,17 @@ root outside the kit's own folder ${KIT_FOLDER_ROOT} plus the spec store docs/ai
|
|
|
31
31
|
disk, and the files of each declared root.
|
|
32
32
|
|
|
33
33
|
A recorded entry is DEBT: a finding stops exactly when the regeneration would raise it, and a record
|
|
34
|
-
above the tree or gone warns until the regeneration lowers or removes it.
|
|
35
|
-
|
|
34
|
+
above the tree or gone warns until the regeneration lowers or removes it. No line sum over a root is
|
|
35
|
+
judged or recorded: an "aggregate" an earlier schema recorded warns on every check of a minted config and is dropped,
|
|
36
|
+
with no reason, by the next regeneration.
|
|
36
37
|
|
|
37
|
-
--write-baseline regenerates the machine keys (baseline,
|
|
38
|
-
|
|
38
|
+
--write-baseline regenerates the machine keys (baseline, and layout where it is judged) from the
|
|
39
|
+
tree and writes schema ${SOURCE_SIZE_SCHEMA}, on an absent config too. --layout starts the layout record on a
|
|
39
40
|
present config that has none. The authored keys keep their values and their order; the file is
|
|
40
41
|
canonically serialized. A regeneration that RAISES any recorded value needs --reason; the string is
|
|
41
|
-
recorded in the entry it raised. A pure tighten needs none. A
|
|
42
|
-
the same write
|
|
43
|
-
stops on
|
|
42
|
+
recorded in the entry it raised. A pure tighten needs none. A config of an earlier schema is moved in
|
|
43
|
+
the same write; a minted schema-1 one whose regeneration is refused is moved off schema 1 in a write
|
|
44
|
+
of its own, its records carried as they are; --check stops on schema 1 until it is moved.
|
|
44
45
|
|
|
45
46
|
--adopt is the ONE-line adoption: it mints the record and declares the source-size gate (and NOTHING
|
|
46
47
|
else) in docs/ai/gates.json. It is idempotent on an already-adopted project. With the config absent
|
|
@@ -80,8 +80,9 @@ export const limitLines = (limits, { escape = String, recorded = false } = {}) =
|
|
|
80
80
|
return `limit ${id} ${amount}, tolerance ${tolerance}% — ${source === 'kit' ? 'from kit' : `from override: ${escape(reason)}`}`;
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
// migrateSchema1(parsed, readmes) → the schema-2 config
|
|
84
|
-
// `_README` byte-equal to `readmes.schema1`
|
|
83
|
+
// migrateSchema1(parsed, readmes) → the schema-2 config, every key in its place; the writer writes it as
|
|
84
|
+
// it is only where the moved file holds the line sum. A `_README` byte-equal to `readmes.schema1`
|
|
85
|
+
// becomes `readmes.schema2`; any other is carried verbatim.
|
|
85
86
|
export const migrateSchema1 = (parsed, readmes = {}) => {
|
|
86
87
|
const overrides = Object.fromEntries(Object.entries(SCHEMA1_KEY)
|
|
87
88
|
.filter(([id, key]) => parsed.defaults[key] !== KIT_LIMITS[id].value)
|
|
@@ -94,6 +95,11 @@ export const migrateSchema1 = (parsed, readmes = {}) => {
|
|
|
94
95
|
}));
|
|
95
96
|
};
|
|
96
97
|
|
|
98
|
+
// atSchema(parsed, schema, { earlier, current }) → the config at `schema`, every key in its place: a
|
|
99
|
+
// `_README` byte-equal to one of the `earlier` template texts becomes `current`, any other is carried.
|
|
100
|
+
export const atSchema = (parsed, schema, { earlier = [], current } = {}) => Object.fromEntries(Object.entries(parsed)
|
|
101
|
+
.map(([key, value]) => [key, key === 'schema' ? schema : key === '_README' && earlier.includes(value) ? current : value]));
|
|
102
|
+
|
|
97
103
|
// applyOverride(parsed, id, override) → the config with one id's override set from { value,
|
|
98
104
|
// tolerance, reason } or, given null, removed; a `limits` left empty is dropped and a new one is
|
|
99
105
|
// appended. It judges nothing about the tree: the writer regenerates the record from the result.
|
|
@@ -29,11 +29,11 @@ const HELD_TEXT = {
|
|
|
29
29
|
};
|
|
30
30
|
const held = (reason, ...args) => ({ answer: 'held', reason, text: HELD_TEXT[reason](...args) });
|
|
31
31
|
|
|
32
|
-
// pilesOf(loaded) → [{ key, entries, value }]: each directory of a minted
|
|
32
|
+
// pilesOf(loaded) → [{ key, entries, value }]: each directory of a minted config's layout record whose
|
|
33
33
|
// recorded entries exceed the resolved entries-per-directory value plus its band, in the record's order.
|
|
34
34
|
export const pilesOf = (loaded) => {
|
|
35
35
|
const config = loaded?.state === 'minted' ? loaded.config : null;
|
|
36
|
-
if (config === null || config.schema
|
|
36
|
+
if (config === null || config.schema === 1 || config.layout === null) return [];
|
|
37
37
|
const { value, tolerance } = config.limits['entries-per-directory'];
|
|
38
38
|
return Object.entries(config.layout.directories)
|
|
39
39
|
.filter(([, record]) => Object.hasOwn(record, 'entries') && record.entries > value + bandOf(value, tolerance))
|
|
@@ -86,13 +86,11 @@ const layoutPlan = (recorded, projected) => {
|
|
|
86
86
|
// then two renderings of one computation.
|
|
87
87
|
export const planRecord = ({ config, verdict }) => {
|
|
88
88
|
const oldBaseline = config.baseline ?? {};
|
|
89
|
-
const oldAggregate = config.aggregate ?? {};
|
|
90
89
|
const files = verdict.scope.files.map((rel) => {
|
|
91
90
|
const next = verdict.projected.get(rel);
|
|
92
91
|
const recorded = ownEntry(oldBaseline, rel);
|
|
93
92
|
return { rel, next, recorded, changes: changesFor(rel, next, recorded) };
|
|
94
93
|
});
|
|
95
|
-
const roots = config.roots.map((root) => ({ root, lines: verdict.rootLines.get(root) ?? 0, recorded: ownEntry(oldAggregate, root) }));
|
|
96
94
|
const layout = verdict.layout ? layoutPlan(config.layout, verdict.layout.projected) : null;
|
|
97
95
|
const deltas = [
|
|
98
96
|
...files.flatMap(({ changes }) => changes),
|
|
@@ -101,30 +99,24 @@ export const planRecord = ({ config, verdict }) => {
|
|
|
101
99
|
...Object.entries(oldBaseline)
|
|
102
100
|
.filter(([rel]) => !verdict.measured.has(rel))
|
|
103
101
|
.flatMap(([rel, recorded]) => changesFor(rel, {}, recorded)),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
.map(({ root, lines, recorded }) => ({ target: root, dimension: 'aggregate lines', from: recorded ? recorded.lines : null, to: lines })),
|
|
107
|
-
...Object.entries(oldAggregate)
|
|
108
|
-
.filter(([root]) => !config.roots.includes(root))
|
|
102
|
+
// A per-root line sum an earlier schema recorded is dropped whole, and the delta says so.
|
|
103
|
+
...Object.entries(config.aggregate ?? {})
|
|
109
104
|
.map(([root, recorded]) => ({ target: root, dimension: 'aggregate lines', from: recorded.lines, to: null })),
|
|
110
105
|
...(layout ? layout.deltas : []),
|
|
111
106
|
];
|
|
112
|
-
return { files,
|
|
107
|
+
return { files, layout, deltas, raises: deltas.filter(isRaise) };
|
|
113
108
|
};
|
|
114
109
|
|
|
115
110
|
const byKey = (entries) => Object.fromEntries(entries.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)));
|
|
116
111
|
|
|
117
112
|
// The reason of an entry the regeneration did NOT raise is the one already recorded — a tighten
|
|
118
113
|
// rewrites a number, never the human sentence that justified it.
|
|
119
|
-
export const materialize = ({ files,
|
|
114
|
+
export const materialize = ({ files, layout }, reason) => ({
|
|
120
115
|
baseline: Object.fromEntries(
|
|
121
116
|
files
|
|
122
117
|
.filter(({ next }) => Object.keys(next).length > 0)
|
|
123
118
|
.map(({ rel, next, recorded, changes }) => [rel, { ...next, reason: changes.some(isRaise) ? reason : recorded.reason }]),
|
|
124
119
|
),
|
|
125
|
-
aggregate: Object.fromEntries(
|
|
126
|
-
roots.map(({ root, lines, recorded }) => [root, { lines, reason: !recorded || lines > recorded.lines ? reason : recorded.reason }]),
|
|
127
|
-
),
|
|
128
120
|
...(layout === null ? {} : {
|
|
129
121
|
layout: {
|
|
130
122
|
roots: byKey(layout.roots.map(({ root, next, recorded }) => [root, { files: next, reason: !recorded || next > recorded.files ? reason : recorded.reason }])),
|
|
@@ -136,7 +128,8 @@ export const materialize = ({ files, roots, layout }, reason) => ({
|
|
|
136
128
|
// The file is CANONICALLY serialized: the authored VALUES and the ORDER the human wrote them in are
|
|
137
129
|
// preserved exactly, their formatting is not — this file is machine-maintained and the writer owns
|
|
138
130
|
// half of it, so one deterministic rendering is what makes "regenerate an unchanged tree and get the
|
|
139
|
-
// same bytes" true at all. The machine keys follow in their fixed order
|
|
131
|
+
// same bytes" true at all. The machine keys follow in their fixed order; `aggregate` is dropped
|
|
132
|
+
// with them and written back only by the schema-1 move, which carries it.
|
|
140
133
|
export const serialize = (parsed, machine) => {
|
|
141
134
|
const authored = Object.fromEntries(Object.entries(parsed).filter(([key]) => !MACHINE_KEYS.includes(key)));
|
|
142
135
|
return `${JSON.stringify({ ...authored, ...machine }, null, 2)}\n`;
|
|
@@ -10,12 +10,12 @@ import { SPEC_STORE_ROOT } from './layout.mjs';
|
|
|
10
10
|
export const SETUP_ANSWERS = Object.freeze(['armable', 'record', 'held']);
|
|
11
11
|
|
|
12
12
|
// checkTargetOf({ loaded, absentConfig }) → exactly one of: the schema-1 stop, the unminted stop (a
|
|
13
|
-
// present config
|
|
13
|
+
// present config with no file record), or the config to judge with the dimensions judged.
|
|
14
14
|
export const checkTargetOf = ({ loaded, absentConfig }) => {
|
|
15
15
|
const absent = loaded.state === 'absent';
|
|
16
16
|
const config = absent ? absentConfig : loaded.config;
|
|
17
17
|
if (config.schema === 1) return { stop: 'schema-1', config };
|
|
18
|
-
if (!absent && loaded.state !== 'minted') return { stop: 'unminted', config, state: loaded.state
|
|
18
|
+
if (!absent && loaded.state !== 'minted') return { stop: 'unminted', config, state: loaded.state };
|
|
19
19
|
return { stop: null, config, judged: { absent, layout: absent || config.layout !== null } };
|
|
20
20
|
};
|
|
21
21
|
|