Commit graph

156 commits

Author SHA1 Message Date
dan 91f324949c bd sync: 2026-01-10 15:56:52 2026-01-10 15:56:53 -08:00
dan f2a5199337 bd sync: 2026-01-10 15:44:21 2026-01-10 15:44:21 -08:00
dan 713a627185 bd sync: 2026-01-10 15:41:05 2026-01-10 15:41:05 -08:00
dan 0fcfbe0624 bd sync: 2026-01-10 15:34:24 2026-01-10 15:34:24 -08:00
dan 1888db7ec0 bd sync: 2026-01-10 15:27:39 2026-01-10 15:27:39 -08:00
dan bc4f2e85cf bd sync: 2026-01-10 15:08:58 2026-01-10 15:08:58 -08:00
dan 83b126719d bd sync: 2026-01-10 15:00:45 2026-01-10 15:00:45 -08:00
dan ed12600df1 bd sync: 2026-01-10 14:37:59 2026-01-10 14:37:59 -08:00
dan 7c6ff10be7 bd sync: 2026-01-10 14:01:28 2026-01-10 14:01:28 -08:00
dan a34da926c2 bd sync: 2026-01-10 13:55:44 2026-01-10 13:55:44 -08:00
dan d6c47c26f5 docs: worklog for multi-agent Lego architecture design session
Covers: review-gate Stop hook fixes, circuit breaker, research on
OpenHands/Gastown/JWZ patterns, epic creation, phased approach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:35:58 -08:00
dan cc2a727644 bd sync: 2026-01-10 13:34:04 2026-01-10 13:34:04 -08:00
dan 71d8445be4 bd sync: 2026-01-10 13:24:42 2026-01-10 13:24:43 -08:00
dan 7426c1f303 bd sync: 2026-01-10 12:24:11 2026-01-10 12:24:11 -08:00
dan c474b81f51 bd sync: 2026-01-10 12:15:46 2026-01-10 12:15:46 -08:00
dan 0356ed237c feat: add circuit breaker to prevent Stop hook infinite loop
- Track block attempts per session in .attempts file
- After 3 attempts (configurable via REVIEW_MAX_ATTEMPTS), trip breaker
- Circuit breaker allows exit with warning instead of crashing
- Clear attempts on approve or when breaker trips
- Add 3 new tests for circuit breaker behavior (46 total)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 10:33:24 -08:00
dan 9df3aedc2f fix: prevent Stop hook infinite loop via stop_hook_active check
When Claude continues after a Stop hook block, the next Stop hook
invocation has stop_hook_active: true. Detect this and allow exit
to break the loop and prevent stack overflow crash.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 09:34:15 -08:00
dan 020458c9b8 fix: review-gate Stop hook output format and test harness
- Change exit code to 2 (Claude Code blocking signal)
- Output JSON to stderr with decision: block and reason fields
- Add integration test harness for live Claude testing
- Update unit tests for new JSON output format
- Add hooks.json example for Stop hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:23:46 -08:00
dan 4130dd4614 test: add review-gate unit tests (43 tests)
Tests cover:
- All CLI commands (check, enable, approve, reject, status, list, clean)
- Exit codes (0 for allow, 1 for block)
- State file creation and JSON structure
- Session ID auto-detection from env vars
- Multiple issues in reject
- Workflow reset (re-enable after approve)
- Error handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 23:09:33 -08:00
dan 061556e003 bd sync: 2026-01-09 20:39:37 2026-01-09 20:39:37 -08:00
dan 91b6c842a2 feat: add review-gate skill for cross-agent quality enforcement
- CLI tool with check/enable/approve/reject/status commands
- Stop hook integration for Claude Code blocking
- Adversarial reviewer prompt template
- Dual-publish structure (SKILL.md + .claude-plugin)
- Session ID auto-detection from env vars or git state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 20:39:34 -08:00
dan 4d298c1e22 bd sync: 2026-01-09 19:59:51 2026-01-09 19:59:51 -08:00
dan beace9046d bd sync: 2026-01-09 19:51:10 2026-01-09 19:51:10 -08:00
dan 75c5edb86c docs: cross-agent enforcement architecture design
Comprehensive design covering:
- Abstract layers (message passing, memory, enforcement)
- Four enforcement strategies:
  - Hook-based (Claude/Gemini)
  - Orchestrator-enforced (OpenCode/Codex)
  - Validator sidecar (universal)
  - Proxy-based (API interception)
