GOAL-sprint-4-M1-M2.md (mailed to Dais via Resend id 0493d1f1-...).
| # | feature | phase | notes |
|---|---|---|---|
| a2 | earnings-to-settle-mirror | ✅ COMPLETE (Phase 6) | Full pipeline PROVEN LIVE on production gig: p-1782887987 roi 0→25000 |
| a1 | LAYER C STARTUP prompt update | ✅ DEPLOYED 2026-07-01 | 3 injections in gig-cli.sh: PRE-B1 CURRENT_PASS_ID binding from oldest tasks/*.json; B2 per-apply task-request-map.jsonl append; EARNED CHECK jq exact-match historical pass_id lookup + task-request-map.errors.jsonl fallback. Restarted per REQ-L3, --status=ALIVE < 30s. M2 auto-closes on first real Coconala 検収. |
| b | earn-roi-reconciler | ✅ COMPLETE | Feature (b) sprint-4 done |
| c | dispatcher-live-dormant | ✅ COMPLETE | Phase 6 converged + live E2E on prod gig; .slot_created marker deployed |
| d | recipe-6-actions | ✅ COMPLETE | 6 real wires (kill_server/send_keys/login/npm_install/git_checkout/escalate_via_bot2bot); 503 tests GREEN; INV-P1/INV-4 preserved |
- ✅ M1 (settle pipeline ready) — reconciler + mirror COMPLETE. Full flow PROVEN LIVE.
- ⏳ M2 (first real ¥) — pipeline FULLY WIRED including (a1) STARTUP update. Waiting on first real Coconala 検収 in production. Loop is LIVE via launchctl
ai.anicca.gig-proactive(5-min tick) + hourly reconciler menu item.
503/503 tests GREEN.
- No settle event in 30 days across ANY slot
- INV regression uncloseable in 3 iters
- crypto primitive fails
- (a1) STARTUP deployed successfully; gig-cli.sh --status=ALIVE
- task #6 hook fix:
~/.claude/settings.jsonPreToolUse:Bash hook wasrtk hook claude(PATH-dependent). Headless tmux sessions couldn't resolvertk→ repeated "PreToolUse:Bash hook error". Fixed by pinning to/opt/homebrew/bin/rtk hook claude. Post-fix: session runs clean, no more hook errors. - First post-fix pass: correctly detected concurrency (multiple restarts + healthcheck cron) and skipped browser-driving to avoid collision. Registered cron
52b154a2for future ticks. This is the CORRECT anti-collision behavior spec'd in HARD 0.36's INV-4. - task-request-map.jsonl materialization: waiting for first uncontested B2 apply pass (next hourly cron fire).
- M2 auto-close path: unchanged. First real Coconala 検収 → gig-cli.sh a1 lookup → earnings row w/ pass_id → (a2) mirror → (b) reconciler → roi_jpy_realized > 0 → M2 satisfied.
~/clips/queue/is empty because it's fed byproducer.sh(creates mp4+caption) while the proactive-loop dispatcher enqueuesproduce-cliptask descriptors to~/loops/clip/tasks/(34 descriptors queued, 5-min tick, none consumed).- The clip LAYER C session's STARTUP (
clip-cli.sh:21) only invokesrun.sh(POSTS from queue), neverproducer.sh(FILLS queue). No consumer bridges~/loops/clip/tasks/→producer.sh. - FIX (out of scope for M2 sprint-4, deferred to sprint-5): mirror the gig-cli.sh a1
pattern in clip-cli.sh STARTUP:
- Read oldest
~/loops/clip/tasks/*.json - If
picked.name == "produce-clip", invokeproducer.shwith the task's platform/params - Move the consumed task descriptor to
~/loops/clip/tasks/done/
- Read oldest
- Impact: without this fix,
produce-cliptasks pile up indefinitely and no clips are ever posted. NOT a M1/M2 blocker (gig is the M1/M2 primary slot). - Sprint-5 candidate feature:
clip-cli.sh a1-equivalentfor task-descriptor consumption + producer.sh wire.
Full timeline from gig data (2026-06-30 → 07-01):
- Applied w/ site-specific 3-improvement proposal — buyer replied "契約手続きを進めたい"
- Formal 見積り sent via direct_offer/4857277 (¥40,000/月, 定期購入, 期限 7/7)
- Two follow-ups sent (2026-06-30 23:38, 07-01 01:17)
- Result: 公開募集終了 + direct_offer/4857277 → 404 (offer link dead)
→ outcome=
ignored_closed, lesson: "高額見積りは決断を促す締切設定が必要"
M2 candidate: NO (deal closed). The gig-cli.sh a1 pipeline still stands ready for the next buyer that reaches 検収 stage. Cron 52b154a2 next :27 tick continues the discovery.
- Absolute-path fix (
/opt/homebrew/bin/rtk hook claude) alone was NOT enough. - Continued observing "Failed with non-blocking status code: node:internal/modules/cjs/loader:1458" in gig session — Claude Code's own internal Node.js error trying to interpret rtk's empty stdout on non-rewrite pass-through cases.
- FIX:
/Users/anicca/.claude/hooks/rtk-hook-wrapper.sh(installed + settings.json pointed at it) — always emits valid JSON:- rtk rewrite? → forward rtk's JSON
- rtk silent? → emit
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}
- Will take effect on next gig-cli restart (currently: 28min-subagent completed with 0 applies but tmux still ALIVE; no active hook errors right now).
- After installing rtk-hook-wrapper.sh, hook errors REDUCED but not to zero (dropped from 8+/500lines to 3/500lines).
- Root cause: wrapper output was missing trailing newline (
printf '%s'→printf '%s\n'). Some Claude Code hook parser paths need line-terminated output. - After fix + gig-cli --restart: session progressing through Coconala gig pass 45 with proper phase structure (B1 nurture → B2 apply → B3 learn → B4 improve → B5 share → finalize + .last-pass).
- Expected: task-request-map.jsonl materialized during B2 apply; task #1 verified on B5+finalize.