bmad-plus 0.12.2 → 0.14.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 +47 -0
- package/README.md +96 -461
- package/package.json +12 -5
- package/readme-international/README.de.md +42 -9
- package/readme-international/README.es.md +43 -10
- package/readme-international/README.fr.md +42 -9
- package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +5 -3
- package/src/bmad-plus/module.yaml +270 -220
- package/src/bmad-plus/packs/pack-dev-studio/README.md +133 -141
- package/src/bmad-plus/packs/pack-dev-studio/SKILL.md +49 -0
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/analyst-agent.md +35 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/document-project.md +59 -59
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/domain-research.md +55 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/market-research.md +58 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/prfaq.md +55 -132
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/product-brief.md +63 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +54 -69
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/technical-research.md +54 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/architect-agent.md +32 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-architecture.md +67 -71
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-epics-stories.md +61 -90
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/generate-project-context.md +56 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/implementation-readiness.md +55 -88
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01-init.md +20 -153
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01b-continue.md +20 -173
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-02-context.md +14 -220
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-03-starter.md +20 -329
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-04-decisions.md +15 -314
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-05-patterns.md +15 -355
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-06-structure.md +15 -375
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-07-validation.md +14 -357
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-08-complete.md +13 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/checkpoint-preview.md +52 -65
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-01-gather-context.md +14 -81
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-02-review.md +14 -31
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-03-triage.md +14 -45
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-04-present.md +13 -128
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review.md +61 -87
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/correct-course.md +55 -298
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/create-story.md +52 -426
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-agent.md +48 -69
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story-checklist.md +22 -80
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story.md +60 -482
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/investigate.md +50 -184
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/qa-e2e-tests.md +57 -173
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/quick-dev.md +56 -108
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/retrospective.md +54 -1509
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-planning.md +54 -296
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-status.md +41 -283
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-prd.md +58 -18
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-ux-design.md +103 -72
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/edit-prd.md +55 -27
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/pm-agent.md +34 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/prd.md +46 -87
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/steps/step-01-init.md +10 -0
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/ux-designer-agent.md +30 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/validate-prd.md +57 -27
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/advanced-elicitation.md +47 -138
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/adversarial-review.md +48 -34
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/bmad-help.md +51 -68
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/brainstorming.md +46 -3
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/customize.md +68 -109
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/distillator.md +53 -174
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/edge-case-hunter.md +39 -53
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-prose.md +45 -83
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-structure.md +45 -176
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/index-docs.md +45 -63
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/party-mode.md +53 -124
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/shard-doc.md +44 -100
- package/src/bmad-plus/packs/pack-dev-studio/dev-studio-orchestrator.md +56 -116
- package/src/bmad-plus/packs/pack-dev-studio/shared/architecture-decision-template.md +49 -12
- package/src/bmad-plus/packs/pack-dev-studio/shared/bwml-spec.md +51 -328
- package/src/bmad-plus/packs/pack-dev-studio/shared/catalog.json +489 -0
- package/src/bmad-plus/packs/pack-dev-studio/shared/execution.md +69 -0
- package/src/bmad-plus/packs/pack-dev-studio/shared/module-help.csv +39 -32
- package/src/bmad-plus/packs/pack-dev-studio/upstream-sync.yaml +85 -14
- package/src/bmad-plus/packs/pack-memory/README.md +6 -0
- package/src/bmad-plus/packs/pack-memory/memory-orchestrator.md +12 -5
- package/src/bmad-plus/packs/pack-seo/SKILL.md +27 -1
- package/src/bmad-plus/packs/pack-seo/scripts/seo_apis.py +8 -8
- package/src/bmad-plus/packs/pack-seo/scripts/seo_fetch.py +1 -2
- package/src/bmad-plus/packs/pack-seo/scripts/seo_report.py +0 -1
- package/src/bmad-plus/packs/pack-seo/seo-chief.md +16 -1
- package/src/bmad-plus/packs/pack-seo/seo-judge.md +12 -0
- package/src/bmad-plus/packs/pack-seo/seo-scout.md +12 -0
- package/src/bmad-plus/skills/bmad-plus-autopilot/SKILL.md +4 -4
- package/src/bmad-plus/skills/bmad-plus-sync/SKILL.md +5 -3
- package/src/bmad-plus/skills/dev-studio/SKILL.md +19 -0
- package/tools/bmad-plus-npx.js +4 -2
- package/tools/build/adapters.config.js +60 -51
- package/tools/build/check-counts.js +52 -54
- package/tools/build/check-install-contract.js +450 -0
- package/tools/build/generate-adapters.js +252 -56
- package/tools/build/generate.js +364 -14
- package/tools/build/generated-adapters/.codex/AGENTS.md +20 -7
- package/tools/build/generated-adapters/.cursor/rules/bmad-plus.mdc +20 -7
- package/tools/build/generated-adapters/.opencode/AGENTS.md +20 -7
- package/tools/build/generated-adapters/AGENTS.md +20 -7
- package/tools/build/generated-adapters/CLAUDE.md +20 -7
- package/tools/build/generated-adapters/CONVENTIONS.md +20 -7
- package/tools/build/generated-adapters/GEMINI.md +20 -7
- package/tools/build/module.template.yaml +82 -0
- package/tools/build/pack-delivery.js +78 -0
- package/tools/cli/bmad-plus-cli.js +16 -1
- package/tools/cli/commands/doctor.js +49 -217
- package/tools/cli/commands/install.js +109 -164
- package/tools/cli/commands/studio.js +68 -0
- package/tools/cli/commands/uninstall.js +173 -65
- package/tools/cli/commands/update-check.js +31 -0
- package/tools/cli/commands/update-policy.js +39 -0
- package/tools/cli/commands/update.js +102 -113
- package/tools/cli/i18n.js +60 -0
- package/tools/cli/lib/ide-config.js +4 -261
- package/tools/cli/lib/install-manifest.js +17 -0
- package/tools/cli/lib/installation-health.js +360 -0
- package/tools/cli/lib/installed-adapters.js +89 -0
- package/tools/cli/lib/npm-runner.js +177 -0
- package/tools/cli/lib/pack-copy.js +62 -66
- package/tools/cli/lib/packs.js +546 -3
- package/tools/cli/lib/python-health.js +233 -0
- package/tools/cli/lib/python-provision.js +2 -2
- package/tools/cli/lib/studio.js +310 -0
- package/tools/cli/lib/update-check.js +153 -0
- package/tools/cli/lib/update-dispatch.js +182 -0
- package/tools/cli/lib/update-policy.js +90 -0
- package/tools/cli/lib/update-transaction.js +334 -0
- package/tools/release/publication-content.js +901 -0
|
@@ -1,111 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
1
|
+
---
|
|
2
|
+
name: customize
|
|
3
|
+
description: Adapt supported BMAD+ configuration or explicit local instructions while preserving existing project settings and custom files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Overrides are sparse: only the fields being changed. Never copy the whole `agent configuration`.
|
|
72
|
-
|
|
73
|
-
**Template swap** (`*_template` scalar): offer to copy the default template to `{project-root}/custom/{skill-name}-{purpose}-template.md`, point the override at the new path, offer to help edit it.
|
|
74
|
-
|
|
75
|
-
## Step 5: Team or user placement
|
|
76
|
-
|
|
77
|
-
Under `{project-root}/custom/`:
|
|
78
|
-
- `{skill-name}.toml` — team, committed. Policies, org conventions, compliance.
|
|
79
|
-
- `{skill-name}.user.toml` — user, gitignored. Personal tone, private facts, shortcuts.
|
|
80
|
-
|
|
81
|
-
Default by character (policy → team, personal → user), confirm before writing.
|
|
82
|
-
|
|
83
|
-
## Step 6: Show, confirm, write, verify
|
|
84
|
-
|
|
85
|
-
1. Show the full TOML. If the file exists, show a diff. Never silently overwrite.
|
|
86
|
-
2. Wait for explicit yes.
|
|
87
|
-
3. Write. Create `{project-root}/custom/` if needed.
|
|
88
|
-
4. Verify:
|
|
89
|
-
```
|
|
90
|
-
<!-- Adapted for BMAD+: original script dependency removed -->
|
|
91
|
-
```
|
|
92
|
-
Show the merged output, point out the changed fields.
|
|
93
|
-
|
|
94
|
-
**Resolver missing or fails:** read whichever layers exist — `<install-path>/agent configuration` (base), `{project-root}/custom/{skill-name}.toml` (team), `{project-root}/custom/{skill-name}.user.toml` (user) — apply base → team → user with the same merge rules (scalars override, tables deep-merge, `code`/`id`-keyed arrays merge by key, all other arrays append), describe how the changed fields resolve.
|
|
95
|
-
|
|
96
|
-
**Verify shows override didn't land** (field unchanged, merge conflict, file not picked up): re-enter Step 4 with the verify output as context. Usually wrong field name, wrong merge mode (scalar vs array), or wrong scope.
|
|
97
|
-
5. Summarize what changed, where the file lives, how to iterate. Remind the user to commit team overrides.
|
|
98
|
-
|
|
99
|
-
## Complete when
|
|
100
|
-
|
|
101
|
-
- Override file written (or user explicitly aborted).
|
|
102
|
-
- User has seen resolver output (or manual fallback merge summary).
|
|
103
|
-
- User has acknowledged the summary.
|
|
104
|
-
|
|
105
|
-
Otherwise the skill isn't done — finish or tell the user they're exiting incomplete.
|
|
106
|
-
|
|
107
|
-
## When this skill can't help
|
|
108
|
-
|
|
109
|
-
- **Central config** (`{project-root}/custom/config.toml`) — see the [How to Customize BMad guide](https://docs.bmad-method.org/how-to/customize-bmad/).
|
|
110
|
-
- **Step logic, ordering, behavior not in `agent configuration`** — open a feature request, or use `bmad-builder` to create a custom skill. Offer to help with either.
|
|
111
|
-
- **Skills without a `agent configuration`** — not customizable.
|
|
6
|
+
# Customize Dev Studio
|
|
7
|
+
|
|
8
|
+
Read the [execution guide](../../shared/execution.md) and adopt
|
|
9
|
+
[Oholiab](../implementation/dev-agent.md).
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
A concrete customization request and the selected project, plus the target agent
|
|
14
|
+
or workflow when the request changes its behavior. Inspect the existing
|
|
15
|
+
installation and project instructions before proposing a file change.
|
|
16
|
+
|
|
17
|
+
## Supported configuration
|
|
18
|
+
|
|
19
|
+
Dev Studio reads these optional string fields from `_bmad/config.yaml`:
|
|
20
|
+
|
|
21
|
+
| Field | Default when absent | Purpose |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| user_name | user | Name used in project context |
|
|
24
|
+
| communication_language | English | Conversation preference |
|
|
25
|
+
| document_output_language | English | Document preference |
|
|
26
|
+
| output_folder | _bmad-output | Base for proposed workflow reports |
|
|
27
|
+
| project_name | Selected directory name | Project label |
|
|
28
|
+
|
|
29
|
+
Current user instructions take precedence over language preferences. Existing
|
|
30
|
+
unrelated YAML settings remain intact. A malformed existing file or a known field
|
|
31
|
+
with the wrong type must be corrected explicitly; do not silently replace it.
|
|
32
|
+
This pack does not load TOML overrides or merge hidden customization layers.
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
1. Identify the intended behavior and where it belongs. Use the supported YAML
|
|
37
|
+
fields for configuration. Use an actual project instruction file already read
|
|
38
|
+
by the host for broader conventions. Use the specific workflow or persona file
|
|
39
|
+
only for an explicitly requested local change to that instruction.
|
|
40
|
+
2. Read the target file, applicable project rules and any previous customization.
|
|
41
|
+
Distinguish the framework source checkout from a consumer installation. In a
|
|
42
|
+
source checkout edit the maintained source. In an installation a change to an
|
|
43
|
+
owned pack file becomes a local customization that future updates must preserve.
|
|
44
|
+
Never hand-edit an adapter marked as generated; follow its source instructions.
|
|
45
|
+
3. Prepare and apply the smallest change covered by the user's request. Preserve
|
|
46
|
+
unrelated YAML keys, comments and user-authored content. Do not replace the
|
|
47
|
+
whole configuration to change one value. If no target instruction file is
|
|
48
|
+
automatically loaded by the host, document the required explicit loading step;
|
|
49
|
+
creating a new file alone does not activate it.
|
|
50
|
+
4. Validate the result with the available YAML parser and inspect the diff.
|
|
51
|
+
Prepare a representative workflow through the CLI to verify resolved
|
|
52
|
+
configuration and loaded instruction text. Preparation verifies loading; it
|
|
53
|
+
does not demonstrate that an LLM followed the new behavior.
|
|
54
|
+
5. Explain what changed, which host or command reads it, the check performed and
|
|
55
|
+
how to revert the specific change. Keep a locally customized pack instruction
|
|
56
|
+
identified as such; do not adopt or overwrite its ownership hash merely to hide
|
|
57
|
+
the customization.
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
The common report includes the request, changed path and fields, before/after
|
|
62
|
+
summary, resolved configuration or instruction evidence, remaining limitations
|
|
63
|
+
and a precise rollback description. Keep private values out of public examples.
|
|
64
|
+
|
|
65
|
+
## Acceptance and continuation
|
|
66
|
+
|
|
67
|
+
The requested setting resolves as intended, unrelated settings are preserved and
|
|
68
|
+
the activation mechanism is real. On resume, read the latest file and compare
|
|
69
|
+
prior evidence before changing anything; preserve intervening edits and recheck
|
|
70
|
+
the representative prepared context.
|
|
@@ -1,177 +1,56 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: distillator
|
|
3
|
+
description: Create a compact context brief with traceable decisions, constraints, omissions and source references.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Distillator
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
After the compressor (or merge compressor) returns:
|
|
59
|
-
|
|
60
|
-
1. **Completeness check.** Using the headings and named entities list returned by the compressor, verify each appears in the distillate content. If gaps are found, send them back to the compressor for a targeted fix pass — not a full recompression. Limit to 2 fix passes maximum.
|
|
61
|
-
|
|
62
|
-
2. **Format check.** Verify the output follows distillate format rules:
|
|
63
|
-
- No prose paragraphs (only bullets)
|
|
64
|
-
- No decorative formatting
|
|
65
|
-
- No repeated information
|
|
66
|
-
- Each bullet is self-contained
|
|
67
|
-
- Themes are clearly delineated with `##` headings
|
|
68
|
-
|
|
69
|
-
3. **Determine output format.** Using the split prediction from Stage 1 and actual distillate size:
|
|
70
|
-
|
|
71
|
-
**Single distillate** (≤~5,000 tokens or token_budget not exceeded):
|
|
72
|
-
|
|
73
|
-
Save as a single file with frontmatter:
|
|
74
|
-
|
|
75
|
-
```yaml
|
|
76
|
-
---
|
|
77
|
-
type: bmad-distillate
|
|
78
|
-
sources:
|
|
79
|
-
- "{relative path to source file 1}"
|
|
80
|
-
- "{relative path to source file 2}"
|
|
81
|
-
downstream_consumer: "{consumer or 'general'}"
|
|
82
|
-
created: "{date}"
|
|
83
|
-
token_estimate: {approximate token count}
|
|
84
|
-
parts: 1
|
|
85
|
-
---
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Split distillate** (>~5,000 tokens, or token_budget requires it):
|
|
89
|
-
|
|
90
|
-
Create a folder `{base-name}-distillate/` containing:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
{base-name}-distillate/
|
|
94
|
-
├── _index.md # Orientation, cross-cutting items, section manifest
|
|
95
|
-
├── 01-{topic-slug}.md # Self-contained section
|
|
96
|
-
├── 02-{topic-slug}.md
|
|
97
|
-
└── 03-{topic-slug}.md
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
The `_index.md` contains:
|
|
101
|
-
- Frontmatter with sources (relative paths from the distillate folder to the originals)
|
|
102
|
-
- 3-5 bullet orientation (what was distilled, from what)
|
|
103
|
-
- Section manifest: each section's filename + 1-line description
|
|
104
|
-
- Cross-cutting items that span multiple sections
|
|
105
|
-
|
|
106
|
-
Each section file is self-contained — loadable independently. Include a 1-line context header: "This section covers [topic]. Part N of M."
|
|
107
|
-
|
|
108
|
-
Source paths in frontmatter must be relative to the distillate's location.
|
|
109
|
-
|
|
110
|
-
4. **Measure distillate.** Run `scripts/analyze_sources.py` on the final distillate file(s) to get accurate token counts for the output. Use the `total_estimated_tokens` from this analysis as `distillate_total_tokens`.
|
|
111
|
-
|
|
112
|
-
5. **Report results.** Always return structured JSON output:
|
|
113
|
-
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"status": "complete",
|
|
117
|
-
"distillate": "{path or folder path}",
|
|
118
|
-
"section_distillates": ["{path1}", "{path2}"] or null,
|
|
119
|
-
"source_total_tokens": N,
|
|
120
|
-
"distillate_total_tokens": N,
|
|
121
|
-
"compression_ratio": "X:1",
|
|
122
|
-
"source_documents": ["{path1}", "{path2}"],
|
|
123
|
-
"completeness_check": "pass" or "pass_with_additions"
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Where `source_total_tokens` is from the Stage 1 analysis and `distillate_total_tokens` is from step 4. The `compression_ratio` is `source_total_tokens / distillate_total_tokens` formatted as "X:1" (e.g., "3.2:1").
|
|
128
|
-
|
|
129
|
-
6. If `--validate` flag was set, proceed to Stage 4. Otherwise, done.
|
|
130
|
-
|
|
131
|
-
### Stage 4: Round-Trip Validation (--validate only)
|
|
132
|
-
|
|
133
|
-
This stage proves the distillate is lossless by reconstructing source documents from the distillate alone. Use for critical documents where information loss is unacceptable, or as a quality gate for high-stakes downstream workflows. Not for routine use — it adds significant token cost.
|
|
134
|
-
|
|
135
|
-
1. **Spawn the reconstructor agent** using `agents/round-trip-reconstructor.md`. Pass it ONLY the distillate file path (or `_index.md` path for split distillates) — it must NOT have access to the original source documents.
|
|
136
|
-
|
|
137
|
-
For split distillates, spawn one reconstructor per section in parallel. Each receives its section file plus the `_index.md` for cross-cutting context.
|
|
138
|
-
|
|
139
|
-
**Graceful degradation:** If subagent spawning is unavailable, this stage cannot be performed by the main agent (it has already seen the originals). Report that round-trip validation requires subagent support and skip.
|
|
140
|
-
|
|
141
|
-
2. **Receive reconstructions.** The reconstructor returns reconstruction file paths saved adjacent to the distillate.
|
|
142
|
-
|
|
143
|
-
3. **Perform semantic diff.** Read both the original source documents and the reconstructions. For each section of the original, assess:
|
|
144
|
-
- Is the core information present in the reconstruction?
|
|
145
|
-
- Are specific details preserved (numbers, names, decisions)?
|
|
146
|
-
- Are relationships and rationale intact?
|
|
147
|
-
- Did the reconstruction add anything not in the original? (indicates hallucination filling gaps)
|
|
148
|
-
|
|
149
|
-
4. **Produce validation report** saved adjacent to the distillate as `-validation-report.md`:
|
|
150
|
-
|
|
151
|
-
```markdown
|
|
152
|
-
---
|
|
153
|
-
type: distillate-validation
|
|
154
|
-
distillate: "{distillate path}"
|
|
155
|
-
sources: ["{source paths}"]
|
|
156
|
-
created: "{date}"
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Validation Summary
|
|
160
|
-
- Status: PASS | PASS_WITH_WARNINGS | FAIL
|
|
161
|
-
- Information preserved: {percentage estimate}
|
|
162
|
-
- Gaps found: {count}
|
|
163
|
-
- Hallucinations detected: {count}
|
|
164
|
-
|
|
165
|
-
## Gaps (information in originals but missing from reconstruction)
|
|
166
|
-
- {gap description} — Source: {which original}, Section: {where}
|
|
167
|
-
|
|
168
|
-
## Hallucinations (information in reconstruction not traceable to originals)
|
|
169
|
-
- {hallucination description} — appears to fill gap in: {section}
|
|
170
|
-
|
|
171
|
-
## Possible Gap Markers (flagged by reconstructor)
|
|
172
|
-
- {marker description}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
5. **If gaps are found**, offer to run a targeted fix pass on the distillate — adding the missing information without full recompression. Limit to 2 fix passes maximum.
|
|
176
|
-
|
|
177
|
-
6. **Clean up** — delete the temporary reconstruction files after the report is generated.
|
|
6
|
+
# Distillator
|
|
7
|
+
|
|
8
|
+
Read the [execution guide](../../shared/execution.md) and adopt
|
|
9
|
+
[Huldah](../analysis/tech-writer-agent.md).
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
At least one explicit source document, its intended reader or next task, and any
|
|
14
|
+
size limit. If the task or limit is absent, state a practical default: a brief for
|
|
15
|
+
the next project contributor, with no fixed compression ratio. Inspect every
|
|
16
|
+
source; preserve the originals. Summarization can lose information and must never
|
|
17
|
+
be described as lossless compression.
|
|
18
|
+
|
|
19
|
+
## Procedure
|
|
20
|
+
|
|
21
|
+
1. Inventory source paths, dates and hashes when available. Separate current
|
|
22
|
+
decisions from proposals, superseded claims and unresolved disagreement. Note
|
|
23
|
+
unreadable sections or sources that exceed the available context.
|
|
24
|
+
2. Extract the facts the next task depends on: objective, acceptance criteria,
|
|
25
|
+
constraints, interfaces, decisions with reasons, current state and blockers.
|
|
26
|
+
Keep exact identifiers, units, conditions and negations where they affect the
|
|
27
|
+
work. Do not turn an approximate figure into a precise one.
|
|
28
|
+
3. Draft a compact brief with source pointers next to material claims. Preserve
|
|
29
|
+
incompatible claims as an explicit conflict; do not silently choose a winner.
|
|
30
|
+
Use a small table for a useful mapping rather than opaque abbreviations.
|
|
31
|
+
4. Check the brief against the sources. Trace each decision and constraint back
|
|
32
|
+
to a section. Check numbers, names and exceptions separately. If a size limit
|
|
33
|
+
would hide a required constraint, report the tradeoff and retain that detail.
|
|
34
|
+
5. List what was omitted and when the reader must reopen an original document.
|
|
35
|
+
Include the next action and the exact sources needed to perform it.
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
Write the common workflow report with these additional sections:
|
|
40
|
+
|
|
41
|
+
- Purpose and source inventory.
|
|
42
|
+
- Current facts and constraints, with references.
|
|
43
|
+
- Decisions and rationale; unresolved conflicts.
|
|
44
|
+
- Completed work, open work and next action.
|
|
45
|
+
- Omitted material and original documents to reopen.
|
|
46
|
+
|
|
47
|
+
Use the report itself as the brief, or link to a separate user-requested brief.
|
|
48
|
+
If reporting a reduction, measure both texts with the same word or byte counter
|
|
49
|
+
and name that measure. Do not invent token counts.
|
|
50
|
+
|
|
51
|
+
## Acceptance and continuation
|
|
52
|
+
|
|
53
|
+
Every material assertion has a source or an explicit assumption label. Required
|
|
54
|
+
constraints remain readable; omissions and uninspected inputs are visible. The
|
|
55
|
+
source files are unchanged. On resume, compare the source inventory and hashes;
|
|
56
|
+
refresh affected claims and recheck their dependents before reusing the brief.
|
|
@@ -1,67 +1,53 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: edge-case-hunter
|
|
3
|
+
description: Derive concrete boundary and failure scenarios from a feature, interface or implementation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Edge Case Hunter
|
|
6
|
+
# Edge Case Hunter
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
11
|
-
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
8
|
+
Read the [execution guide](../../shared/execution.md) and adopt
|
|
9
|
+
[Bezalel](../architecture/architect-agent.md).
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
- **content** — Content to review: diff, full file, or function
|
|
15
|
-
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
11
|
+
## Inputs
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
A feature, interface, state transition or failure concern, with its intended
|
|
14
|
+
behavior and relevant artifacts where available. For a code claim, inspect the
|
|
15
|
+
implementation before describing it as present. A description alone supports
|
|
16
|
+
design scenarios, not verified defects.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
## Procedure
|
|
20
19
|
|
|
20
|
+
1. Map the relevant inputs, states, outputs and trust boundaries. Identify the
|
|
21
|
+
invariant that should hold and any user-visible behavior that must remain true.
|
|
22
|
+
Keep the scope narrow enough to inspect.
|
|
23
|
+
2. Derive applicable boundaries: absent or malformed input, minimum and maximum
|
|
24
|
+
size, duplicate requests, concurrent changes, interruption, timeout, partial
|
|
25
|
+
failure, stale state, cancellation, permission changes and recovery. Include
|
|
26
|
+
time, locale, accessibility or resource limits when they affect this feature.
|
|
27
|
+
3. Turn relevant cases into concrete scenarios. Specify initial state, trigger,
|
|
28
|
+
expected behavior, failure consequence and an observable check. Discard cases
|
|
29
|
+
already impossible under a verified constraint and record the reason.
|
|
30
|
+
4. Inspect code or run safe existing checks to see which cases are covered.
|
|
31
|
+
Distinguish a design gap, a reproduced defect, an unexecuted scenario and
|
|
32
|
+
verified protection. Record the command or source location behind each status.
|
|
33
|
+
5. Prioritize by consequence and plausible exposure, with reasons. Propose the
|
|
34
|
+
smallest regression check or design decision for each material gap. If the user
|
|
35
|
+
requested fixes, carry those out within scope using the implementation workflow;
|
|
36
|
+
a list of cases by itself does not establish a fix.
|
|
21
37
|
|
|
22
|
-
##
|
|
38
|
+
## Output
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
The common report includes a boundary map and a scenario table:
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- Identify content type (diff, full file, or function) to determine scope rules
|
|
42
|
+
| Scenario | Initial state and trigger | Expected behavior | Evidence/status | Impact | Next check |
|
|
43
|
+
| --- | --- | --- | --- | --- | --- |
|
|
29
44
|
|
|
30
|
-
|
|
45
|
+
Include invariant violations separately from preferred UX improvements. Record
|
|
46
|
+
cases excluded by inspected constraints and any unavailable execution capability.
|
|
31
47
|
|
|
32
|
-
|
|
48
|
+
## Acceptance and continuation
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Step 3: Validate Completeness
|
|
40
|
-
|
|
41
|
-
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
42
|
-
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
43
|
-
|
|
44
|
-
### Step 4: Present Findings
|
|
45
|
-
|
|
46
|
-
Output findings as a JSON array following the Output Format specification exactly.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## OUTPUT FORMAT
|
|
50
|
-
|
|
51
|
-
Return ONLY a valid JSON array of objects. Each object must contain exactly these four fields and nothing else:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
[{
|
|
55
|
-
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
56
|
-
"trigger_condition": "one-line description (max 15 words)",
|
|
57
|
-
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
58
|
-
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
59
|
-
}]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when no unhandled paths are found.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## HALT CONDITIONS
|
|
66
|
-
|
|
67
|
-
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
50
|
+
Each retained case can become an observable check. Reproduced defects include
|
|
51
|
+
reproduction evidence; unrun cases are labeled accurately. On resume, compare
|
|
52
|
+
changed interfaces and invariants, rerun affected checks and preserve evidence for
|
|
53
|
+
closed cases. Do not mark the whole feature robust because a sample passed.
|