You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Analyze Cypilot artifacts against templates or code against design requirements with traceability verification (tool invocation is validate-only)"
4
+
---
5
+
6
+
ALWAYS open and follow `{cypilot_path}/.core/workflows/analyze.md`
@@ -69,6 +70,16 @@ build command → track lifecycle. It returns a structured dict with keys:
69
70
-`"delegated"` — command assembled and ready for invocation
70
71
-`"error"` — a precondition failed; check the `error` field
71
72
73
+
**Error handling:** When `result["status"] == "error"`, inspect `result["error"]`
74
+
for the failure reason and `result["lifecycle_state"]` for the lifecycle position.
75
+
Do NOT proceed to Post-Run Handoff. Instead:
76
+
- If `result["bootstrap"]["needed"]` is `True`: inform the user that `ralphex --init`
77
+
is required and request explicit approval before running it.
78
+
- If `result["error"]` references review precondition failure: report the
79
+
precondition (e.g. no commits ahead of default branch) and suggest resolution.
80
+
- For all other errors: report the error message, the lifecycle state at failure,
81
+
and offer retry or abort options.
82
+
72
83
**Mode selection:**
73
84
74
85
| Mode | Command | Notes |
@@ -120,9 +131,28 @@ from cypilot.ralphex_export import (
120
131
121
132
1. Call `read_handoff_status(exit_code, output_refs, partial)` to classify the delegation outcome (success/partial/failed).
122
133
2. Call `check_completed_plans(plans_dir, task_slug)` to inspect the ralphex-managed `completed/` subdirectory for lifecycle artifacts.
123
-
3. Call `run_validation_commands(commands, cwd=repo_root)` with the validation commands from the original Cypilot plan to verify execution correctness independently of ralphex. Pass the delegated repository root as `cwd` so repo-relative commands resolve correctly.
134
+
3. Call `run_validation_commands(commands, cwd=repo_root)` with validation commands
135
+
extracted from the `## Validation Commands` section of the compiled plan file
136
+
(`result["plan_file"]`). Each non-empty, non-heading line in that section is one
137
+
command. Pass the delegated repository root as `cwd` so repo-relative commands
138
+
resolve correctly.
124
139
4. Call `report_handoff(...)` to assemble the delegation summary.
125
-
5. Return the handoff report to the main conversation with status, output refs, validation outcome, and next-step options.
140
+
5. Return the handoff report to the main conversation using this structured format:
0 commit comments