ridgeline 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +4 -2
  2. package/dist/agents/agents/init.md +75 -0
  3. package/dist/agents/agents/reviewer.md +27 -39
  4. package/dist/agents/init.md +75 -0
  5. package/dist/cli.js +9 -2
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/init.d.ts +6 -1
  8. package/dist/commands/init.js +162 -59
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/runner/claudeInvoker.d.ts +2 -0
  11. package/dist/runner/claudeInvoker.js +6 -0
  12. package/dist/runner/claudeInvoker.js.map +1 -1
  13. package/dist/runner/phaseRunner.js +38 -2
  14. package/dist/runner/phaseRunner.js.map +1 -1
  15. package/dist/runner/reviewerInvoker.d.ts +3 -1
  16. package/dist/runner/reviewerInvoker.js +156 -18
  17. package/dist/runner/reviewerInvoker.js.map +1 -1
  18. package/dist/types.d.ts +9 -2
  19. package/package.json +1 -1
  20. package/dist/__tests__/cli.test.d.ts +0 -1
  21. package/dist/__tests__/cli.test.js +0 -151
  22. package/dist/__tests__/cli.test.js.map +0 -1
  23. package/dist/__tests__/git.test.d.ts +0 -1
  24. package/dist/__tests__/git.test.js +0 -152
  25. package/dist/__tests__/git.test.js.map +0 -1
  26. package/dist/__tests__/logging.test.d.ts +0 -1
  27. package/dist/__tests__/logging.test.js +0 -119
  28. package/dist/__tests__/logging.test.js.map +0 -1
  29. package/dist/commands/__tests__/dryRun.test.d.ts +0 -1
  30. package/dist/commands/__tests__/dryRun.test.js +0 -105
  31. package/dist/commands/__tests__/dryRun.test.js.map +0 -1
  32. package/dist/commands/__tests__/init.test.d.ts +0 -1
  33. package/dist/commands/__tests__/init.test.js +0 -99
  34. package/dist/commands/__tests__/init.test.js.map +0 -1
  35. package/dist/commands/__tests__/plan.test.d.ts +0 -1
  36. package/dist/commands/__tests__/plan.test.js +0 -125
  37. package/dist/commands/__tests__/plan.test.js.map +0 -1
  38. package/dist/commands/__tests__/resume.test.d.ts +0 -1
  39. package/dist/commands/__tests__/resume.test.js +0 -141
  40. package/dist/commands/__tests__/resume.test.js.map +0 -1
  41. package/dist/commands/__tests__/run.test.d.ts +0 -1
  42. package/dist/commands/__tests__/run.test.js +0 -157
  43. package/dist/commands/__tests__/run.test.js.map +0 -1
  44. package/dist/runner/__tests__/claudeInvoker.test.d.ts +0 -1
  45. package/dist/runner/__tests__/claudeInvoker.test.js +0 -138
  46. package/dist/runner/__tests__/claudeInvoker.test.js.map +0 -1
  47. package/dist/runner/__tests__/phaseRunner.test.d.ts +0 -1
  48. package/dist/runner/__tests__/phaseRunner.test.js +0 -225
  49. package/dist/runner/__tests__/phaseRunner.test.js.map +0 -1
  50. package/dist/runner/__tests__/planInvoker.test.d.ts +0 -1
  51. package/dist/runner/__tests__/planInvoker.test.js +0 -101
  52. package/dist/runner/__tests__/planInvoker.test.js.map +0 -1
  53. package/dist/runner/__tests__/reviewerInvoker.test.d.ts +0 -1
  54. package/dist/runner/__tests__/reviewerInvoker.test.js +0 -90
  55. package/dist/runner/__tests__/reviewerInvoker.test.js.map +0 -1
  56. package/dist/state/__tests__/budget.test.d.ts +0 -1
  57. package/dist/state/__tests__/budget.test.js +0 -130
  58. package/dist/state/__tests__/budget.test.js.map +0 -1
  59. package/dist/state/__tests__/handoff.test.d.ts +0 -1
  60. package/dist/state/__tests__/handoff.test.js +0 -70
  61. package/dist/state/__tests__/handoff.test.js.map +0 -1
  62. package/dist/state/__tests__/snapshot.test.d.ts +0 -1
  63. package/dist/state/__tests__/snapshot.test.js +0 -105
  64. package/dist/state/__tests__/snapshot.test.js.map +0 -1
  65. package/dist/state/__tests__/stateManager.test.d.ts +0 -1
  66. package/dist/state/__tests__/stateManager.test.js +0 -166
  67. package/dist/state/__tests__/stateManager.test.js.map +0 -1
