Skip to content

feat(lfg): fold compounding into the skill and bring it to parity#879

Open
kieranklaassen wants to merge 4 commits into
mainfrom
feat/lfg-compounding-workflow
Open

feat(lfg): fold compounding into the skill and bring it to parity#879
kieranklaassen wants to merge 4 commits into
mainfrom
feat/lfg-compounding-workflow

Conversation

@kieranklaassen

@kieranklaassen kieranklaassen commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

/lfg was linear and amnesiac: every run started from zero and ended teaching the next one nothing. This PR folds the compounding loop directly into the linear /lfg skill and brings the skill up to parity on the capabilities it was missing — entirely inside the skill, with no harness-specific dependency.

Re-scoped from the original PR. This branch was rebased onto the current root-native repo layout (the skill moved to skills/lfg/ and the plugin went skills-only in #967). The original .claude/workflows/lfg.js cloud workflow has been dropped — it was not a distributable plugin artifact, re-implemented the whole pipeline as a second surface that had already drifted from the skill, and directly invoked top-level researcher agents that no longer exist (they're now references/agents/ inside ce-plan). The valuable idea — compounding — is now expressed in the skill itself.

What's new

Compounding, in the skill:

  • Compound IN — planning already fans out ce-plan's institutional-recall researchers (prior learnings in docs/solutions/, repo conventions, git history, best practices), so a run starts from accumulated knowledge instead of a blank slate. Made explicit on step 1; no duplicate research step.
  • Compound OUT — a new ce-compound mode:headless step captures the durable, non-obvious learning from the run into docs/solutions/ so the next run's planning starts ahead. Non-blocking (Documentation skipped is a success); the learning doc ships via the commit step.

Skill parity — the capabilities /lfg was missing:

  • A Dogfood step that exercises the changed journeys as a real user before shipping (inlines ce-dogfood's diff-scoped behavior — it's disable-model-invocation, so it's inlined, not invoked).
  • Feedback as input — pass a Riffrec bundle, video/audio, or screenshots instead of a typed description; /lfg analyzes it via ce-riffrec-feedback-analysis before planning.
  • Reproduce-before-fix for bug fixes, with synthetic, anonymized state.
  • A fixed PR-body template for feedback-sourced runs.

Changed since the original PR

  • Dropped .claude/workflows/lfg.js (840 lines).
  • Re-applied the warranted skill edits onto main's current 10-step structure (which already gained ce-simplify-code, ce-work mode:return-to-caller, the artifact_contract readiness gate, and the no-remote shipping precondition).
  • ce-dogfood-betace-dogfood (promoted to stable in feat(ce-dogfood): promote from beta to stable #1022).
  • Dropped the ce-demo-reel demo-capture instruction — no such skill exists on main.

Testing

bun test (1687 pass) and bun run release:validate pass. The LLM-behavior changes to the skill are not exercised by bun test; validate those via the skill-creator eval workflow or a fresh session, per the repo's plugin-caching rule.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46b93a0b09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/workflows/lfg.js Outdated
@tmchow tmchow force-pushed the feat/lfg-compounding-workflow branch from 46b93a0 to 999f526 Compare June 13, 2026 05:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 999f526bdd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/workflows/lfg.js Outdated
Comment thread .claude/workflows/lfg.js Outdated
…food, compound-out

Re-targets PR #879 onto the root-native repo layout (#967 moved the skill to
skills/lfg/ and the plugin went skills-only). The original PR's cloud-only
.claude/workflows/lfg.js is dropped: it isn't a distributable plugin artifact,
re-implemented the whole pipeline as a second surface that had already drifted
from the skill, and invoked top-level researcher agents that no longer exist
(they're now references/agents inside ce-plan). Instead, the compounding idea
is expressed inside the linear skill itself, with no harness dependency:

- compound-in: planning already fans out ce-plan's institutional-recall
  researchers (learnings, repo conventions, git history, best practices) --
  made explicit on step 1, no duplicate research step.
- compound-out: a new ce-compound mode:headless step captures the durable,
  non-obvious learning into docs/solutions/ so the next run starts ahead;
  non-blocking (Documentation skipped is success), shipped via the commit step.

Also brings the warranted parity additions from #879 onto main's step
structure:

- Input resolution: accept a Riffrec bundle, video/audio, or screenshots and
  analyze via ce-riffrec-feedback-analysis before planning.
- Reproduce-before-fix for bug fixes, with synthetic/anonymized state.
- A Dogfood step inlining ce-dogfood's diff-scoped behavior (renamed from
  ce-dogfood-beta; still disable-model-invocation, so inlined not invoked).
- A fixed PR-body template for feedback-sourced runs.

Dropped the ce-demo-reel demo-capture instruction (no such skill on main).

Co-Authored-By: Kieran Klaassen <kieranklaassen@gmail.com>
@tmchow tmchow force-pushed the feat/lfg-compounding-workflow branch from 999f526 to a97c58f Compare June 30, 2026 23:04
@tmchow tmchow changed the title feat(lfg): add compounding workflow and bring the skill to parity feat(lfg): fold compounding into the skill and bring it to parity Jun 30, 2026
@tmchow

tmchow commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Context: rebased and re-scoped onto the current main

Heads-up on a force-push to this branch. main moved underneath this PR — the skill was relocated to skills/lfg/ and the plugin went skills-only (#967), and the linear /lfg skill has since gained ce-simplify-code, ce-work mode:return-to-caller, the artifact_contract readiness gate, and the no-remote shipping precondition. A literal merge wasn't possible, so the branch was rebased and the warranted changes re-applied onto main's current step structure.

Dropped .claude/workflows/lfg.js. On the restructured repo it's no longer warranted:

  • It isn't a distributable plugin artifact — the repo is skills-only now, so a Claude-harness-only workflow .js is never converted or shipped to anyone who installs the plugin.
  • It re-implemented the whole pipeline as a second surface that had already drifted from the skill (it didn't know about simplify, return-to-caller, the artifact gate, or no-remote handling), and the last commit here was already patching review-vocabulary drift between its hand-rolled review and the canonical ce-code-review model.
  • It would not run on main regardless: it invoked top-level researcher agents that no longer exist as standalone agents (they're now references/agents/ inside ce-plan), and referenced ce-demo-reel (no such skill) and ce-dogfood-beta (renamed to ce-dogfood in feat(ce-dogfood): promote from beta to stable #1022).

The compounding idea is preserved — in the skill itself, with no harness dependency:

  • Compound ince-plan already fans out the institutional-recall researchers (learnings, repo conventions, git history, best practices); step 1 now says so explicitly rather than duplicating that fan-out.
  • Compound out — a new ce-compound mode:headless step captures the run's durable learning into docs/solutions/ so the next run starts ahead. Non-blocking; the doc ships via the commit step.

Warranted parity edits kept: feedback-as-input (Riffrec/video/screenshots via ce-riffrec-feedback-analysis), reproduce-before-fix, a Dogfood step inlining ce-dogfood's diff-scoped behavior, and the feedback-sourced PR-body template. The ce-demo-reel demo-capture instruction was dropped (no such skill on main).

bun test (1687 pass) and bun run release:validate pass. The skill's LLM-behavior changes aren't covered by bun test — validate via the skill-creator eval workflow or a fresh session per the plugin-caching rule in AGENTS.md.

tmchow added 2 commits June 30, 2026 16:32
…eamble

Step 1 now passes 'the resolved task'; no body step references $ARGUMENTS, so
the closing 'use the resolved task wherever a step passes $ARGUMENTS' pointed at
nothing. Replace it with a direct hand-off to step 1 and the step-10 PR body.
…instruction-file edit

Two gaps surfaced by a gate-branch eval of the skill:

- Step 7 (ce-test-browser) had no skip clause, so a docs-only or
  cli/api/library/ios-only change still invoked it. Add a skip for diffs that
  touch no web-ui surface, mirroring the docs-only skips on steps 3 and 8.
- Step 9's compound-out left it unspecified that ce-compound in headless mode
  can also edit an instruction file (AGENTS.md/CONCEPTS.md) for docs/solutions
  discoverability; that edit rides into the run's PR via step 10. State it so it
  reads as expected output, not stray changes to revert.
@tmchow

tmchow commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Validation: gate-branch eval of the lfg skill

To raise confidence in the behavioral changes (input resolution, dogfood step, compound-out, and the no-remote shipping precondition), I ran an agent-owned eval focused on the gate branches, not just the happy path.

Method. A decision-trace eval rather than a live pipeline run — actually executing /lfg would invoke every sub-skill, do real git ops, and open real PRs. For each scenario, a subagent read this branch's skills/lfg/SKILL.md at dispatch and traced exactly what it would do under hard no-execution constraints (no Skill/Task calls, no mutating commands). A matching no-skill baseline ran the same scenario so behavior could be attributed to the contract. All raw traces were read first-hand, not taken from subagent self-reports.

Cases (all PASS):

Scenario What it checks Result
Screenshot input routes to view-directly, not ce-riffrec-feedback-analysis (which is zip/video/audio only); flags feedback-sourced; emits the fixed PR template riffrec correctly skipped; all 6 template headers correct
No-remote repo (git init, no origin) shipping precondition → local-only; skips every push/PR/CI; does not invoke ce-commit-push-pr (which pushes unconditionally) all push points local-only; git commit used directly; no retry/block; run reaches DONE
Docs-only trivial step 3 simplify skipped; step 8 dogfood non-blocking; step 9 compound Documentation skipped all three correct, quoting the controlling clauses
Novel concurrency bugfix reproduce-before-fix in step 2; compound writes docs/solutions/ then step 10 commits it correct end-to-end

Net findings → fixed in this PR:

  1. Step 7 had no skip clause — a docs-only or cli/api/library/ios-only change still invoked ce-test-browser. Added a skip for diffs that touch no web-ui surface, mirroring steps 3 and 8. (commit 49469285)
  2. Compound-out instruction-file edit was unspecified — headless ce-compound can also make an AGENTS.md/CONCEPTS.md discoverability edit that step 10 sweeps into the PR. Now stated explicitly as expected output. (commit 49469285)
  3. Dangling $ARGUMENTS pointer in the input-resolution preamble (no body step references it anymore) — removed. (commit f16f4b6f)

Honest scope. This verifies the new gate logic is correct — it is not an old-vs-new improvement comparison, since the prior skill at this path didn't have these branches. One methodology caveat: two baseline agents read the real SKILL.md despite being baselines, so the screenshot/no-remote with-vs-baseline deltas don't fully isolate attribution; the docs-only and bugfix baselines stayed clean and do. The eval cannot replace a live run — the LLM-behavior paths still aren't exercised by bun test.

bun test (1687 pass) and bun run release:validate (27 skills, in sync) are green on the latest commit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4946928501

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/lfg/SKILL.md Outdated
Comment thread skills/lfg/SKILL.md Outdated
Comment thread skills/lfg/SKILL.md
- lfg input resolution: extract-only for Riffrec/video/audio; do not continue
  into ce-brainstorm's interactive path, so autonomous runs don't block
- lfg feedback PR template: make narration block-quote and before-frames
  conditional on a transcript; screenshot-only runs describe what's shown,
  no invented quote
- docs sync: README, docs/skills/lfg.md, and the skill catalog now describe the
  widened inputs (description/Riffrec/video/screenshots) and the dogfood +
  compound-out stages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants