feat: auto-loop + continuity contract (ScheduleWakeup integration)#1
Open
zelinewang wants to merge 2 commits into
Open
feat: auto-loop + continuity contract (ScheduleWakeup integration)#1zelinewang wants to merge 2 commits into
zelinewang wants to merge 2 commits into
Conversation
Three logical change groups bundled in one PR (see PR description for full breakdown). High-level: 1. Month of local iteration (~72 lines): language/framework detection table, source-evaluation rules, phase-adaptation polish, description tweaks. 2. LOOP INTEGRATION (+192 lines): ScheduleWakeup (/loop dynamic) as first-class tool inside /dev. 4 standard patterns (CI wait, long task, agent merge, deploy health), exit-conditions matrix, cost budget (300s cache-TTL trap documented), anti-patterns, CHECKPOINT interaction. 3. CONTINUITY CONTRACT (+64 lines): /dev owns the task end-to-end; stops only at CHECKPOINT 1, CHECKPOINT 2, or loop-escalation. Auto-loop is ON by default for STANDARD/DEEP tiers on phases with external wait. --no-loop opts out. --loop becomes redundant. File growth: skills/dev-orchestrator/SKILL.md 311 -> 639 lines (+328 net). File growth: commands/dev.md adds --loop/--no-loop/--max-loop-iter/--loop-delay flags. Risk assessment: skill is prompt/markdown, no executable code path — there is no crash/security risk. The only real risks are semantic (loop without exit condition → cost drift; 300s delay → cache miss). Both are mitigated by the new Exit Conditions Matrix (mandatory) and cache-budget table with 300s explicitly flagged as the worst choice.
… fixes
Evolves from v2.1 (2 mandatory checkpoints) to v3.0 (zero mandatory checkpoints)
per design roadmap from 2026-03-08.
Key changes:
1. NEW CONTINUITY CONTRACT v3 (zero-checkpoint):
- /dev runs P0 → P10 without mandatory pauses
- 3 legitimate pauses only: Requirement Clarification Gate (P3 prefix,
one-shot), External Wait (auto-loop), Anomaly Escalation (AI confidence <70%)
- Models a senior engineer's workflow — clarify once up-front, then execute
autonomously
2. Requirement Clarification Gate:
- Fires at P3 prefix if requirement has load-bearing ambiguity AI can't
resolve via claudemem + codebase + web + DAO reasoning
- Single AskUserQuestion with 2-4 pointed options, no subsequent pauses
- Calibration examples for when to clarify vs when to just do it
3. CHECKPOINT 1 + CHECKPOINT 2 removed:
- P5 no longer pauses after plan (plan written to disk as artifact)
- P9 no longer pauses after PR (user reviews via PR/git log/wrapup)
- Safety exception: push to master/main/production triggers anomaly-escalate
4. Loop fixes addressing codex-review findings:
- Pattern 1 success: direct → P10 (no CHECKPOINT detour)
- Pattern 1 failure: max fix-cycles: 3 outer cap (was unbounded)
- Universal unknown-signal circuit breaker: ≥3 consecutive unknown wakes
→ exit-escalate (prevents 90min burn on probe failures)
- LOOP WAKE status block: Elapsed/cache fields marked estimated
(Claude can't observe wall-clock or cache state directly)
- P9 CICD → Pattern 4 (Deploy Health), not Pattern 1 (PR CI)
5. Language detection fixes:
- TypeScript: tsconfig.json OR (.ts files AND package.json)
- JavaScript: package.json without .ts files
- Kotlin: build.gradle.kts (no longer collides with Java)
- Java: pom.xml OR build.gradle (Groovy DSL, no .kts)
File growth: skills/dev-orchestrator/SKILL.md 639 → 736 lines (+97 net).
Owner
Author
|
Pushed v3 refactor on Snapshot of pre-v3 state saved as tag Key changes in this update:
Not auto-merging — human review first. |
zelinewang
added a commit
that referenced
this pull request
Apr 27, 2026
Hardening of v5.2 feedback loop based on 3-Claude-agent independent review: #1 NOTHING-filter separated (was AND-gated on length) #2 Cooldown writes ONLY on save success (was pre-emptive — failed extract silently blocked retries for 30min) #3 session-start reads latest retro by stored note ID (was relevance- ranked search — old notes outranked yesterday's lesson) #4 TRANSCRIPT_PATH validated against $HOME/.claude/ prefix (was only existence check) #5 Prompt injection defense: untrusted-block tags + minimal output sanitize #6 session-start CONTEXT built in Python (was bash \n mixing) #7 Strict alnum+dash branch sanitization (was just slash → dash) Plus: atomic mkdir lock prevents concurrent extractor instances. E2E verified all 7 fixes. See claude-code-config commit for full details.
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.
Summary
Integrates Claude Code's built-in ScheduleWakeup tool (the
/loopdynamic-mode primitive) into the/devworkflow so a single /dev invocation can run end-to-end — including waiting on CI, long builds, agent teams, or deploy health — without requiring the human to manually say "continue" between phases.This PR bundles three logical change groups accumulated over ~5 weeks of daily use:
1. Month of local iteration (~72 net lines)
Small quality-of-life improvements that landed locally but never got pushed:
2. LOOP INTEGRATION (~192 net lines) — new dedicated section
Authoritative reference for ScheduleWakeup usage inside /dev:
<<autonomous-loop-dynamic>>vs CronCreate's<<autonomous-loop>>)ScheduleWakeupcall3. CONTINUITY CONTRACT (~64 net lines) — new top-level section
Formalizes the end-to-end execution discipline:
--loopflag.--no-loopopts out (blocking mode).--loopis redundant/explicit-only.Why bundle these together?
The three groups are intertwined:
Risk assessment
This skill is prompt/markdown — no executable code path. There is no crash, memory, or security risk. The only meaningful risks are:
--no-loopescape hatch and per-wake status blocks giving user visibility.Test plan
skills/dev-orchestrator/SKILL.mddiff — focus on LOOP INTEGRATION section and CONTINUITY CONTRACT consistency--no-loop/--max-loop-iter/--loop-delaydocumented in OVERRIDE FLAGS table/dev fix X + push PR + wait CI— does the flow make sense end-to-end?File stats
skills/dev-orchestrator/SKILL.mdcommands/dev.md