Skip to content

docs: Add --help flag and fix bootstrap line references - #5

Merged
evansenter merged 1 commit into
mainfrom
docs/add-help-flag-and-fix-line-refs
Dec 24, 2025
Merged

docs: Add --help flag and fix bootstrap line references#5
evansenter merged 1 commit into
mainfrom
docs/add-help-flag-and-fix-line-refs

Conversation

@evansenter

Copy link
Copy Markdown
Owner

Summary

  • Add -h/--help flag to bootstrap.sh showing usage and available options
  • Update CLAUDE.md to reference correct line numbers for Bootstrap Process section

Test plan

  • Run ./bootstrap.sh --help to verify help output displays correctly
  • Verify line references in CLAUDE.md match actual bootstrap.sh content

🤖 Generated with Claude Code

- Add -h/--help flag to bootstrap.sh showing usage and available options
- Update CLAUDE.md to reference correct line numbers for Bootstrap Process

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude

claude Bot commented Dec 23, 2025

Copy link
Copy Markdown

Code Review

✅ Overall Assessment

This is a clean, well-focused PR that adds helpful documentation features. The implementation is solid with no major issues.


📝 Code Quality & Best Practices

Strengths:

  • Clean implementation: The help flag follows standard CLI conventions with both short (-h) and long (--help) forms
  • Consistent style: Matches the existing argument parsing pattern in bootstrap.sh:211-226
  • Good documentation: Help text is clear, concise, and properly formatted
  • Accurate line reference: The CLAUDE.md update correctly points to bootstrap.sh:172-201 for the Bootstrap Process section

Minor suggestions:

  1. Exit code consistency: The help flag uses exit 0 which is correct, but consider that unknown flags are silently ignored (no * case in the switch statement). This is acceptable for this simple script but could be enhanced in the future.

🐛 Potential Issues

No bugs found - The implementation is straightforward and correct.


⚡ Performance Considerations

No performance concerns - Help flag exits immediately without any expensive operations.


🔒 Security Concerns

No security issues - The help text is static and doesn't process any user input or execute external commands.


🧪 Test Coverage

Manual testing needed:

  • ✅ Test plan in PR description is appropriate
  • Run ./bootstrap.sh --help to verify output
  • Verify ./bootstrap.sh -h also works
  • Test that help flag works in combination with other flags (e.g., ./bootstrap.sh --help --force should still show help and exit)

Edge case to verify: What happens with ./bootstrap.sh --force --help? Currently it will show help and exit (which is correct behavior), but worth confirming the order doesn't matter.


💡 Suggestions for Future Enhancement

Not blocking for this PR, but for future consideration:

  1. Add an unknown flag handler to warn users about typos
  2. Consider adding a --version flag
  3. The help text could mention that ~/.extra won't be touched (might be reassuring for users)

✅ Approval

LGTM! This PR is ready to merge once the test plan items are checked off. Great job keeping it focused and well-documented.