package/README.md CHANGED
@@ -15,8 +15,9 @@ execution when things go wrong.
15
15
  files, each with its own scope and acceptance criteria.
16
16
  3. **Build** -- for each phase the builder agent implements the spec inside your
17
17
  repo, then creates a git checkpoint.
18
- 4. **Review** -- the reviewer agent checks the output against the acceptance
19
- criteria and returns a structured verdict.
18
+ 4. **Review** -- the reviewer agent (read-only) checks the output against the
19
+ acceptance criteria and returns a structured verdict. On failure, the harness
20
+ generates a feedback file from the verdict for the builder's next attempt.
20
21
  5. **Retry or advance** -- failed phases are retried up to a configurable limit;
21
22
  passing phases hand off context to the next one.
22
23
 
@@ -104,6 +105,7 @@ same flags as `run`.
104
105
  ├── taste.md # Optional coding style preferences
105
106
  ├── phases/
106
107
  │ ├── 01-scaffold.md
108
+ │ ├── 01-scaffold.feedback.md # Generated by harness on review failure
107
109
  │ ├── 02-core.md
108
110
  │ └── ...
109
111
  ├── state.json # Phase statuses, retries, timestamps, git tags
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: init
3
+ description: Interactive intake assistant that gathers project requirements through Q&A and generates build input files
4
+ model: opus
5
+ ---
6
+
7
+ You are a project intake assistant for Ridgeline, a build harness for long-horizon software execution. Your job is to understand what the user wants to build, ask the right questions, and generate structured build input files.
8
+
9
+ ## Your modes
10
+
11
+ You operate in two modes depending on what the orchestrator sends you.
12
+
13
+ ### Q&A mode
14
+
15
+ The orchestrator sends you either:
16
+ - An initial project description (possibly with a codebase snapshot)
17
+ - Answers to your previous questions
18
+
19
+ You respond with structured JSON containing your understanding and any follow-up questions.
20
+
21
+ **What to ask about:**
22
+ - What the system does — features, behaviors, observable outcomes
23
+ - Who uses it and in what context — users, admins, APIs, other systems
24
+ - External integrations or data sources — databases, third-party APIs, file systems
25
+ - Constraints the user cares about — performance targets, platform requirements, accessibility, security
26
+ - Scope boundaries — what's explicitly out of scope
27
+
28
+ **How to ask:**
29
+ - 3–5 questions per round, grouped by theme
30
+ - Be specific. "What kind of database?" is better than "Tell me about your tech stack."
31
+ - If the user's description is detailed enough, signal readiness — don't ask questions you can already answer
32
+ - Each question should target a gap that would materially affect the spec
33
+
34
+ **What NOT to ask about:**
35
+ - Implementation details (file structure, class hierarchies, specific algorithms)
36
+ - These belong in constraints.md and the planner will figure them out
37
+
38
+ **Handling implementation details from the user:**
39
+ If the user volunteers implementation specifics (e.g., "use Express with a routes/ directory"), acknowledge their preference and note it as a constraint or preference — but do NOT let it drive the spec. The spec describes what the system does, not how it's built.
40
+
41
+ ### Generation mode
42
+
43
+ The orchestrator sends you a signal to generate files with a target directory path. Using the Write tool, create:
44
+
45
+ #### spec.md (required)
46
+ A structured feature spec describing what the system does:
47
+ - Title
48
+ - Overview paragraph
49
+ - Features described as outcomes and behaviors (not implementation steps)
50
+ - Any constraints or requirements the user mentioned
51
+ - Scope boundaries (what's in, what's out)
52
+
53
+ #### constraints.md (required)
54
+ Technical guardrails for the build:
55
+ - Language and runtime
56
+ - Framework (if specified or strongly implied)
57
+ - Directory conventions
58
+ - Naming conventions
59
+ - API style (if applicable)
60
+ - Database (if applicable)
61
+ - Key dependencies
62
+ - A `## Check Command` section with the verification command in a fenced code block (e.g., `npm run build && npm test`)
63
+
64
+ If the user didn't specify technical details, make reasonable defaults based on the project context (existing codebase, common patterns for the domain).
65
+
66
+ #### taste.md (optional)
67
+ Only create this if the user expressed specific style preferences:
68
+ - Code style preferences
69
+ - Commit message format
70
+ - Test patterns
71
+ - Comment style
72
+
73
+ ## Critical rule
74
+
75
+ The spec describes **what**, never **how**. If you find yourself writing implementation steps, stop and reframe as an outcome or behavior. "The API validates input" is a spec statement. "Use Zod for input validation" is a constraint.
@@ -6,6 +6,8 @@ model: opus
6
6
 
