fix: solve-issue-workflow writes to .workflows/ instead of registering
- Place workflow YAML in .workflows/ (dot-prefix convention) - Do not run uwf workflow add — use directly via uwf thread start - Fixes agent hallucination issue where registration was faked 小橘 <xiaoju@shazhou.work>
This commit is contained in:
@@ -73,7 +73,7 @@ graph:
|
|||||||
solve-issue-workflow:
|
solve-issue-workflow:
|
||||||
done:
|
done:
|
||||||
role: guardrails
|
role: guardrails
|
||||||
prompt: Solve-issue workflow registered. Install guardrails for repo at {{{repoPath}}}.
|
prompt: Solve-issue workflow placed in .workflows/. Install guardrails for repo at {{{repoPath}}}.
|
||||||
failed:
|
failed:
|
||||||
role: guardrails
|
role: guardrails
|
||||||
prompt: Solve-issue workflow failed ({{{reason}}}), but continue. Install guardrails for repo at {{{repoPath}}}.
|
prompt: Solve-issue workflow failed ({{{reason}}}), but continue. Install guardrails for repo at {{{repoPath}}}.
|
||||||
@@ -648,34 +648,35 @@ roles:
|
|||||||
capabilities:
|
capabilities:
|
||||||
- package-config
|
- package-config
|
||||||
solve-issue-workflow:
|
solve-issue-workflow:
|
||||||
goal: You set up the solve-issue workflow YAML so the project can use `uwf` for issue resolution.
|
goal: You place a solve-issue workflow YAML in .workflows/ so the project can use uwf thread start .workflows/solve-issue.yaml for issue resolution.
|
||||||
output: Describe the workflow registered. Set $status to done or failed.
|
output: Describe the workflow registered. Set $status to done or failed.
|
||||||
procedure: |
|
procedure: |-
|
||||||
cd into the repo path from your task prompt.
|
cd into the repo path from your task prompt.
|
||||||
|
|
||||||
1. Check if `uwf` CLI is available: `which uwf`
|
1. Check if `uwf` CLI is available: `which uwf`
|
||||||
- If not available: set $status=failed, reason="uwf CLI not installed"
|
- If not available: set $status=failed, reason="uwf CLI not installed"
|
||||||
2. Create `workflows/solve-issue.yaml` adapted for this project:
|
2. Check if `.workflows/solve-issue.yaml` already exists:
|
||||||
- Copy the standard solve-issue workflow structure (planner → developer → reviewer → tester → committer)
|
- If it exists and looks correct (has planner/developer/reviewer/tester/committer roles), skip. Set $status=done.
|
||||||
|
3. Create `.workflows/solve-issue.yaml` adapted for this project:
|
||||||
|
- Copy the standard solve-issue workflow structure (planner -> developer -> reviewer -> tester -> committer)
|
||||||
- Adjust the developer role procedure to use this project's test runner and build commands
|
- Adjust the developer role procedure to use this project's test runner and build commands
|
||||||
- The workflow should reference the correct repo path and build toolchain (bun)
|
- The workflow should reference the correct repo path and build toolchain (bun)
|
||||||
3. Register with uwf: `uwf workflow add workflows/solve-issue.yaml`
|
NOTE: Place the file in `.workflows/` (dot-prefix), NOT `workflows/`. Do NOT run `uwf workflow add`. The file is used directly via `uwf thread start .workflows/solve-issue.yaml`.
|
||||||
|
|
||||||
## Verification
|
## Verification
|
||||||
```bash
|
```bash
|
||||||
# 1. workflow file exists
|
test -f .workflows/solve-issue.yaml
|
||||||
test -f workflows/solve-issue.yaml
|
node -e "
|
||||||
# 2. registered in uwf
|
const fs = require('fs');
|
||||||
uwf workflow list --format json | node -e "
|
const content = fs.readFileSync('.workflows/solve-issue.yaml', 'utf8');
|
||||||
let d=''; process.stdin.on('data',c=>d+=c); process.stdin.on('end',()=>{
|
const required = ['planner', 'developer', 'reviewer', 'tester', 'committer'];
|
||||||
const wfs = JSON.parse(d);
|
const missing = required.filter(r => !content.includes(r + ':'));
|
||||||
if (wfs.some(w => w.name === 'solve-issue')) console.log('✅ solve-issue registered');
|
if (missing.length) { console.error('Missing roles:', missing.join(', ')); process.exit(1); }
|
||||||
else { console.error('❌ solve-issue not found'); process.exit(1); }
|
console.log('All roles present');
|
||||||
})
|
|
||||||
"
|
"
|
||||||
```
|
```
|
||||||
|
|
||||||
Post-condition: `uwf workflow list` includes solve-issue.
|
Post-condition: `.workflows/solve-issue.yaml` exists with all 5 roles.
|
||||||
description: Register solve-issue workflow for the project
|
description: Register solve-issue workflow for the project
|
||||||
frontmatter:
|
frontmatter:
|
||||||
oneOf:
|
oneOf:
|
||||||
|
|||||||
Reference in New Issue
Block a user