- Circuit breakers (semantic drift, three-strike, budget)
- Adversarial reviewer pattern
- State flow diagram
- Implementation phases

Based on web research via orch (gemini --websearch).

Addresses: skills-8sj

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:51:09 -08:00
dan 8c033eedd1 docs: add Gemini path fix (includeDirectories setting)
Gemini CLI can access ~/.claude/skills/ via:
  settings.json: { "context": { "includeDirectories": ["~/.claude/skills"] } }
  or CLI: gemini --include-directories ~/.claude/skills

Closes: skills-8nl, skills-bo8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:35:28 -08:00
dan f7483edcf3 bd sync: 2026-01-09 19:33:03 2026-01-09 19:33:03 -08:00
dan 52fe241734 bd sync: 2026-01-09 19:01:55 2026-01-09 19:01:55 -08:00
dan c14075ae7e docs: web research on cross-agent patterns (via orch)
Key findings from gemini --websearch:
- Manager-Worker orchestration (Maestro pattern)
- alice/idle adversarial review gates (emes)
- Git-as-state for agent coordination
- tissue for machine-first issue tracking
- Circuit breakers: semantic drift, three-strike, budget limits
- Sandboxing: Wasm and Docker playgrounds

Validates our direction: beads, orch, file-based coordination.
Gaps: orchestrator-enforced gates, agent messaging, sandboxing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:50:37 -08:00
dan e367be6cb6 bd sync: 2026-01-09 17:32:23 2026-01-09 17:32:23 -08:00
dan ec2d856c05 docs: add agent capability matrix for cross-agent design
Comprehensive comparison of Claude Code, Gemini CLI, OpenCode, and Codex:
- Hooks/lifecycle events (Claude/Gemini best, OpenCode most comprehensive)
- Subagent spawning (MCP is universal bridge)
- File access (Gemini has path restrictions - skills-bo8)
- Sandboxing (Codex has OS-level, others approval-based)
- State persistence (need external store for cross-agent)

Key finding: Orchestrator pattern works across all agents.
Stop hooks only in Claude/Gemini - others need protocol-based gates.

Closes: skills-fqu

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:32:17 -08:00
dan c94def1c61 bd sync: 2026-01-09 17:14:41 2026-01-09 17:14:41 -08:00
dan a87f2f4950 bd sync: 2026-01-09 16:57:16 2026-01-09 16:57:16 -08:00
dan 4773abe56f docs: correct alice framing - adversarial agent review for automation
alice is for reviewing AGENT work in unattended/autonomous contexts,
not code review. Key use cases:
- Autonomous runs on ops-jrz1
- CI/CD pipelines with agents
- High-stakes changes without human oversight

Added hybrid approach recommendation: use alice concepts (Stop hook,
adversarial methodology) with our infrastructure (beads, orch).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:45:49 -08:00
dan 144bafd2b5 bd sync: 2026-01-09 16:43:51 2026-01-09 16:43:51 -08:00
dan 239c758dc7 docs: research idle/alice quality gate mechanism
Comprehensive analysis of emes idle/alice plugin:
- Hook chain (6 hooks, Stop is key blocker)
- State management via jwz (topic-based messaging)
- alice agent (read-only Opus reviewer)
- Circuit breakers against infinite loops