@evansenter
evansenter merged commit 4dc7d45 into main Dec 24, 2025
1 check passed
@evansenter
evansenter deleted the docs/add-help-flag-and-fix-line-refs branch December 24, 2025 00:44
@claude claude Bot mentioned this pull request Dec 29, 2025
2 tasks
evansenter added a commit that referenced this pull request Dec 29, 2025
- Add branch existence check before worktree creation (#1)
- Add explicit dirty worktree warning and confirmation in cleanup (#2)
- Clarify date placeholder should be executed when writing context file (#4)
- Use dynamic default branch detection for stacked PR detection (#5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
evansenter added a commit that referenced this pull request Dec 29, 2025
* feat: Add /parallel-work command for multi-PR development

Enable working on multiple PRs simultaneously using git worktrees with
context handoff between Claude sessions.

New command with three subcommands:
- start: Create worktree + branch, gather context, write .parallel-context.md
- list: Show all worktrees with PR/CI status in table format
- cleanup: Remove worktrees for merged/closed PRs with confirmation

Enhanced /status-report to show:
- Active worktrees section with PR/CI status
- Stacked PR detection (PRs targeting non-main branches)
- Worktree-related recommendations

Also created GitHub issue #37 for future tmux integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Address PR review feedback

- Add branch existence check before worktree creation (#1)
- Add explicit dirty worktree warning and confirmation in cleanup (#2)
- Clarify date placeholder should be executed when writing context file (#4)
- Use dynamic default branch detection for stacked PR detection (#5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
evansenter added a commit that referenced this pull request Jan 6, 2026
- Rename user_guide.md → case-study.md (matches content)
- Merge Key Learning #5 (dependency injection) into #6 (ownership)
- Cut Key Learning #7 (workflow integration) - covered in thesis/takeaway
- Cut 3 implementation-specific Frontier items (api drift, typestate, eval)
- Add "human in the loop is the design" to Takeaway
- Add ecosystem reframing: "A world of single agents is a swarm"
- Update cross-references for renumbered learnings

Net: -24 lines while adding higher-value insights for agent researchers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
evansenter added a commit that referenced this pull request Jan 6, 2026
* refactor: Rewrite user_guide.md as evidence-based case study

Restructure from sales pitch to documented experiment format:
- Add per-repo activity table (PRs, issues, LoC, +/- lines)
- Add session analytics with source citations
- Add cost analysis (£1K subscription vs $28K API equivalent)
- Add system architecture diagram showing data flow
- Reduce from 580 to 218 lines (62% reduction)

Update repo-stats.sh with --session-stats flag:
- Integrates session-analytics-cli for token/tool data
- Shows sessions, tool invocations, cache ratio
- Displays date range for data availability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Address PR feedback on user_guide and repo-stats

- Add clarifying note about Dec 30+ date range for cost data
- Widen session stats column (15→25 chars) for long sequences
- Change "Code" header to "LoC" for consistency
- Add --days flag to Source column commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Address 11 inline review comments on user guide

- Fix session logging wording (not retention, but when logging began)
- Add cost breakdown: Claude Max $200 + 2x quota + pay-as-you-go
- Move architecture diagram to top as headline
- Add control plane / data plane terminology
- Note running up to 15 parallel sessions
- Add event-bus state caching to context compaction mitigation
- Emphasize MCP push limitation significance for multi-agent
- Rewrite CLAUDE.md section as system-wide dependency injection
- Add dotfiles feature set section with commands, agents, hooks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Use MCP tools for PR comment fetching in pr-review workflow

Aligns with CLAUDE.md guidance: "Prefer MCP tools for structured data"
- mcp__github__get_pull_request_comments for inline code comments
- mcp__github__get_pull_request_reviews for review summaries
- Keep gh api for issue comments (no MCP equivalent)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Add architectural learnings and expand frontier

Thesis:
- Reframe around workflow integration over code generation

Key Learnings:
- #6: Ownership over Skill (domain agents > capability agents)
- #7: Workflow Integration over Code Generation (the real value prop)

Frontier:
- Expand MCP section to cover learning propagation gap
- Add Constrained Self-Evolution (swarm controller, self-modifying DI)

Also: Update pr-review.md to use MCP tools for comment fetching

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Organize dotfiles capabilities by theme, not function

Replace Commands/Agents/Hooks/Infrastructure listing with thematic capabilities:
- Workflow Orchestration (issue→PR loop)
- Parallel Development (worktrees, event bus coordination)
- Context Continuity (compaction survival, WIP restoration)
- Self-Improvement (analytics-driven automation)
- Ambient Awareness (statusline, tmux integration)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Clarify self-evolution is partially implemented

dotfiles/ as swarm controller is real, but limited by:
- No push notifications (MCP)
- No dynamic reload (CC reads CLAUDE.md at start)

Workarounds: claude --continue, event bus "reload recommended"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Event bus is proper pub/sub, MCP is the blocker

The event bus architecture is sound—it's MCP's request/response
model that prevents push delivery, not the event bus design.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Expand self-improvement loop with event bus routing

Friction → issue → event bus routes to repo owner → free agent
(with human approval) picks up the work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Clarify current state is unconstrained self-modification

No guardrails on scope, no automatic rollback, no approval thresholds.
Human approval is the only constraint—once approved, anything goes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Clarify parallel session limits are human + API, not tooling

Tooling scales beyond 15—bottleneck is user context-switching
overhead and API rate limits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Add Repository Details for all 4 supporting repos

Add capability-themed documentation for:
- claude-event-bus (Coordinate): Session lifecycle, broadcast pub/sub, MCP+CLI parity, observable logging
- claude-session-analytics (Insight): Incremental ingestion, pattern detection, session intelligence, git correlation, raw signals
- gemicro (Agents): Streaming observability, agent composition, trajectory recording, tool permissions, event bus coordination
- rust-genai (SDK): Stateful conversations, flexible function calling, streaming with resume, Evergreen types, built-in tools

Each section follows the established format: role in parentheses, capability themes as bold headers with em-dashes, value prop before implementation details.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Incorporate rust-genai session's framing for SDK section

Updated based on cross-session feedback via event bus:
- Renamed "Evergreen Type System" → "Evergreen Soft-Typing"
- Consolidated "Flexible Function Calling" + "Built-In Tools" → "Unified Tool Ecosystem"
- Merged "Stateful Conversations" into "Multi-Turn State Management"
- Kept "Streaming with Resume" (unique insight not in their response)

This demonstrates the template working: same codebase, different sessions,
different but coherent capability themes that can be merged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Final rust-genai section via 3-round cross-session iteration

Themes converged after 3 rounds of event bus feedback from rust-genai session:

R1: Evergreen, Unified Tools, Multi-Turn State
R2: +Compile-Time Safety, -Unified Tools, +Resumable Streaming
R3: Compile-Time Safety + Unified Tools + Evergreen + Resumable (converged)

Key insight surfaced: typestate pattern makes invalid API sequences
impossible to compile—deeper than "state management" framing.

Also: "docs sometimes lie" re ENUM_WIRE_FORMATS.md empirical testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add Key Learning #8 - Cross-Session Refinement

Documents the pattern we just demonstrated:
- Send help_needed with template prompt
- Receive help_response with fresh perspective
- Iterate 2-3 rounds until convergence
- Synthesis beats either session alone

Uses the rust-genai section refinement as concrete example:
typestate insight surfaced in R2, converged in R3.

Acknowledges limitation: only works for interactive sessions
(hook polls on prompt, not during tool loops).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Replace gemicro section with owner-session's architectural insights

Cross-session refinement surfaced deeper patterns:

DROPPED (feature-level):
- Agent Composition, Trajectory Recording, Event Bus Coordination

ADDED (architectural):
- Generic Interceptor Semantics (single trait, decision tree)
- Orchestration Resource Budgets (semaphores, timeouts, depth)
- Agent-Owned Progress Reporting (streaming without introspection)

REFINED:
- Streaming Observability → Soft-Typed Event Extensibility
- Tool Permission Boundaries → ToolSet Permission Boundaries (inheritance!)

Role changed: (Agents) → (Owner) per Key Learning #6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Add gemicro Round 2 insights - LLM-First Design theme

Round 2 follow-up clarified:
- Why Trajectory/EventBus dropped: "useful but not architecturally novel"
- Layering: rust-genai = LLM client, gemicro = agent patterns
- No Frontier solutions (MCP push, learning propagation)
- Evaluation is "feature not architecture"

Added:
- "LLM-First Design" theme: trust the model, thin wrappers, breaking changes ok
- Improved intro: "Agent patterns and tool orchestration on top of rust-genai"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Update event-bus section with owner-session insights

Cross-session refinement surfaced:

NEW theme:
- "Human-as-Router Coordination" - honest about MCP constraints, DMs notify human

REFRAMED:
- "Session Lifecycle" → "Cursor-Tracked Session Lifecycle" (cursor is the interesting part)
- Broadcast-First now includes trade-off acknowledgment (simplicity over scale)

DROPPED:
- "MCP + CLI Parity" - not architecturally novel, just good practice

Key insight: "Deliberately minimal—a coordination primitive, not a framework"

Honest Frontier assessment: MCP push NOT solved, learning propagation NOT addressed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Rename event-bus theme to Hook-Driven Semi-Realtime Updates

More accurately describes the automatic polling via prompt-events.sh hook
that injects <recent-events> on every prompt, rather than implying manual
human intervention for cross-session coordination.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Update session-analytics section and learning propagation insights

- session-analytics: Replace feature list with architectural themes from owner-session
  - Raw Signals Over Interpretation (RFC #17)
  - Guaranteed Drill-Down Paths (RFC #49)
  - Incremental Ingestion with Protected History
  - Agent-Aware Token Deduplication (RFC #41)
- Architecture diagram: Change 'SSE stream' to 'poll-based' (SSE is FastMCP internal)
- Learning propagation: Correct to 'latency gap, not absence'
- Add potential improvement: Wire event-bus + session-analytics together

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Update dotfiles section and strengthen cross-session refinement story

- dotfiles: Reframe themes as architectural patterns
  - Commands as Workflow Specifications (not shortcuts)
  - Hook-Based Lifecycle Extension (context preservation)
  - Global Behavioral Dependency Injection (CLAUDE.md propagation)
  - Self-Improving Feedback Loop (mines own usage)
- Add meta-note explaining Repository Details generation process
- Expand Key Learning #8 with full refinement story and table
- Document what broke (SSE stream correction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Deep rewrite of dotfiles section after exploration

Themes now at same architectural depth as other repos:
- Session Lifecycle Inversion of Control (hooks as extension points)
- Discontinuity-Aware State Management (compaction as checkpoint/restore)
- Persistent Workflow Topology (commands as resumable state machines)
- Declared Behavioral Contracts (CLAUDE.md as runtime constraint spec)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Add Frontier gaps and Key Learning #9 from cross-session feedback

New Frontier sections from event-bus and session-analytics:
- Correlation Without Causation (analytics can't determine cause)
- Broadcast Scalability Ceiling (deliberately accepted for simplicity)

New Key Learning #9: Self-Play API Testing
- From session-analytics RFC #49 work
- Every aggregate should lead to source data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add dotfiles to refinement table

Used explore agent to go deeper on own codebase, discovered
'Session Lifecycle IoC' framing (hooks as extension points).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add Frontier gaps from gemicro and rust-genai

New Frontier sections:
- External API Documentation Drift (Google docs sometimes wrong)
- Typestate Complexity Ceiling (combinatorial state explosion)
- Offline-Only Evaluation (no online agent quality measurement)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Restructure doc with methodology prominence and actionable priorities

Major restructure:
- Move cross-session refinement methodology to 'The Experiment' section (was buried in Key Learnings)
- Add 'What to Build Next' section with prioritized improvements
- Simplify Key Learning #8 (now references methodology section)

Structure now: Thesis → Architecture → Experiment (methodology + stats) → Protocol → Learnings → What to Build → Frontier → Getting Started → Repository Details

Created issues for top priorities:
- session-analytics #54: Wire event-bus integration (P1)
- gemicro #231: Agent memory layer (P2)
- gemicro #232: Online evaluation hooks (P3)
- rust-genai #300: Wire format fuzzer (P4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Clarify agent model and separate runtime from projects

Key changes to user_guide.md:
- Add transparency that "agents" are Claude Code sessions, not gemicro
- Separate architecture into "Runtime System" (dotfiles, event-bus, analytics)
  and "Projects Under Development" (gemicro, rust-genai)
- Add future goal diagram showing gemicro agents replacing CC sessions
- Split repository activity table by category
- Update Repository Details headings to match hierarchy

Also includes:
- CLAUDE.md: Improve event handling guidance with explicit scan/respond pattern
- .exports: Disable statusline hyperlinks due to injection corruption (#172)
- statusline-command.sh: Various improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Takeaway section with key conclusions

- "The control plane is the product" - main thesis for agent researchers
- Summarize what didn't work (push workarounds, emerging analytics utility)
- Note session-analytics self-play: used it to analyze human's role
- Quantify human leverage: sparse checkpoint guidance shapes autonomous work
- Position for Google agent research audience

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Tighten case study with key insights

- Rename user_guide.md → case-study.md (matches content)
- Merge Key Learning #5 (dependency injection) into #6 (ownership)
- Cut Key Learning #7 (workflow integration) - covered in thesis/takeaway
- Cut 3 implementation-specific Frontier items (api drift, typestate, eval)
- Add "human in the loop is the design" to Takeaway
- Add ecosystem reframing: "A world of single agents is a swarm"
- Update cross-references for renumbered learnings

Net: -24 lines while adding higher-value insights for agent researchers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add Key Learning #8 - Context Is Infrastructure

Frame the surprising amount of context window management machinery:
- Hooks checkpoint/restore around compaction
- TodoWrite survives summarization
- Task subagents get isolated windows
- CLAUDE.md always injected
- Event bus cursors avoid re-injection
- Worktrees prevent context bleed

The 39% subagent token ratio isn't incidental—fresh windows are cheaper
than cramming everything into one context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Address Gemini feedback on case study

- Add "Operating the Swarm" section (human experience, failure mode)
- Add Concepts mapping table (generic terms for portability)
- Reorder Key Learnings: fundamentals first, then architecture, then tactics
- Trim gemicro/rust-genai sections (cut feature lists, keep insights)
- Remove "Getting Started" section
- Add "context compression is a black box" to what didn't work
- Rewrite "it's not X, it's Y" sentences to direct statements
- Update Thesis to emphasize ownership-based agents

Net: -16 lines while adding human experience section and concepts table.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Simplify Self-Play API Testing to focus on methodology

The key insight is the method (LLM uses its own API to find gaps),
not the specific "821 errors" example.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add repo links for all 5 repositories

Short linked descriptions for runtime system (dotfiles, event-bus,
analytics) and projects under development (gemicro, rust-genai).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Update push protocol to MCP or custom

No scaffolding found in gemicro - either MCP adds push support
or we build a custom protocol.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Move The Experiment section after Takeaway

Evidence/data becomes appendix-style - readers get insights first,
supporting data to validate after.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Consolidate thin Frontier items into Known Limits

Merged Rate Limiting and Broadcast Scalability into bullet list.
Dropped No Cross-Machine Coordination (not useful).
Removed redundant Two Blockers section.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Reduce repetition between intro and takeaway

- Intro: "Code generation isn't the bottleneck" (softer)
- Takeaway: "The control plane compounds" (conclusion from experiment)
- Trimmed What to Build Next to Priority 1 only
- Removed Further Reading section
- Consolidated thin Frontier items

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Reorder doc with Takeaway before Frontier

Sections now flow: Key Learnings → Takeaway → The Frontier → The Experiment → Repository Details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
evansenter added a commit that referenced this pull request May 30, 2026
…kflow, docs, tests) (#314)

* bootstrap: guard launchctl bootstrap + robust host-gating

Two new-machine reliability fixes from the readiness audit:

- launchctl bootstrap (:401, :441) lacked `|| true` while the paired bootout
  had it. Under `set -euo pipefail`, re-bootstrapping an already-loaded agent
  returns non-zero and aborts the rest of the run. Matches bootout's guard.
- Host-gating used exact `== "mac-mini"`, which macOS silently breaks when
  Bonjour appends a "-N" LocalHostName suffix on mDNS collision (mac-mini-2).
  Factored into is_gateway_host() using `^mac-mini(-[0-9]+)?$` so the gateway
  keeps behaving as the gateway after a rename. Replaces all 3 sites (308/451/1118).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* workflow: fix broken code-reviewer call + gh body-file convention

- pr-review.md step 2 invoked Skill(pr-review-toolkit:code-reviewer), but
  code-reviewer is an agent, not a skill — the call no-ops every run. Switch
  to Task(subagent_type=...).
- Agents were referenced as /slash-commands (audit-workflows, status-report)
  though they're invoked via Task. Clarified agent vs command.
- Added a --body-file convention to the 5 gh issue/pr body sites
  (summarize-work, rfc-create, rfc-respond, audit-workflows, improve-workflow):
  a bare --body/--title "..." shell-evaluates [[, ==, parens, brackets in
  markdown (confirmed past failure, event 4133). Kept inline, not in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* hooks: defensively source ~/.extra under set -euo pipefail

All 8 hooks that source ~/.extra did so with a bare
`[[ -f ~/.extra ]] && source ~/.extra` under `set -euo pipefail`. ~/.extra is
user-edited and untracked, so a stray unset variable (trips -u) or a top-level
command returning non-zero (trips -e) would abort the hook before it runs —
silently skipping insight enforcement (Stop) or session registration
(SessionStart). On a new machine where the user pastes in env setup, this is a
real footgun. Wrap the source in `set +eu` / `set -eu`.

Transcript-stabilization race in enforce-insight-publish.sh is tracked
separately (needs a writer-lag regression test; out of scope for this batch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* statusline: bound gh calls, negative-cache, repo-scope keys

The statusline renders on every prompt, so unbounded GitHub calls were a
fresh-machine hazard (unauthenticated gh / offline / flaky network blocked the
render for seconds, re-attempting every render with no negative cache).

- Wrap all gh calls in a timeout (timeout / gtimeout / no-op fallback) and
  short-circuit the whole GitHub section unless `gh auth status` succeeds
  (cached 300s). gh missing or unauthed => zero gh calls.
- Negative-cache repo_url / pr / body / ci so transient failures don't re-block
  every render; repo_url now uses a TTL instead of a permanent file check.
- Repo-scope the pr/body/ci cache keys (repo_slug + key): PR #5 exists in nearly
  every repo, so keys on pr_num alone served repo A's CI/issues for repo B.
- Atomic cache writes (temp + rename) to prevent torn reads under concurrent renders.
- Event-bus session lookup negative-caches a miss (~60s) so an unregistered /
  bus-down session doesn't pay the 0.6s retry loop every render.
- Show model display_name ("Opus 4.8") instead of the raw id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* tests: behavioral coverage for host-gating + obsidian preflight

test-bootstrap.sh was mostly grep-presence checks. Add behavioral tests tied to
confirmed past failures:

- is_gateway_host: extract the REAL function from bootstrap.sh (not a copy) and
  assert mac-mini / mac-mini-2 (Bonjour suffix) / FQDN match, and that steamdeck
  and mac-mini-laptop are rejected.
- obsidian-mcp-start preflight: stub curl/sleep/server and assert it backs off
  with a non-zero exit (server NOT exec'd) when the REST API is down, and execs
  the server when it's up. Regression test for the KeepAlive crash-loop (#313).
- Makefile: bash -n every home/.bin/* script so a new wrapper can't ship with a
  syntax error unnoticed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: host-gating, required secrets, memory-store, LaunchAgents

- CLAUDE.md host-gating section now describes the is_gateway_host helper and
  the Bonjour -N suffix tolerance (matches the bootstrap change), instead of
  the bare exact-match that was vulnerable.
- README: document the ~/.extra secrets a new machine needs — OPENCLAW_GATEWAY_TOKEN
  and OBSIDIAN_API_KEY (the obsidian wrapper exits without it) — alongside
  GITHUB_TOKEN. Softened the stale hardcoded plugin list to point at settings.json.
- CLAUDE.md: flag agent-memory-store as documented-but-not-bootstrap-wired, and
  enumerate the repo-managed LaunchAgents (obsidian-mcp/sysload/dark-notify/cargo-sweep)
  with their install gates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* hermes: track ~/.hermes/config.yaml via dotfiles

Mirror ~/.hermes/config.yaml into home/.hermes/ so symlink_dotfiles links it to
~ like the other configs (no bootstrap change needed — home/.hermes isn't in the
symlink excludes). hermes supports ${VAR} interpolation in config values
(_expand_env_vars in hermes_cli/config.py), so secrets can be externalized to
~/.extra the same way openclaw does — but this config has none: API keys are
empty/env-referenced, and the bitwarden block is disabled. Verified no credential
patterns before committing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* aliases: rename claude-yolo -> ccyolo

Shorter alias matching the cc* convention; no remaining references.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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