agentic-forge 0.0.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/.gitattributes +24 -0
- package/.github/workflows/ci.yml +70 -0
- package/.markdownlint-cli2.jsonc +16 -0
- package/.prettierignore +3 -0
- package/.prettierrc +6 -0
- package/.vscode/agentic-forge.code-workspace +26 -0
- package/CHANGELOG.md +100 -0
- package/CLAUDE.md +158 -0
- package/CONTRIBUTING.md +152 -0
- package/LICENSE +21 -0
- package/README.md +145 -0
- package/agentic-forge-banner.png +0 -0
- package/biome.json +21 -0
- package/package.json +5 -0
- package/scripts/copy-assets.js +21 -0
- package/src/agents/explorer.md +97 -0
- package/src/agents/reviewer.md +137 -0
- package/src/checkpoints/manager.ts +119 -0
- package/src/claude/.claude/skills/analyze/SKILL.md +241 -0
- package/src/claude/.claude/skills/analyze/references/bug.md +62 -0
- package/src/claude/.claude/skills/analyze/references/debt.md +76 -0
- package/src/claude/.claude/skills/analyze/references/doc.md +67 -0
- package/src/claude/.claude/skills/analyze/references/security.md +76 -0
- package/src/claude/.claude/skills/analyze/references/style.md +72 -0
- package/src/claude/.claude/skills/create-checkpoint/SKILL.md +88 -0
- package/src/claude/.claude/skills/create-log/SKILL.md +75 -0
- package/src/claude/.claude/skills/fix-analyze/SKILL.md +102 -0
- package/src/claude/.claude/skills/git-branch/SKILL.md +71 -0
- package/src/claude/.claude/skills/git-commit/SKILL.md +107 -0
- package/src/claude/.claude/skills/git-pr/SKILL.md +96 -0
- package/src/claude/.claude/skills/orchestrate/SKILL.md +120 -0
- package/src/claude/.claude/skills/sdlc-plan/SKILL.md +163 -0
- package/src/claude/.claude/skills/sdlc-plan/references/bug.md +115 -0
- package/src/claude/.claude/skills/sdlc-plan/references/chore.md +105 -0
- package/src/claude/.claude/skills/sdlc-plan/references/feature.md +130 -0
- package/src/claude/.claude/skills/sdlc-review/SKILL.md +215 -0
- package/src/claude/.claude/skills/workflow-builder/SKILL.md +185 -0
- package/src/claude/.claude/skills/workflow-builder/references/REFERENCE.md +487 -0
- package/src/claude/.claude/skills/workflow-builder/references/workflow-example.yaml +427 -0
- package/src/cli.ts +182 -0
- package/src/commands/config-cmd.ts +28 -0
- package/src/commands/index.ts +21 -0
- package/src/commands/init.ts +96 -0
- package/src/commands/release-notes.ts +85 -0
- package/src/commands/resume.ts +103 -0
- package/src/commands/run.ts +234 -0
- package/src/commands/shortcuts.ts +11 -0
- package/src/commands/skills-dir.ts +11 -0
- package/src/commands/status.ts +112 -0
- package/src/commands/update.ts +64 -0
- package/src/commands/version.ts +27 -0
- package/src/commands/workflows.ts +129 -0
- package/src/config.ts +129 -0
- package/src/console.ts +790 -0
- package/src/executor.ts +354 -0
- package/src/git/worktree.ts +236 -0
- package/src/logging/logger.ts +95 -0
- package/src/orchestrator.ts +815 -0
- package/src/parser.ts +225 -0
- package/src/progress.ts +306 -0
- package/src/prompts/agentic-system.md +31 -0
- package/src/ralph-loop.ts +260 -0
- package/src/renderer.ts +164 -0
- package/src/runner.ts +634 -0
- package/src/signal-manager.ts +55 -0
- package/src/steps/base.ts +71 -0
- package/src/steps/conditional-step.ts +144 -0
- package/src/steps/index.ts +15 -0
- package/src/steps/parallel-step.ts +213 -0
- package/src/steps/prompt-step.ts +121 -0
- package/src/steps/ralph-loop-step.ts +186 -0
- package/src/steps/serial-step.ts +84 -0
- package/src/templates/analysis/bug.md.j2 +35 -0
- package/src/templates/analysis/debt.md.j2 +38 -0
- package/src/templates/analysis/doc.md.j2 +45 -0
- package/src/templates/analysis/security.md.j2 +35 -0
- package/src/templates/analysis/style.md.j2 +44 -0
- package/src/templates/analysis-summary.md.j2 +58 -0
- package/src/templates/checkpoint.md.j2 +27 -0
- package/src/templates/implementation-report.md.j2 +81 -0
- package/src/templates/memory.md.j2 +16 -0
- package/src/templates/plan-bug.md.j2 +42 -0
- package/src/templates/plan-chore.md.j2 +27 -0
- package/src/templates/plan-feature.md.j2 +41 -0
- package/src/templates/progress.json.j2 +16 -0
- package/src/templates/ralph-report.md.j2 +45 -0
- package/src/types.ts +141 -0
- package/src/workflows/analyze-codebase-merge.yaml +328 -0
- package/src/workflows/analyze-codebase.yaml +196 -0
- package/src/workflows/analyze-single.yaml +56 -0
- package/src/workflows/demo.yaml +180 -0
- package/src/workflows/one-shot.yaml +54 -0
- package/src/workflows/plan-build-review.yaml +160 -0
- package/src/workflows/ralph-loop.yaml +73 -0
- package/tests/config.test.ts +219 -0
- package/tests/console.test.ts +506 -0
- package/tests/executor.test.ts +339 -0
- package/tests/init.test.ts +86 -0
- package/tests/logger.test.ts +110 -0
- package/tests/parser.test.ts +290 -0
- package/tests/progress.test.ts +345 -0
- package/tests/ralph-loop.test.ts +418 -0
- package/tests/renderer.test.ts +350 -0
- package/tests/runner.test.ts +497 -0
- package/tests/setup.test.ts +7 -0
- package/tests/signal-manager.test.ts +26 -0
- package/tests/steps.test.ts +412 -0
- package/tests/worktree.test.ts +411 -0
- package/tsconfig.json +18 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: af-sdlc-review
|
|
3
|
+
description: Review implementation quality and plan compliance
|
|
4
|
+
argument-hint: <workflow-id> [plan] [output_dir] [severity]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SDLC Review
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Review the implementation against quality standards and optionally against a plan. When a plan is provided, the review verifies plan compliance. Creates a review.md file in the specified output directory. When no plan is provided, the review examines the diff compared to the remote main branch.
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
### Definitions
|
|
16
|
+
|
|
17
|
+
- **`<workflow-id>`** (required): The workflow identifier for output organization.
|
|
18
|
+
- **`[plan]`** (optional): Path to plan document. When provided, review checks plan compliance.
|
|
19
|
+
- **`[output_dir]`** (optional): Directory to write review.md file (default to `agentic/outputs/<workflow-id>`).
|
|
20
|
+
- **`[severity]`** (optional): Minimum severity to report. Values: `minor`, `major`, `critical`. Defaults to `minor`.
|
|
21
|
+
|
|
22
|
+
### Values
|
|
23
|
+
|
|
24
|
+
\$ARGUMENTS
|
|
25
|
+
|
|
26
|
+
## Core Principles
|
|
27
|
+
|
|
28
|
+
- Review all changes thoroughly before reporting
|
|
29
|
+
- When no plan is provided, review the diff against `origin/main` (or `origin/master` as fallback)
|
|
30
|
+
- When a plan is provided, verify all milestones and tasks are completed
|
|
31
|
+
- Report issues with accurate severity levels
|
|
32
|
+
- Tests, lint, types, and build must pass for a successful review
|
|
33
|
+
- Always create a review.md file in the output directory
|
|
34
|
+
|
|
35
|
+
## Instructions
|
|
36
|
+
|
|
37
|
+
1. **Parse Arguments**
|
|
38
|
+
- Extract workflow-id, plan, output_dir, and severity from arguments
|
|
39
|
+
- Default output_dir to `agentic/outputs/<workflow-id>` if not specified
|
|
40
|
+
- Default severity to `minor` if not specified
|
|
41
|
+
|
|
42
|
+
2. **Determine Review Scope**
|
|
43
|
+
- If plan is provided: Load and parse the plan document
|
|
44
|
+
- If no plan: Fetch latest remote main branch and get diff
|
|
45
|
+
|
|
46
|
+
3. **Run Quality Checks**
|
|
47
|
+
- **Test Suite**: Run all tests, verify coverage
|
|
48
|
+
- **Linter**: Check for linting errors
|
|
49
|
+
- **Type Checker**: Verify type correctness
|
|
50
|
+
- **Build**: Ensure project builds successfully
|
|
51
|
+
|
|
52
|
+
4. **Review Changes**
|
|
53
|
+
- If plan provided:
|
|
54
|
+
- Verify all milestones completed
|
|
55
|
+
- Verify all tasks marked done
|
|
56
|
+
- Check for scope creep (unplanned changes)
|
|
57
|
+
- If no plan:
|
|
58
|
+
- Review all changed files in the diff
|
|
59
|
+
- Check for code quality issues
|
|
60
|
+
- Identify potential bugs or regressions
|
|
61
|
+
|
|
62
|
+
5. **Generate Review Output**
|
|
63
|
+
- Aggregate all check results
|
|
64
|
+
- Filter issues by severity threshold
|
|
65
|
+
- Generate summary
|
|
66
|
+
|
|
67
|
+
6. **Write Outputs**
|
|
68
|
+
- Create `review.md` file in the output_dir
|
|
69
|
+
- Return JSON output
|
|
70
|
+
|
|
71
|
+
## Output Guidance
|
|
72
|
+
|
|
73
|
+
### JSON Output
|
|
74
|
+
|
|
75
|
+
Return JSON with review details:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"success": true,
|
|
80
|
+
"review_passed": {{review_passed}},
|
|
81
|
+
"checks": {
|
|
82
|
+
"plan_compliance": {
|
|
83
|
+
"passed": {{plan_compliance_passed}},
|
|
84
|
+
"milestones_complete": {{milestones_complete}},
|
|
85
|
+
"milestones_total": {{milestones_total}}
|
|
86
|
+
},
|
|
87
|
+
"tests": {
|
|
88
|
+
"passed": {{tests_passed}},
|
|
89
|
+
"total": {{tests_total}},
|
|
90
|
+
"passing": {{tests_passing}},
|
|
91
|
+
"failing": {{tests_failing}},
|
|
92
|
+
"coverage": {{coverage_percent}}
|
|
93
|
+
},
|
|
94
|
+
"lint": {
|
|
95
|
+
"passed": {{lint_passed}},
|
|
96
|
+
"errors": {{lint_errors}},
|
|
97
|
+
"warnings": {{lint_warnings}}
|
|
98
|
+
},
|
|
99
|
+
"types": {
|
|
100
|
+
"passed": {{types_passed}},
|
|
101
|
+
"errors": {{type_errors}}
|
|
102
|
+
},
|
|
103
|
+
"build": {
|
|
104
|
+
"passed": {{build_passed}}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"issues": [{{issues_array}}],
|
|
108
|
+
"summary": "{{summary}}",
|
|
109
|
+
"document_path": "{{document_path}}"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<!--
|
|
114
|
+
Placeholders:
|
|
115
|
+
- {{review_passed}}: Boolean indicating if review passed (true/false)
|
|
116
|
+
- {{plan_compliance_passed}}: Boolean for plan compliance check (true/false/null if no plan)
|
|
117
|
+
- {{milestones_complete}}, {{milestones_total}}: Integer counts for plan compliance (null if no plan)
|
|
118
|
+
- {{tests_passed}}: Boolean for tests passing (true/false)
|
|
119
|
+
- {{tests_total}}, {{tests_passing}}, {{tests_failing}}: Integer counts for test results
|
|
120
|
+
- {{coverage_percent}}: Code coverage percentage (e.g., 82.5)
|
|
121
|
+
- {{lint_passed}}: Boolean for lint check passing (true/false)
|
|
122
|
+
- {{lint_errors}}, {{lint_warnings}}: Integer counts for lint results
|
|
123
|
+
- {{types_passed}}: Boolean for type check passing (true/false)
|
|
124
|
+
- {{type_errors}}: Integer count for type check errors
|
|
125
|
+
- {{build_passed}}: Boolean for build passing (true/false)
|
|
126
|
+
- {{issues_array}}: Array of issue objects with severity, category, message, file, line
|
|
127
|
+
- {{summary}}: Human-readable summary of review results
|
|
128
|
+
- {{document_path}}: Path to generated review.md file
|
|
129
|
+
-->
|
|
130
|
+
|
|
131
|
+
### Issue Schema
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"severity": "{{severity}}",
|
|
136
|
+
"category": "{{category}}",
|
|
137
|
+
"message": "{{message}}",
|
|
138
|
+
"file": "{{file}}",
|
|
139
|
+
"line": {{line}}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
<!--
|
|
144
|
+
Placeholders:
|
|
145
|
+
- {{severity}}: One of minor, major, critical
|
|
146
|
+
- {{category}}: Check category (tests, lint, types, build, plan_compliance, code_quality)
|
|
147
|
+
- {{message}}: Description of the issue
|
|
148
|
+
- {{file}}: Path to the affected file (null if not applicable)
|
|
149
|
+
- {{line}}: Line number where issue occurs (null if not applicable)
|
|
150
|
+
-->
|
|
151
|
+
|
|
152
|
+
### Review Document
|
|
153
|
+
|
|
154
|
+
Create a `review.md` file in the output_dir with the following format:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
# Review
|
|
158
|
+
|
|
159
|
+
**Status**: {{review_status}}
|
|
160
|
+
**Date**: {{review_date}}
|
|
161
|
+
|
|
162
|
+
## Progress
|
|
163
|
+
|
|
164
|
+
- [ ] All issues resolved
|
|
165
|
+
- [ ] Tests passing
|
|
166
|
+
- [ ] Lint passing
|
|
167
|
+
- [ ] Types passing
|
|
168
|
+
- [ ] Build passing
|
|
169
|
+
|
|
170
|
+
## Summary
|
|
171
|
+
|
|
172
|
+
{{summary}}
|
|
173
|
+
|
|
174
|
+
## Checks
|
|
175
|
+
|
|
176
|
+
| Check | Status | Details |
|
|
177
|
+
| --------------- | -------------------------- | -------------------------------------------------------------------------- |
|
|
178
|
+
| Plan Compliance | {{plan_compliance_status}} | {{milestones_complete}}/{{milestones_total}} milestones |
|
|
179
|
+
| Tests | {{tests_status}} | {{tests_passing}}/{{tests_total}} passing ({{coverage_percent}}% coverage) |
|
|
180
|
+
| Lint | {{lint_status}} | {{lint_errors}} errors, {{lint_warnings}} warnings |
|
|
181
|
+
| Types | {{types_status}} | {{type_errors}} errors |
|
|
182
|
+
| Build | {{build_status}} | {{build_details}} |
|
|
183
|
+
|
|
184
|
+
## Issues
|
|
185
|
+
|
|
186
|
+
{{#if issues_exist}}
|
|
187
|
+
| Severity | Category | File | Line | Message |
|
|
188
|
+
|----------|----------|------|------|---------|
|
|
189
|
+
{{#each issues}}
|
|
190
|
+
| {{severity}} | {{category}} | {{file}} | {{line}} | {{message}} |
|
|
191
|
+
{{/each}}
|
|
192
|
+
{{else}}
|
|
193
|
+
No issues found.
|
|
194
|
+
{{/if}}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
<!--
|
|
198
|
+
Placeholders:
|
|
199
|
+
- {{review_status}}: PASSED or FAILED
|
|
200
|
+
- {{review_date}}: ISO 8601 date (YYYY-MM-DD)
|
|
201
|
+
- {{summary}}: Human-readable summary of review results
|
|
202
|
+
- {{plan_compliance_status}}: Checkmark or X emoji based on passed status
|
|
203
|
+
- {{milestones_complete}}, {{milestones_total}}: Integer counts
|
|
204
|
+
- {{tests_status}}: Checkmark or X emoji based on passed status
|
|
205
|
+
- {{tests_passing}}, {{tests_total}}: Integer counts
|
|
206
|
+
- {{coverage_percent}}: Code coverage percentage
|
|
207
|
+
- {{lint_status}}: Checkmark or X emoji based on passed status
|
|
208
|
+
- {{lint_errors}}, {{lint_warnings}}: Integer counts
|
|
209
|
+
- {{types_status}}: Checkmark or X emoji based on passed status
|
|
210
|
+
- {{type_errors}}: Integer count
|
|
211
|
+
- {{build_status}}: Checkmark or X emoji based on passed status
|
|
212
|
+
- {{build_details}}: Brief description of build result
|
|
213
|
+
- {{issues_exist}}: Boolean indicating if there are issues to display
|
|
214
|
+
- {{issues}}: Array of issue objects (severity, category, file, line, message)
|
|
215
|
+
-->
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: af-workflow-builder
|
|
3
|
+
description: Create, update, explain, validate, and debug agentic-forge YAML workflows with comprehensive schema knowledge
|
|
4
|
+
argument-hint: <request>
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Workflow Builder
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Create, update, explain, validate, and debug agentic-forge YAML workflows. This skill has comprehensive knowledge of every workflow property, step type, setting, and pattern. Use it when you need to author new workflows, modify existing ones, understand workflow features, check YAML correctness, or troubleshoot execution issues.
|
|
13
|
+
|
|
14
|
+
## Arguments
|
|
15
|
+
|
|
16
|
+
### Definitions
|
|
17
|
+
|
|
18
|
+
- **`<request>`** (required): Free-form description of what you want. Examples: "create a workflow that plans and reviews a feature", "update my-workflow.yaml to add a parallel step", "explain how ralph-loop works", "validate my-workflow.yaml", "debug why my conditional always takes the else branch"
|
|
19
|
+
|
|
20
|
+
### Values
|
|
21
|
+
|
|
22
|
+
\$ARGUMENTS
|
|
23
|
+
|
|
24
|
+
## Additional Resources
|
|
25
|
+
|
|
26
|
+
- For the complete annotated workflow example, see [workflow-example.yaml](references/workflow-example.yaml)
|
|
27
|
+
- For the complete schema reference with all properties, types, and defaults, see [REFERENCE.md](references/REFERENCE.md)
|
|
28
|
+
|
|
29
|
+
## Core Principles
|
|
30
|
+
|
|
31
|
+
- Always produce valid YAML that conforms to the workflow schema
|
|
32
|
+
- Use kebab-case for all YAML keys (e.g., `timeout-minutes`, `max-retry`, `on-error`)
|
|
33
|
+
- Use kebab-case for step names and workflow names (e.g., `analyze-codebase`, `implement-feature`)
|
|
34
|
+
- Use snake_case for variable names (e.g., `max_iterations`, `fix_severity`)
|
|
35
|
+
- Use skill names without prefix in prompt steps (e.g., `/sdlc-plan`)
|
|
36
|
+
- Keep workflows focused: prefer composing simple workflows over one massive workflow
|
|
37
|
+
- Every workflow requires `name`, `version: "1.0"`, and at least one step
|
|
38
|
+
- Include descriptions on the workflow and variables for documentation
|
|
39
|
+
- When updating workflows, read the existing file first and preserve structure
|
|
40
|
+
- When validating, check: required fields, valid step types, valid setting values, variable type consistency, no nested parallel steps
|
|
41
|
+
- When debugging, look for: undefined template variables, incorrect condition expressions, missing completion-promise in ralph loops, timeout issues
|
|
42
|
+
|
|
43
|
+
## Skill-Specific Guidelines
|
|
44
|
+
|
|
45
|
+
### Operation Modes
|
|
46
|
+
|
|
47
|
+
**Create** - Generate a complete workflow YAML from a description:
|
|
48
|
+
|
|
49
|
+
1. Ask clarifying questions if the request is ambiguous
|
|
50
|
+
2. Choose appropriate step types for the task
|
|
51
|
+
3. Define variables for configurable values
|
|
52
|
+
4. Set reasonable defaults for settings and timeouts
|
|
53
|
+
5. Write the YAML file to the requested location (default: project root or `agentic/workflows/`)
|
|
54
|
+
|
|
55
|
+
**Update** - Modify an existing workflow YAML:
|
|
56
|
+
|
|
57
|
+
1. Read the existing workflow file
|
|
58
|
+
2. Understand the current structure
|
|
59
|
+
3. Apply the requested changes
|
|
60
|
+
4. Preserve comments and formatting where possible
|
|
61
|
+
|
|
62
|
+
**Explain** - Answer questions about workflow features:
|
|
63
|
+
|
|
64
|
+
1. Reference the schema to provide accurate information
|
|
65
|
+
2. Include examples from the reference workflow
|
|
66
|
+
3. Explain defaults and valid values
|
|
67
|
+
|
|
68
|
+
**Validate** - Check a workflow YAML for correctness:
|
|
69
|
+
|
|
70
|
+
1. Read the workflow file
|
|
71
|
+
2. Check against the schema (required fields, valid types, valid values)
|
|
72
|
+
3. Report issues with specific field references
|
|
73
|
+
4. Suggest fixes for each issue found
|
|
74
|
+
|
|
75
|
+
**Debug** - Help troubleshoot workflow execution issues:
|
|
76
|
+
|
|
77
|
+
1. Read the workflow YAML and any error output
|
|
78
|
+
2. Check for common issues (undefined variables, incorrect conditions, missing fields)
|
|
79
|
+
3. Check `agentic/outputs/<workflow-id>/progress.json` if available
|
|
80
|
+
4. Suggest specific fixes
|
|
81
|
+
|
|
82
|
+
### Step Type Selection Guide
|
|
83
|
+
|
|
84
|
+
| Step Type | Use When |
|
|
85
|
+
| ---------------- | -------------------------------------------------- |
|
|
86
|
+
| `prompt` | Single task, skill invocation, or simple operation |
|
|
87
|
+
| `serial` | Multiple tasks that must run in sequence |
|
|
88
|
+
| `parallel` | Independent tasks that can run concurrently |
|
|
89
|
+
| `conditional` | Branching logic based on variables or outputs |
|
|
90
|
+
| `ralph-loop` | Iterative work with unknown iteration count |
|
|
91
|
+
| `wait-for-human` | Pause for human review, approval, or input |
|
|
92
|
+
|
|
93
|
+
### Model Selection Strategy
|
|
94
|
+
|
|
95
|
+
| Model | Best For |
|
|
96
|
+
| -------- | --------------------------------------------------- |
|
|
97
|
+
| `haiku` | Quick tasks: validation, formatting, small analysis |
|
|
98
|
+
| `sonnet` | Default: implementation, review, planning |
|
|
99
|
+
| `opus` | Complex reasoning: architecture, large refactors |
|
|
100
|
+
|
|
101
|
+
Priority: step `model` > `settings.model` > config default > `sonnet`
|
|
102
|
+
|
|
103
|
+
### Common Patterns
|
|
104
|
+
|
|
105
|
+
**Plan-Build-Review**: plan (prompt) -> implement (ralph-loop) -> review (prompt) -> conditional fix -> conditional PR
|
|
106
|
+
|
|
107
|
+
**Parallel Analysis**: parallel step with multiple analyze prompts, each with `on-error: skip`
|
|
108
|
+
|
|
109
|
+
**Iterative Implementation**: ralph-loop with completion-promise, reading a plan file each iteration
|
|
110
|
+
|
|
111
|
+
**Gated Deployment**: implement -> review -> wait-for-human approval -> conditional deploy
|
|
112
|
+
|
|
113
|
+
### Common Debugging Issues
|
|
114
|
+
|
|
115
|
+
| Symptom | Likely Cause | Fix |
|
|
116
|
+
| -------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------- |
|
|
117
|
+
| "Missing required variable" | Variable not passed via `--var` | Add `--var "name=value"` to CLI or set `default` |
|
|
118
|
+
| Conditional always takes else | Condition expression evaluates to falsy | Check Jinja2 expression syntax and variable names |
|
|
119
|
+
| Ralph loop never completes | Completion JSON not output or promise mismatch | Verify `completion-promise` matches the `promise` field in JSON |
|
|
120
|
+
| Template variable shows as `{{ ... }}` | Undefined variable in lenient mode | Define the variable or enable `strict-mode: true` to catch early |
|
|
121
|
+
| Step timeout | Task exceeds `timeout-minutes` | Increase step or workflow `timeout-minutes` |
|
|
122
|
+
| "Nested parallel steps not allowed" | Parallel step inside another parallel | Flatten structure or use serial inside parallel |
|
|
123
|
+
|
|
124
|
+
## Instructions
|
|
125
|
+
|
|
126
|
+
1. **Identify the operation** from the user's request (create, update, explain, validate, or debug)
|
|
127
|
+
2. **Load reference material**: Read [REFERENCE.md](references/REFERENCE.md) for schema details and [workflow-example.yaml](references/workflow-example.yaml) for patterns
|
|
128
|
+
3. **For create operations**:
|
|
129
|
+
a. Determine which step types are needed
|
|
130
|
+
b. Identify what variables should be configurable
|
|
131
|
+
c. Choose appropriate settings (git, timeouts, model)
|
|
132
|
+
d. Generate the complete YAML with comments explaining key sections
|
|
133
|
+
e. Write the file to the appropriate location
|
|
134
|
+
4. **For update operations**:
|
|
135
|
+
a. Read the existing workflow YAML file
|
|
136
|
+
b. Understand the current structure and intent
|
|
137
|
+
c. Apply the requested modifications
|
|
138
|
+
d. Validate the result is still correct
|
|
139
|
+
5. **For explain operations**:
|
|
140
|
+
a. Reference the schema to provide accurate, complete answers
|
|
141
|
+
b. Include relevant examples
|
|
142
|
+
c. Mention defaults, valid values, and edge cases
|
|
143
|
+
6. **For validate operations**:
|
|
144
|
+
a. Read the workflow YAML file
|
|
145
|
+
b. Check all required fields are present
|
|
146
|
+
c. Verify step types have their required properties
|
|
147
|
+
d. Check variable references in templates exist in the variables section
|
|
148
|
+
e. Report all issues found with suggestions
|
|
149
|
+
7. **For debug operations**:
|
|
150
|
+
a. Read the workflow YAML and any error output or progress files
|
|
151
|
+
b. Identify the root cause of the issue
|
|
152
|
+
c. Provide a specific fix with updated YAML
|
|
153
|
+
|
|
154
|
+
## Output Guidance
|
|
155
|
+
|
|
156
|
+
After completing the operation, output a JSON object:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"status": "completed",
|
|
161
|
+
"operation": "create | update | explain | validate | debug",
|
|
162
|
+
"workflow": {
|
|
163
|
+
"name": "workflow-name",
|
|
164
|
+
"path": "path/to/workflow.yaml"
|
|
165
|
+
},
|
|
166
|
+
"summary": "Brief description of what was done",
|
|
167
|
+
"issues": [],
|
|
168
|
+
"suggestions": []
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
For validate operations, populate `issues`:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"issues": [
|
|
177
|
+
{
|
|
178
|
+
"severity": "error | warning",
|
|
179
|
+
"field": "steps[0].type",
|
|
180
|
+
"message": "Invalid step type: 'loop'",
|
|
181
|
+
"suggestion": "Use 'ralph-loop' instead"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
```
|