Conclusion: alice pattern is overkill for code-review (we ARE the
reviewer). More useful: "review reminder" hook that checks if
code-review was run before exit on significant changes.

Closes: skills-9jk

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:43:46 -08:00
dan 1b943742bd bd sync: 2026-01-09 16:19:14 2026-01-09 16:19:14 -08:00
dan 5a7891656a feat: convert all skills to dual-publish pattern
Add Claude plugin structure (.claude-plugin/plugin.json) and auto-discovery
(skills/<name>.md) to 15 skills. orch was already converted.

Skills converted:
- ai-tools-doctor, bd-issue-tracking, code-review, doc-review
- niri-window-capture, ops-review, playwright-visit, screenshot-latest
- spec-review, tufte-press, update-opencode, update-spec-kit
- web-research, web-search, worklog

Marketplace now lists all 16 skills for /plugin install.

Closes: skills-1ks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:19:09 -08:00
dan f6ec653a83 bd sync: 2026-01-09 16:06:50 2026-01-09 16:06:50 -08:00
dan a198b31add docs: clarify deployment strategy (beads local, tissue remote)
Local (skills, dotfiles): beads + our dual-publish
Remote (ops-jrz1 VPS): tissue + emes ecosystem

They coexist by environment, not replacing each other.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:06:45 -08:00
dan 8a76f4e9cb docs: add plugin systems comparison (ours vs claude vs emes)
Compares three approaches:
- Our system: cross-agent, Nix, lenses
- Claude plugins: official, hooks, marketplace
- emes: mechanical enforcement, tissue, idle, jwz

Living document for iterating on architecture.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:39:19 -08:00
dan a84066c1dd docs: add ADR-005 for dual-publish plugin architecture
Captures the decision to maintain both:
- Nix deployment (cross-agent: Gemini, OpenCode)
- Claude plugin system (hooks, marketplace)

Documents trade-offs, consequences, and mitigations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:44:15 -08:00
dan 3e3363e35d bd sync: 2026-01-09 11:21:36 2026-01-09 11:21:36 -08:00
dan d97c96be4c feat: add marketplace.json and update dual-publish guide
- Create .claude-plugin/marketplace.json at repo root
- Register orch as first dual-publish plugin
- Update emes-conversion-guide.md to explain dual-publish pattern
- Cross-agent support (Gemini, OpenCode) via Nix
- Claude plugin system for hooks and /plugin install UX

Part of skills-6x1 (emes plugin architecture epic)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:21:32 -08:00
dan 7bbf79e947 bd sync: 2026-01-09 11:03:44 2026-01-09 11:03:44 -08:00
dan f24b2bb518 feat: add emes plugin structure to orch skill
- Add .claude-plugin/plugin.json with metadata
- Copy SKILL.md to skills/orch.md for auto-discovery
- Keep original SKILL.md for Nix backward compat
- Add emes-conversion-guide.md documenting the pattern

Part of skills-6x1 (emes plugin architecture epic)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:03:37 -08:00
dan fe51d14889 bd sync: 2026-01-06 16:29:22 2026-01-06 16:29:22 -08:00
dan 853bf347e4 test: add deploy-skill.sh config injection tests (21 tests)
Covers:
- Basic injection (config inserted before closing brace)
- Idempotency (no duplicates on re-run)
- Multiple injections (different configs can coexist)
- File not found handling (graceful skip)
- Brace structure preservation (nested braces work)
- inject_home_file wrapper (builds correct Nix block)
- Already present detection
- Edge cases (empty props, minimal file)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 16:29:12 -08:00
dan 112d43a4c3 refactor(deploy): move functions to top of file (code-review) 2026-01-03 12:16:01 -08:00
dan f00c0e7e20 bd sync: 2026-01-03 12:13:49 2026-01-03 12:13:49 -08:00
dan e605f26cb1 refactor(specify): simplify branch generation and add main (skills-lzk) 2026-01-03 12:13:21 -08:00