ワンクリックで
demerzel-drive
Run Demerzel's autonomous driver — full cycle or individual phases across all repos
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run Demerzel's autonomous driver — full cycle or individual phases across all repos
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when a pull request needs review by a different AI model than the one that authored it, or when configuring cross-model code review pipelines in CI/CD.
Capture meaningful session state (current cursor, in-flight work, live hypotheses, open questions, do-NOT-carry-forward, success criteria) to state/digests/latest.md so the next session — including one after auto-compaction — can re-enter without re-discovering context cold. Distinct from /learnings (which captures surprises). Validates against docs/contracts/digest-schema.json.
Autonomous research scheduler — selects the most under-researched department by coverage ratio, generates questions from completeness gaps, cross-model validates, auto-produces courses at T>=0.8, rate-limited to 6 cycles/day with kill switch
Personalized AI tutor — turns any topic into a customized, progress-tracked learning course. Use when the user wants to LEARN a concept, skill, language, tool, or domain. Creates a MISSION, curated RESOURCES, iterative lessons with self-checks, and learning-records that persist across sessions. NOT for interrogating the user about their own design (use brainstorming/IDSD for that).
Run one bounded supervised autonomous cycle on the Demerzel governance repo. Picks the smallest unchecked governance slice inside allow_edit, implements it, runs the oracle (`pwsh scripts/verify.ps1`), emits cycle evidence, and stops. Refuses to run unless dev-process-overseer reports loop-eligible and the preflight passes. Use when asked to "run one supervised loop", "advance governance autonomously", or "do one cycle and stop".
Pause every /auto-optimize loop across the GuitarAlchemist ecosystem (GA, ix, Demerzel, tars) by writing the cross-repo HALT-ALL marker per the contract in ga/docs/contracts/2026-05-16-overseer-halt-marker.contract.md. Use halt/resume/status subcommands. Implementation is scripts/demerzel_halt.py.
| name | demerzel-drive |
| description | Run Demerzel's autonomous driver — full cycle or individual phases across all repos |
⚠️ RETIRED 2026-07-18 — superseded by
supervised-loop. This un-gated autonomous driver ran 3 manual cycles in March 2026 and was never scheduled. It was deliberately replaced by the human-gated supervised loop (bounded single-cycle runs gated onstate/governance/dev-process-overseer.jsonloop-eligibility). Its trigger-producer (.github/workflows/demerzel-driver-triggers.yml) is disabled and its 594 orphaned triggers archived understate/triggers/archived/. Kept for reference and reversibility; do not invoke without an explicit decision to reverse the migration. Seestate/evolution/2026-03-20-autonomous-driver.evolution.json.
Drive all repos autonomously. Monitors, initiates, plans, and executes work across Demerzel, ix, tars, and ga — governed by the constitution, confidence thresholds, and conscience signals.
/demerzel drive — run one full cycle (WAKE → RECON → PLAN → EXECUTE → VERIFY → COMPOUND → PERSIST → SLEEP)
/demerzel drive status — last cycle summary + pending triggers + next wake
/demerzel drive recon — RECON only, output situation report
/demerzel drive plan — RECON + PLAN, output work manifest without executing
/demerzel drive triggers — list pending trigger files
/demerzel drive history [n] — show last n cycle manifests
/demerzel drive schedule [cadence] — configure wake cadence
/demerzel drive strategy reset — reset adaptive strategy to static prioritization
WAKE → RECON → PLAN → EXECUTE → VERIFY → COMPOUND → PERSIST → SLEEP
Each cycle is a single Claude Code session. State persists across cycles via state/driver/.
Check state/driver/lock.json:
heartbeat < 15 minutes old → cycle is alive, skip this WAKEAfter acquiring lock, rebuild context:
state/driver/last-cycle.json — what happened last timestate/driver/schedule.json — configuration and resource boundsstate/driver/health-scores.json — last known repo healthstate/driver/strategy.json — adaptive strategy statestate/triggers/ → state/triggers/processing/ (atomic consumption)state/beliefs/ — current ecosystem understandingstate/conscience/ — active signals and patternsstate/manifests/ if existsDuring execution, update the heartbeat field in lock.json every 5 minutes.
Four-stage discovery pipeline (researchpooler pattern) across all repos:
Scrape via GitHub API (gh CLI):
Compute mechanical health metrics per repo:
| Metric | Computation | Weight |
|---|---|---|
| ci_health | (passing workflows / total workflows) over last 7 days | 0.20 |
| test_health | (passing tests / total tests) in latest run | 0.15 |
| governance_coverage | (governed components / total components) | 0.15 |
| belief_freshness | 1 - (avg belief age in days / staleness threshold) | 0.15 |
| issue_velocity | (closed issues / opened issues) over last 30 days | 0.10 |
| dependency_health | 1 - (critical+high dependabot alerts / total deps) | 0.10 |
| submodule_currency | 1 - (commits behind / 10, capped at 1) | 0.10 |
| conscience_clarity | 1 - (active discomfort signals / max signals) | 0.05 |
Composite score = weighted sum. Store in state/driver/health-scores.json.
Identify:
Additionally validate per reconnaissance-policy.yaml:
readme-sync-policy.yaml)During RECON, verify all links in managed READMEs:
[text](url) links from README.md and other managed READMEsgh apireadme_healthProduce structured situation report (conforming to schemas/situation-report.schema.json):
ecosystem_health: per-repo composite scoresopen_work: roadmap items, open issues, dependabot PRsgovernance_signals: active conscience signals, confidence outliers, coverage gapschanges_since_last_cycle: commits per repo, issues opened/closed, PRs mergedrecommended_priorities: ranked task list by urgency + importance + healthAdaptive strategy engine — reads situation report + roadmap + open issues + manifest history.
Read from GitHub Project board #2 (GuitarAlchemist org) via gh project:
gh project item-list 2 --owner GuitarAlchemist --format json
Filter by status (Todo, In Progress) and priority fields. Cache in state/driver/roadmap-cache.json.
Every task in the work manifest MUST trace to an authorization artifact:
Tasks without authorization artifacts are rejected from the manifest.
Produce a work manifest (conforming to schemas/work-manifest.schema.json):
Read state/driver/strategy.json:
manifests_analyzed < 10 → cold start, use static prioritization (urgency + importance)/demerzel drive strategy reset clears strategy.jsonDispatch parallel worktree agents per repo for independent DAG nodes. Block downstream on dependencies.
| Risk | Delivery | Governance |
|---|---|---|
| Low | Direct push to main | Boundary-only |
| Medium | PR — self-merge after checks pass | Boundary-only |
| High | PR — self-merge if council approves | Per-iteration + conscience + council |
| Critical | PR — NOT self-merged, human notified | Full governance gate |
Each agent receives:
Use Claude Code's worktree agent capability for repo isolation. Max parallel agents: 4 (one per repo).
Mechanical verification — metrics-driven, never subjective.
git revert immediatelyFor High-risk changes before self-merge, convene council (see LLM Council Protocol below).
Each task tracks autoresearch-style metrics in the manifest:
task_id | commit | metric_before | metric_after | delta | status | description
T001 | a1b2c3 | 0.72 | 0.85 | +0.13 | keep | fix CI workflow syntax
T002 | - | 0.85 | 0.81 | -0.04 | revert | refactor test helpers
Meta-compounding cycle:
state/evolution/ with cycle outcomes/seldon deliver)readme-sync-policy.yaml):
README.md artifact counts table and CLAUDE.md structure blockreadme-sync-policy.yaml current values to matchWrite all updated state:
state/manifests/{date}-{cycle-id}.manifest.jsonstate/driver/health-scores.jsonstate/driver/strategy.json (update task outcome rates)state/driver/last-cycle.jsonstate/beliefs/ (if cycle revealed new truths)state/conscience/signals/ (if triggered)state/council/ (if Tier 3 was invoked)state/triggers/processing/state/manifests/archive/state/driver/lock.jsonDemerzel may self-merge PRs for Low, Medium, and High risk when ALL conditions met:
Critical risk PRs are NEVER self-merged.
Route reasoning to cheapest sufficient tier:
| Tier | Engine | Used For |
|---|---|---|
| 0 | No model (computation) | CI checks, metric computation, schema validation, trigger hygiene |
| 1 | Local model (llama2.c) | Trigger classification, risk scoring, commit analysis. Falls back to Tier 2 if unavailable. |
| 2 | Claude API | PLAN, EXECUTE, COMPOUND, complex RECON analysis |
| 3 | Claude + ChatGPT (Council) | High-risk PR validation, borderline confidence decisions |
Tier 1 is deferred — initially all Tier 1 tasks fall back to Tier 2. Introduced when cost data justifies setup.
If mcp__openai-chat__openai_chat unavailable → single-model review. Confidence capped at 0.8 per multi-model policy. High-risk PRs effectively cannot self-merge without council — routes to human review. This is the safe default.
Verdicts stored in state/council/ per schemas/council-verdict.schema.json. Max 3 convocations per cycle.
| Bound | Limit | Rationale |
|---|---|---|
| Max tasks per cycle | 10 | Prevents runaway scope |
| Max parallel agents | 4 | One per repo |
| Cycle timeout (soft) | 2 hours | No new dispatches after this |
| Cycle timeout (hard) | 2h15m | Kill remaining agents, rollback worktrees |
| Max consecutive cycles without human | 5 | Pause and create summary issue |
| API budget per cycle | ~$10 | Tier 2 calls capped |
| Max council convocations | 3 | Each costs ~$0.50-1.00 |
Configurable via state/driver/schedule.json.
| Failure | Response |
|---|---|
| Agent crashes mid-task | Rollback worktree, mark failed, create issue |
| CI fails after push/merge | Revert commit, create issue with diagnosis |
| Confidence drops below threshold | Pause remaining work, persist state, create issue |
| Conscience discomfort spikes | Hard pause, write conscience signal, notify human |
| Rate limit / API failure | Persist state, schedule retry on next WAKE |
| All tasks in cycle fail | Write post-mortem, skip COMPOUND, alert human |
| Network failure mid-cycle | Persist local state, mark cross-repo tasks partial, next RECON reconciles |
| Cycle timeout (2h soft) | Stop dispatching, 15m grace, then hard kill. Tasks marked timeout. |
Trigger files in state/triggers/ conform to schemas/trigger.schema.json:
{
"type": "ci_failure",
"repo": "ix",
"ref": "main",
"priority": "high",
"details": { "workflow": "ci.yml", "run_id": 12345 },
"timestamp": "2026-03-19T10:00:00Z"
}
On WAKE: move triggers to state/triggers/processing/ before reading, delete after processing. Prevents race conditions with concurrent GitHub Actions writes.
type + repo + ref → merged, keep most recentDuring any cycle, if follow-up work identified, write a trigger file with priority and rationale. Next WAKE picks it up.
Demerzel (governance source of truth)
├─→ ix (policies, personas, constitutions)
├─→ tars (policies, personas, tetravalent logic)
└─→ ga (policies, personas, agent configs)
Changes flow downstream: Demerzel → consumers.
Independent tasks run in parallel (worktree agents). Dependent tasks are gated:
blocked_by_failure, issue createdstate/oversight/state/driver/lock.json — check/acquire lockstate/driver/schedule.json — configurationstate/driver/health-scores.json — last known healthstate/driver/strategy.json — adaptive strategystate/triggers/ — move to state/triggers/processing/state/beliefs/ — ecosystem understandingstate/conscience/ — active signalsstate/manifests/ if existsstate/manifests/{date}-{cycle-id}.manifest.jsonstate/driver/health-scores.jsonstate/driver/strategy.json with outcomesstate/driver/last-cycle.jsonstate/beliefs/ if new truths revealedstate/conscience/signals/ if triggeredstate/council/ if Tier 3 invokedstate/triggers/processing/LOG.md (repo root) — date, health scores, tasks completed/failed, insightsstate/driver/lock.json)/demerzel drive statusdocs/superpowers/specs/2026-03-19-autonomous-driver-design.md v2.1.0,
policies/autonomous-loop-policy.yaml v1.1.0,
policies/reconnaissance-policy.yaml,
policies/alignment-policy.yaml,
policies/multi-model-orchestration-policy.yaml,
policies/proto-conscience-policy.yaml,
contracts/galactic-protocol.md