@entelligentsia/forgecli 0.6.6 → 0.7.7
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 +112 -0
- package/README.md +99 -190
- package/dist/bin/forge.js +20 -0
- package/dist/bin/forge.js.map +1 -1
- package/dist/extensions/forgecli/approve.d.ts +24 -0
- package/dist/extensions/forgecli/approve.js +202 -0
- package/dist/extensions/forgecli/approve.js.map +1 -0
- package/dist/extensions/forgecli/audience-gate.d.ts +4 -0
- package/dist/extensions/forgecli/audience-gate.js +8 -5
- package/dist/extensions/forgecli/audience-gate.js.map +1 -1
- package/dist/extensions/forgecli/collate.d.ts +24 -0
- package/dist/extensions/forgecli/collate.js +199 -0
- package/dist/extensions/forgecli/collate.js.map +1 -0
- package/dist/extensions/forgecli/commit.d.ts +24 -0
- package/dist/extensions/forgecli/commit.js +202 -0
- package/dist/extensions/forgecli/commit.js.map +1 -0
- package/dist/extensions/forgecli/fix-bug.d.ts +75 -0
- package/dist/extensions/forgecli/fix-bug.js +1133 -0
- package/dist/extensions/forgecli/fix-bug.js.map +1 -0
- package/dist/extensions/forgecli/forge-commands.js +7 -0
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-header.js +10 -4
- package/dist/extensions/forgecli/forge-header.js.map +1 -1
- package/dist/extensions/forgecli/forge-init.js +16 -8
- package/dist/extensions/forgecli/forge-init.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +29 -0
- package/dist/extensions/forgecli/forge-subagent.js +14 -1
- package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
- package/dist/extensions/forgecli/hook-dispatcher.d.ts +53 -1
- package/dist/extensions/forgecli/hook-dispatcher.js +47 -1
- package/dist/extensions/forgecli/hook-dispatcher.js.map +1 -1
- package/dist/extensions/forgecli/hooks/post-init-hook.d.ts +15 -0
- package/dist/extensions/forgecli/hooks/post-init-hook.js +127 -0
- package/dist/extensions/forgecli/hooks/post-init-hook.js.map +1 -0
- package/dist/extensions/forgecli/hooks/post-sprint-hook.d.ts +37 -0
- package/dist/extensions/forgecli/hooks/post-sprint-hook.js +166 -0
- package/dist/extensions/forgecli/hooks/post-sprint-hook.js.map +1 -0
- package/dist/extensions/forgecli/index.js +56 -5
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/review-code.d.ts +24 -0
- package/dist/extensions/forgecli/review-code.js +202 -0
- package/dist/extensions/forgecli/review-code.js.map +1 -0
- package/dist/extensions/forgecli/review-plan.d.ts +24 -0
- package/dist/extensions/forgecli/review-plan.js +203 -0
- package/dist/extensions/forgecli/review-plan.js.map +1 -0
- package/dist/extensions/forgecli/run-sprint.d.ts +18 -0
- package/dist/extensions/forgecli/run-sprint.js +33 -1
- package/dist/extensions/forgecli/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/run-task.d.ts +21 -2
- package/dist/extensions/forgecli/run-task.js +33 -9
- package/dist/extensions/forgecli/run-task.js.map +1 -1
- package/dist/extensions/forgecli/session-registry.d.ts +10 -0
- package/dist/extensions/forgecli/session-registry.js +9 -0
- package/dist/extensions/forgecli/session-registry.js.map +1 -1
- package/dist/extensions/forgecli/validate.d.ts +24 -0
- package/dist/extensions/forgecli/validate.js +202 -0
- package/dist/extensions/forgecli/validate.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/engine.d.ts +23 -0
- package/dist/extensions/forgecli/wf-engine/engine.js +384 -0
- package/dist/extensions/forgecli/wf-engine/engine.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/event-parser.d.ts +6 -0
- package/dist/extensions/forgecli/wf-engine/event-parser.js +29 -0
- package/dist/extensions/forgecli/wf-engine/event-parser.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/id-gen.d.ts +6 -0
- package/dist/extensions/forgecli/wf-engine/id-gen.js +17 -0
- package/dist/extensions/forgecli/wf-engine/id-gen.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/loader.d.ts +2 -0
- package/dist/extensions/forgecli/wf-engine/loader.js +100 -0
- package/dist/extensions/forgecli/wf-engine/loader.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/predicate.d.ts +7 -0
- package/dist/extensions/forgecli/wf-engine/predicate.js +36 -0
- package/dist/extensions/forgecli/wf-engine/predicate.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/prompt-compiler.d.ts +15 -0
- package/dist/extensions/forgecli/wf-engine/prompt-compiler.js +23 -0
- package/dist/extensions/forgecli/wf-engine/prompt-compiler.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/register.d.ts +9 -0
- package/dist/extensions/forgecli/wf-engine/register.js +59 -0
- package/dist/extensions/forgecli/wf-engine/register.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/remit-check.d.ts +6 -0
- package/dist/extensions/forgecli/wf-engine/remit-check.js +42 -0
- package/dist/extensions/forgecli/wf-engine/remit-check.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/state-store.d.ts +13 -0
- package/dist/extensions/forgecli/wf-engine/state-store.js +43 -0
- package/dist/extensions/forgecli/wf-engine/state-store.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/types.d.ts +66 -0
- package/dist/extensions/forgecli/wf-engine/types.js +2 -0
- package/dist/extensions/forgecli/wf-engine/types.js.map +1 -0
- package/dist/extensions/forgecli/wf-engine/worker.d.ts +11 -0
- package/dist/extensions/forgecli/wf-engine/worker.js +50 -0
- package/dist/extensions/forgecli/wf-engine/worker.js.map +1 -0
- package/dist/forge-payload/.base-pack/workflows/_fragments/context-injection.md +10 -4
- package/dist/forge-payload/.base-pack/workflows/fix_bug.md +12 -0
- package/dist/forge-payload/.schemas/bug.schema.json +4 -2
- package/dist/forge-payload/.schemas/event.schema.json +22 -3
- package/dist/forge-payload/commands/add-pipeline.md +342 -0
- package/dist/forge-payload/commands/add-task.md +269 -0
- package/dist/forge-payload/commands/ask.md +43 -0
- package/dist/forge-payload/commands/calibrate.md +356 -0
- package/dist/forge-payload/commands/config.md +202 -0
- package/dist/forge-payload/commands/enhance.md +38 -0
- package/dist/forge-payload/commands/health.md +225 -0
- package/dist/forge-payload/commands/init.md +165 -0
- package/dist/forge-payload/commands/materialize.md +119 -0
- package/dist/forge-payload/commands/migrate.md +160 -0
- package/dist/forge-payload/commands/quiz-agent.md +38 -0
- package/dist/forge-payload/commands/regenerate.md +673 -0
- package/dist/forge-payload/commands/remove.md +174 -0
- package/dist/forge-payload/commands/report-bug.md +191 -0
- package/dist/forge-payload/commands/store-query.md +73 -0
- package/dist/forge-payload/commands/store-repair.md +187 -0
- package/dist/forge-payload/commands/update-tools.md +56 -0
- package/dist/forge-payload/commands/update.md +1376 -0
- package/dist/forge-payload/tools/preflight-gate.cjs +2 -1
- package/dist/forge-payload/tools/read-verdict.cjs +41 -8
- package/dist/forge-payload/tools/store-cli.cjs +4 -3
- package/node_modules/argparse/CHANGELOG.md +216 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/cliui/CHANGELOG.md +121 -0
- package/node_modules/color-convert/CHANGELOG.md +54 -0
- package/node_modules/esprima/ChangeLog +235 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +247 -0
- package/node_modules/js-yaml/bin/js-yaml.js +126 -0
- package/node_modules/js-yaml/dist/js-yaml.js +3880 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +3856 -0
- package/node_modules/js-yaml/index.js +47 -0
- package/node_modules/js-yaml/lib/common.js +59 -0
- package/node_modules/js-yaml/lib/dumper.js +965 -0
- package/node_modules/js-yaml/lib/exception.js +55 -0
- package/node_modules/js-yaml/lib/loader.js +1733 -0
- package/node_modules/js-yaml/lib/schema/core.js +11 -0
- package/node_modules/js-yaml/lib/schema/default.js +22 -0
- package/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
- package/node_modules/js-yaml/lib/schema/json.js +19 -0
- package/node_modules/js-yaml/lib/schema.js +121 -0
- package/node_modules/js-yaml/lib/snippet.js +101 -0
- package/node_modules/js-yaml/lib/type/binary.js +125 -0
- package/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/type/float.js +97 -0
- package/node_modules/js-yaml/lib/type/int.js +156 -0
- package/node_modules/js-yaml/lib/type/map.js +8 -0
- package/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/type/null.js +35 -0
- package/node_modules/js-yaml/lib/type/omap.js +44 -0
- package/node_modules/js-yaml/lib/type/pairs.js +53 -0
- package/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/type/set.js +29 -0
- package/node_modules/js-yaml/lib/type/str.js +8 -0
- package/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/type.js +66 -0
- package/node_modules/js-yaml/package.json +66 -0
- package/node_modules/mz/HISTORY.md +66 -0
- package/node_modules/proper-lockfile/CHANGELOG.md +108 -0
- package/node_modules/source-map/CHANGELOG.md +301 -0
- package/node_modules/thenify/History.md +11 -0
- package/node_modules/thenify-all/History.md +11 -0
- package/node_modules/y18n/CHANGELOG.md +100 -0
- package/node_modules/yargs/CHANGELOG.md +88 -0
- package/node_modules/yargs-parser/CHANGELOG.md +263 -0
- package/package.json +6 -2
- package/themes/forge-matrix.json +89 -0
- package/themes/forge-mono.json +86 -0
- package/workflows/lead-qualifier/prompts/digest.md +44 -0
- package/workflows/lead-qualifier/prompts/draft-outreach.md +44 -0
- package/workflows/lead-qualifier/prompts/enrich.md +52 -0
- package/workflows/lead-qualifier/prompts/intake.md +48 -0
- package/workflows/lead-qualifier/prompts/mark-cold.md +38 -0
- package/workflows/lead-qualifier/prompts/score.md +45 -0
- package/workflows/lead-qualifier/workflow.yaml +95 -0
- package/workflows/research-brief/prompts/brief-synthesize.md +43 -0
- package/workflows/research-brief/prompts/intake.md +51 -0
- package/workflows/research-brief/prompts/source-critique.md +38 -0
- package/workflows/research-brief/prompts/source-score.md +38 -0
- package/workflows/research-brief/prompts/source-summarize.md +54 -0
- package/workflows/research-brief/workflow.yaml +66 -0
- package/dist/extensions/forgecli/session-monitor-widget.d.ts +0 -37
- package/dist/extensions/forgecli/session-monitor-widget.js +0 -320
- package/dist/extensions/forgecli/session-monitor-widget.js.map +0 -1
- package/dist/extensions/forgecli/session-monitor.d.ts +0 -2
- package/dist/extensions/forgecli/session-monitor.js +0 -135
- package/dist/extensions/forgecli/session-monitor.js.map +0 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: materialize
|
|
3
|
+
description: Use when you've run /forge:init --fast and want to fill in missing scaffolding — either for a specific workflow's closure or as a full warm-up. Fills missing or stubbed artifacts; does not change config mode. Unlike /forge:regenerate (which rebuilds regardless), materialize only fills what is missing or stubbed, leaving pristine user-modified files untouched.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge:materialize
|
|
7
|
+
|
|
8
|
+
Fills missing or stubbed Forge scaffolding without overwriting pristine files.
|
|
9
|
+
This is the on-demand complement to `/forge:init --fast`.
|
|
10
|
+
|
|
11
|
+
`materialize` is **mode-neutral** — it never writes `.forge/config.json`
|
|
12
|
+
`mode`. Promotion from fast → full is a separate explicit decision owned
|
|
13
|
+
by `/forge:config mode full`. After a `materialize --all`, it is normal
|
|
14
|
+
for `mode` to remain `fast` even though every artifact is now present.
|
|
15
|
+
|
|
16
|
+
## Locate the Forge plugin
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Read `.forge/config.json`. If it does not exist, stop and tell the user to run
|
|
23
|
+
`/forge:init` first.
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
$ARGUMENTS
|
|
28
|
+
|
|
29
|
+
Parse the argument:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/forge:materialize # full warm-up — all stubs + missing
|
|
33
|
+
/forge:materialize --all # same as no args
|
|
34
|
+
/forge:materialize workflows plan_task # just this workflow's closure
|
|
35
|
+
/forge:materialize workflows:plan_task # colon form
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Full warm-up (`/forge:materialize` or `--all`)
|
|
41
|
+
|
|
42
|
+
Open with the forge badge + status line:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
node "$FORGE_ROOT/tools/banners.cjs" --badge forge
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Emit: `〇 forge:materialize — full warm-up…`
|
|
49
|
+
|
|
50
|
+
Then announce the fast-mode capability state — silent on full installs:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
node "$FORGE_ROOT/tools/ensure-ready.cjs" --announce --all
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`banners.cjs` strips ANSI in `NO_COLOR` / non-tty / `--plain` contexts.
|
|
57
|
+
|
|
58
|
+
Follow `$FORGE_ROOT/init/generation/lazy-materialize.md` for each stub or missing
|
|
59
|
+
workflow in `.forge/workflows/`. Work from a single collected list:
|
|
60
|
+
|
|
61
|
+
1. Read `$FORGE_ROOT/schemas/structure-manifest.json` for the full workflow list.
|
|
62
|
+
2. For each workflow id in `namespaces.workflows.files`:
|
|
63
|
+
- Check if `.forge/workflows/{id}.md` is a stub (starts with `<!-- FORGE FAST-MODE STUB`)
|
|
64
|
+
or is missing.
|
|
65
|
+
- Collect all stubs/missing into one list.
|
|
66
|
+
3. Compute the union closure across all stubs/missing workflows.
|
|
67
|
+
4. Fan-out materialisation following the lazy-materialize rulebook steps 5–10
|
|
68
|
+
for the union closure (one pass, not per-workflow).
|
|
69
|
+
5. Rebuild the persona pack so `meta-orchestrate` and `meta-fix-bug` use
|
|
70
|
+
a fresh reference index (consumed when `FORGE_PROMPT_MODE=reference`):
|
|
71
|
+
```sh
|
|
72
|
+
node "$FORGE_ROOT/tools/build-persona-pack.cjs" \
|
|
73
|
+
--out .forge/cache/persona-pack.json
|
|
74
|
+
```
|
|
75
|
+
On exit 1, surface the stderr message (it includes the offending file
|
|
76
|
+
path) and continue — the pack is refreshable later via `/forge:regenerate`.
|
|
77
|
+
6. Rebuild the architecture context pack:
|
|
78
|
+
```sh
|
|
79
|
+
ENGINEERING=$(node "$FORGE_ROOT/tools/manage-config.cjs" get paths.engineering 2>/dev/null || echo engineering)
|
|
80
|
+
node "$FORGE_ROOT/tools/build-context-pack.cjs" \
|
|
81
|
+
--arch-dir "$ENGINEERING/architecture" \
|
|
82
|
+
--out-md .forge/cache/context-pack.md \
|
|
83
|
+
--out-json .forge/cache/context-pack.json
|
|
84
|
+
```
|
|
85
|
+
On exit 1 (architecture directory not yet present), emit a warning and
|
|
86
|
+
continue — the pack can be built later via `/forge:regenerate`.
|
|
87
|
+
7. Emit: `〇 forge:materialize complete — gaps filled (mode unchanged)`
|
|
88
|
+
8. If `.forge/config.json` `mode` is still `"fast"`, append the promotion hint:
|
|
89
|
+
```
|
|
90
|
+
〇 To declare the project fully generated: /forge:config mode full
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Single-workflow (`/forge:materialize workflows <id>`)
|
|
96
|
+
|
|
97
|
+
Open with the forge badge + status line:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
node "$FORGE_ROOT/tools/banners.cjs" --badge forge
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Emit: `〇 forge:materialize — materialising closure for {id}…`
|
|
104
|
+
|
|
105
|
+
Follow `$FORGE_ROOT/init/generation/lazy-materialize.md` with `workflow_id={id}`.
|
|
106
|
+
Pass the full argument (caller intent) so the rulebook can re-read and execute
|
|
107
|
+
the real workflow after materialisation.
|
|
108
|
+
|
|
109
|
+
Do NOT flip config mode for any materialize invocation. Mode is owned by
|
|
110
|
+
`/forge:config`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## On error
|
|
115
|
+
|
|
116
|
+
If any generation step fails unexpectedly:
|
|
117
|
+
|
|
118
|
+
> "This looks like a Forge bug. Would you like to file a report? Run
|
|
119
|
+
> `/forge:report-bug` — I'll pre-fill the report from this conversation."
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate
|
|
3
|
+
description: Use after forge:init to migrate a pre-existing AI-SDLC store to Forge format — interviews you to define the project-specific mapping
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge:migrate
|
|
7
|
+
|
|
8
|
+
Migrate an existing project store to Forge format. Requires `forge:init` to have been completed first.
|
|
9
|
+
|
|
10
|
+
## Locate the Forge plugin
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Step 0 — Detect migration type
|
|
17
|
+
|
|
18
|
+
Check whether a structural migration (v0.x prose-heavy → v0.40 base-pack
|
|
19
|
+
format) is needed:
|
|
20
|
+
|
|
21
|
+
- If the user passed `--structural` explicitly, OR
|
|
22
|
+
- If `.forge/structure-versions.json` is absent (pre-T05 install detected):
|
|
23
|
+
|
|
24
|
+
→ Load and run the structural migration workflow:
|
|
25
|
+
Read `"$FORGE_ROOT/meta/workflows/meta-migrate.md"` and follow it.
|
|
26
|
+
→ Do NOT proceed to Step 1 of this command.
|
|
27
|
+
|
|
28
|
+
If neither condition applies (post-T05 install and no `--structural` flag):
|
|
29
|
+
continue to Step 1 (store schema migration).
|
|
30
|
+
|
|
31
|
+
## Step 1 — Verify forge:init has run
|
|
32
|
+
|
|
33
|
+
Check that `.forge/config.json` exists. If it does not, stop and tell the user:
|
|
34
|
+
|
|
35
|
+
> "Forge has not been initialised in this project. Run `/forge:init` first, then come back to `/forge:migrate`."
|
|
36
|
+
|
|
37
|
+
Read `.forge/config.json` to get `paths.store` (default: `.forge/store`).
|
|
38
|
+
|
|
39
|
+
## Step 2 — Scan for non-Forge values
|
|
40
|
+
|
|
41
|
+
Read every JSON file under `{paths.store}/sprints/`, `{paths.store}/tasks/`, and `{paths.store}/bugs/`.
|
|
42
|
+
|
|
43
|
+
Collect the distinct values present in each `status` field and `severity` field (bugs only), grouped by record type. Cross-reference against the known Forge enums:
|
|
44
|
+
|
|
45
|
+
**Sprint status:** `planning`, `active`, `completed`, `retrospective-done`, `blocked`, `partially-completed`, `abandoned`
|
|
46
|
+
|
|
47
|
+
**Task status:** `draft`, `planned`, `plan-approved`, `implementing`, `implemented`, `review-approved`, `approved`, `committed`, `plan-revision-required`, `code-revision-required`, `blocked`, `escalated`, `abandoned`
|
|
48
|
+
|
|
49
|
+
**Bug status:** `reported`, `triaged`, `in-progress`, `fixed`, `verified`
|
|
50
|
+
|
|
51
|
+
**Bug severity:** `critical`, `major`, `minor`
|
|
52
|
+
|
|
53
|
+
Report only the values that are **not** already valid Forge enums. If all values are already valid, tell the user:
|
|
54
|
+
|
|
55
|
+
> "Store is already fully Forge-compatible — no migration needed. Run `node \"$FORGE_ROOT/tools/validate-store.cjs\"` to confirm."
|
|
56
|
+
|
|
57
|
+
Then exit.
|
|
58
|
+
|
|
59
|
+
## Step 3 — Interview the user
|
|
60
|
+
|
|
61
|
+
Present the unrecognised values grouped by record type. For each value, ask the user to choose the Forge equivalent (or mark it as custom/skip):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Found values not in Forge format. Please map each one:
|
|
65
|
+
|
|
66
|
+
Sprint status:
|
|
67
|
+
"✅ Complete" → ? (Forge options: planning / active / completed / retrospective-done / blocked / partially-completed / abandoned)
|
|
68
|
+
"🔵 In Progress" → ?
|
|
69
|
+
|
|
70
|
+
Task status:
|
|
71
|
+
"✅ Complete" → ?
|
|
72
|
+
"📋 Prompt Ready" → ?
|
|
73
|
+
...
|
|
74
|
+
|
|
75
|
+
Bug severity:
|
|
76
|
+
"Major" → ? (Forge options: critical / major / minor)
|
|
77
|
+
|
|
78
|
+
For each value above, enter the Forge equivalent. Type "skip" to leave that value unchanged (it will remain invalid and fail validate-store).
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Wait for the user to provide the full mapping before proceeding.
|
|
82
|
+
|
|
83
|
+
## Step 4 — Preview changes
|
|
84
|
+
|
|
85
|
+
Count how many records will be affected per type. Show a preview table:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Migration preview:
|
|
89
|
+
|
|
90
|
+
Sprints: N records — M values will change
|
|
91
|
+
Tasks: N records — M values will change
|
|
92
|
+
Bugs: N records — M values will change
|
|
93
|
+
|
|
94
|
+
Example changes:
|
|
95
|
+
sprints/S01.json status: "✅ Complete" → "completed"
|
|
96
|
+
tasks/WI-T001.json status: "✅ Complete" → "committed"
|
|
97
|
+
bugs/WI-BUG-01.json severity: "Major" → "major"
|
|
98
|
+
|
|
99
|
+
Apply? [Y/n]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If the user declines, exit without changes.
|
|
103
|
+
|
|
104
|
+
## Step 5 — Apply migration
|
|
105
|
+
|
|
106
|
+
For each affected record, apply the migration via the store custodian:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
export FORGE_ROOT
|
|
110
|
+
node "$FORGE_ROOT/tools/store-cli.cjs" write <entity> '{updated-json}'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
where `<entity>` is `sprint`, `task`, or `bug` as appropriate, and
|
|
114
|
+
`'{updated-json}'` is the full record with the mapped field values applied.
|
|
115
|
+
Construct the JSON by reading the current record (using the Read tool or
|
|
116
|
+
`/forge:store read <entity> <id>`), applying only the agreed mapping, and
|
|
117
|
+
passing the complete updated record to the custodian.
|
|
118
|
+
|
|
119
|
+
**Error handling:** If the custodian exits with code 1, read stderr for the
|
|
120
|
+
validation error, fix the data, and retry (max 2 retries). If the command still
|
|
121
|
+
fails after retries, report the validation error to the user and stop. **Never
|
|
122
|
+
fall back to writing store files directly.**
|
|
123
|
+
|
|
124
|
+
Do not modify any field that was not part of the agreed mapping. Do not add or remove fields.
|
|
125
|
+
|
|
126
|
+
## Step 6 — Verify
|
|
127
|
+
|
|
128
|
+
Run:
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
export FORGE_ROOT
|
|
132
|
+
node "$FORGE_ROOT/tools/validate-store.cjs" --dry-run
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Report the result. If errors remain (e.g. values the user chose to skip), list them clearly so the user knows what still needs attention.
|
|
136
|
+
|
|
137
|
+
## Step 7 — Close
|
|
138
|
+
|
|
139
|
+
Report a summary:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Migration complete:
|
|
143
|
+
N sprint(s) updated
|
|
144
|
+
N task(s) updated
|
|
145
|
+
N bug(s) updated
|
|
146
|
+
|
|
147
|
+
Run /forge:health to check overall knowledge base status.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Arguments
|
|
151
|
+
|
|
152
|
+
$ARGUMENTS
|
|
153
|
+
|
|
154
|
+
If the user passes `--dry-run`, run Steps 1–4 only (no writes).
|
|
155
|
+
|
|
156
|
+
## On error
|
|
157
|
+
|
|
158
|
+
If any step above fails unexpectedly, describe what went wrong and ask:
|
|
159
|
+
|
|
160
|
+
> "This looks like a Forge bug. Would you like to file a report to help improve it? Run `/forge:report-bug` — I'll pre-fill the report from this conversation."
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quiz-agent
|
|
3
|
+
description: Verify an agent has loaded and understood the project knowledge base — run a short factual quiz before starting high-stakes tasks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge:quiz-agent
|
|
7
|
+
|
|
8
|
+
Verify that the active agent has correctly read and understood this project's
|
|
9
|
+
knowledge base before beginning a high-stakes task (schema changes, migrations,
|
|
10
|
+
release engineering, significant refactors).
|
|
11
|
+
|
|
12
|
+
## Locate plugin root
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Arguments
|
|
19
|
+
|
|
20
|
+
$ARGUMENTS
|
|
21
|
+
|
|
22
|
+
## How to Run
|
|
23
|
+
|
|
24
|
+
Read `.forge/workflows/quiz_agent.md` and follow it exactly.
|
|
25
|
+
|
|
26
|
+
Pass `$ARGUMENTS` to the workflow so the agent can include task context in its
|
|
27
|
+
responses if provided.
|
|
28
|
+
|
|
29
|
+
## On error
|
|
30
|
+
|
|
31
|
+
If `.forge/workflows/quiz_agent.md` does not exist, tell the user:
|
|
32
|
+
|
|
33
|
+
> △ The quiz_agent workflow is missing. Run `/forge:regenerate workflows` to
|
|
34
|
+
> regenerate it, then retry.
|
|
35
|
+
|
|
36
|
+
If any other step fails unexpectedly, describe what went wrong and ask:
|
|
37
|
+
|
|
38
|
+
> "This looks like a Forge bug. Would you like to file a report to help improve it? Run `/forge:report-bug` — I'll pre-fill the report from this conversation."
|