ridgeline 0.5.9 → 0.6.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/README.md +50 -9
- package/dist/agents/core/refiner.md +34 -0
- package/dist/agents/core/researcher.md +59 -0
- package/dist/agents/researchers/academic.md +27 -0
- package/dist/agents/researchers/competitive.md +28 -0
- package/dist/agents/researchers/context.md +46 -0
- package/dist/agents/researchers/ecosystem.md +28 -0
- package/dist/cli.js +52 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/create.js +5 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/refine.d.ts +7 -0
- package/dist/commands/refine.js +92 -0
- package/dist/commands/refine.js.map +1 -0
- package/dist/commands/research.d.ts +10 -0
- package/dist/commands/research.js +132 -0
- package/dist/commands/research.js.map +1 -0
- package/dist/commands/rewind.js +5 -3
- package/dist/commands/rewind.js.map +1 -1
- package/dist/engine/pipeline/ensemble.exec.d.ts +12 -1
- package/dist/engine/pipeline/ensemble.exec.js +20 -10
- package/dist/engine/pipeline/ensemble.exec.js.map +1 -1
- package/dist/engine/pipeline/refine.exec.d.ts +8 -0
- package/dist/engine/pipeline/refine.exec.js +80 -0
- package/dist/engine/pipeline/refine.exec.js.map +1 -0
- package/dist/engine/pipeline/research.exec.d.ts +14 -0
- package/dist/engine/pipeline/research.exec.js +127 -0
- package/dist/engine/pipeline/research.exec.js.map +1 -0
- package/dist/flavours/data-analysis/core/refiner.md +38 -0
- package/dist/flavours/data-analysis/core/researcher.md +62 -0
- package/dist/flavours/data-analysis/researchers/academic.md +29 -0
- package/dist/flavours/data-analysis/researchers/competitive.md +29 -0
- package/dist/flavours/data-analysis/researchers/ecosystem.md +29 -0
- package/dist/flavours/game-dev/core/refiner.md +38 -0
- package/dist/flavours/game-dev/core/researcher.md +62 -0
- package/dist/flavours/game-dev/researchers/academic.md +31 -0
- package/dist/flavours/game-dev/researchers/competitive.md +30 -0
- package/dist/flavours/game-dev/researchers/ecosystem.md +29 -0
- package/dist/flavours/legal-drafting/core/refiner.md +38 -0
- package/dist/flavours/legal-drafting/core/researcher.md +62 -0
- package/dist/flavours/legal-drafting/researchers/academic.md +31 -0
- package/dist/flavours/legal-drafting/researchers/competitive.md +31 -0
- package/dist/flavours/legal-drafting/researchers/ecosystem.md +30 -0
- package/dist/flavours/machine-learning/core/refiner.md +38 -0
- package/dist/flavours/machine-learning/core/researcher.md +62 -0
- package/dist/flavours/machine-learning/researchers/academic.md +32 -0
- package/dist/flavours/machine-learning/researchers/competitive.md +32 -0
- package/dist/flavours/machine-learning/researchers/ecosystem.md +31 -0
- package/dist/flavours/mobile-app/core/refiner.md +38 -0
- package/dist/flavours/mobile-app/core/researcher.md +62 -0
- package/dist/flavours/mobile-app/researchers/academic.md +31 -0
- package/dist/flavours/mobile-app/researchers/competitive.md +32 -0
- package/dist/flavours/mobile-app/researchers/ecosystem.md +31 -0
- package/dist/flavours/music-composition/core/refiner.md +38 -0
- package/dist/flavours/music-composition/core/researcher.md +62 -0
- package/dist/flavours/music-composition/researchers/academic.md +32 -0
- package/dist/flavours/music-composition/researchers/competitive.md +32 -0
- package/dist/flavours/music-composition/researchers/ecosystem.md +32 -0
- package/dist/flavours/novel-writing/core/refiner.md +38 -0
- package/dist/flavours/novel-writing/core/researcher.md +62 -0
- package/dist/flavours/novel-writing/researchers/academic.md +32 -0
- package/dist/flavours/novel-writing/researchers/competitive.md +32 -0
- package/dist/flavours/novel-writing/researchers/ecosystem.md +32 -0
- package/dist/flavours/screenwriting/core/refiner.md +38 -0
- package/dist/flavours/screenwriting/core/researcher.md +62 -0
- package/dist/flavours/screenwriting/researchers/academic.md +32 -0
- package/dist/flavours/screenwriting/researchers/competitive.md +32 -0
- package/dist/flavours/screenwriting/researchers/ecosystem.md +32 -0
- package/dist/flavours/security-audit/core/refiner.md +38 -0
- package/dist/flavours/security-audit/core/researcher.md +62 -0
- package/dist/flavours/security-audit/researchers/academic.md +32 -0
- package/dist/flavours/security-audit/researchers/competitive.md +32 -0
- package/dist/flavours/security-audit/researchers/ecosystem.md +32 -0
- package/dist/flavours/software-engineering/core/refiner.md +38 -0
- package/dist/flavours/software-engineering/core/researcher.md +62 -0
- package/dist/flavours/software-engineering/researchers/academic.md +32 -0
- package/dist/flavours/software-engineering/researchers/competitive.md +32 -0
- package/dist/flavours/software-engineering/researchers/ecosystem.md +32 -0
- package/dist/flavours/technical-writing/core/refiner.md +38 -0
- package/dist/flavours/technical-writing/core/researcher.md +62 -0
- package/dist/flavours/technical-writing/researchers/academic.md +32 -0
- package/dist/flavours/technical-writing/researchers/competitive.md +32 -0
- package/dist/flavours/technical-writing/researchers/ecosystem.md +32 -0
- package/dist/flavours/test-suite/core/refiner.md +38 -0
- package/dist/flavours/test-suite/core/researcher.md +62 -0
- package/dist/flavours/test-suite/researchers/academic.md +32 -0
- package/dist/flavours/test-suite/researchers/competitive.md +32 -0
- package/dist/flavours/test-suite/researchers/ecosystem.md +32 -0
- package/dist/flavours/translation/core/refiner.md +38 -0
- package/dist/flavours/translation/core/researcher.md +62 -0
- package/dist/flavours/translation/researchers/academic.md +32 -0
- package/dist/flavours/translation/researchers/competitive.md +32 -0
- package/dist/flavours/translation/researchers/ecosystem.md +32 -0
- package/dist/stores/settings.d.ts +2 -0
- package/dist/stores/settings.js +24 -1
- package/dist/stores/settings.js.map +1 -1
- package/dist/stores/state.js +41 -10
- package/dist/stores/state.js.map +1 -1
- package/dist/types.d.ts +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
Build harness for long-horizon software execution using AI agents.
|
|
6
6
|
|
|
7
7
|
Ridgeline decomposes large software ideas into phased builds using a
|
|
8
|
-
multi-agent pipeline (shaper, specifier, planner, builder,
|
|
9
|
-
the Claude CLI. It manages state through git checkpoints,
|
|
10
|
-
supports resumable execution when things go wrong.
|
|
8
|
+
multi-agent pipeline (shaper, specifier, researcher, refiner, planner, builder,
|
|
9
|
+
reviewer) driven by the Claude CLI. It manages state through git checkpoints,
|
|
10
|
+
tracks costs, and supports resumable execution when things go wrong.
|
|
11
11
|
|
|
12
12
|
## How it works
|
|
13
13
|
|
|
@@ -16,15 +16,22 @@ supports resumable execution when things go wrong.
|
|
|
16
16
|
2. **Specify** -- an ensemble of three specialist agents (completeness, clarity,
|
|
17
17
|
pragmatism) drafts spec proposals, then a synthesizer merges them into
|
|
18
18
|
`spec.md`, `constraints.md`, and optionally `taste.md`.
|
|
19
|
-
3. **
|
|
19
|
+
3. **Research** (optional) -- an ensemble of research specialists (academic,
|
|
20
|
+
ecosystem, competitive) investigates the spec using web sources, then a
|
|
21
|
+
synthesizer merges findings into `research.md`. A quick single-agent mode
|
|
22
|
+
is also available. See [Research and Refine](docs/research.md).
|
|
23
|
+
4. **Refine** (optional) -- the refiner agent rewrites `spec.md` incorporating
|
|
24
|
+
research findings. Additive by default -- adds insights without removing
|
|
25
|
+
user-authored content.
|
|
26
|
+
5. **Plan** -- an ensemble of three specialist planners (simplicity,
|
|
20
27
|
thoroughness, velocity) proposes phase decompositions, then a synthesizer
|
|
21
28
|
merges them into numbered phase files with acceptance criteria.
|
|
22
|
-
|
|
29
|
+
6. **Build** -- for each phase the builder agent implements the spec inside your
|
|
23
30
|
repo, then creates a git checkpoint.
|
|
24
|
-
|
|
31
|
+
7. **Review** -- the reviewer agent (read-only) checks the output against the
|
|
25
32
|
acceptance criteria and returns a structured verdict. On failure, the harness
|
|
26
33
|
generates a feedback file from the verdict for the builder's next attempt.
|
|
27
|
-
|
|
34
|
+
8. **Retry or advance** -- failed phases are retried up to a configurable limit;
|
|
28
35
|
passing phases hand off context to the next one.
|
|
29
36
|
|
|
30
37
|
## Install
|
|
@@ -55,6 +62,8 @@ ridgeline my-feature "Build a REST API for task management"
|
|
|
55
62
|
# Or run each stage individually
|
|
56
63
|
ridgeline shape my-feature "Build a REST API for task management"
|
|
57
64
|
ridgeline spec my-feature
|
|
65
|
+
ridgeline research my-feature --deep # optional: enrich spec with web research
|
|
66
|
+
ridgeline refine my-feature # optional: merge research into spec
|
|
58
67
|
ridgeline plan my-feature
|
|
59
68
|
ridgeline dry-run my-feature # preview before committing
|
|
60
69
|
ridgeline build my-feature
|
|
@@ -74,7 +83,8 @@ ridgeline clean
|
|
|
74
83
|
### `ridgeline [build-name] [input]` (default)
|
|
75
84
|
|
|
76
85
|
Auto-advances the build through the next incomplete pipeline stage
|
|
77
|
-
(shape → spec → plan → build
|
|
86
|
+
(shape → spec → plan → build; research and refine are opt-in). Accepts all
|
|
87
|
+
flags from the individual commands.
|
|
78
88
|
|
|
79
89
|
### `ridgeline shape [build-name] [input]`
|
|
80
90
|
|
|
@@ -86,6 +96,7 @@ path to an existing document or a natural language description.
|
|
|
86
96
|
|------|---------|-------------|
|
|
87
97
|
| `--model <name>` | `opus` | Model for shaper agent |
|
|
88
98
|
| `--timeout <minutes>` | `10` | Max duration per turn |
|
|
99
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
89
100
|
|
|
90
101
|
### `ridgeline spec [build-name]`
|
|
91
102
|
|
|
@@ -98,6 +109,33 @@ pragmatism) draft proposals in parallel, then a synthesizer merges them into
|
|
|
98
109
|
| `--model <name>` | `opus` | Model for specifier agents |
|
|
99
110
|
| `--timeout <minutes>` | `10` | Max duration per turn |
|
|
100
111
|
| `--max-budget-usd <n>` | none | Halt if cumulative cost exceeds this |
|
|
112
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
113
|
+
|
|
114
|
+
### `ridgeline research [build-name]`
|
|
115
|
+
|
|
116
|
+
Researches the spec using web sources. Produces `research.md` in the build
|
|
117
|
+
directory. Optional step between `spec` and `plan`. See
|
|
118
|
+
[Research and Refine](docs/research.md) for details.
|
|
119
|
+
|
|
120
|
+
| Flag | Default | Description |
|
|
121
|
+
|------|---------|-------------|
|
|
122
|
+
| `--model <name>` | `opus` | Model for research agents |
|
|
123
|
+
| `--timeout <minutes>` | `15` | Max duration per agent |
|
|
124
|
+
| `--max-budget-usd <n>` | none | Halt if cumulative cost exceeds this |
|
|
125
|
+
| `--deep` | off | Run full ensemble (3 specialists) instead of quick single-agent |
|
|
126
|
+
| `--auto [iterations]` | off | Auto-loop: research + refine for N iterations (default 3) |
|
|
127
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
128
|
+
|
|
129
|
+
### `ridgeline refine [build-name]`
|
|
130
|
+
|
|
131
|
+
Merges `research.md` findings into `spec.md`. Run after reviewing or editing
|
|
132
|
+
`research.md`.
|
|
133
|
+
|
|
134
|
+
| Flag | Default | Description |
|
|
135
|
+
|------|---------|-------------|
|
|
136
|
+
| `--model <name>` | `opus` | Model for refiner agent |
|
|
137
|
+
| `--timeout <minutes>` | `10` | Max duration |
|
|
138
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
101
139
|
|
|
102
140
|
### `ridgeline plan [build-name]`
|
|
103
141
|
|
|
@@ -112,6 +150,7 @@ build's `phases/` directory.
|
|
|
112
150
|
| `--timeout <minutes>` | `120` | Max planning duration |
|
|
113
151
|
| `--constraints <path>` | auto | Path to constraints file |
|
|
114
152
|
| `--taste <path>` | auto | Path to taste file |
|
|
153
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
115
154
|
|
|
116
155
|
### `ridgeline dry-run [build-name]`
|
|
117
156
|
|
|
@@ -135,6 +174,7 @@ and advance on success.
|
|
|
135
174
|
| `--taste <path>` | auto | Path to taste file |
|
|
136
175
|
| `--context <text>` | none | Extra context appended to builder and planner prompts |
|
|
137
176
|
| `--unsafe` | off | Disable sandbox auto-detection |
|
|
177
|
+
| `--flavour <name-or-path>` | none | Agent flavour: built-in name or path to custom agents |
|
|
138
178
|
|
|
139
179
|
The build command automatically resumes from the last successful phase if
|
|
140
180
|
previous state exists. Each build runs in an isolated git worktree -- completed
|
|
@@ -147,7 +187,7 @@ Resets pipeline state to a given stage and deletes downstream artifacts.
|
|
|
147
187
|
|
|
148
188
|
| Flag | Default | Description |
|
|
149
189
|
|------|---------|-------------|
|
|
150
|
-
| `--to <stage>` | (required) | Stage to rewind to: `shape`, `spec`, or `plan` |
|
|
190
|
+
| `--to <stage>` | (required) | Stage to rewind to: `shape`, `spec`, `research`, `refine`, or `plan` |
|
|
151
191
|
|
|
152
192
|
### `ridgeline clean`
|
|
153
193
|
|
|
@@ -166,6 +206,7 @@ WIP branches. Use this after inspecting a failed build.
|
|
|
166
206
|
├── spec.md # What to build
|
|
167
207
|
├── constraints.md # Technical constraints and check commands
|
|
168
208
|
├── taste.md # Optional coding style preferences
|
|
209
|
+
├── research.md # Optional research findings (from researcher)
|
|
169
210
|
├── phases/
|
|
170
211
|
│ ├── 01-scaffold.md
|
|
171
212
|
│ ├── 01-scaffold.feedback.md # Generated by harness on review failure
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refiner
|
|
3
|
+
description: Merges research findings into a spec, producing a revised spec.md
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the Spec Refiner. You receive a spec.md and a research.md, and your job is to produce a revised spec.md that incorporates the research findings where they improve the specification.
|
|
8
|
+
|
|
9
|
+
## Your Inputs
|
|
10
|
+
|
|
11
|
+
- **spec.md** — the current specification
|
|
12
|
+
- **research.md** — research findings with recommendations
|
|
13
|
+
- **constraints.md** — technical constraints (do not modify these)
|
|
14
|
+
- **taste.md** (optional) — style preferences (do not modify these)
|
|
15
|
+
|
|
16
|
+
## Your Task
|
|
17
|
+
|
|
18
|
+
Rewrite spec.md incorporating research findings. Use the Write tool to overwrite the existing spec.md file.
|
|
19
|
+
|
|
20
|
+
## Refinement Guidelines
|
|
21
|
+
|
|
22
|
+
- **Additive by default**: Add new insights, edge cases, or approaches the research uncovered. Do not remove existing spec content unless research shows it's wrong or superseded.
|
|
23
|
+
- **Preserve structure**: Keep the same markdown structure and section ordering as the original spec. Add subsections if needed.
|
|
24
|
+
- **Cite sources inline**: When adding content from research, include a brief inline note like "(per [source])" so the user knows which changes came from research.
|
|
25
|
+
- **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
|
+
- **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
|
+
- **Flag conflicts**: If research contradicts an existing spec decision, keep the original decision but add a note explaining the alternative and trade-offs.
|
|
28
|
+
|
|
29
|
+
## What NOT to do
|
|
30
|
+
|
|
31
|
+
- Do not rewrite the spec from scratch — revise it.
|
|
32
|
+
- Do not add implementation details — the spec describes what, not how.
|
|
33
|
+
- Do not remove features the user explicitly specified.
|
|
34
|
+
- Do not modify constraints.md or taste.md.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: researcher
|
|
3
|
+
description: Synthesizes research findings from specialist agents into a unified report
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the Research Synthesizer. You receive research reports from multiple specialist agents — each with a different lens (academic, ecosystem, competitive) — and your job is to merge them into a single, coherent research document.
|
|
8
|
+
|
|
9
|
+
## Your Inputs
|
|
10
|
+
|
|
11
|
+
You receive:
|
|
12
|
+
|
|
13
|
+
- The current **spec.md** being researched
|
|
14
|
+
- Research reports from each specialist
|
|
15
|
+
|
|
16
|
+
## Your Task
|
|
17
|
+
|
|
18
|
+
Write a unified `research.md` file to the build directory. Use the Write tool.
|
|
19
|
+
|
|
20
|
+
## Output Structure
|
|
21
|
+
|
|
22
|
+
Structure research.md as follows:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# Research Findings
|
|
26
|
+
|
|
27
|
+
> Research conducted on [date] for spec: [spec title]
|
|
28
|
+
|
|
29
|
+
## Key Recommendations
|
|
30
|
+
|
|
31
|
+
Bullet list of the 3-5 most impactful recommendations, each in one sentence.
|
|
32
|
+
|
|
33
|
+
## Detailed Findings
|
|
34
|
+
|
|
35
|
+
### [Topic/Theme 1]
|
|
36
|
+
|
|
37
|
+
**Source:** [URL or citation]
|
|
38
|
+
**Perspective:** [which specialist found this]
|
|
39
|
+
**Relevance:** [why this matters to the spec]
|
|
40
|
+
**Recommendation:** [what should change in the spec]
|
|
41
|
+
|
|
42
|
+
### [Topic/Theme 2]
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
## Sources
|
|
46
|
+
|
|
47
|
+
Numbered list of all URLs and citations referenced above.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Synthesis Guidelines
|
|
51
|
+
|
|
52
|
+
- **Deduplicate**: If multiple specialists found the same thing, merge into one finding and note the convergence.
|
|
53
|
+
- **Resolve conflicts**: If specialists disagree, present both views with trade-offs. Do not silently pick one.
|
|
54
|
+
- **Rank by impact**: Order findings by how much they could improve the spec, most impactful first.
|
|
55
|
+
- **Be concrete**: Every recommendation should be specific enough that someone could act on it without further research.
|
|
56
|
+
- **Preserve sources**: Always include the URL or citation. The user needs to verify your work.
|
|
57
|
+
- **Stay scoped**: Only include findings relevant to the spec. Don't pad with tangentially related material.
|
|
58
|
+
|
|
59
|
+
When there is only one specialist report (quick mode), organize and refine it rather than just passing it through. Add structure, verify claims are sourced, and sharpen recommendations.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: academic
|
|
3
|
+
description: Searches academic papers, arxiv, and research for novel algorithms, architectures, and techniques
|
|
4
|
+
perspective: academic
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the Academic Research Specialist. Your focus is on cutting-edge research that could inform the specification — novel algorithms, architectural patterns, data structures, or techniques from recent papers.
|
|
8
|
+
|
|
9
|
+
## Where to Search
|
|
10
|
+
|
|
11
|
+
- arxiv.org (cs.SE, cs.AI, cs.PL, cs.DC, cs.DB — pick relevant categories)
|
|
12
|
+
- Semantic Scholar for citation-rich papers
|
|
13
|
+
- Google Scholar for broad academic coverage
|
|
14
|
+
- Conference proceedings (ICSE, SOSP, OSDI, VLDB, etc.) referenced in search results
|
|
15
|
+
|
|
16
|
+
## What to Look For
|
|
17
|
+
|
|
18
|
+
- Novel approaches to problems described in the spec
|
|
19
|
+
- Recent papers (last 2 years) on algorithms or architectures relevant to the spec's domain
|
|
20
|
+
- Techniques that could simplify or improve the proposed approach
|
|
21
|
+
- Known pitfalls or failure modes documented in research
|
|
22
|
+
|
|
23
|
+
## What to Skip
|
|
24
|
+
|
|
25
|
+
- Textbook material the builder would already know
|
|
26
|
+
- Papers that are purely theoretical with no practical application to the spec
|
|
27
|
+
- Research in unrelated domains unless the technique transfers clearly
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: competitive
|
|
3
|
+
description: Investigates how other tools and products solve similar problems
|
|
4
|
+
perspective: competitive
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the Competitive Research Specialist. Your focus is on understanding how other projects, tools, or products approach the same problem space as the spec.
|
|
8
|
+
|
|
9
|
+
## Where to Search
|
|
10
|
+
|
|
11
|
+
- GitHub repositories solving similar problems (sort by stars, recent activity)
|
|
12
|
+
- Product pages and documentation of competing/adjacent tools
|
|
13
|
+
- Developer blog posts comparing approaches in this domain
|
|
14
|
+
- Hacker News, Reddit, and Stack Overflow discussions about the problem space
|
|
15
|
+
|
|
16
|
+
## What to Look For
|
|
17
|
+
|
|
18
|
+
- UX patterns or API designs that feel particularly well-considered
|
|
19
|
+
- Features that users commonly request or praise in competing tools
|
|
20
|
+
- Architectural decisions other projects made and their documented trade-offs
|
|
21
|
+
- Anti-patterns or mistakes other projects warn about in their docs
|
|
22
|
+
- Novel approaches that differentiate a competitor from the obvious solution
|
|
23
|
+
|
|
24
|
+
## What to Skip
|
|
25
|
+
|
|
26
|
+
- Superficial feature lists without insight into why choices were made
|
|
27
|
+
- Closed-source products where you can't see the approach behind the interface
|
|
28
|
+
- Projects that are abandoned or unmaintained (unless the ideas are still relevant)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Research Context
|
|
2
|
+
|
|
3
|
+
You are a research specialist in an ensemble pipeline. Your job is to investigate external sources and produce findings that could improve a software specification.
|
|
4
|
+
|
|
5
|
+
## Your Inputs
|
|
6
|
+
|
|
7
|
+
You receive:
|
|
8
|
+
|
|
9
|
+
- **spec.md** — the current specification describing what is being built
|
|
10
|
+
- **constraints.md** — technical constraints (language, framework, runtime)
|
|
11
|
+
- **taste.md** (optional) — style preferences
|
|
12
|
+
|
|
13
|
+
## Your Output
|
|
14
|
+
|
|
15
|
+
Produce a prose research report in markdown. Structure it as:
|
|
16
|
+
|
|
17
|
+
### Findings
|
|
18
|
+
|
|
19
|
+
For each finding, include:
|
|
20
|
+
|
|
21
|
+
- **Source**: URL or citation
|
|
22
|
+
- **Relevance**: Why this matters to the spec
|
|
23
|
+
- **Recommendation**: What the spec should consider changing or adding
|
|
24
|
+
|
|
25
|
+
### Summary
|
|
26
|
+
|
|
27
|
+
A brief paragraph summarizing the most impactful findings.
|
|
28
|
+
|
|
29
|
+
## Research Guidelines
|
|
30
|
+
|
|
31
|
+
- Focus on findings that are **actionable** for the spec — skip general knowledge the builder would already have.
|
|
32
|
+
- Prefer primary sources (official docs, papers, release notes) over secondary summaries.
|
|
33
|
+
- When you find conflicting approaches, present both with trade-offs rather than picking one.
|
|
34
|
+
- Be honest about confidence levels — a well-sourced finding is worth more than a speculative one.
|
|
35
|
+
- Target 5-15 findings. Quality over quantity.
|
|
36
|
+
- Include URLs so the user can verify your sources.
|
|
37
|
+
|
|
38
|
+
## Tool Usage
|
|
39
|
+
|
|
40
|
+
You have access to web search and web fetch tools. Use them to:
|
|
41
|
+
|
|
42
|
+
1. Search for relevant information
|
|
43
|
+
2. Fetch and read specific pages
|
|
44
|
+
3. Verify claims against primary sources
|
|
45
|
+
|
|
46
|
+
Do NOT use Write or Edit tools. Your output is your response text only.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ecosystem
|
|
3
|
+
description: Researches latest framework documentation, library features, and tooling updates
|
|
4
|
+
perspective: ecosystem
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the Ecosystem Research Specialist. Your focus is on the specific technologies mentioned in the spec and constraints — their latest versions, new features, best practices, and ecosystem tools.
|
|
8
|
+
|
|
9
|
+
## Where to Search
|
|
10
|
+
|
|
11
|
+
- Official documentation for frameworks/libraries mentioned in constraints.md
|
|
12
|
+
- Release notes and changelogs for recent versions
|
|
13
|
+
- GitHub repositories for new releases, migration guides, and examples
|
|
14
|
+
- Package registry pages (npm, PyPI, crates.io, etc.) for dependency updates
|
|
15
|
+
|
|
16
|
+
## What to Look For
|
|
17
|
+
|
|
18
|
+
- New framework/library features that could simplify the spec's implementation
|
|
19
|
+
- Deprecations or breaking changes that could affect the planned approach
|
|
20
|
+
- Built-in solutions that would replace custom implementations in the spec
|
|
21
|
+
- Official best practices or patterns recommended by framework authors
|
|
22
|
+
- Performance characteristics documented in benchmarks or release notes
|
|
23
|
+
|
|
24
|
+
## What to Skip
|
|
25
|
+
|
|
26
|
+
- Version history older than the currently specified versions
|
|
27
|
+
- Features unrelated to the spec's requirements
|
|
28
|
+
- Community blog posts when official docs cover the same ground
|
package/dist/cli.js
CHANGED
|
@@ -11,6 +11,8 @@ const dry_run_1 = require("./commands/dry-run");
|
|
|
11
11
|
const build_1 = require("./commands/build");
|
|
12
12
|
const create_1 = require("./commands/create");
|
|
13
13
|
const rewind_1 = require("./commands/rewind");
|
|
14
|
+
const research_1 = require("./commands/research");
|
|
15
|
+
const refine_1 = require("./commands/refine");
|
|
14
16
|
const claude_exec_1 = require("./engine/claude/claude.exec");
|
|
15
17
|
// Kill all Claude subprocesses on Ctrl+C before exiting
|
|
16
18
|
process.on("SIGINT", () => {
|
|
@@ -120,6 +122,55 @@ program
|
|
|
120
122
|
handleCommandError(err);
|
|
121
123
|
}
|
|
122
124
|
});
|
|
125
|
+
program
|
|
126
|
+
.command("research [build-name]")
|
|
127
|
+
.description("Research the spec using web sources to find improvements (optional step between spec and plan)")
|
|
128
|
+
.option("--model <name>", "Model for research agents", "opus")
|
|
129
|
+
.option("--timeout <minutes>", "Max duration per agent in minutes", "15")
|
|
130
|
+
.option("--max-budget-usd <n>", "Halt if cumulative research cost exceeds this amount")
|
|
131
|
+
.option("--deep", "Run full ensemble (3 specialists) instead of quick single-agent research")
|
|
132
|
+
.option("--auto [iterations]", "Auto-loop: research + refine for N iterations (default 3)")
|
|
133
|
+
.option("--flavour <name-or-path>", "Agent flavour: built-in name or path to custom agents")
|
|
134
|
+
.action(async (buildName, opts) => {
|
|
135
|
+
try {
|
|
136
|
+
const autoRaw = opts.auto;
|
|
137
|
+
let auto = null;
|
|
138
|
+
if (autoRaw !== undefined) {
|
|
139
|
+
auto = autoRaw === true ? 3 : parseInt(String(autoRaw), 10);
|
|
140
|
+
if (isNaN(auto) || auto < 1)
|
|
141
|
+
auto = 3;
|
|
142
|
+
}
|
|
143
|
+
await (0, research_1.runResearch)(await requireBuildName(buildName), {
|
|
144
|
+
model: opts.model ?? "opus",
|
|
145
|
+
timeout: parseInt(String(opts.timeout ?? "15"), 10),
|
|
146
|
+
maxBudgetUsd: opts.maxBudgetUsd ? parseFloat(String(opts.maxBudgetUsd)) : undefined,
|
|
147
|
+
flavour: opts.flavour ?? undefined,
|
|
148
|
+
isDeep: opts.deep === true,
|
|
149
|
+
auto,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
handleCommandError(err);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
program
|
|
157
|
+
.command("refine [build-name]")
|
|
158
|
+
.description("Merge research.md findings into spec.md")
|
|
159
|
+
.option("--model <name>", "Model for refiner agent", "opus")
|
|
160
|
+
.option("--timeout <minutes>", "Max duration in minutes", "10")
|
|
161
|
+
.option("--flavour <name-or-path>", "Agent flavour: built-in name or path to custom agents")
|
|
162
|
+
.action(async (buildName, opts) => {
|
|
163
|
+
try {
|
|
164
|
+
await (0, refine_1.runRefine)(await requireBuildName(buildName), {
|
|
165
|
+
model: opts.model ?? "opus",
|
|
166
|
+
timeout: parseInt(String(opts.timeout ?? "10"), 10),
|
|
167
|
+
flavour: opts.flavour ?? undefined,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
handleCommandError(err);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
123
174
|
const addPlanOptions = (cmd) => cmd
|
|
124
175
|
.option("--model <name>", "Model for planner", "opus")
|
|
125
176
|
.option("--timeout <minutes>", "Max duration for planning", "120")
|
|
@@ -152,7 +203,7 @@ program
|
|
|
152
203
|
program
|
|
153
204
|
.command("rewind <build-name>")
|
|
154
205
|
.description("Reset pipeline state to a given stage and clean up downstream artifacts")
|
|
155
|
-
.requiredOption("--to <stage>", "Stage to rewind to (shape, spec, plan)")
|
|
206
|
+
.requiredOption("--to <stage>", "Stage to rewind to (shape, spec, research, refine, plan)")
|
|
156
207
|
.action((buildName, opts) => {
|
|
157
208
|
try {
|
|
158
209
|
(0, rewind_1.runRewind)(buildName, opts.to);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAmC;AACnC,qCAAqD;AAErD,wCAA0C;AAC1C,4CAA2C;AAC3C,0CAAyC;AACzC,0CAAyC;AACzC,gDAA8C;AAC9C,4CAA2C;AAC3C,8CAA6C;AAC7C,8CAA6C;AAC7C,6DAA2D;AAE3D,wDAAwD;AACxD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,IAAA,2BAAa,GAAE,CAAA;IACf,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAA;AAIF,MAAM,gBAAgB,GAAG,KAAK,EAAE,SAA6B,EAAm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CAAC;KAC7E,MAAM,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;KACxD,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;KAC5C,MAAM,CAAC,kBAAkB,EAAE,uDAAuD,CAAC;KACnF,MAAM,CAAC,UAAU,EAAE,gCAAgC,CAAC;KACpD,MAAM,CAAC,0BAA0B,EAAE,uDAAuD,CAAC;KAC3F,MAAM,CAAC,UAAU,CAAC,gBAAQ,CAAC,CAAC,CAAA;AAE/B,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,yEAAyE,CAAC;KACtF,cAAc,CAAC,cAAc,EAAE,0DAA0D,CAAC;KAC1F,MAAM,CAAC,CAAC,SAAiB,EAAE,IAAU,EAAE,EAAE;IACxC,IAAI,CAAC;QACH,IAAA,kBAAS,EAAC,SAAS,EAAE,IAAI,CAAC,EAAY,CAAC,CAAA;IACzC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,kBAAkB,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;AACH,CAAC,CAAC,CAAA;AAEJ,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,GAAG,EAAE;IACX,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;QAChD,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;IACzB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,kBAAkB,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;AACH,CAAC,CAAC,CAAA;AAEJ,OAAO,CAAC,KAAK,EAAE,CAAA"}
|
package/dist/commands/create.js
CHANGED
|
@@ -11,6 +11,8 @@ const build_1 = require("./build");
|
|
|
11
11
|
const STAGE_LABELS = {
|
|
12
12
|
shape: "shape.md",
|
|
13
13
|
spec: "spec.md",
|
|
14
|
+
research: "research.md",
|
|
15
|
+
refine: "refine",
|
|
14
16
|
plan: "phases/",
|
|
15
17
|
build: "build",
|
|
16
18
|
};
|
|
@@ -27,8 +29,9 @@ const runCreate = async (buildName, opts) => {
|
|
|
27
29
|
console.log("");
|
|
28
30
|
(0, output_1.printInfo)(`Build: ${buildName}`);
|
|
29
31
|
console.log("");
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
const DISPLAY_STAGES = ["shape", "spec", "research", "refine", "plan", "build"];
|
|
33
|
+
for (const stage of DISPLAY_STAGES) {
|
|
34
|
+
const icon = STATUS_ICONS[status[stage]] ?? (status[stage] === "skipped" ? "skip" : "---");
|
|
32
35
|
const label = STAGE_LABELS[stage];
|
|
33
36
|
console.log(` ${label.padEnd(16)} ${icon}`);
|
|
34
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC,2CAAyE;AAEzE,mCAAgD;AAChD,iCAA6C;AAC7C,sCAA0D;AAC1D,iCAAgC;AAChC,mCAAkC;AAiBlC,MAAM,YAAY,GAAkC;IAClD,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,OAAO;CACf,CAAA;AAED,MAAM,YAAY,GAA2B;IAC3C,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,KAAK;CACf,CAAA;AAEM,MAAM,SAAS,GAAG,KAAK,EAAE,SAAiB,EAAE,IAAmB,EAAiB,EAAE;IACvF,MAAM,QAAQ,GAAG,IAAA,wBAAe,EAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;IAE7D,MAAM,MAAM,GAAG,IAAA,yBAAiB,EAAC,QAAQ,CAAC,CAAA;IAC1C,MAAM,SAAS,GAAG,IAAA,4BAAoB,EAAC,QAAQ,CAAC,CAAA;I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0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.runRefine = void 0;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const output_1 = require("../ui/output");
|
|
40
|
+
const refine_exec_1 = require("../engine/pipeline/refine.exec");
|
|
41
|
+
const state_1 = require("../stores/state");
|
|
42
|
+
const trajectory_1 = require("../stores/trajectory");
|
|
43
|
+
const budget_1 = require("../stores/budget");
|
|
44
|
+
const runRefine = async (buildName, opts) => {
|
|
45
|
+
const buildDir = path.join(process.cwd(), ".ridgeline", "builds", buildName);
|
|
46
|
+
if (!fs.existsSync(buildDir)) {
|
|
47
|
+
(0, output_1.printError)(`Build directory not found: ${buildDir}`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const specPath = path.join(buildDir, "spec.md");
|
|
51
|
+
const researchPath = path.join(buildDir, "research.md");
|
|
52
|
+
const constraintsPath = path.join(buildDir, "constraints.md");
|
|
53
|
+
if (!fs.existsSync(specPath)) {
|
|
54
|
+
(0, output_1.printError)(`spec.md not found. Run 'ridgeline spec ${buildName}' first.`);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!fs.existsSync(researchPath)) {
|
|
58
|
+
(0, output_1.printError)(`research.md not found. Run 'ridgeline research ${buildName}' first.`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!fs.existsSync(constraintsPath)) {
|
|
62
|
+
(0, output_1.printError)(`constraints.md not found. Run 'ridgeline spec ${buildName}' first.`);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const specMd = fs.readFileSync(specPath, "utf-8");
|
|
66
|
+
const researchMd = fs.readFileSync(researchPath, "utf-8");
|
|
67
|
+
const constraintsMd = fs.readFileSync(constraintsPath, "utf-8");
|
|
68
|
+
const tastePath = path.join(buildDir, "taste.md");
|
|
69
|
+
const tasteMd = fs.existsSync(tastePath) ? fs.readFileSync(tastePath, "utf-8") : null;
|
|
70
|
+
const config = {
|
|
71
|
+
model: opts.model,
|
|
72
|
+
timeoutMinutes: opts.timeout,
|
|
73
|
+
buildDir,
|
|
74
|
+
flavour: opts.flavour ?? null,
|
|
75
|
+
};
|
|
76
|
+
(0, trajectory_1.logTrajectory)(buildDir, (0, trajectory_1.makeTrajectoryEntry)("refine_start", null, "Refine started"));
|
|
77
|
+
const result = await (0, refine_exec_1.invokeRefiner)(specMd, researchMd, constraintsMd, tasteMd, config);
|
|
78
|
+
(0, budget_1.recordCost)(buildDir, "refine", "refiner", 0, result);
|
|
79
|
+
(0, trajectory_1.logTrajectory)(buildDir, (0, trajectory_1.makeTrajectoryEntry)("refine_complete", null, "Refine complete", {
|
|
80
|
+
duration: result.durationMs,
|
|
81
|
+
tokens: { input: result.usage.inputTokens, output: result.usage.outputTokens },
|
|
82
|
+
costUsd: result.costUsd,
|
|
83
|
+
}));
|
|
84
|
+
(0, state_1.advancePipeline)(buildDir, buildName, "refine");
|
|
85
|
+
(0, output_1.printInfo)(`\nSpec refined with research findings.`);
|
|
86
|
+
(0, output_1.printInfo)(`Cost: $${result.costUsd.toFixed(2)}`);
|
|
87
|
+
console.log("");
|
|
88
|
+
(0, output_1.printInfo)(`Review: ${path.join(buildDir, "spec.md")}`);
|
|
89
|
+
(0, output_1.printInfo)(`Next: ridgeline plan ${buildName}`);
|
|
90
|
+
};
|
|
91
|
+
exports.runRefine = runRefine;
|
|
92
|
+
//# sourceMappingURL=refine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refine.js","sourceRoot":"","sources":["../../src/commands/refine.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AACjC,yCAAoD;AACpD,gEAA4E;AAC5E,2CAAiD;AACjD,qDAAyE;AACzE,6CAA6C;AAQtC,MAAM,SAAS,GAAG,KAAK,EAAE,SAAiB,EAAE,IAAmB,EAAiB,EAAE;IACvF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA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EAAE,CAAC,CAAA;IACtD,IAAA,kBAAS,EAAC,wBAAwB,SAAS,EAAE,CAAC,CAAA;AAChD,CAAC,CAAA;AAzDY,QAAA,SAAS,aAyDrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ResearchOptions = {
|
|
2
|
+
model: string;
|
|
3
|
+
timeout: number;
|
|
4
|
+
maxBudgetUsd?: number;
|
|
5
|
+
flavour?: string;
|
|
6
|
+
isDeep: boolean;
|
|
7
|
+
auto: number | null;
|
|
8
|
+
};
|
|
9
|
+
export declare const runResearch: (buildName: string, opts: ResearchOptions) => Promise<void>;
|
|
10
|
+
export {};
|