feat: add /gloop goal-loop command#2065
Open
Avanderheyde wants to merge 3 commits into
Open
Conversation
/gloop drives a goal to a PR-ready state through gstack's own
plan -> review -> implement -> review loop, instead of jumping
straight from a vague goal to code the way a plain /goal loop does.
The skill:
- frames the goal into verifiable success criteria (Phase 0)
- writes/updates a plan artifact (Phase 1)
- runs a plan review BEFORE any code — /autoplan or /plan-eng-review
via {{INVOKE_SKILL}} — as a hard gate (Phase 2)
- surfaces major scope changes at a user-challenge gate instead of
auto-deciding them (Phase 2.5)
- implements one scoped milestone per pass (Phase 3)
- runs the project's tests (Phase 4) and /review on the diff (Phase 5)
- loops with durable state (pass count + plan_review marker) and
guards (max passes, convergence) so it stops instead of spinning (Phase 6)
- ends at PR-ready and hands off to /ship (Phase 7)
Discovery is directory-driven (gloop/SKILL.md.tmpl -> generated
gloop/SKILL.md). Wires the skill into the routing catalog
(SKILL.md.tmpl), the README and docs/skills.md skill tables, AGENTS.md,
and the test coverage registry (SKILL_COVERAGE in
test/skill-coverage-matrix.ts). Generated outputs (SKILL.md, llms.txt,
proactive-suggestions.json) regenerated via gen:skill-docs.
preamble-tier 3, matching the autoplan orchestrator sibling.
Structural tripwire for the new /gloop skill, matching the investigate/
office-hours pattern. Asserts the full Phase 0-7 loop is present, the
goal-straight-to-code anti-pattern banner and hard gate exist, the loop
drives /autoplan, /plan-eng-review, and /review (and that those
{{INVOKE_SKILL}} blocks actually resolved to skill-file reads, with no
unresolved {{placeholders}}), the user-challenge gate, the durable
plan_review/--resume state, the loop guards, and the PR-ready /ship hand-off.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
5797c81 to
2553e74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
/gloop— a goal-loop orchestrator skill. You hand it a goal; it drives that goal to a PR-ready state through gstack's own plan → review → implement → review loop, instead of jumping straight from a vague sentence to code.The problem it solves: a plain
/goalloop (Codex, or vanilla Claude) takes a one-line goal, jumps to implementation, then loops on its own output with no independent check. It optimizes for "the tests I wrote pass" and ships scope nobody approved./glooprefuses that shape — every goal passes through gstack's planning and review skills, and an independent/reviewruns after every implementation pass.The loop
/office-hours//spec./specissue or design doc)./autoplan(full) or/plan-eng-review(focused) before any code. Drives them via the{{INVOKE_SKILL}}resolver.plan_review: done.CLAUDE.md(platform-agnostic), run it, add tests for the new behavior./reviewon the diff — an independent reviewer, not the context that wrote the code. Re-runs tests if review auto-fixes anything./ship, or an exact blocker for--resume./gloopends at PR-ready; it does not merge or deploy.How it's wired in
gstack skill discovery is directory-driven, so the skill is
gloop/SKILL.md.tmpl→ generatedgloop/SKILL.mdviabun run gen:skill-docs. The loop drives sibling skills with the canonical{{INVOKE_SKILL:autoplan|plan-eng-review|review}}resolver (reads and follows theirSKILL.md, skipping preamble).preamble-tier: 3, matching the/autoplanorchestrator sibling. Wired into: the root routing catalog,README.md,docs/skills.md,AGENTS.md, and the test coverage registry (SKILL_COVERAGEintest/skill-coverage-matrix.ts);gstack/llms.txtandscripts/proactive-suggestions.jsonregenerated.Tests
gloop skill structureintest/skill-validation.test.ts(matches theinvestigate/office-hourspattern): pins the full Phase 0–7 loop, the anti-pattern banner + hard gate, that the loop drives/autoplan+/plan-eng-review+/review(and that the{{INVOKE_SKILL}}blocks actually resolved — no unresolved{{placeholders}}), autonomous reconciliation except for true objective blockers, the durableplan_review/--resumestate, the loop guards, and the/shiphand-off.gen-skill-docs.test.tsandskill-coverage-matrix.test.tsdiscover skills by directory scan, so/gloopis auto-covered by registry, freshness, description-length, structural-compliance, and placeholder-resolution checks. Latest focused suite: 756 pass / 0 fail.bun run slop:diff— no new findings in any changed file.bun testrun also surfaces 4 pre-existing, environmental failures (3brain-cache-*+ 1user-slug-fallback) that touch real~/.gstackcache/config state. They are unrelated to this branch: the complete branch diff is gloop + docs + two test-registration files, none of which the failing tests import or exercise, and they reproduce in isolation against the same (unchanged) source.Review
Reviewed by an independent Claude eng-review subagent and by Codex (
codex exec) as a final outside voice. Valid findings were applied before commit: explicitplan_review: pending|donestate marker so--resumecan't mistake a chosen review path for a completed one; durable pass counter read from the state file (guards survive resume); re-run tests after review auto-fixes before declaring DONE; autonomous Phase 2.5 reconciliation so/gloopdoes not stop for ordinary review/evaluation findings; flag precedence. One Codex finding (persisting the test command toCLAUDE.md) was consciously rejected — that is gstack's documented platform-agnostic convention, followed by/qa,/ship, and others.Not in scope
VERSION / CHANGELOG are intentionally left to
/shipper the repo's convention (CHANGELOG entries are written at ship time, andversion-gate.ymlis path-filtered to those files). No compiled binaries touched.🤖 Generated with Claude Code