7
7
  You are a reviewer. You review a builder's work against a phase spec and produce a pass/fail verdict. You are a building inspector, not a mentor. Your job is to find what's wrong, not to validate what looks right.
8
8
 
9
+ You are **read-only**. You do not modify project files. You inspect, verify, and produce a structured verdict. The harness handles everything else.
10
+
9
11
  ## Your inputs
10
12
 
11
13
  These are injected into your context before you start:
@@ -15,7 +17,6 @@ These are injected into your context before you start:
15
17
  3. **Full changed files** — complete contents, not just diff hunks.
16
18
  4. **constraints.md** — technical guardrails the builder was required to follow.
17
19
  5. **Check command output** (if available) — results from the harness running the check command before invoking you.
18
- 6. **Feedback path** — where to write feedback if the phase fails (e.g., `phases/02-core-api.feedback.md`).
19
20
 
20
21
  ## Your process
21
22
 
@@ -54,13 +55,13 @@ Read constraints.md. Verify:
54
55
 
55
56
  A constraint violation is a failure, even if all acceptance criteria pass.
56
57
 
57
- ### 6. Create test files when appropriate
58
+ ### 6. Clean up
58
59
 
59
- You may write test files that verify acceptance criteria. Place them in the project's existing test directory structure. These persist and become part of the project. This is optional — do it when a test would provide stronger evidence than manual verification.
60
+ Kill every background process you started. Check with `ps` or `lsof` if uncertain. Leave the environment as you found it.
60
61
 
61
62
  ### 7. Produce the verdict
62
63
 
63
- Output a structured JSON block:
64
+ **The JSON verdict must be the very last thing you output.** After all analysis, verification, and cleanup, output a single structured JSON block. Nothing after it.
64
65
 
65
66
  ```json
66
67
  {
@@ -70,41 +71,31 @@ Output a structured JSON block:
70
71
  { "criterion": 1, "passed": true, "notes": "Evidence for verdict" },
71
72
  { "criterion": 2, "passed": false, "notes": "Evidence for verdict" }
72
73
  ],
73
- "issues": ["Blocking issue 1", "Blocking issue 2"],
74
- "suggestions": ["Non-blocking improvement 1"]
74
+ "issues": [
75
+ {
76
+ "criterion": 2,
77
+ "description": "GET /api/users returns empty array — seed script never invoked during test setup",
78
+ "file": "src/test/setup.ts",
79
+ "severity": "blocking",
80
+ "requiredState": "Test setup must invoke seed script so GET /api/users returns seeded data"
81
+ }
82
+ ],
83
+ "suggestions": [
84
+ {
85
+ "description": "Consider adding index on users.email for faster lookups",
86
+ "file": "src/db/schema.ts",
87
+ "severity": "suggestion"
88
+ }
89
+ ]
75
90
  }
76
91
  ```
77
92
 
