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
feat(lfg): add dogfood step and riffrec/video/screenshot input
Bring the linear /lfg skill and the lfg workflow to parity and extend
both:
- Add a Dogfood step to the skill, inlining ce-dogfood-beta's diff-scoped
behavior (it is disable-model-invocation and can't be invoked from the
pipeline), mirroring the workflow's Dogfood phase.
- Accept a Riffrec bundle, video, audio, or screenshots as input and
analyze it before planning, on both surfaces.
- Reproduce bugs locally with synthetic, anonymized state before writing
the fix.
- Capture demos non-interactively via ce-demo-reel for observable
changes, and emit a fixed PR template for feedback-sourced runs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/workflows/lfg.js
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@
53
53
exportconstmeta={
54
54
name: 'lfg',
55
55
description: 'Compounding autonomous engineering pipeline named in compound-engineering steps: Worktree, Riffrec, Research, Ideate, Plan, Doc Review, Work, Code Review, Autofix, Re-review, Simplify, Test, Dogfood, Commit & PR, Compound, Cleanup. Runs in an isolated git worktree, recalls prior learnings in and captures a durable learning out, watching CI to green.',
56
-
whenToUse: 'Hands-off execution of a software task when you want the full compound-engineering loop (institutional recall in, durable learning out, CI watched to green) rather than a single linear pass. Runs in an isolated git worktree so your checkout is untouched. Pass the feature description (or a Riffrec bundlepath) as args. Add { dryRun: true } to stop before Commit & PR / CI / Compound.',
56
+
whenToUse: 'Hands-off execution of a software task when you want the full compound-engineering loop (institutional recall in, durable learning out, CI watched to green) rather than a single linear pass. Runs in an isolated git worktree so your checkout is untouched. Pass the feature description — or a Riffrec bundle, video, audio, or screenshot path — as args. Add { dryRun: true } to stop before Commit & PR / CI / Compound.',
57
57
phases: [
58
58
{title: 'Worktree',detail: 'Create an isolated git worktree so the run never touches the user checkout'},
59
59
{title: 'Riffrec',detail: 'ce-riffrec-feedback-analysis — if a recording is present, find + analyze it and fold its findings into the task'},
`Determine whether a Riffrec product-feedback recording is available for this task, then act.\n\nTask:\n${task}\n\nLook for a \`riffrec-*.zip\` or a bundle containing session.json + events.json + recording.webm + voice.webm — in any path named in the task, the repo root, the current directory, or ~/Downloads.\n- If you find one, invoke the ce-riffrec-feedback-analysis skill to analyze it, and return found=true, the path, and the structured product feedback (bugs, UX issues, repro steps, the user's spoken intent).\n- If none exists, return found=false and stop — do not fabricate feedback. ${NON_INTERACTIVE}`,
422
+
`Determine whether product-feedback input is available for this task, then act.\n\nTask:\n${task}\n\nLook for any of these — in any path named in the task, the repo root, the current directory, or ~/Downloads:\n- a \`riffrec-*.zip\` or a bundle containing session.json + events.json + recording.webm + voice.webm;\n- a video or audio recording (.mp4 / .mov / .webm / .m4a / .mp3 / .wav);\n- one or more screenshots (image files) showing the problem.\n\n- For a Riffrec bundle, video, or audio: invoke the ce-riffrec-feedback-analysis skill on it and return found=true, the path, and the structured product feedback (bugs, UX issues, repro steps, the user's spoken intent).\n- For screenshots: view them, derive what is broken or requested, and return found=true, the path, and that as the feedback.\n- If none exists, return found=false and stop — do not fabricate feedback. ${NON_INTERACTIVE}`,
`${wt}Invoke the ce-work skill to execute the plan at ${planPath}. Implement the full feature, following the codebase's existing patterns and the conventions surfaced in research. Address these Doc Review concerns as you go:\n${JSON.stringify(planConcerns)}\n${NON_INTERACTIVE}\n\nWhen done, report whether files actually changed, a concise summary, the files touched, and which observable surfaces (web-ui / ios / cli / api / library / docs) the change affects.`,
543
+
`${wt}Invoke the ce-work skill to execute the plan at ${planPath}. Implement the full feature, following the codebase's existing patterns and the conventions surfaced in research. If this is a bug fix (including any Riffrec/feedback-sourced run), reproduce the bug locally FIRST — minimal synthetic state, anonymize any production data, never commit throwaway repro data — then fix the confirmed root cause. Address these Doc Review concerns as you go:\n${JSON.stringify(planConcerns)}\n${NON_INTERACTIVE}\n\nWhen done, report whether files actually changed, a concise summary, the files touched, and which observable surfaces (web-ui / ios / cli / api / library / docs) the change affects.`,
? `This change has an observable surface (${surfaceList}) — also invoke the ce-demo-reel skill to capture visual/CLI proof and include its markdown in the PR body.\n\n`
700
700
: '')+
701
+
(riffrecFeedback
702
+
? `This is a feedback-sourced run. Write the PR body from this exact template so the issue is understandable WITHOUT watching the recording:\n`+
703
+
`## What the user reported\n<one or two plain-language sentences>\n> <verbatim narration excerpt from the analysis, as a Markdown block quote>\n<any "before" frames from the analysis>\n\n`+
704
+
`## The problem\n<technical root cause>\n\n`+
705
+
`## How we reproduced it\n<minimal local state + exact steps>\n\n`+
706
+
`## The fix\n<what changed and why, kept tight>\n\n`+
707
+
`## Demo\n<after evidence from ce-demo-reel proving it works>\n\n`+
708
+
`## Testing\n<regression test covering this bug + other checks run>\n\n`
709
+
: '')+
701
710
`In the PR body, add a "## Residual Findings" section listing these unresolved items verbatim (omit the section if the list is empty):\n${JSON.stringify(residualForPr,null,2)}\n\nReturn the PR number, URL, and branch.`,
Copy file name to clipboardExpand all lines: plugins/compound-engineering/skills/lfg/SKILL.md
+45-11Lines changed: 45 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,29 @@
1
1
---
2
2
name: lfg
3
-
description: Run the full autonomous engineering pipeline end-to-end (plan, work, code review, test, commit, push, open PR, watch CI, fix CI failures until green). Use only when the user explicitly requests hands-off execution of a software task and provides a feature description; do not auto-route casual conversation here.
4
-
argument-hint: "[feature description]"
3
+
description: Run the full autonomous engineering pipeline end-to-end (plan, work, code review, test, dogfood, commit, push, open PR, watch CI, fix CI failures until green). Use only when the user explicitly requests hands-off execution of a software task and provides a feature description, Riffrec recording, video, or screenshots; do not auto-route casual conversation here.
4
+
argument-hint: "[feature description | riffrec zip | video | screenshots]"
5
5
---
6
6
7
7
CRITICAL: You MUST execute every step below IN ORDER. Do NOT skip any required step. Do NOT jump ahead to coding or implementation. The plan phase (step 1) MUST be completed and verified BEFORE any work begins. Violating this order produces bad output.
8
8
9
9
When invoking any skill referenced below, resolve its name against the available-skills list the host platform provides and use that exact entry. Some platforms list skills under a plugin namespace (e.g., `compound-engineering:ce-plan`); others list the bare name. Invoking a short-form guess that isn't in the list will fail — always match a listed entry verbatim before calling the Skill/Task tool.
10
10
11
-
1. Invoke the `ce-plan` skill with `$ARGUMENTS`.
11
+
**Input resolution (do this before step 1).**`$ARGUMENTS` may be a plain feature description, a path to a Riffrec bundle (`riffrec-*.zip`, or a folder with `session.json` + `events.json` + `recording.webm` + `voice.webm`), a video/audio recording, or one or more screenshots. Resolve it into a concrete task before planning:
12
12
13
-
GATE: STOP. If ce-plan reported the task is non-software and cannot be processed in pipeline mode, stop the pipeline and inform the user that LFG requires software tasks. Otherwise, verify that the `ce-plan` workflow produced a plan file in `docs/plans/`. If no plan file was created, invoke `ce-plan` again with `$ARGUMENTS`. Do NOT proceed to step 2 until a written plan exists. **Record the plan file path** — it will be passed to ce-code-review in step 3.
13
+
- Riffrec bundle, video, or audio: invoke the `ce-riffrec-feedback-analysis` skill on the path to extract structured product feedback — the bugs, UX issues, repro steps, and the user's spoken intent. Use that feedback as the task.
14
+
- Screenshot image(s): view them and derive what is broken or requested. Use that as the task.
15
+
- Plain text: use it verbatim.
16
+
17
+
Call the result the **resolved task**, and note whether it came from a recording, video, or screenshots — a **feedback-sourced** run, which changes the PR body in step 8. Pass the resolved task (not bare `$ARGUMENTS`) to every step below.
18
+
19
+
1. Invoke the `ce-plan` skill with the resolved task.
20
+
21
+
GATE: STOP. If ce-plan reported the task is non-software and cannot be processed in pipeline mode, stop the pipeline and inform the user that LFG requires software tasks. Otherwise, verify that the `ce-plan` workflow produced a plan file in `docs/plans/`. If no plan file was created, invoke `ce-plan` again with the resolved task. Do NOT proceed to step 2 until a written plan exists. **Record the plan file path** — it will be passed to ce-code-review in step 3.
14
22
15
23
2. Invoke the `ce-work` skill.
16
24
25
+
If the task is a bug fix (especially a feedback-sourced run), reproduce the bug locally FIRST — set up the minimal local state and trigger the failing behavior — before writing any fix, so the fix targets the confirmed root cause. Prefer building that state synthetically; only pull production data as a last resort, and always anonymize names, emails, and other PII. Do not commit throwaway repro data (e.g., to seed files) unless it has lasting value for the team.
26
+
17
27
GATE: STOP. Verify that implementation work was performed - files were created or modified beyond the plan. Do NOT proceed to step 3 if no code changes were made.
18
28
19
29
3. Invoke the `ce-code-review` skill with `mode:agent plan:<plan-path-from-step-1>`.
@@ -52,13 +62,37 @@ When invoking any skill referenced below, resolve its name against the available
52
62
53
63
6. Invoke the `ce-test-browser` skill with `mode:pipeline`.
54
64
55
-
7. Invoke the `ce-commit-push-pr` skill.
65
+
7. **Dogfood the change as a real user** (ALWAYS run;do not skip)
66
+
67
+
`ce-dogfood-beta` is `disable-model-invocation` and cannot be invoked from this pipeline, so perform its diff-scoped dogfooding behavior directly. This is hands-on exercise of the changed journeys, distinct from the automated browser tests in step 6.
68
+
69
+
Determine which observable surfaces the branch diff touches (web-ui, ios, cli, api, library, docs), then exercise the CHANGED user journeys the way a real user would — not just the happy path; include bad input, edge states, and back/forward navigation:
70
+
71
+
- web-ui: start or attach to the running app and drive the affected pages in a real browser (e.g., agent-browser).
72
+
- ios: drive the changed flows on the simulator.
73
+
- cli: run the changed commands as a user would, including bad input and unusual flag combinations.
74
+
- api / library: call the changed entrypoints as a consumer would, including misuse.
75
+
76
+
Fix any UX or behavior breakage found at its root cause, add a regression testforeach fix, and re-check until the changed journeys work. Leave the fixes uncommittedin the working tree — step 8 commits and pushes them. If there is genuinely nothing runnable to exercise (e.g., a pure docs change), state that explicitly and continue.
77
+
78
+
8. Invoke the `ce-commit-push-pr` skill.
79
+
80
+
This commits any remaining changes (including dogfood fixes from step 7), pushes the branch, and opens a pull request. If step 5 already opened a PR (check with `gh pr view --json number,url,state 2>/dev/null`), skip PR creation but still commit and push any uncommitted changes.
81
+
82
+
For observable changes (UI, CLI output, API behavior, generated artifacts), capture a demo NON-INTERACTIVELY via the `ce-demo-reel` skill and splice its markdown into the PR body. This run is autonomous — do not waitfor an interactive "capture evidence?" prompt; decide to capture for observable changes, and skip only when there is genuinely nothing runnable to show.
83
+
84
+
If this is a feedback-sourced run (input resolution), write the PR body from this fixed template so the issue is understandable without watching the original recording:
56
85
57
-
This commits any remaining changes, pushes the branch, and opens a pull request. If step 5 already opened a PR (check with `gh pr view --json number,url,state 2>/dev/null`), skip PR creation but still commit and push any uncommitted changes.
86
+
- `## What the user reported` — one or two plain-language sentences, then the user's narration as a verbatim Markdown block quote (`>`), and any "before" frames from the analysis.
87
+
- `## The problem` — the technical root cause.
88
+
- `## How we reproduced it` — the minimal local state and exact steps.
89
+
- `## The fix` — what changed and why, kept tight.
90
+
- `## Demo` — the after evidence from `ce-demo-reel` proving it works.
91
+
- `## Testing` — the regression test covering this bug, plus any other checks run.
58
92
59
-
8. **CI watch and autofix loop** (only when an open PR exists for the current branch)
93
+
9. **CI watch and autofix loop** (only when an open PR exists for the current branch)
60
94
61
-
Detect the PR;if none exists or `gh` is unavailable, skip this step entirely and proceed to step 9.
95
+
Detect the PR; if none exists or `gh` is unavailable, skip this step entirely and proceed to step 10.
62
96
63
97
```bash
64
98
gh pr view --json number,url,state
@@ -72,7 +106,7 @@ When invoking any skill referenced below, resolve its name against the available
72
106
gh pr checks --watch
73
107
```
74
108
75
-
If the command exits 0, all checks passed. Break out of the loop and proceed to step 9.
109
+
If the command exits 0, all checks passed. Break out of the loop and proceed to step 10.
76
110
77
111
If it exits non-zero, one or more checks failed. Continue to (2).
78
112
@@ -105,8 +139,8 @@ When invoking any skill referenced below, resolve its name against the available
105
139
gh pr edit PR_NUMBER --body-file BODY_FILE
106
140
```
107
141
108
-
- Do NOT continue looping. The autopilot contract is "make residuals durable, then exit." Proceed to step 9.
142
+
- Do NOT continue looping. The autopilot contract is "make residuals durable, then exit." Proceed to step 10.
109
143
110
-
9. Output `<promise>DONE</promise>` when complete
144
+
10. Output `<promise>DONE</promise>` when complete
111
145
112
146
Start with step 1 now. Remember: plan FIRST, then work. Never skip the plan.
0 commit comments