Skip to content

πŸ” fix(l6): upload-artifact include-hidden-files=true so trajectory.db survives#122

Merged
ZaxShen merged 1 commit into
devfrom
fix/l6-artifact-include-hidden
Apr 26, 2026
Merged

πŸ” fix(l6): upload-artifact include-hidden-files=true so trajectory.db survives#122
ZaxShen merged 1 commit into
devfrom
fix/l6-artifact-include-hidden

Conversation

@ZaxShen
Copy link
Copy Markdown
Contributor

@ZaxShen ZaxShen commented Apr 26, 2026

Summary

Run #24966708851 confirmed L6_KEEP_ARTIFACTS=1 worked β€” the per-flow scratch dirs survived the trap cleanup. But the uploaded `l6-trajectory-dumps` artifact contained only `README.md` files, no `.claude/tmb/trajectory.db`.

Root cause: `actions/upload-artifact@v4` defaults `include-hidden-files` to `false`. `.claude/` is dot-prefixed β†’ the entire DB tree gets filtered out at upload.

Setting `include-hidden-files: true` so post-mortem can actually inspect the trajectory DB.

Followup (separate PR β€” needs design)

The full run revealed deeper issues that the artifact will help diagnose:

  • 01-onboarding β€” bro tries `AskUserQuestion` (no human in headless `-p` β†’ errors out). The onboarding flow contract assumes a human in the loop. Need either a headless-mode bypass in bro, or seed identity+config in the fixture so onboarding doesn't trigger.
  • 02-simple-task β€” bro proposes branch and stalls waiting for user "Yes, proceed". Same human-in-the-loop assumption.
  • D-direct-mode β€” bro went the full planning flow for a 1-line typo fix instead of triggering Direct Mode. Doctrine bug in the prompt.
  • 95-anonymous-cold-restart β€” bro skipped the first-action chain entirely (no `identity_get`, `config_get`, `issue_resume`) and just responded "Hey I'm bro". Per CLAUDE.md these calls are mandatory.

These are separate from this PR β€” this one just unblocks observability.

… survives

Run #24966708851 confirmed L6_KEEP_ARTIFACTS=1 prevented the trap cleanup,
but the uploaded artifact contained only README.md β€” no .claude/tmb/
trajectory.db. actions/upload-artifact@v4 defaults include-hidden-files
to false, and .claude/ is dot-prefixed, so the entire DB tree was filtered
out at upload time.

Setting include-hidden-files: true so post-mortem diagnosis can actually
inspect the trajectory DB.
@ZaxShen ZaxShen merged commit babc48e into dev Apr 26, 2026
2 checks passed
@ZaxShen ZaxShen deleted the fix/l6-artifact-include-hidden branch April 26, 2026 21:00
ZaxShen added a commit that referenced this pull request Apr 26, 2026
…cp-errors / direct-mode / push-gate to skills (#124)

* πŸ›‘οΈ feat(bro): headless fallback doctrine for AskUserQuestion

L6 run #24966945645 (artifact #122) confirmed bro halts in `claude -p`
mode whenever a skill calls AskUserQuestion β€” no Human, error, halt.
3 of 4 wired flows died this way. Plus 95-anonymous-cold-restart
revealed bro short-circuiting the first-action chain on casual
messages, contradicting the documented "every triggered message" rule.

Doctrine fix:

1. **CLAUDE.md** gains an "AskUserQuestion fallback β€” never halt"
   section. Every fallback MUST record both `ledger_log(event_type=
   'headless_fallback', ...)` AND `discussion_append(kind='note', ...)`
   so the autonomous decision is auditable.

2. **First-action chain** clarified: "No exceptions. Casual messages
   like @bro hi still run the full chain." Removes the wiggle-room
   bro was using to skip identity_get/config_get/issue_resume.

3. **4 in-DB skills** (tmb_first-run-onboarding, tmb_branch-id-proposal,
   tmb_reonboard, tmb_planning-difficult) get a "## Headless fallback"
   section listing question→default→audit-write protocol.

4. **2 file-writing skills** (tmb_skill-creator, tmb_agent-creator)
   get a "## Headless mode β€” HALT" section. Auto-approving silent
   skill/agent generation in CI is the foot-gun the rule guards
   against; halt with `ledger_log(event_type='headless_creator_blocked')`
   instead.

5. **tmb_reonboard** also halts (re-onboarding flips policy keys that
   drive git-guards.sh; silent fallback could break the project's
   git workflow with no audit trace).

Defaults table summary:
- identity name β†’ "Anonymous" (recoverable via tmb_reonboard)
- branching_model β†’ github-flow
- pr_target β†’ main
- protected_branches β†’ ["main"]
- branch-id-proposal confirm β†’ "Yes, proceed"
- planning-difficult scope β†’ "proceed as proposed"

* βœ‚οΈ refactor(claude.md): slim 268β†’149 lines, extract 4 reactive skills

User feedback on PR #124: AskUserQuestion fallback (+ much more) belongs
in skills, not in the always-loaded CLAUDE.md. Recommended target:
under 200 lines, ideally 60.

Extracted to new reactive skills (load on trigger, not on every turn):

- tmb_headless-fallback β€” AskUserQuestion fallback doctrine + ledger/discussion audit (was the new section from #124)
- tmb_mcp-error-handling β€” is_error halt rule + forbidden-tools list
- tmb_direct-mode β€” ≀3-line single-file bypass protocol
- tmb_push-gate β€” pr-reviewer-at-push-time orchestration

CLAUDE.md retains only what bro needs on EVERY message:

- Trigger rule
- Identity / role / two-layer agent model (compressed)
- MCP caller identity + forbidden-tools one-liner
- First-action chain (no exceptions for casual messages β€” preserved from #124)
- Routing decision table
- Code-touching ask chain (with skill pointers)
- "Skills bro loads reactively" lookup table
- Catchphrase + communication style
- Reference pointers (state, perf, config keys)

Net: 268 β†’ 149 lines (44% reduction). Reference-style sections
(Agents shipped, Where state lives) collapsed to one-liners pointing
at CONTRIBUTING.md and existing architecture docs.

---------

Co-authored-by: Zax Shen <ZaxShen@users.noreply.github.com>
ZaxShen added a commit that referenced this pull request May 20, 2026
Adds outcome.sql, tools-required/forbidden.json, cost-budget.json, and
README.md to flows 03, 05, 06, 07, 08, 09, 32, 92, 94, 96, C. Replaces
skeleton run.sh (mode 0755) in flows 03, 06, 08, 09, 92, C with custom
pre-seed logic; keeps skeleton in the remaining five.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ZaxShen added a commit that referenced this pull request May 20, 2026
feat(l5): author fixtures for 11 skeleton flows (#122)

See merge request trustmybot/plugin!40
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.

1 participant