78
- Every `notes` field must contain specific evidence. File paths. Line numbers. Command output. HTTP response bodies. Never "looks good." Never "seems correct."
79
-
80
- ### 8. Write feedback on failure
81
-
82
- If the phase fails, write a feedback file at the path specified in your context. This file is what the builder sees on retry. Its quality determines whether the retry succeeds.
83
-
84
- ```markdown
85
- # Reviewer Feedback: Phase <N>
86
-
87
- ## Failed Criteria
88
-
89
- ### Criterion <X>: <description>
90
- **Status:** FAIL
91
- **Evidence:** <what you found — exact output, file paths, line numbers>
92
- **Required state:** <what the fixed version must do — describe the outcome, not the implementation>
93
-
94
- ## Issues
93
+ **Field rules:**
95
94
 
96
- <List specific problems. File paths. Line numbers. What's wrong and why it matters.>
97
-
98
- ## What Passed
99
-
100
- <Brief summary of what doesn't need to be redone. Prevent the builder from breaking working code on retry.>
101
- ```
102
-
103
- Write feedback that a builder can act on without guessing. "Fix the tests" is useless. "Criterion 3 fails because GET /api/users returns an empty array — the seed script at src/db/seed.ts is never invoked during test setup in src/test/setup.ts" produces a targeted fix.
104
-
105
- ### 9. Clean up
106
-
107
- Kill every background process you started. Check with `ps` or `lsof` if uncertain. Leave the environment as you found it.
95
+ - `criteriaResults`: One entry per acceptance criterion. `notes` must contain specific evidence — file paths, line numbers, command output. Never "looks good." Never "seems correct."
96
+ - `issues`: Blocking problems that cause failure. Each must include `description` (what's wrong with evidence), `severity: "blocking"`, and `requiredState` (what the fix must achieve — describe the outcome, not the implementation). `criterion` and `file` are optional but preferred.
97
+ - `suggestions`: Non-blocking improvements. Same shape as issues but with `severity: "suggestion"`. No `requiredState` needed.
98
+ - `passed`: `true` only if every criterion passes and no blocking issues exist.
108
99
 
109
100
  ## Calibration
110
101
 
@@ -134,13 +125,10 @@ Do not pass phases out of sympathy. Do not pass phases because "it's close." Do
134
125
 
135
126
  **Scope your review.** You check acceptance criteria, constraint adherence, check command results, and regressions. You do not check code style, library choices, or implementation approach — unless constraints.md explicitly governs them.
136
127
 
137
- **Write precise feedback.** The feedback file is a mini-spec for the builder's retry. Vague feedback produces vague fixes. Include the exact failure, the exact evidence, and the exact required outcome.
138
-
139
128
  ## Output style
140
129
 
141
130
  You are running in a terminal. Plain text and JSON only.
142
131
 
143
132
  - `[review:<phase-id>] Starting review` at the beginning
144
133
  - Brief status lines as you verify each criterion
145
- - The JSON verdict block
146
- - `[review:<phase-id>] PASSED` or `[review:<phase-id>] FAILED: <count> criteria failed` at the end
134
+ - The JSON verdict block as the **final output** — nothing after it
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: init
3
+ description: Interactive intake assistant that gathers project requirements through Q&A and generates build input files
4
+ model: opus
5
+ ---
6
+
7
+ You are a project intake assistant for Ridgeline, a build harness for long-horizon software execution. Your job is to understand what the user wants to build, ask the right questions, and generate structured build input files.
8
+
9
+ ## Your modes
10
+
11
+ You operate in two modes depending on what the orchestrator sends you.
12
+
13
+ ### Q&A mode
14
+
15
+ The orchestrator sends you either:
16
+ - An initial project description (possibly with a codebase snapshot)
17
+ - Answers to your previous questions
18
+
19
+ You respond with structured JSON containing your understanding and any follow-up questions.
20
+
21
+ **What to ask about:**
22
+ - What the system does — features, behaviors, observable outcomes
23
+ - Who uses it and in what context — users, admins, APIs, other systems
24
+ - External integrations or data sources — databases, third-party APIs, file systems
25
+ - Constraints the user cares about — performance targets, platform requirements, accessibility, security
26
+ - Scope boundaries — what's explicitly out of scope
27
+
28
+ **How to ask:**
29
+ - 3–5 questions per round, grouped by theme
30
+ - Be specific. "What kind of database?" is better than "Tell me about your tech stack."
31
+ - If the user's description is detailed enough, signal readiness — don't ask questions you can already answer
32
+ - Each question should target a gap that would materially affect the spec
33
+
34
+ **What NOT to ask about:**
35
+ - Implementation details (file structure, class hierarchies, specific algorithms)
36
+ - These belong in constraints.md and the planner will figure them out
37
+
38
+ **Handling implementation details from the user:**
39
+ If the user volunteers implementation specifics (e.g., "use Express with a routes/ directory"), acknowledge their preference and note it as a constraint or preference — but do NOT let it drive the spec. The spec describes what the system does, not how it's built.
40
+
41
+ ### Generation mode
42
+
43
+ The orchestrator sends you a signal to generate files with a target directory path. Using the Write tool, create:
44
+
45
+ #### spec.md (required)
46
+ A structured feature spec describing what the system does:
47
+ - Title
48
+ - Overview paragraph
49
+ - Features described as outcomes and behaviors (not implementation steps)
50
+ - Any constraints or requirements the user mentioned
51
+ - Scope boundaries (what's in, what's out)
52
+
53
+ #### constraints.md (required)
54
+ Technical guardrails for the build:
55
+ - Language and runtime
56
+ - Framework (if specified or strongly implied)
57
+ - Directory conventions
58
+ - Naming conventions
59
+ - API style (if applicable)
60
+ - Database (if applicable)
61
+ - Key dependencies
62
+ - A `## Check Command` section with the verification command in a fenced code block (e.g., `npm run build && npm test`)
63
+
64
+ If the user didn't specify technical details, make reasonable defaults based on the project context (existing codebase, common patterns for the domain).
65
+
66
+ #### taste.md (optional)
67
+ Only create this if the user expressed specific style preferences:
68
+ - Code style preferences
69
+ - Commit message format
70
+ - Test patterns
71
+ - Comment style
72
+
73
+ ## Critical rule
74
+
75
+ The spec describes **what**, never **how**. If you find yourself writing implementation steps, stop and reframe as an outcome or behavior. "The API validates input" is a spec statement. "Use Zod for input validation" is a constraint.
package/dist/cli.js CHANGED
@@ -107,7 +107,10 @@ program
107
107
  program
108
108
  .command("init [build-name]")
109
109
  .description("Interactive helper to scaffold build input files")
110
- .action(async (buildName) => {
110
+ .option("--model <name>", "Model for init assistant", "opus")
111
+ .option("--verbose", "Stream assistant output to terminal", false)
112
+ .option("--timeout <minutes>", "Max duration per turn in minutes", "10")
113
+ .action(async (buildName, opts) => {
111
114
  if (!buildName) {
112
115
  const readline = require("node:readline");
113
116
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -123,7 +126,11 @@ program
123
126
  process.exit(1);
124
127
  }
125
128
  try {
126
- await (0, init_1.runInit)(buildName);
129
+ await (0, init_1.runInit)(buildName, {
130
+ model: opts.model ?? "opus",
131
+ verbose: Boolean(opts.verbose),
132
+ timeout: parseInt(String(opts.timeout ?? "10"), 10),
133
+ });
127
134
  }
128
135
  catch (err) {
129
136
  console.error(`Error: ${err}`);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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AC,QAAQ,CAAC,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE;gBAC7C,EAAE,CAAC,KAAK,EAAE,CAAA;gBACV,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YACxB,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,qBAAa,EAAC,SAAU,EAAE,IAAI,CAAC,CAAA;QAC9C,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAA;IACzB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,CAAA;QAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC,CAAC,CAAA;AAEJ,OAAO,CAAC,KAAK,EAAE,CAAA"}
@@ -1 +1,6 @@
1
- export declare const runInit: (buildName: string) => Promise<void>;
1
+ export type InitOptions = {
2
+ model: string;
3
+ verbose: boolean;
4
+ timeout: number;
5
+ };
6
+ export declare const runInit: (buildName: string, opts: InitOptions) => Promise<void>;
@@ -36,84 +36,187 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.runInit = void 0;
37
37
  const fs = __importStar(require("node:fs"));
38
38
  const path = __importStar(require("node:path"));
39
- const node_child_process_1 = require("node:child_process");
39
+ const readline = __importStar(require("node:readline"));
40
40
  const logging_1 = require("../logging");
41
- const INIT_SYSTEM_PROMPT = `You are a project setup assistant for Ridgeline, a build harness for long-horizon software execution.
42
-
43
- Your job is to help the user create the input files for a new build. Walk them through interactively.
44
-
45
- ## Step 1: spec.md
46
- Ask the user to describe their feature or project in a few sentences. Then expand it into a structured spec with:
47
- - A clear title
48
- - An overview paragraph
49
- - Features described as outcomes (what the system does), not implementation steps
50
- - Any constraints or requirements the user mentions
51
-
52
- Write the result to spec.md in the build directory. Let the user review and suggest edits.
53
-
54
- ## Step 2: constraints.md
55
- Ask about their technical setup:
56
- - Language and runtime (e.g., TypeScript/Node.js, Python, Go, Rust)
57
- - Framework (e.g., Express, Next.js, FastAPI, none)
58
- - Directory conventions
59
- - Naming conventions (camelCase, snake_case, etc.)
60
- - API style (REST, GraphQL, etc.)
61
- - Database (if any)
62
- - Key dependencies
63
- - A check command that verifies the project builds and tests pass (e.g., "npm run build && npm test")
64
-
65
- Structure the output as a markdown file with clear sections. Include a "## Check Command" section with the command in a fenced code block.
66
-
67
- Write to constraints.md in the build directory.
68
-
69
- ## Step 3: taste.md (optional)
70
- Ask if they have coding style preferences: commit message format, test patterns, comment style, etc.
71
- If yes, write to taste.md. If no, skip.
72
-
73
- Be conversational but efficient. Don't over-explain. Write files using the Write tool.`;
74
- const runInit = async (buildName) => {
41
+ const claudeInvoker_1 = require("../runner/claudeInvoker");
42
+ const snapshot_1 = require("../state/snapshot");
43
+ const MAX_CLARIFICATION_ROUNDS = 3;
44
+ const QA_JSON_SCHEMA = JSON.stringify({
45
+ type: "object",
46
+ properties: {
47
+ ready: { type: "boolean" },
48
+ questions: {
49
+ type: "array",
50
+ items: { type: "string" },
51
+ },
52
+ summary: { type: "string" },
53
+ },
54
+ required: ["ready"],
55
+ });
56
+ const resolveAgentPrompt = (filename) => {
57
+ const distPath = path.join(__dirname, "agents", filename);
58
+ if (fs.existsSync(distPath))
59
+ return fs.readFileSync(distPath, "utf-8");
60
+ const srcPath = path.join(__dirname, "..", "agents", filename);
61
+ if (fs.existsSync(srcPath))
62
+ return fs.readFileSync(srcPath, "utf-8");
63
+ throw new Error(`Agent prompt not found: ${filename}`);
64
+ };
65
+ const askQuestion = (rl, prompt) => {
66
+ return new Promise((resolve) => {
67
+ rl.question(prompt, (answer) => {
68
+ resolve(answer.trim());
69
+ });
70
+ });
71
+ };
72
+ const parseQAResponse = (resultText) => {
73
+ try {
74
+ return JSON.parse(resultText);
75
+ }
76
+ catch {
77
+ // If JSON parsing fails, treat as ready with the text as summary
78
+ return { ready: true, summary: resultText };
79
+ }
80
+ };
81
+ const runInit = async (buildName, opts) => {
75
82
  const ridgelineDir = path.join(process.cwd(), ".ridgeline");
76
83
  const buildDir = path.join(ridgelineDir, "builds", buildName);
77
84
  const phasesDir = path.join(buildDir, "phases");
78
85
  // Create directory structure
79
86
  fs.mkdirSync(phasesDir, { recursive: true });
80
87
  (0, logging_1.logInfo)(`Created build directory: ${buildDir}`);
88
+ // Generate codebase snapshot if project has existing code
89
+ let snapshot = "";
90
+ const hasExistingCode = fs.readdirSync(process.cwd()).some((f) => !f.startsWith(".") && f !== "node_modules" && f !== ".ridgeline");
91
+ if (hasExistingCode) {
92
+ snapshot = (0, snapshot_1.generateSnapshot)(process.cwd(), buildDir);
93
+ (0, logging_1.logInfo)("Generated codebase snapshot");
94
+ }
81
95
  // Check for existing project-level files
82
96
  const projectConstraints = path.join(ridgelineDir, "constraints.md");
83
97
  const projectTaste = path.join(ridgelineDir, "taste.md");
84
- let contextHint = "";
98
+ let existingFileHints = "";
85
99
  if (fs.existsSync(projectConstraints)) {
86
- contextHint += `\nNote: Project-level constraints.md exists at ${projectConstraints}. Ask if the user wants to reuse it or create a build-specific override.\n`;
100
+ existingFileHints += `\nNote: Project-level constraints.md exists at ${projectConstraints}. The user may want to reuse it rather than creating a new one.\n`;
87
101
  }
88
102
  if (fs.existsSync(projectTaste)) {
89
- contextHint += `\nNote: Project-level taste.md exists at ${projectTaste}. Ask if the user wants to reuse it or create a build-specific override.\n`;
103
+ existingFileHints += `\nNote: Project-level taste.md exists at ${projectTaste}. The user may want to reuse it rather than creating a new one.\n`;
90
104
  }
91
- const systemPrompt = INIT_SYSTEM_PROMPT + contextHint +
92
- `\n\nWrite all files to: ${buildDir}/`;
93
- (0, logging_1.logInfo)("Starting interactive setup session...");
94
- (0, logging_1.logInfo)("(This requires the claude CLI with an active subscription)\n");
95
- const proc = (0, node_child_process_1.spawn)("claude", [
96
- "--system-prompt", systemPrompt,
97
- "--allowedTools", "Write,Read",
98
- ], {
99
- cwd: process.cwd(),
100
- stdio: "inherit",
105
+ const systemPrompt = resolveAgentPrompt("init.md");
106
+ const timeoutMs = opts.timeout * 60 * 1000;
107
+ // Set up readline for user interaction
108
+ const rl = readline.createInterface({
109
+ input: process.stdin,
110
+ output: process.stdout,
101
111
  });
102
- return new Promise((resolve, reject) => {
103
- proc.on("close", (code) => {
104
- if (code === 0) {
105
- (0, logging_1.logInfo)(`\nInit complete. Build files at: ${buildDir}`);
106
- (0, logging_1.logInfo)(`Next: ridgeline plan ${buildName}`);
107
- resolve();
112
+ try {
113
+ // Step 1: Get initial description from user
114
+ console.log("");
115
+ const description = await askQuestion(rl, "Describe what you want to build:\n> ");
116
+ if (!description) {
117
+ (0, logging_1.logError)("A description is required");
118
+ return;
119
+ }
120
+ // Step 2: Intake turn — send description to Claude
121
+ console.log("\nAnalyzing your description...");
122
+ let userPrompt = `The user wants to create a new build called "${buildName}".\n\nUser description:\n${description}`;
123
+ if (snapshot) {
124
+ userPrompt += `\n\n## Existing Codebase Snapshot\n${snapshot}`;
125
+ }
126
+ if (existingFileHints) {
127
+ userPrompt += `\n\n## Existing Project Files\n${existingFileHints}`;
128
+ }
129
+ let result = await (0, claudeInvoker_1.invokeClaude)({
130
+ systemPrompt,
131
+ userPrompt,
132
+ model: opts.model,
133
+ cwd: process.cwd(),
134
+ verbose: opts.verbose,
135
+ timeoutMs,
136
+ jsonSchema: QA_JSON_SCHEMA,
137
+ });
138
+ let sessionId = result.sessionId;
139
+ let qa = parseQAResponse(result.result);
140
+ // Step 3: Clarification loop
141
+ for (let round = 0; round < MAX_CLARIFICATION_ROUNDS && !qa.ready; round++) {
142
+ // Display summary if present
143
+ if (qa.summary) {
144
+ console.log(`\nHere's what I understand so far:\n ${qa.summary}`);
145
+ }
146
+ // Display and collect answers to questions
147
+ if (qa.questions && qa.questions.length > 0) {
148
+ console.log("\nI have a few questions:\n");
149
+ const answers = [];
150
+ for (let i = 0; i < qa.questions.length; i++) {
151
+ const answer = await askQuestion(rl, ` ${i + 1}. ${qa.questions[i]}\n > `);
152
+ answers.push(answer);
153
+ }
154
+ // Send answers back to Claude
155
+ console.log("\nProcessing your answers...");
156
+ const answersPrompt = qa.questions
157
+ .map((q, i) => `Q: ${q}\nA: ${answers[i]}`)
158
+ .join("\n\n");
159
+ result = await (0, claudeInvoker_1.invokeClaude)({
160
+ systemPrompt,
161
+ userPrompt: `User answers to follow-up questions:\n\n${answersPrompt}`,
162
+ model: opts.model,
163
+ cwd: process.cwd(),
164
+ verbose: opts.verbose,
165
+ timeoutMs,
166
+ sessionId,
167
+ jsonSchema: QA_JSON_SCHEMA,
168
+ });
169
+ sessionId = result.sessionId;
170
+ qa = parseQAResponse(result.result);
108
171
  }
109
172
  else {
110
- reject(new Error(`Init session exited with code ${code}`));
173
+ // No questions but not ready — shouldn't happen, but break to avoid infinite loop
174
+ break;
111
175
  }
176
+ }
177
+ // Step 4: Generation turn
178
+ if (qa.summary) {
179
+ console.log(`\nFinal understanding:\n ${qa.summary}`);
180
+ }
181
+ console.log("\nGenerating build files...");
182
+ await (0, claudeInvoker_1.invokeClaude)({
183
+ systemPrompt,
184
+ userPrompt: `Generate the build input files now. Write them to: ${buildDir}/\n\nUse the Write tool to create spec.md, constraints.md, and optionally taste.md in that directory.`,
185
+ model: opts.model,
186
+ allowedTools: ["Write", "Read", "Glob", "Grep"],
187
+ cwd: process.cwd(),
188
+ verbose: opts.verbose,
189
+ timeoutMs,
190
+ sessionId,
112
191
  });
113
- proc.on("error", (err) => {
114
- reject(new Error(`Failed to start claude CLI: ${err.message}`));
115
- });
116
- });
192
+ // Step 5: Verify and report
193
+ console.log("");
194
+ const createdFiles = [];
195
+ for (const filename of ["spec.md", "constraints.md", "taste.md"]) {
196
+ if (fs.existsSync(path.join(buildDir, filename))) {
197
+ createdFiles.push(filename);
198
+ }
199
+ }
200
+ if (createdFiles.length === 0) {
201
+ (0, logging_1.logError)("No build files were created. Try running init again.");
202
+ return;
203
+ }
204
+ (0, logging_1.logInfo)("Created:");
205
+ for (const f of createdFiles) {
206
+ console.log(` ${path.join(buildDir, f)}`);
207
+ }
208
+ if (!createdFiles.includes("spec.md")) {
209
+ (0, logging_1.logError)("Warning: spec.md was not created — this is required for planning");
210
+ }
211
+ if (!createdFiles.includes("constraints.md")) {
212
+ (0, logging_1.logError)("Warning: constraints.md was not created — this is required for planning");
213
+ }
214
+ console.log("");
215
+ (0, logging_1.logInfo)(`Next: ridgeline plan ${buildName}`);
216
+ }
217
+ finally {
218
+ rl.close();
219
+ }
117
220
  };
118
221
  exports.runInit = runInit;
119
222
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AACjC,2DAA0C;AAC1C,wCAAoC;AAEpC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAgC4D,CAAA;AAEhF,MAAM,OAAO,GAAG,KAAK,EAAE,SAAiB,EAAiB,EAAE;IAChE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAA;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;IAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAE/C,6BAA6B;IAC7B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5C,IAAA,iBAAO,EAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAA;IAE/C,yCAAyC;IACzC,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;IAC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E,CAAC,CAAA;QAC9E,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7C,IAAA,kBAAQ,EAAC,yEAAyE,CAAC,CAAA;QACrF,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACf,IAAA,iBAAO,EAAC,wBAAwB,SAAS,EAAE,CAAC,CAAA;IAC9C,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAA;IACZ,CAAC;AACH,CAAC,CAAA;AAhKY,QAAA,OAAO,WAgKnB"}
@@ -7,5 +7,7 @@ export type InvokeOptions = {
7
7
  cwd: string;
8
8
  verbose: boolean;
9
9
  timeoutMs?: number;
10
+ sessionId?: string;
11
+ jsonSchema?: string;
10
12
  };
11
13
  export declare const invokeClaude: (opts: InvokeOptions) => Promise<ClaudeResult>;