Skip to content

feat(sdk): Phase 3 — decommission bash orchestrator, TypeScript-only CLI#31

Open
Sillhouette wants to merge 1 commit intomainfrom
genie/P0-sdk-phase3-decommission
Open

feat(sdk): Phase 3 — decommission bash orchestrator, TypeScript-only CLI#31
Sillhouette wants to merge 1 commit intomainfrom
genie/P0-sdk-phase3-decommission

Conversation

@Sillhouette
Copy link
Copy Markdown
Collaborator

Summary

Phase 3 of P0-typescript-sdk-migration: eliminate the 2,938-line bash orchestrator entirely. The genies command is now a direct npm bin entry pointing to compiled TypeScript — no shell shim, no fallback.

  • Deleted scripts/genies (2,938 lines) and all 10 bash test files + fixtures
  • Renamed genies-coregenies (single binary, no intermediary)
  • Added 13 new TypeScript modules: artifact threading, slug utility, batch status surface, continuous daemon loop with signal handling, finisher (head chef quality pass), lockfile management, recovery mode, quality validation, worktree environment setup
  • Wired all CLI flags to behavioral code: --dry-run, --no-worktree, --no-preflight, --lock, --cleanup-on-failure, per-phase turn overrides, --min-phase, --finish-mode
  • Extended single-item executor with artifact path threading between phases, enhanced verdict detection (frontmatter → output text fallback), and min-turn retry
  • Extended item-resolver with docs/topics/ scanning and --topics-file support
  • Updated install.sh to distribute genies via npm link only, cleaning up legacy scripts

Tests: 212 → 373 (+161 new vitest tests, 0 bash tests remain)
Build: TypeScript compiles cleanly

New CLI subcommands

Subcommand Purpose
genies status Batch execution status from log directory
genies quality Run validation scripts
genies recover Integrate orphaned genie/* branches
genies daemon start Continuous daemon with signal handling
genies daemon stop Send SIGTERM to running daemon
genies daemon status Display daemon status

Test plan

  • npm test — 373 vitest tests passing
  • npm run build — TypeScript compiles cleanly, no errors
  • All CLI flags verified with behavioral tests (not just parsing)
  • Finisher state machine exhaustively tested (12 state combinations)
  • Daemon loop tested with cycle limits, cost caps, finisher integration
  • Lockfile tested with PID liveness, stale detection
  • Manual: npm link && genies check works end-to-end
  • Manual: genies run executes phases without bash fallback

Refs: docs/backlog/P0-typescript-sdk-migration.md

🤖 Generated with Claude Code

Phase 3 of P0-typescript-sdk-migration: eliminate the 2,938-line bash
`scripts/genies` orchestrator entirely. The `genies` command is now a
direct npm bin entry pointing to compiled TypeScript.

Key changes:
- Remove scripts/genies bash orchestrator (2,938 lines → deleted)
- Remove scripts/genie-session from distribution (legacy cleanup)
- Remove all 10 bash test files and test fixtures
- Rename genies-core → genies (package.json bin, CLI name, install.sh)
- Add new TypeScript modules: artifact threading, slug utility,
  batch status surface, continuous daemon loop, finisher (head chef),
  lockfile management, recovery mode, quality validation
- Wire all CLI flags to behavioral code (--dry-run, --no-worktree,
  --no-preflight, --lock, --cleanup-on-failure, per-phase turns)
- Add preflight checks before run execution
- Add lockfile acquisition for --lock flag
- Extend item-resolver with topics scanning and --min-phase floor
- Extend single-item executor with artifact path threading between
  phases, enhanced verdict detection (frontmatter fallback), and
  min-turn retry on anomalous completions
- Add worktree environment setup (auto-detect package manager)
- Update install.sh to distribute genies via npm link only

Tests: 212 → 373 (161 new vitest tests)
Build: TypeScript compiles cleanly

Refs: docs/backlog/P0-typescript-sdk-migration.md

Co-Authored-By: Crafter <noreply@anthropic.com>
@Sillhouette Sillhouette requested a review from npatterson April 7, 2026 20:01
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