You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(recipes): add stale-imports diff-shape; reject organize-imports in plan
Sole-specifier unused import lines via import_specifiers × references;
review-first apply (auto_fixable false). Golden on ProductCard unused now import.
Defer organize-imports to formatter domain in utilization plan.
Copy file name to clipboardExpand all lines: docs/architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ Three **mutually exclusive** CLI entry shapes; all converge on `applyDiffPayload
154
154
155
155
**Recipe-only CLI flags** (not on MCP/HTTP today): `--until-empty` + `--max-passes N` (default 10) run `runApplyUntilEmpty` — dry-run probe → apply → targeted reindex of touched files → repeat until zero rows, conflicts, or cap; envelope adds `passes` and `terminated_by` ∈ `{empty, cap, conflicts, complete}`. `--commit "<msg>"` runs `git add -- <touched>` + `git commit` after a clean apply (stderr error string on git failure; apply still succeeded).
156
156
157
-
**Bundled diff-shape recipes** (emit the row contract; inspect with `codemap query --recipe <id> --format diff-json`): `rename-preview`, `migrate-import-source`, `replace-marker-kind` (`auto_fixable: true`in frontmatter); `add-jsdoc-deprecated` (`auto_fixable: false` — writes need `--force` unless allowlisted). Wave-2 candidates (`organize-imports`, `stale-imports`, …) tracked in [`plans/substrate-apply-utilization.md`](./plans/substrate-apply-utilization.md).
157
+
**Bundled diff-shape recipes** (emit the row contract; inspect with `codemap query --recipe <id> --format diff-json`): `rename-preview`, `migrate-import-source`, `replace-marker-kind`, `stale-imports` (first three `auto_fixable: true`except `stale-imports` — review-first); `add-jsdoc-deprecated` (`auto_fixable: false` — writes need `--force` unless allowlisted). Wave-2 remainder (`migrate-deprecated`, …) in [`plans/substrate-apply-utilization.md`](./plans/substrate-apply-utilization.md).
158
158
159
159
**Policy** (`src/application/apply-policy.ts`, recipe mode only): non-`auto_fixable` recipes reject writes unless `--force` / MCP `force: true`. `apply.autoApplyRecipes` in user config is an allowlist of recipe ids that may run without TTY `--yes` on non-interactive CLI (MCP/HTTP still require `yes: true` for writes). `--rows` / `apply_rows` / `--diff-input` bypass both gates — separate trust boundary for agent-supplied hunks.
|**Substrate (tiers 1–6)**|**Partially**| Rich tables exist (`references`, `bindings`, `jsx_*`, `import_specifiers`, `jsdoc_tags`, …) but **only a thin slice** is JOIN'd by shipped diff-shape recipes. Tiers **7–13** are intentionally unshipped — not a utilization failure. |
12
12
|**Apply executor**|**Mostly yes**| Phase-1/2 engine, three CLI input modes, MCP `apply` + `apply_rows`, policy gates, fixpoint loop — **shipped and engine-heavy in tests**. |
13
-
|**Apply recipes**|**No**|**4 of 62** bundled SQL recipes emit the diff row contract; **3**are `auto_fixable: true`. The product bottleneck is **recipe surface**, not executor plumbing. |
| C.5 |**`rename-app-wide` or barrel import rows**|**✓ Shipped** — `barrel_import_rows` + `reference_rows` on `rename-preview`|
132
132
| C.6 |`actions[].command` on audit recipes w/ diff SQL |**Open**|
133
133
134
-
**Phase C exit criteria:**≥2 new diff-shape recipes beyond the original four; `re_export` golden or documented gap removed.
134
+
**Phase C exit criteria (partial):**`stale-imports` + rename extensions shipped; **`migrate-deprecated`** still open for “≥2 beyond original four” if counting only new ids.
135
135
136
136
### Phase D — Optional transport parity (trigger-gated)
137
137
@@ -160,18 +160,19 @@ The "no fix engine" floor was about **product class** (no ESLint-style verdict e
160
160
161
161
## Rejected items (grep-able; revisit only on trigger)
0 commit comments