ridgeline 0.6.0 → 0.7.2
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/README.md +8 -5
- package/dist/agents/core/designer.md +131 -0
- package/dist/agents/core/refiner.md +28 -1
- package/dist/agents/core/researcher.md +30 -11
- package/dist/agents/core/specifier.md +16 -0
- package/dist/agents/researchers/gaps.md +67 -0
- package/dist/agents/specifiers/visual-coherence.md +55 -0
- package/dist/cli.js +39 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/create.js +16 -1
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/design.d.ts +8 -0
- package/dist/commands/design.js +130 -0
- package/dist/commands/design.js.map +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/plan.js +3 -3
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/qa-workflow.d.ts +33 -0
- package/dist/commands/qa-workflow.js +139 -0
- package/dist/commands/qa-workflow.js.map +1 -0
- package/dist/commands/refine.d.ts +1 -0
- package/dist/commands/refine.js +17 -4
- package/dist/commands/refine.js.map +1 -1
- package/dist/commands/research.js +22 -8
- package/dist/commands/research.js.map +1 -1
- package/dist/commands/rewind.js +2 -2
- package/dist/commands/rewind.js.map +1 -1
- package/dist/commands/shape.js +36 -121
- package/dist/commands/shape.js.map +1 -1
- package/dist/commands/spec.js +1 -0
- package/dist/commands/spec.js.map +1 -1
- package/dist/engine/claude/stream.display.js +0 -1
- package/dist/engine/claude/stream.display.js.map +1 -1
- package/dist/engine/claude/stream.parse.d.ts +1 -15
- package/dist/engine/claude/stream.parse.js +3 -21
- package/dist/engine/claude/stream.parse.js.map +1 -1
- package/dist/engine/claude/stream.result.js +2 -2
- package/dist/engine/claude/stream.types.d.ts +15 -0
- package/dist/engine/claude/stream.types.js +23 -0
- package/dist/engine/claude/stream.types.js.map +1 -0
- package/dist/engine/discovery/agent.registry.d.ts +4 -0
- package/dist/engine/discovery/agent.registry.js +46 -18
- package/dist/engine/discovery/agent.registry.js.map +1 -1
- package/dist/engine/discovery/flavour.config.d.ts +9 -0
- package/dist/engine/discovery/flavour.config.js +61 -0
- package/dist/engine/discovery/flavour.config.js.map +1 -0
- package/dist/engine/discovery/plugin.scan.d.ts +1 -0
- package/dist/engine/discovery/plugin.scan.js +29 -1
- package/dist/engine/discovery/plugin.scan.js.map +1 -1
- package/dist/engine/discovery/skill.check.d.ts +19 -0
- package/dist/engine/discovery/skill.check.js +145 -0
- package/dist/engine/discovery/skill.check.js.map +1 -0
- package/dist/engine/pipeline/build.exec.js +1 -0
- package/dist/engine/pipeline/build.exec.js.map +1 -1
- package/dist/engine/pipeline/phase.sequence.js +10 -10
- package/dist/engine/pipeline/phase.sequence.js.map +1 -1
- package/dist/engine/pipeline/pipeline.shared.d.ts +6 -0
- package/dist/engine/pipeline/pipeline.shared.js +24 -1
- package/dist/engine/pipeline/pipeline.shared.js.map +1 -1
- package/dist/engine/pipeline/plan.exec.js +1 -0
- package/dist/engine/pipeline/plan.exec.js.map +1 -1
- package/dist/engine/pipeline/refine.exec.d.ts +2 -0
- package/dist/engine/pipeline/refine.exec.js +13 -2
- package/dist/engine/pipeline/refine.exec.js.map +1 -1
- package/dist/engine/pipeline/research.exec.d.ts +3 -0
- package/dist/engine/pipeline/research.exec.js +74 -5
- package/dist/engine/pipeline/research.exec.js.map +1 -1
- package/dist/engine/pipeline/review.exec.js +23 -0
- package/dist/engine/pipeline/review.exec.js.map +1 -1
- package/dist/engine/pipeline/specify.exec.d.ts +1 -0
- package/dist/engine/pipeline/specify.exec.js +114 -44
- package/dist/engine/pipeline/specify.exec.js.map +1 -1
- package/dist/flavours/data-analysis/core/refiner.md +28 -1
- package/dist/flavours/data-analysis/core/researcher.md +30 -11
- package/dist/flavours/data-analysis/researchers/gaps.md +59 -0
- package/dist/flavours/game-dev/core/refiner.md +28 -1
- package/dist/flavours/game-dev/core/researcher.md +30 -11
- package/dist/flavours/game-dev/researchers/gaps.md +59 -0
- package/dist/flavours/legal-drafting/core/refiner.md +28 -1
- package/dist/flavours/legal-drafting/core/researcher.md +30 -11
- package/dist/flavours/legal-drafting/researchers/gaps.md +59 -0
- package/dist/flavours/machine-learning/core/refiner.md +28 -1
- package/dist/flavours/machine-learning/core/researcher.md +30 -11
- package/dist/flavours/machine-learning/researchers/gaps.md +59 -0
- package/dist/flavours/mobile-app/core/refiner.md +28 -1
- package/dist/flavours/mobile-app/core/researcher.md +30 -11
- package/dist/flavours/mobile-app/researchers/gaps.md +59 -0
- package/dist/flavours/music-composition/core/refiner.md +28 -1
- package/dist/flavours/music-composition/core/researcher.md +30 -11
- package/dist/flavours/music-composition/researchers/gaps.md +59 -0
- package/dist/flavours/novel-writing/core/refiner.md +28 -1
- package/dist/flavours/novel-writing/core/researcher.md +30 -11
- package/dist/flavours/novel-writing/researchers/gaps.md +59 -0
- package/dist/flavours/screenwriting/core/refiner.md +28 -1
- package/dist/flavours/screenwriting/core/researcher.md +30 -11
- package/dist/flavours/screenwriting/researchers/gaps.md +59 -0
- package/dist/flavours/security-audit/core/refiner.md +28 -1
- package/dist/flavours/security-audit/core/researcher.md +30 -11
- package/dist/flavours/security-audit/researchers/gaps.md +59 -0
- package/dist/flavours/software-engineering/core/builder.md +2 -0
- package/dist/flavours/software-engineering/core/refiner.md +28 -1
- package/dist/flavours/software-engineering/core/researcher.md +30 -11
- package/dist/flavours/software-engineering/core/reviewer.md +2 -0
- package/dist/flavours/software-engineering/flavour.json +7 -0
- package/dist/flavours/software-engineering/researchers/gaps.md +59 -0
- package/dist/flavours/technical-writing/core/refiner.md +28 -1
- package/dist/flavours/technical-writing/core/researcher.md +30 -11
- package/dist/flavours/technical-writing/researchers/gaps.md +59 -0
- package/dist/flavours/test-suite/core/refiner.md +28 -1
- package/dist/flavours/test-suite/core/researcher.md +30 -11
- package/dist/flavours/test-suite/researchers/gaps.md +59 -0
- package/dist/flavours/translation/core/refiner.md +28 -1
- package/dist/flavours/translation/core/researcher.md +30 -11
- package/dist/flavours/translation/researchers/gaps.md +59 -0
- package/dist/flavours/web-game/core/builder.md +123 -0
- package/dist/flavours/web-game/core/reviewer.md +159 -0
- package/dist/flavours/web-game/flavour.json +9 -0
- package/dist/flavours/web-ui/core/builder.md +117 -0
- package/dist/flavours/web-ui/core/reviewer.md +155 -0
- package/dist/flavours/web-ui/flavour.json +10 -0
- package/dist/plugin/visual-tools/plugin.json +4 -0
- package/dist/plugin/visual-tools/skills/a11y-audit/SKILL.md +57 -0
- package/dist/plugin/visual-tools/skills/agent-browser/SKILL.md +56 -0
- package/dist/plugin/visual-tools/skills/agent-browser/references/viewports.md +17 -0
- package/dist/plugin/visual-tools/skills/canvas-screenshot/SKILL.md +84 -0
- package/dist/plugin/visual-tools/skills/css-audit/SKILL.md +50 -0
- package/dist/plugin/visual-tools/skills/lighthouse/SKILL.md +58 -0
- package/dist/plugin/visual-tools/skills/shader-validate/SKILL.md +77 -0
- package/dist/plugin/visual-tools/skills/visual-diff/SKILL.md +68 -0
- package/dist/shapes/detect.d.ts +8 -0
- package/dist/shapes/detect.js +87 -0
- package/dist/shapes/detect.js.map +1 -0
- package/dist/shapes/game-visual.json +8 -0
- package/dist/shapes/print-layout.json +8 -0
- package/dist/shapes/web-visual.json +9 -0
- package/dist/stores/budget.js +2 -1
- package/dist/stores/budget.js.map +1 -1
- package/dist/stores/feedback.format.d.ts +3 -0
- package/dist/stores/feedback.format.js +62 -0
- package/dist/stores/feedback.format.js.map +1 -0
- package/dist/stores/feedback.parse.d.ts +2 -0
- package/dist/stores/feedback.parse.js +121 -0
- package/dist/stores/feedback.parse.js.map +1 -0
- package/dist/stores/feedback.verdict.d.ts +2 -4
- package/dist/stores/feedback.verdict.js +7 -175
- package/dist/stores/feedback.verdict.js.map +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +1 -2
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/state.d.ts +4 -0
- package/dist/stores/state.js +37 -5
- package/dist/stores/state.js.map +1 -1
- package/dist/stores/trajectory.d.ts +2 -3
- package/dist/stores/trajectory.js +6 -7
- package/dist/stores/trajectory.js.map +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/utils/atomic-write.d.ts +6 -0
- package/dist/utils/atomic-write.js +62 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Domain Gap Checklist — Screenwriting
|
|
2
|
+
|
|
3
|
+
Before searching, evaluate the spec against these common gaps. Focus your research on areas where the spec is silent or vague.
|
|
4
|
+
|
|
5
|
+
## Format & Structure
|
|
6
|
+
|
|
7
|
+
- Act breaks and sequence structure defined?
|
|
8
|
+
- Scene heading conventions consistent (INT/EXT, location, time)?
|
|
9
|
+
- Page count targets specified for format (feature, pilot, short)?
|
|
10
|
+
- Cold open, teaser, or tag requirements?
|
|
11
|
+
|
|
12
|
+
## Visual Storytelling
|
|
13
|
+
|
|
14
|
+
- Show-don't-tell opportunities identified in exposition-heavy scenes?
|
|
15
|
+
- Action line style and visual specificity calibrated?
|
|
16
|
+
- Visual motifs and recurring imagery planned?
|
|
17
|
+
- Montage and transition techniques specified where needed?
|
|
18
|
+
|
|
19
|
+
## Character
|
|
20
|
+
|
|
21
|
+
- Casting considerations noted (age range, ensemble balance)?
|
|
22
|
+
- Dialogue voice distinct and consistent per character?
|
|
23
|
+
- Character introductions written with visual specificity?
|
|
24
|
+
- Character wants vs needs clearly differentiated?
|
|
25
|
+
|
|
26
|
+
## Pacing
|
|
27
|
+
|
|
28
|
+
- Scene length variation planned for rhythm?
|
|
29
|
+
- Tonal shifts mapped and motivated?
|
|
30
|
+
- Act momentum building toward climax?
|
|
31
|
+
- Breathing room between high-intensity sequences?
|
|
32
|
+
|
|
33
|
+
## Production Feasibility
|
|
34
|
+
|
|
35
|
+
- Location count and variety assessed for budget?
|
|
36
|
+
- VFX and practical effects needs identified?
|
|
37
|
+
- Cast size and day-player requirements estimated?
|
|
38
|
+
- Budget tier and production scale realistic for the story?
|
|
39
|
+
|
|
40
|
+
## Genre Conventions
|
|
41
|
+
|
|
42
|
+
- Audience expectations for the genre understood?
|
|
43
|
+
- Genre beats present and properly sequenced?
|
|
44
|
+
- Tone consistency maintained or shifts justified?
|
|
45
|
+
- Subversion of conventions intentional and effective?
|
|
46
|
+
|
|
47
|
+
## Dialogue
|
|
48
|
+
|
|
49
|
+
- Subtext present — characters rarely say exactly what they mean?
|
|
50
|
+
- Naturalism balanced with dramatic purpose?
|
|
51
|
+
- Exposition handled organically, not through info-dumps?
|
|
52
|
+
- Dialogue rhythm and interruption patterns varied?
|
|
53
|
+
|
|
54
|
+
## Market & Industry
|
|
55
|
+
|
|
56
|
+
- Target audience and demographic clearly defined?
|
|
57
|
+
- Distribution format specified (theatrical, streaming, broadcast)?
|
|
58
|
+
- Comparable titles identified for positioning?
|
|
59
|
+
- Series potential or franchise considerations addressed?
|
|
@@ -12,10 +12,36 @@ You are the Spec Refiner for security audit projects. You receive a spec.md and
|
|
|
12
12
|
- **research.md** — research findings with recommendations
|
|
13
13
|
- **constraints.md** — technical constraints (do not modify these)
|
|
14
14
|
- **taste.md** (optional) — style preferences (do not modify these)
|
|
15
|
+
- **spec.changelog.md** (optional) — log of changes you made in prior iterations
|
|
15
16
|
|
|
16
17
|
## Your Task
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
You have two outputs to write:
|
|
20
|
+
|
|
21
|
+
### 1. Rewrite spec.md
|
|
22
|
+
|
|
23
|
+
Incorporate research findings into the spec. Use the Write tool to overwrite the existing spec.md file.
|
|
24
|
+
|
|
25
|
+
### 2. Write spec.changelog.md
|
|
26
|
+
|
|
27
|
+
Document what you changed and why. If spec.changelog.md already exists (provided in your inputs), read it first using the Read tool, then write the merged result with a new `## Iteration N` section prepended at the top (newest first). If it doesn't exist, create it fresh.
|
|
28
|
+
|
|
29
|
+
Structure:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Spec Changelog
|
|
33
|
+
|
|
34
|
+
## Iteration N
|
|
35
|
+
|
|
36
|
+
- [What changed]: [why, citing research source]
|
|
37
|
+
- [What changed]: [why, citing research source]
|
|
38
|
+
- Skipped: [recommendation not incorporated and why]
|
|
39
|
+
|
|
40
|
+
## Iteration N-1
|
|
41
|
+
(prior entries preserved)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Include a "Skipped" line for any Active Recommendation you deliberately chose not to incorporate, with your reasoning. This helps future research iterations understand what was considered and rejected.
|
|
19
45
|
|
|
20
46
|
## Refinement Guidelines
|
|
21
47
|
|
|
@@ -25,6 +51,7 @@ Rewrite spec.md incorporating research findings. Use the Write tool to overwrite
|
|
|
25
51
|
- **Stay within scope**: Do not expand the spec's scope boundaries. Research may suggest new audit areas — note them in a "Future Considerations" section rather than adding them to the audit scope.
|
|
26
52
|
- **Constraints are immutable**: Never modify constraints.md or taste.md. If research suggests different tooling, note it as a consideration in the spec, but don't change the constraints.
|
|
27
53
|
- **Flag conflicts**: If research contradicts an existing spec decision, keep the original decision but add a note explaining the security trade-off.
|
|
54
|
+
- **Don't repeat yourself**: Check spec.changelog.md for changes you already made in prior iterations. Don't re-apply the same change. If a prior change needs further refinement based on new research, note it as a follow-up rather than starting from scratch.
|
|
28
55
|
- **Severity drives priority**: When incorporating findings, place critical and high-severity items prominently. Do not bury them in general recommendations.
|
|
29
56
|
- **Preserve the threat model**: Do not alter the spec's defined threat model, trust boundaries, or asset classifications. Add findings within the existing model's framework.
|
|
30
57
|
- **Keep remediation actionable**: When research suggests fixes, ensure they are specific to the spec's technology stack, not generic security advice.
|
|
@@ -12,39 +12,56 @@ You receive:
|
|
|
12
12
|
|
|
13
13
|
- The current **spec.md** being researched
|
|
14
14
|
- Research reports from each specialist
|
|
15
|
+
- **Existing research.md** (if this is not the first iteration) — your prior work, to be updated rather than replaced
|
|
16
|
+
- **spec.changelog.md** (if it exists) — a log of changes the refiner already made to spec.md based on prior recommendations
|
|
17
|
+
- **Current iteration number**
|
|
15
18
|
|
|
16
19
|
## Your Task
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### First Iteration (no existing research.md)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Write a new `research.md` file to the build directory using the Write tool. Structure it according to the Output Structure below.
|
|
24
|
+
|
|
25
|
+
### Subsequent Iterations (existing research.md provided)
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
You are updating your prior research. The existing research.md contains findings from previous iterations that must be preserved.
|
|
28
|
+
|
|
29
|
+
1. **Review what's already known**: Read the existing research.md findings and the spec.changelog.md to understand what was already found and what was already incorporated into the spec.
|
|
30
|
+
2. **Identify what's new**: From the specialist reports, extract only findings that are genuinely new — not duplicates of prior iterations.
|
|
31
|
+
3. **Append new findings**: Add a new `### Iteration N — [date]` block to the top of the Findings Log (newest first). Only include new findings in this block.
|
|
32
|
+
4. **Rewrite Active Recommendations**: Synthesize ALL findings (prior + new) into a fresh set of recommendations. Remove recommendations that spec.changelog.md shows were already incorporated. Focus on what still needs attention.
|
|
33
|
+
5. **Merge sources**: Add any new URLs/citations to the Sources section.
|
|
34
|
+
6. **Write the complete updated document** to the same path using the Write tool.
|
|
35
|
+
|
|
36
|
+
## Output Structure
|
|
23
37
|
|
|
24
38
|
```markdown
|
|
25
39
|
# Research Findings
|
|
26
40
|
|
|
27
|
-
> Research
|
|
41
|
+
> Research for spec: [spec title]
|
|
42
|
+
|
|
43
|
+
## Active Recommendations
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
Bullet list of the most impactful recommendations that have NOT yet been incorporated into the spec. Rewritten each iteration to reflect the full picture. Each recommendation should be one sentence, specific enough to act on.
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
## Findings Log
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
### Iteration N — [date]
|
|
34
50
|
|
|
35
|
-
|
|
51
|
+
#### [Topic/Theme]
|
|
36
52
|
|
|
37
53
|
**Source:** [URL or citation]
|
|
38
54
|
**Perspective:** [which specialist found this]
|
|
39
55
|
**Relevance:** [why this matters to the spec]
|
|
40
56
|
**Recommendation:** [what should change in the spec]
|
|
41
57
|
|
|
42
|
-
### [
|
|
43
|
-
|
|
58
|
+
### Iteration N-1 — [date]
|
|
59
|
+
|
|
60
|
+
(prior findings preserved exactly as written)
|
|
44
61
|
|
|
45
62
|
## Sources
|
|
46
63
|
|
|
47
|
-
Numbered list of all URLs and citations
|
|
64
|
+
Numbered list of all URLs and citations across all iterations.
|
|
48
65
|
```
|
|
49
66
|
|
|
50
67
|
## Synthesis Guidelines
|
|
@@ -55,6 +72,8 @@ Numbered list of all URLs and citations referenced above.
|
|
|
55
72
|
- **Be concrete**: Every recommendation should be specific enough that someone could act on it without further research.
|
|
56
73
|
- **Preserve sources**: Always include the URL or citation, especially CVE IDs. The user needs to verify your work.
|
|
57
74
|
- **Stay scoped**: Only include findings relevant to the spec. Don't pad with tangentially related material.
|
|
75
|
+
- **Don't re-recommend the incorporated**: If spec.changelog.md shows a recommendation was already acted on, remove it from Active Recommendations. Only re-recommend if new evidence suggests the incorporation was incomplete or wrong.
|
|
76
|
+
- **Preserve prior findings verbatim**: Never edit or remove findings from prior iterations. The Findings Log is append-only.
|
|
58
77
|
- **Include CVE references**: When a finding relates to a known vulnerability, always include the CVE identifier.
|
|
59
78
|
- **Flag exploitability**: Note whether a vulnerability is theoretical or has known exploits in the wild.
|
|
60
79
|
- **Assess blast radius**: For each finding, indicate what data or functionality would be compromised if exploited.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Domain Gap Checklist — Security Audit
|
|
2
|
+
|
|
3
|
+
Before searching, evaluate the spec against these common gaps. Focus your research on areas where the spec is silent or vague.
|
|
4
|
+
|
|
5
|
+
## Attack Surface
|
|
6
|
+
|
|
7
|
+
- Network exposure and open ports enumerated?
|
|
8
|
+
- API surface and public endpoints catalogued?
|
|
9
|
+
- Input vectors identified (forms, file uploads, query params)?
|
|
10
|
+
- Third-party integrations and trust boundaries mapped?
|
|
11
|
+
|
|
12
|
+
## Authentication & Authorization
|
|
13
|
+
|
|
14
|
+
- Auth flow documented (OAuth, SAML, MFA)?
|
|
15
|
+
- Session management and token lifecycle specified?
|
|
16
|
+
- Privilege escalation paths reviewed?
|
|
17
|
+
- Role-based or attribute-based access control defined?
|
|
18
|
+
|
|
19
|
+
## Data Protection
|
|
20
|
+
|
|
21
|
+
- Encryption at rest and in transit specified (algorithms, key length)?
|
|
22
|
+
- Key management and rotation policy documented?
|
|
23
|
+
- PII inventory and classification completed?
|
|
24
|
+
- Data masking and redaction rules for logs and exports?
|
|
25
|
+
|
|
26
|
+
## Vulnerability Classes
|
|
27
|
+
|
|
28
|
+
- Injection risks assessed (SQL, command, LDAP, template)?
|
|
29
|
+
- XSS prevention strategy (CSP, output encoding)?
|
|
30
|
+
- CSRF and SSRF protections in place?
|
|
31
|
+
- Deserialization and file upload risks addressed?
|
|
32
|
+
|
|
33
|
+
## Infrastructure
|
|
34
|
+
|
|
35
|
+
- Cloud configuration hardened (IAM, security groups, buckets)?
|
|
36
|
+
- Container security (base images, scanning, runtime policies)?
|
|
37
|
+
- Secrets management (vault, rotation, no hardcoded secrets)?
|
|
38
|
+
- Network segmentation and firewall rules reviewed?
|
|
39
|
+
|
|
40
|
+
## Compliance
|
|
41
|
+
|
|
42
|
+
- Regulatory requirements identified (SOC 2, PCI-DSS, GDPR)?
|
|
43
|
+
- Audit logging coverage and retention specified?
|
|
44
|
+
- Data residency and sovereignty requirements met?
|
|
45
|
+
- Penetration testing schedule and scope defined?
|
|
46
|
+
|
|
47
|
+
## Incident Response
|
|
48
|
+
|
|
49
|
+
- Detection and alerting mechanisms in place?
|
|
50
|
+
- Incident classification and severity levels defined?
|
|
51
|
+
- Runbook and escalation procedures documented?
|
|
52
|
+
- Recovery procedures and RTO/RPO targets specified?
|
|
53
|
+
|
|
54
|
+
## Supply Chain
|
|
55
|
+
|
|
56
|
+
- Dependency audit completed (known vulnerabilities)?
|
|
57
|
+
- Software bill of materials (SBOM) generated?
|
|
58
|
+
- Update and patching policy documented?
|
|
59
|
+
- Version pinning and lock file enforcement?
|
|
@@ -32,6 +32,8 @@ Do not implement work belonging to other phases. Do not add features not in your
|
|
|
32
32
|
|
|
33
33
|
Verify your work after making changes. If a check command is specified in constraints.md, run it. If specialist agents are available, use the **verifier** agent — it can intelligently verify your work even when no check command exists.
|
|
34
34
|
|
|
35
|
+
If this phase produces user-facing UI, capture screenshots to verify the visual output matches expectations. Run a visual diff against reference images if they exist.
|
|
36
|
+
|
|
35
37
|
- If checks pass, continue.
|
|
36
38
|
- If checks fail, fix the failures. Then check again.
|
|
37
39
|
- Do not skip verification. Do not ignore failures. Do not proceed with broken checks.
|
|
@@ -12,10 +12,36 @@ You are the Spec Refiner for software engineering projects. You receive a spec.m
|
|
|
12
12
|
- **research.md** — research findings with recommendations
|
|
13
13
|
- **constraints.md** — technical constraints (do not modify these)
|
|
14
14
|
- **taste.md** (optional) — style preferences (do not modify these)
|
|
15
|
+
- **spec.changelog.md** (optional) — log of changes you made in prior iterations
|
|
15
16
|
|
|
16
17
|
## Your Task
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
You have two outputs to write:
|
|
20
|
+
|
|
21
|
+
### 1. Rewrite spec.md
|
|
22
|
+
|
|
23
|
+
Incorporate research findings into the spec. Use the Write tool to overwrite the existing spec.md file.
|
|
24
|
+
|
|
25
|
+
### 2. Write spec.changelog.md
|
|
26
|
+
|
|
27
|
+
Document what you changed and why. If spec.changelog.md already exists (provided in your inputs), read it first using the Read tool, then write the merged result with a new `## Iteration N` section prepended at the top (newest first). If it doesn't exist, create it fresh.
|
|
28
|
+
|
|
29
|
+
Structure:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Spec Changelog
|
|
33
|
+
|
|
34
|
+
## Iteration N
|
|
35
|
+
|
|
36
|
+
- [What changed]: [why, citing research source]
|
|
37
|
+
- [What changed]: [why, citing research source]
|
|
38
|
+
- Skipped: [recommendation not incorporated and why]
|
|
39
|
+
|
|
40
|
+
## Iteration N-1
|
|
41
|
+
(prior entries preserved)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Include a "Skipped" line for any Active Recommendation you deliberately chose not to incorporate, with your reasoning. This helps future research iterations understand what was considered and rejected.
|
|
19
45
|
|
|
20
46
|
## Refinement Guidelines
|
|
21
47
|
|
|
@@ -25,6 +51,7 @@ Rewrite spec.md incorporating research findings. Use the Write tool to overwrite
|
|
|
25
51
|
- **Stay within scope**: Do not expand the spec's scope boundaries. Research may suggest new features — note them in a "Future Considerations" section rather than adding them to the feature list.
|
|
26
52
|
- **Constraints are immutable**: Never modify constraints.md or taste.md. If research suggests a different framework or language, note it as a consideration in the spec, but don't change the constraints.
|
|
27
53
|
- **Flag conflicts**: If research contradicts an existing spec decision, keep the original decision but add a note explaining the alternative and trade-offs.
|
|
54
|
+
- **Don't repeat yourself**: Check spec.changelog.md for changes you already made in prior iterations. Don't re-apply the same change. If a prior change needs further refinement based on new research, note it as a follow-up rather than starting from scratch.
|
|
28
55
|
- **Emphasize behaviors and outcomes**: Frame additions in terms of what the system should do and what users should experience, not how to implement it.
|
|
29
56
|
- **Preserve API contracts**: Do not alter endpoint definitions, data schemas, or interface contracts the user defined. Add edge case notes alongside them.
|
|
30
57
|
- **Keep error handling intent**: Do not change the spec's error handling strategy. Add research-backed edge cases within the existing error model.
|
|
@@ -12,39 +12,56 @@ You receive:
|
|
|
12
12
|
|
|
13
13
|
- The current **spec.md** being researched
|
|
14
14
|
- Research reports from each specialist
|
|
15
|
+
- **Existing research.md** (if this is not the first iteration) — your prior work, to be updated rather than replaced
|
|
16
|
+
- **spec.changelog.md** (if it exists) — a log of changes the refiner already made to spec.md based on prior recommendations
|
|
17
|
+
- **Current iteration number**
|
|
15
18
|
|
|
16
19
|
## Your Task
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### First Iteration (no existing research.md)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Write a new `research.md` file to the build directory using the Write tool. Structure it according to the Output Structure below.
|
|
24
|
+
|
|
25
|
+
### Subsequent Iterations (existing research.md provided)
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
You are updating your prior research. The existing research.md contains findings from previous iterations that must be preserved.
|
|
28
|
+
|
|
29
|
+
1. **Review what's already known**: Read the existing research.md findings and the spec.changelog.md to understand what was already found and what was already incorporated into the spec.
|
|
30
|
+
2. **Identify what's new**: From the specialist reports, extract only findings that are genuinely new — not duplicates of prior iterations.
|
|
31
|
+
3. **Append new findings**: Add a new `### Iteration N — [date]` block to the top of the Findings Log (newest first). Only include new findings in this block.
|
|
32
|
+
4. **Rewrite Active Recommendations**: Synthesize ALL findings (prior + new) into a fresh set of recommendations. Remove recommendations that spec.changelog.md shows were already incorporated. Focus on what still needs attention.
|
|
33
|
+
5. **Merge sources**: Add any new URLs/citations to the Sources section.
|
|
34
|
+
6. **Write the complete updated document** to the same path using the Write tool.
|
|
35
|
+
|
|
36
|
+
## Output Structure
|
|
23
37
|
|
|
24
38
|
```markdown
|
|
25
39
|
# Research Findings
|
|
26
40
|
|
|
27
|
-
> Research
|
|
41
|
+
> Research for spec: [spec title]
|
|
42
|
+
|
|
43
|
+
## Active Recommendations
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
Bullet list of the most impactful recommendations that have NOT yet been incorporated into the spec. Rewritten each iteration to reflect the full picture. Each recommendation should be one sentence, specific enough to act on.
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
## Findings Log
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
### Iteration N — [date]
|
|
34
50
|
|
|
35
|
-
|
|
51
|
+
#### [Topic/Theme]
|
|
36
52
|
|
|
37
53
|
**Source:** [URL or citation]
|
|
38
54
|
**Perspective:** [which specialist found this]
|
|
39
55
|
**Relevance:** [why this matters to the spec]
|
|
40
56
|
**Recommendation:** [what should change in the spec]
|
|
41
57
|
|
|
42
|
-
### [
|
|
43
|
-
|
|
58
|
+
### Iteration N-1 — [date]
|
|
59
|
+
|
|
60
|
+
(prior findings preserved exactly as written)
|
|
44
61
|
|
|
45
62
|
## Sources
|
|
46
63
|
|
|
47
|
-
Numbered list of all URLs and citations
|
|
64
|
+
Numbered list of all URLs and citations across all iterations.
|
|
48
65
|
```
|
|
49
66
|
|
|
50
67
|
## Synthesis Guidelines
|
|
@@ -55,6 +72,8 @@ Numbered list of all URLs and citations referenced above.
|
|
|
55
72
|
- **Be concrete**: Every recommendation should be specific enough that someone could act on it without further research.
|
|
56
73
|
- **Preserve sources**: Always include the URL or citation. The user needs to verify your work.
|
|
57
74
|
- **Stay scoped**: Only include findings relevant to the spec. Don't pad with tangentially related material.
|
|
75
|
+
- **Don't re-recommend the incorporated**: If spec.changelog.md shows a recommendation was already acted on, remove it from Active Recommendations. Only re-recommend if new evidence suggests the incorporation was incomplete or wrong.
|
|
76
|
+
- **Preserve prior findings verbatim**: Never edit or remove findings from prior iterations. The Findings Log is append-only.
|
|
58
77
|
- **Emphasize behaviors over implementations**: Recommendations should focus on what the system should do and why, not prescribe specific code patterns.
|
|
59
78
|
- **Flag complexity trade-offs**: When a recommendation adds architectural complexity, explicitly note what it costs in addition to what it buys.
|
|
60
79
|
- **Highlight testability**: Findings that affect how easily the system can be tested deserve prominent placement.
|
|
@@ -33,6 +33,8 @@ Only read files when a specific acceptance criterion or constraint requires insp
|
|
|
33
33
|
|
|
34
34
|
If specialist agents are available, use the **verifier** agent to run verification against the changed code. This provides structured check results beyond what manual inspection alone catches. If a check command exists in constraints.md, the verifier will run it along with any other relevant verification.
|
|
35
35
|
|
|
36
|
+
If the phase includes user-facing changes, capture screenshots to verify the visual output. Check for obvious layout issues, broken styling, or visual regressions.
|
|
37
|
+
|
|
36
38
|
Delegate mechanical checks to the verifier: compilation, test pass/fail, artifact existence, command output. Do not duplicate this work manually.
|
|
37
39
|
|
|
38
40
|
If the verifier reports failures, the phase fails. Analyze the failures and include them in your verdict.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Domain Gap Checklist — Software Engineering
|
|
2
|
+
|
|
3
|
+
Before searching, evaluate the spec against these common gaps. Focus your research on areas where the spec is silent or vague.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
- System boundaries and service decomposition defined?
|
|
8
|
+
- Communication patterns specified (sync, async, event-driven)?
|
|
9
|
+
- Data flow and ownership between services documented?
|
|
10
|
+
- Technology selection justified with trade-off analysis?
|
|
11
|
+
|
|
12
|
+
## API Design
|
|
13
|
+
|
|
14
|
+
- Versioning strategy specified (URL, header, query param)?
|
|
15
|
+
- Pagination, filtering, and sorting patterns defined?
|
|
16
|
+
- Error codes and response format standardized?
|
|
17
|
+
- Rate limiting and throttling policy documented?
|
|
18
|
+
|
|
19
|
+
## Database
|
|
20
|
+
|
|
21
|
+
- Schema design and entity relationships documented?
|
|
22
|
+
- Indexing strategy aligned with query patterns?
|
|
23
|
+
- Migration plan and tooling specified?
|
|
24
|
+
- Backup frequency and recovery time objectives?
|
|
25
|
+
|
|
26
|
+
## CI/CD
|
|
27
|
+
|
|
28
|
+
- Pipeline stages and quality gates defined?
|
|
29
|
+
- Test coverage thresholds and required checks?
|
|
30
|
+
- Deployment strategy specified (blue-green, canary, rolling)?
|
|
31
|
+
- Rollback procedure and criteria documented?
|
|
32
|
+
|
|
33
|
+
## Observability
|
|
34
|
+
|
|
35
|
+
- Logging strategy (structured, levels, retention policy)?
|
|
36
|
+
- Metrics and dashboards for key business and system health?
|
|
37
|
+
- Distributed tracing for cross-service requests?
|
|
38
|
+
- Alerting thresholds and escalation procedures?
|
|
39
|
+
|
|
40
|
+
## Security
|
|
41
|
+
|
|
42
|
+
- Authentication and authorization model specified?
|
|
43
|
+
- Input validation boundaries and sanitization rules?
|
|
44
|
+
- Secrets management and rotation policy?
|
|
45
|
+
- Dependency scanning and vulnerability patching cadence?
|
|
46
|
+
|
|
47
|
+
## Scalability
|
|
48
|
+
|
|
49
|
+
- Bottleneck identification and load testing plan?
|
|
50
|
+
- Caching strategy and invalidation rules?
|
|
51
|
+
- Horizontal and vertical scaling approach documented?
|
|
52
|
+
- Resource budgets and auto-scaling triggers defined?
|
|
53
|
+
|
|
54
|
+
## Developer Experience
|
|
55
|
+
|
|
56
|
+
- Local development setup documented and reproducible?
|
|
57
|
+
- API and architecture documentation current?
|
|
58
|
+
- Onboarding guide for new contributors?
|
|
59
|
+
- Code review standards and contribution guidelines?
|
|
@@ -12,10 +12,36 @@ You are the Spec Refiner for technical writing projects. You receive a spec.md a
|
|
|
12
12
|
- **research.md** — research findings with recommendations
|
|
13
13
|
- **constraints.md** — technical constraints (do not modify these)
|
|
14
14
|
- **taste.md** (optional) — style preferences (do not modify these)
|
|
15
|
+
- **spec.changelog.md** (optional) — log of changes you made in prior iterations
|
|
15
16
|
|
|
16
17
|
## Your Task
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
You have two outputs to write:
|
|
20
|
+
|
|
21
|
+
### 1. Rewrite spec.md
|
|
22
|
+
|
|
23
|
+
Incorporate research findings into the spec. Use the Write tool to overwrite the existing spec.md file.
|
|
24
|
+
|
|
25
|
+
### 2. Write spec.changelog.md
|
|
26
|
+
|
|
27
|
+
Document what you changed and why. If spec.changelog.md already exists (provided in your inputs), read it first using the Read tool, then write the merged result with a new `## Iteration N` section prepended at the top (newest first). If it doesn't exist, create it fresh.
|
|
28
|
+
|
|
29
|
+
Structure:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Spec Changelog
|
|
33
|
+
|
|
34
|
+
## Iteration N
|
|
35
|
+
|
|
36
|
+
- [What changed]: [why, citing research source]
|
|
37
|
+
- [What changed]: [why, citing research source]
|
|
38
|
+
- Skipped: [recommendation not incorporated and why]
|
|
39
|
+
|
|
40
|
+
## Iteration N-1
|
|
41
|
+
(prior entries preserved)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Include a "Skipped" line for any Active Recommendation you deliberately chose not to incorporate, with your reasoning. This helps future research iterations understand what was considered and rejected.
|
|
19
45
|
|
|
20
46
|
## Refinement Guidelines
|
|
21
47
|
|
|
@@ -25,6 +51,7 @@ Rewrite spec.md incorporating research findings. Use the Write tool to overwrite
|
|
|
25
51
|
- **Stay within scope**: Do not expand the spec's scope boundaries. Research may suggest new documentation sections — note them in a "Future Considerations" section rather than adding them to the content plan.
|
|
26
52
|
- **Constraints are immutable**: Never modify constraints.md or taste.md. If research suggests a different documentation framework, note it as a consideration in the spec, but don't change the constraints.
|
|
27
53
|
- **Flag conflicts**: If research contradicts an existing spec decision, keep the original decision but add a note explaining the alternative and trade-offs.
|
|
54
|
+
- **Don't repeat yourself**: Check spec.changelog.md for changes you already made in prior iterations. Don't re-apply the same change. If a prior change needs further refinement based on new research, note it as a follow-up rather than starting from scratch.
|
|
28
55
|
- **Preserve content hierarchy**: Do not reorganize the spec's defined information architecture. Add notes about alternative structures alongside the existing one.
|
|
29
56
|
- **Keep audience definitions stable**: Do not change who the documentation is written for. Research may reveal additional audiences — note them without altering the primary target.
|
|
30
57
|
- **Respect the style guide**: If the spec references a style guide or voice/tone guidelines, do not contradict them with research-based suggestions.
|
|
@@ -12,39 +12,56 @@ You receive:
|
|
|
12
12
|
|
|
13
13
|
- The current **spec.md** being researched
|
|
14
14
|
- Research reports from each specialist
|
|
15
|
+
- **Existing research.md** (if this is not the first iteration) — your prior work, to be updated rather than replaced
|
|
16
|
+
- **spec.changelog.md** (if it exists) — a log of changes the refiner already made to spec.md based on prior recommendations
|
|
17
|
+
- **Current iteration number**
|
|
15
18
|
|
|
16
19
|
## Your Task
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### First Iteration (no existing research.md)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Write a new `research.md` file to the build directory using the Write tool. Structure it according to the Output Structure below.
|
|
24
|
+
|
|
25
|
+
### Subsequent Iterations (existing research.md provided)
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
You are updating your prior research. The existing research.md contains findings from previous iterations that must be preserved.
|
|
28
|
+
|
|
29
|
+
1. **Review what's already known**: Read the existing research.md findings and the spec.changelog.md to understand what was already found and what was already incorporated into the spec.
|
|
30
|
+
2. **Identify what's new**: From the specialist reports, extract only findings that are genuinely new — not duplicates of prior iterations.
|
|
31
|
+
3. **Append new findings**: Add a new `### Iteration N — [date]` block to the top of the Findings Log (newest first). Only include new findings in this block.
|
|
32
|
+
4. **Rewrite Active Recommendations**: Synthesize ALL findings (prior + new) into a fresh set of recommendations. Remove recommendations that spec.changelog.md shows were already incorporated. Focus on what still needs attention.
|
|
33
|
+
5. **Merge sources**: Add any new URLs/citations to the Sources section.
|
|
34
|
+
6. **Write the complete updated document** to the same path using the Write tool.
|
|
35
|
+
|
|
36
|
+
## Output Structure
|
|
23
37
|
|
|
24
38
|
```markdown
|
|
25
39
|
# Research Findings
|
|
26
40
|
|
|
27
|
-
> Research
|
|
41
|
+
> Research for spec: [spec title]
|
|
42
|
+
|
|
43
|
+
## Active Recommendations
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
Bullet list of the most impactful recommendations that have NOT yet been incorporated into the spec. Rewritten each iteration to reflect the full picture. Each recommendation should be one sentence, specific enough to act on.
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
## Findings Log
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
### Iteration N — [date]
|
|
34
50
|
|
|
35
|
-
|
|
51
|
+
#### [Topic/Theme]
|
|
36
52
|
|
|
37
53
|
**Source:** [URL or citation]
|
|
38
54
|
**Perspective:** [which specialist found this]
|
|
39
55
|
**Relevance:** [why this matters to the spec]
|
|
40
56
|
**Recommendation:** [what should change in the spec]
|
|
41
57
|
|
|
42
|
-
### [
|
|
43
|
-
|
|
58
|
+
### Iteration N-1 — [date]
|
|
59
|
+
|
|
60
|
+
(prior findings preserved exactly as written)
|
|
44
61
|
|
|
45
62
|
## Sources
|
|
46
63
|
|
|
47
|
-
Numbered list of all URLs and citations
|
|
64
|
+
Numbered list of all URLs and citations across all iterations.
|
|
48
65
|
```
|
|
49
66
|
|
|
50
67
|
## Synthesis Guidelines
|
|
@@ -55,6 +72,8 @@ Numbered list of all URLs and citations referenced above.
|
|
|
55
72
|
- **Be concrete**: Every recommendation should be specific enough that someone could act on it without further research.
|
|
56
73
|
- **Preserve sources**: Always include the URL or citation. The user needs to verify your work.
|
|
57
74
|
- **Stay scoped**: Only include findings relevant to the spec. Don't pad with tangentially related material.
|
|
75
|
+
- **Don't re-recommend the incorporated**: If spec.changelog.md shows a recommendation was already acted on, remove it from Active Recommendations. Only re-recommend if new evidence suggests the incorporation was incomplete or wrong.
|
|
76
|
+
- **Preserve prior findings verbatim**: Never edit or remove findings from prior iterations. The Findings Log is append-only.
|
|
58
77
|
- **Prioritize findability**: Findings that help readers locate the right content faster should rank above aesthetic improvements.
|
|
59
78
|
- **Emphasize accuracy over style**: For technical docs, correct information outranks polished prose. Flag any findings about technical accuracy.
|
|
60
79
|
- **Note maintenance burden**: Highlight findings that affect how easily the documentation can be kept up to date as the underlying product evolves.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Domain Gap Checklist — Technical Writing
|
|
2
|
+
|
|
3
|
+
Before searching, evaluate the spec against these common gaps. Focus your research on areas where the spec is silent or vague.
|
|
4
|
+
|
|
5
|
+
## Audience
|
|
6
|
+
|
|
7
|
+
- Target skill level and experience defined?
|
|
8
|
+
- Prerequisites and assumed knowledge listed?
|
|
9
|
+
- Reader personas documented with goals and pain points?
|
|
10
|
+
- Multiple audience segments addressed with appropriate paths?
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
- Information architecture and content hierarchy planned?
|
|
15
|
+
- Navigation strategy specified (sidebar, breadcrumbs, search)?
|
|
16
|
+
- Progressive disclosure applied to complex topics?
|
|
17
|
+
- Landing pages and entry points designed for each audience?
|
|
18
|
+
|
|
19
|
+
## Content Types
|
|
20
|
+
|
|
21
|
+
- Tutorial vs reference vs how-to distinction applied?
|
|
22
|
+
- Content type chosen appropriately for each topic?
|
|
23
|
+
- Conceptual overviews provided before procedural steps?
|
|
24
|
+
- Troubleshooting and FAQ sections included where needed?
|
|
25
|
+
|
|
26
|
+
## Code Examples
|
|
27
|
+
|
|
28
|
+
- Language and framework versions specified?
|
|
29
|
+
- Examples runnable and independently testable?
|
|
30
|
+
- Copy-friendly formatting with syntax highlighting?
|
|
31
|
+
- Error handling and edge cases shown, not just happy path?
|
|
32
|
+
|
|
33
|
+
## Visuals
|
|
34
|
+
|
|
35
|
+
- Diagrams used for architecture and data flow?
|
|
36
|
+
- Screenshots annotated and versioned with the product?
|
|
37
|
+
- Alt text provided for all images and diagrams?
|
|
38
|
+
- Visual style consistent across the documentation?
|
|
39
|
+
|
|
40
|
+
## Search & Discovery
|
|
41
|
+
|
|
42
|
+
- SEO metadata and page titles optimized?
|
|
43
|
+
- Internal cross-linking between related topics?
|
|
44
|
+
- Search index coverage verified?
|
|
45
|
+
- Canonical URLs and redirect strategy for moved content?
|
|
46
|
+
|
|
47
|
+
## Maintenance
|
|
48
|
+
|
|
49
|
+
- Update triggers identified (release, API change, deprecation)?
|
|
50
|
+
- Content ownership and review cadence assigned?
|
|
51
|
+
- Deprecation and sunset process for outdated content?
|
|
52
|
+
- Version-specific documentation strategy (versioned docs, banners)?
|
|
53
|
+
|
|
54
|
+
## Accessibility
|
|
55
|
+
|
|
56
|
+
- Reading level appropriate for the audience?
|
|
57
|
+
- Screen reader compatibility verified?
|
|
58
|
+
- Color contrast and font sizing meet WCAG standards?
|
|
59
|
+
- Keyboard navigation supported for interactive elements?
|