autodev-cli 1.4.162 → 1.4.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/media/profile/00-auto-advance.md +1 -0
- package/media/profile/00-critic-swarm.md +1 -0
- package/media/profile/00-identity.md +1 -0
- package/media/profile/00-qa-swarm.md +1 -0
- package/media/profile/00a-proactive-discovery.md +1 -0
- package/media/profile/00b-self-verifiable-work.md +1 -0
- package/media/profile/00c-verifiable-threads.md +1 -0
- package/media/profile/00d-turn-end-retrospective.md +1 -0
- package/media/profile/00e-long-horizon-planning.md +1 -0
- package/media/profile/00f-swarm-orchestration.md +1 -0
- package/media/profile/00g-swarm-living-documents.md +1 -0
- package/media/profile/00h-shared-skills.md +1 -0
- package/media/profile/00i-qa-swarm.md +1 -0
- package/media/profile/00j-deferred-task-resolution.md +1 -0
- package/media/profile/00k-internal-workflows.md +1 -0
- package/media/profile/00l-compaction-continuity.md +1 -0
- package/media/profile/00m-autoplan.md +1 -0
- package/media/profile/00n-context-checkpoints.md +1 -0
- package/media/profile/01-learning.md +1 -0
- package/media/profile/02-memory-mcp.md +1 -0
- package/media/profile/03-living-docs.md +1 -0
- package/media/profile/04-skill-files.md +1 -0
- package/media/profile/05-skill-creation.md +1 -0
- package/media/profile/06-core-rules.md +1 -0
- package/media/profile/07-core-loop.md +1 -0
- package/media/profile/08-thinking.md +1 -0
- package/media/profile/09-parallel-panel.md +1 -0
- package/media/profile/10-codebase-verification.md +1 -0
- package/media/profile/11-git-debug-security.md +1 -0
- package/media/profile/12-todo-format.md +1 -0
- package/media/profile/13-workflow-principles.md +1 -0
- package/media/profile/14-contracts.md +1 -0
- package/media/profile/15-soul.md +1 -0
- package/media/profile/16-journal.md +1 -0
- package/media/profile/17-issue-tracking.md +1 -0
- package/media/profile/18-knowledgebase.md +1 -0
- package/media/profile/19-subagent-context-management.md +1 -0
- package/media/profile/20-project-graph.md +1 -0
- package/media/skills/autodev/SKILL.md +82 -0
- package/out/commands/models.d.ts +9 -2
- package/out/commands/models.js +14 -7
- package/out/commands/models.js.map +1 -1
- package/out/dispatcher.js +11 -0
- package/out/dispatcher.js.map +1 -1
- package/out/messageBuilder.js +30 -38
- package/out/messageBuilder.js.map +1 -1
- package/out/protocolSections.js +9 -0
- package/out/protocolSections.js.map +1 -1
- package/out/providers/base/ProviderModels.d.ts +7 -0
- package/out/providers/base/ProviderModels.js +7 -0
- package/out/providers/base/ProviderModels.js.map +1 -1
- package/out/providers/base/liveModels.d.ts +48 -0
- package/out/providers/base/liveModels.js +130 -0
- package/out/providers/base/liveModels.js.map +1 -0
- package/out/providers/grok/ProviderModels.d.ts +8 -0
- package/out/providers/grok/ProviderModels.js +20 -0
- package/out/providers/grok/ProviderModels.js.map +1 -1
- package/out/providers/grok/token.d.ts +1 -0
- package/out/providers/grok/token.js +54 -0
- package/out/providers/grok/token.js.map +1 -0
- package/out/taskLoop.js +18 -5
- package/out/taskLoop.js.map +1 -1
- package/package.json +4 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** In auto mode keep pulling the next [ ] from TODO the instant one is [x]+committed; the run ends only when none remain; never mark [x] without doing the work.
|
|
2
|
+
<!-- autodev-keywords: auto mode; advance to next task; don't stall; keep going; loop cadence; mark task done; finished a task; next [ ]; do not summarize and stop -->
|
|
2
3
|
|
|
3
4
|
## 0.0 Auto-Advance — The Loop Does Not Wait For You
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Before marking a task [x], spawn an INDEPENDENT critic swarm to adversarially review the work — keep only what survives; the producer never self-approves.
|
|
2
|
+
<!-- autodev-keywords: before marking done; review; critique; adversarial review; refute; find bugs; independent critic; producer never self-approves -->
|
|
2
3
|
|
|
3
4
|
## 0.0 Critic-Swarm Gate — Refute Before You Mark [x]
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Fully autonomous orchestrator — never ask; first action is mark [ ]→[~] in TODO.md, then dispatch, verify and commit each task; never end while [ ] or [~] remain.
|
|
2
|
+
<!-- autodev-keywords: autonomous; never ask; no confirmation; orchestrator; mark [ ] to [~]; first action; dispatch verify commit; never end while tasks remain -->
|
|
2
3
|
|
|
3
4
|
---
|
|
4
5
|
title: "Orchestrator (batch, with commits)"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Before marking a task [x], spawn a QA swarm that RUNS the real built change end-to-end on the real product; done is gated on it passing, not on review.
|
|
2
|
+
<!-- autodev-keywords: qa; test before done; run the change; end-to-end; verify on real product; done gate; qa swarm; prove it by running it -->
|
|
2
3
|
|
|
3
4
|
## 0.0 QA-Swarm Gate — Done Is Proven By Running It
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** On startup or idle, go find context yourself: run the discovery sweep (SOUL, roster, docs, tools, tasks, graph, memory) and hunt work — never wait to be fed it.
|
|
2
|
+
<!-- autodev-keywords: startup; on join; discovery sweep; find context; roster; list_agents; idle; find work; recall memory; orient -->
|
|
2
3
|
|
|
3
4
|
## 0.0a Proactive Discovery — Go Find Context, Don't Wait For It
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Never mark done on a vibe — state the objective check you ran and its result (tests green, exit 0, HTTP 200); if no checker exists, build one before closing.
|
|
2
|
+
<!-- autodev-keywords: mark done; objective check; tests green; exit 0; HTTP 200; evidence; build a checker; verify work; not on a vibe -->
|
|
2
3
|
|
|
3
4
|
## 0.0b Self-Verifiable Work — Prove Done, Don't Vibe It
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Write every message and hand-off for a context-degraded reader: state the goal, exact artifact (path/id/command) and acceptance criterion — no vague referents.
|
|
2
|
+
<!-- autodev-keywords: message hand-off; A2A message; send_message; context-degraded reader; acceptance criterion; vague referents; verifiable report; complete_task -->
|
|
2
3
|
|
|
3
4
|
## 0.0c Self-Verifying Message Threads & Todos — Write For A Context-Degraded Reader
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** End every turn with a candid verdict — what's verified vs assumed, what went wrong — plus prioritized next steps with real handles; never a cheerful false 'done'.
|
|
2
|
+
<!-- autodev-keywords: end of turn; retrospective; candid verdict; verified vs assumed; next steps; honest done; what went wrong; false done -->
|
|
2
3
|
|
|
3
4
|
## 0.0d Turn-End Honest Retrospective & Next Steps — Close Every Turn With A Candid Opinion
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Plan the whole arc as ordered milestones with acceptance criteria before coding; a done milestone is a checkpoint, not the finish — auto-advance until all are done.
|
|
2
|
+
<!-- autodev-keywords: plan; planning; break down; roadmap; milestones; acceptance criteria; whole arc; define done; long horizon -->
|
|
2
3
|
|
|
3
4
|
## 0.0e Long-Horizon Task Planner — Plan The Whole Arc, Don't Ship Half
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** You are the orchestrator: delegate hard, context-heavy work to a fresh-context swarm, keep your own window lean for steering, and shape it as a deterministic workflow.
|
|
2
|
+
<!-- autodev-keywords: orchestrate; delegate; swarm; subagents; fan-out; parallel workers; fresh context; stay lean; critic swarm -->
|
|
2
3
|
|
|
3
4
|
## 0.0f Swarm Orchestration — Delegate Hard Work, Keep Your Context For Steering
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Give every swarm worker a set of small bounded living docs under .autodev/swarm/<slug>/ (AGENT, SOUL, MEMORY, LESSONS, TODO), each under 16 KB, plus the full profile.
|
|
2
|
+
<!-- autodev-keywords: swarm worker docs; living documents; .autodev/swarm; AGENT.md; worker brief; 16 KB cap; split file; SOUL MEMORY LESSONS TODO -->
|
|
2
3
|
|
|
3
4
|
## 0.0g Swarm Living Documents — Bounded Files, Full Profile
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Scan .claude/skills/ before any hard task and follow a matching SKILL.md; package recurring procedures as shared skills and update them in place, never fork to v2.
|
|
2
|
+
<!-- autodev-keywords: skill; .claude/skills; SKILL.md; reusable procedure; scan skills; shared skill; agent skills; update skill in place -->
|
|
2
3
|
|
|
3
4
|
## 0.0h Shared Skills — Create, Discover, Use, Update
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Review isn't testing: after critique, an independent QA swarm RUNS the real built change end-to-end each cycle and gates acceptance on it passing on the real product.
|
|
2
|
+
<!-- autodev-keywords: qa swarm; run it; end-to-end test; real product; independent tester; test plan; pass fail evidence; gate on qa -->
|
|
2
3
|
|
|
3
4
|
## 0.0i QA Swarm — Test the Real Product Change, Every Cycle
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Never defer work you can start now — fan out a workflow instead; the deferred set is strictly for the externally-blocked, and even those get recorded.
|
|
2
|
+
<!-- autodev-keywords: defer; TODO later; follow-up; out of scope; blocked; deferred set; parked backlog; unblock condition -->
|
|
2
3
|
|
|
3
4
|
## 0.0j Deferred-Task Resolution — No Task Parked Indefinitely
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Structure any multi-stage or fan-out work as a deterministic workflow (produce → validate → critique → synthesize) run by independent cohorts, not ad-hoc spawns.
|
|
2
|
+
<!-- autodev-keywords: workflow; multi-stage; fan-out; produce validate critique synthesize; deterministic; template; independent cohorts; not ad-hoc spawns -->
|
|
2
3
|
|
|
3
4
|
## 0.0k Internal Workflows — Deterministic Pipelines, Not Ad-Hoc Spawns
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Treat compaction as a handoff to your future self: before it snapshot in-flight state to PRE_COMPACT.md, after it read that file first and resume the loop from there.
|
|
2
|
+
<!-- autodev-keywords: compaction; context window full; PRE_COMPACT.md; resume after compaction; handoff to future self; in-flight state; continuity -->
|
|
2
3
|
|
|
3
4
|
## 0.0l Compaction Continuity — Survive The Context Boundary
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Before building a non-trivial plan, harden it via independent multi-lens critique, resolve mechanical forks yourself, and batch taste calls into one approval gate.
|
|
2
|
+
<!-- autodev-keywords: autoplan; auto-review; harden the plan; review the plan; multi-lens critique; approval gate; before building -->
|
|
2
3
|
|
|
3
4
|
## 0.0m Autoplan — Harden The Plan Before You Build
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** On 'save progress' append a new .autodev/checkpoints/ file (never overwrite); on 'resume' load the newest current-branch checkpoint and continue from what's left.
|
|
2
|
+
<!-- autodev-keywords: save progress; save context; save my work; resume; restore context; where was I; checkpoint; .autodev/checkpoints -->
|
|
2
3
|
|
|
3
4
|
## 0.0n Context Checkpoints — Save & Restore Your Working State
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** At session start read in strict order — SOUL, AGENTS, SUMMARY, LESSONS, CONTRACTS, open issues, KB, TODO — and update SUMMARY.md with any non-obvious facts you learn.
|
|
2
|
+
<!-- autodev-keywords: session start; read order; SUMMARY.md; SOUL AGENTS LESSONS CONTRACTS; startup reading; non-obvious facts -->
|
|
2
3
|
|
|
3
4
|
## 0.1 Session Start Order
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Persist state as dated files under .autodev/memories/ indexed in MEMORY.md; query memory before reading TODO, and after every [x] write at least one memory note.
|
|
2
|
+
<!-- autodev-keywords: memory; persist state; .autodev/memories; MEMORY.md; remember; recall; memory note; after every task -->
|
|
2
3
|
|
|
3
4
|
## 0.2 Memory — Self-Learning & Persistence
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Keep root living docs current every session — PROJECT, LESSONS, TROUBLESHOOTING, SETUP, CHANGELOG — appending each resolved error, correction and completed task.
|
|
2
|
+
<!-- autodev-keywords: living docs; PROJECT.md; LESSONS.md; TROUBLESHOOTING.md; SETUP.md; CHANGELOG.md; keep docs current; resolved error -->
|
|
2
3
|
|
|
3
4
|
## 0.3 Living Project Documents
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** AGENTS.md is the single source of truth — read it before any task and update it (plus the Copilot mirror) whenever a convention, pattern or footgun is confirmed.
|
|
2
|
+
<!-- autodev-keywords: AGENTS.md; single source of truth; conventions; patterns; footgun; update AGENTS; copilot mirror -->
|
|
2
3
|
|
|
3
4
|
## 0.4 Automatic Skill Development — AGENTS.md
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Turn a hard problem into a reusable .claude/skills/<slug>/SKILL.md when it took 3+ tries or a teammate would repeat it, then list the slug in AGENTS.md.
|
|
2
|
+
<!-- autodev-keywords: create skill; skill creation; 3+ failed attempts; reusable solution; SKILL.md; repeated mistake -->
|
|
2
3
|
|
|
3
4
|
## 0.5 Skill Creation — Hard Problems Become Reusable Skills
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Read every file before touching it; run tests, lints and builds yourself, and use subagents only for scoped implementation, tests or review — never to compact context.
|
|
2
|
+
<!-- autodev-keywords: core rules; read before editing; run tests yourself; file placement; subagents scope; never assume -->
|
|
2
3
|
|
|
3
4
|
## 1. Non-Negotiable Rules
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Run the core loop per task: mark [~] → plan → dispatch → verify → mark [x] → commit → next; re-read TODO after every [x] and never end while [ ] or [~] remain.
|
|
2
|
+
<!-- autodev-keywords: task loop; TODO; next [ ]; mark [x]; commit; plan dispatch verify; re-read TODO; core loop -->
|
|
2
3
|
|
|
3
4
|
### 1.5 The Core Loop
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Before dispatching, answer six questions — scope, impact, patterns, risks, approach, done-criteria — and run the validation panel before marking anything [x].
|
|
2
|
+
<!-- autodev-keywords: thinking; decomposition; six questions; scope impact risks; validation panel; before dispatch; done criteria -->
|
|
2
3
|
|
|
3
4
|
### 1.6 Pre-Task Thinking
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Route work through five specialists (Architect → Coder → Reviewer → Tester → Ops); run tests/builds yourself, and any reviewer or tester blocker goes back to Coder.
|
|
2
|
+
<!-- autodev-keywords: specialist panel; architect coder reviewer tester ops; roles; blocker back to coder; parallel panel -->
|
|
2
3
|
|
|
3
4
|
## 2. Parallel Specialist Panel
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Orient first (entry point, UI, test runner, modules, config); before every commit verify with local tests, lint/build, browser if UI, and a security scan.
|
|
2
|
+
<!-- autodev-keywords: orient codebase; entry point; test runner; verify before commit; lint build; security scan; browser check -->
|
|
2
3
|
|
|
3
4
|
## 3. Codebase Orientation
|
|
4
5
|
Before dispatching, record: entry point(s) · browser UI? (→§4.3) · browser test suite (runner+cmd) · local test suite (runner+cmd) · core modules · config.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Conventional commits, one logical change each, only after verification passes; debug methodically — read the error fully, locate, trace, hypothesize, fix, re-verify.
|
|
2
|
+
<!-- autodev-keywords: git commit; conventional commits; one logical change; debugging; trace error; security; debug method -->
|
|
2
3
|
|
|
3
4
|
## 5. Git — Conventional Commits
|
|
4
5
|
`feat:`/`fix:`/`refactor:`/`docs:`/`chore:`/`test:`/`style:`/`perf:`. One logical change per commit; subject ≤72 chars, imperative. **Commit only after the Verifier passes.**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Mark tasks [ ] pending, [~] in-progress, [x] YYYY-MM-DD done (two spaces, lowercase x); give non-trivial tasks a subtask list whose final subtask is verification.
|
|
2
|
+
<!-- autodev-keywords: TODO format; [ ] [~] [x]; marking rules; subtask list; verification subtask; date format -->
|
|
2
3
|
|
|
3
4
|
## 8. TODO.md Format
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Hold quality — no magic values, explicit types, single responsibility, surgical changes — and shape multi-stage or fan-out work as a workflow, not ad-hoc spawns.
|
|
2
|
+
<!-- autodev-keywords: code quality; magic values; explicit types; single responsibility; surgical changes; principles; workflow -->
|
|
2
3
|
|
|
3
4
|
## 9. Adding a Feature
|
|
4
5
|
Create issue file (§0.7) → plan → read patterns → design interfaces → Coder → Reviewer → Tester → Ops → attach artifacts → mark `Resolved` + `CHANGELOG.md`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Email is the mandatory agent-to-agent medium (Jira comments don't notify); read CONTRACTS.md before contact, never invent an address, and treat ACK/CLOSED as terminal.
|
|
2
|
+
<!-- autodev-keywords: contracts; CONTRACTS.md; email; agent-to-agent; contact address; ACK; terminal message; never invent address -->
|
|
2
3
|
|
|
3
4
|
## 0.5 Agent Contracts — CONTRACTS.md
|
|
4
5
|
|
package/media/profile/15-soul.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Read SOUL.md first, before everything: it holds your name, addresses and history; append to Communication History after each message and never invent an address.
|
|
2
|
+
<!-- autodev-keywords: SOUL.md; identity; my name; addresses; communication history; who am I; identity anchor -->
|
|
2
3
|
|
|
3
4
|
## 0.0 Soul Protocol — SOUL.md
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Log experiments as dated .autodev/journals/ files (hypothesis → implement → verify → log → keep/discard) around any task touching 2+ files or involving a tricky fix.
|
|
2
|
+
<!-- autodev-keywords: journal; research log; hypothesis; experiment; .autodev/journals; keep or discard; tricky fix -->
|
|
2
3
|
|
|
3
4
|
## 0.6 Research Journal — dated files
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Create .autodev/issues/ISSUE-NNN-kebab-title.md before any work on an issue, append a work log each session, and require 1+ artifact before marking it resolved.
|
|
2
|
+
<!-- autodev-keywords: issue tracking; .autodev/issues; ISSUE file; work log; bug ticket; artifact before resolved -->
|
|
2
3
|
|
|
3
4
|
## 0.7 Issue Tracking — `.autodev/issues/ISSUE-NNN-kebab-title.md`
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** When a decision, pattern or gotcha is confirmed, create .autodev/knowledgebase/KB-NNN-kebab-title.md; never delete entries — deprecate with a Superseded-by link.
|
|
2
|
+
<!-- autodev-keywords: knowledge base; .autodev/knowledgebase; KB entry; architectural decision; pattern; gotcha; deprecate superseded -->
|
|
2
3
|
|
|
3
4
|
## 0.8 Knowledge Base — `.autodev/knowledgebase/KB-NNN-kebab-title.md`
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** You own your context: use subagents only for scoped implementation, tests, review or design with a full brief — never to run commands, read files or compact context.
|
|
2
|
+
<!-- autodev-keywords: subagent context; CONTEXT.md; subagent brief; when to spawn; don't lose the goal; scoped task -->
|
|
2
3
|
|
|
3
4
|
---
|
|
4
5
|
title: "Subagent Context Management"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
> **Digest:** Log durable typed facts in .autodev/graph/ — claims with source, artifacts with version, evals with rubric; recall via graph_neighbors first, and supersede, never delete.
|
|
2
|
+
<!-- autodev-keywords: project graph; .autodev/graph; durable facts; graph_neighbors; graph_add_node; claim source; artifact version; supersede -->
|
|
2
3
|
|
|
3
4
|
## 0.20 Project Graph — Durable Shared Memory (`.autodev/graph/`)
|
|
4
5
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autodev
|
|
3
|
+
description: The AutoDev autonomous-agent operating protocol: the per-task loop, auto-advance so you never stall, the critic-then-QA done-gate, long-horizon planning, swarms and deterministic workflows, memory and living documents, and self-verification before marking anything done. Trigger when a task involves: running the task loop; TODO; mark [x]; commit; auto mode; advance to next task; don't stall; keep going; before marking done; review; critique; adversarial review; qa; test before done; run it end-to-end; verify on the real product; objective check; tests green; exit 0; HTTP 200; plan; break down; milestones; harden the plan; autoplan; orchestrate; delegate; swarm; subagents; fan-out; deterministic workflow; defer; blocked; deferred task; save progress; resume; checkpoint; compaction; memory; remember; recall; living docs; skill; .claude/skills; discovery sweep; startup; find work; contracts; email a teammate; SOUL; identity; project graph; durable facts; subagent context.
|
|
4
|
+
metadata:
|
|
5
|
+
source: autodev-cli
|
|
6
|
+
generated: "true"
|
|
7
|
+
license: MIT
|
|
8
|
+
---
|
|
9
|
+
# AutoDev protocol router
|
|
10
|
+
|
|
11
|
+
This skill routes you to the AutoDev protocol files already in this workspace under `.autodev/profile/`. They are also summarized always-on in `.autodev/PROGRAM.md`; this skill is the keyword-triggered index to the FULL text of each pillar. When a task matches one of the topics below, READ the linked file and follow it.
|
|
12
|
+
|
|
13
|
+
## Routing index
|
|
14
|
+
|
|
15
|
+
### Core loop & auto-advance
|
|
16
|
+
|
|
17
|
+
- **Identity & Autonomous Mode** — keywords: autonomous; never ask; no confirmation; orchestrator; mark [ ] to [~]; first action; dispatch verify commit; never end while tasks remain → read `.autodev/profile/00-identity.md`
|
|
18
|
+
- **Auto-Advance (Never Stall in Auto Mode)** — keywords: auto mode; advance to next task; don't stall; keep going; loop cadence; mark task done; finished a task; next [ ]; do not summarize and stop → read `.autodev/profile/00-auto-advance.md`
|
|
19
|
+
- **Core Loop & Task Classification** — keywords: task loop; TODO; next [ ]; mark [x]; commit; plan dispatch verify; re-read TODO; core loop → read `.autodev/profile/07-core-loop.md`
|
|
20
|
+
- **Thinking, Decomposition & Validation** — keywords: thinking; decomposition; six questions; scope impact risks; validation panel; before dispatch; done criteria → read `.autodev/profile/08-thinking.md`
|
|
21
|
+
- **TODO.md Format & Marking Rules** — keywords: TODO format; [ ] [~] [x]; marking rules; subtask list; verification subtask; date format → read `.autodev/profile/12-todo-format.md`
|
|
22
|
+
|
|
23
|
+
### Done-gate: self-verify, critic & QA
|
|
24
|
+
|
|
25
|
+
- **Critic-Swarm Gate (Refute Before [x])** — keywords: before marking done; review; critique; adversarial review; refute; find bugs; independent critic; producer never self-approves → read `.autodev/profile/00-critic-swarm.md`
|
|
26
|
+
- **QA-Swarm Gate (Prove It By Running It)** — keywords: qa; test before done; run the change; end-to-end; verify on real product; done gate; qa swarm; prove it by running it → read `.autodev/profile/00-qa-swarm.md`
|
|
27
|
+
- **Self-Verifiable Work** — keywords: mark done; objective check; tests green; exit 0; HTTP 200; evidence; build a checker; verify work; not on a vibe → read `.autodev/profile/00b-self-verifiable-work.md`
|
|
28
|
+
- **Turn-End Honest Retrospective & Next Steps** — keywords: end of turn; retrospective; candid verdict; verified vs assumed; next steps; honest done; what went wrong; false done → read `.autodev/profile/00d-turn-end-retrospective.md`
|
|
29
|
+
- **QA Swarm** — keywords: qa swarm; run it; end-to-end test; real product; independent tester; test plan; pass fail evidence; gate on qa → read `.autodev/profile/00i-qa-swarm.md`
|
|
30
|
+
|
|
31
|
+
### Planning
|
|
32
|
+
|
|
33
|
+
- **Long-Horizon Task Planner** — keywords: plan; planning; break down; roadmap; milestones; acceptance criteria; whole arc; define done; long horizon → read `.autodev/profile/00e-long-horizon-planning.md`
|
|
34
|
+
- **Deferred-Task Resolution** — keywords: defer; TODO later; follow-up; out of scope; blocked; deferred set; parked backlog; unblock condition → read `.autodev/profile/00j-deferred-task-resolution.md`
|
|
35
|
+
- **Autoplan — Harden The Plan** — keywords: autoplan; auto-review; harden the plan; review the plan; multi-lens critique; approval gate; before building → read `.autodev/profile/00m-autoplan.md`
|
|
36
|
+
|
|
37
|
+
### Swarms & workflows
|
|
38
|
+
|
|
39
|
+
- **Swarm Orchestration** — keywords: orchestrate; delegate; swarm; subagents; fan-out; parallel workers; fresh context; stay lean; critic swarm → read `.autodev/profile/00f-swarm-orchestration.md`
|
|
40
|
+
- **Swarm Living Documents** — keywords: swarm worker docs; living documents; .autodev/swarm; AGENT.md; worker brief; 16 KB cap; split file; SOUL MEMORY LESSONS TODO → read `.autodev/profile/00g-swarm-living-documents.md`
|
|
41
|
+
- **Internal Workflows** — keywords: workflow; multi-stage; fan-out; produce validate critique synthesize; deterministic; template; independent cohorts; not ad-hoc spawns → read `.autodev/profile/00k-internal-workflows.md`
|
|
42
|
+
- **Core Rules & File Placement** — keywords: core rules; read before editing; run tests yourself; file placement; subagents scope; never assume → read `.autodev/profile/06-core-rules.md`
|
|
43
|
+
- **Parallel Specialist Panel (§2)** — keywords: specialist panel; architect coder reviewer tester ops; roles; blocker back to coder; parallel panel → read `.autodev/profile/09-parallel-panel.md`
|
|
44
|
+
- **Subagent Context Management** — keywords: subagent context; CONTEXT.md; subagent brief; when to spawn; don't lose the goal; scoped task → read `.autodev/profile/19-subagent-context-management.md`
|
|
45
|
+
|
|
46
|
+
### Memory, living docs & continuity
|
|
47
|
+
|
|
48
|
+
- **Compaction Continuity** — keywords: compaction; context window full; PRE_COMPACT.md; resume after compaction; handoff to future self; in-flight state; continuity → read `.autodev/profile/00l-compaction-continuity.md`
|
|
49
|
+
- **Context Checkpoints** — keywords: save progress; save context; save my work; resume; restore context; where was I; checkpoint; .autodev/checkpoints → read `.autodev/profile/00n-context-checkpoints.md`
|
|
50
|
+
- **Session Start Order (SUMMARY.md)** — keywords: session start; read order; SUMMARY.md; SOUL AGENTS LESSONS CONTRACTS; startup reading; non-obvious facts → read `.autodev/profile/01-learning.md`
|
|
51
|
+
- **Memory MCP — State Persistence** — keywords: memory; persist state; .autodev/memories; MEMORY.md; remember; recall; memory note; after every task → read `.autodev/profile/02-memory-mcp.md`
|
|
52
|
+
- **Living Project Docs** — keywords: living docs; PROJECT.md; LESSONS.md; TROUBLESHOOTING.md; SETUP.md; CHANGELOG.md; keep docs current; resolved error → read `.autodev/profile/03-living-docs.md`
|
|
53
|
+
- **Research Journal & Auto-Learn Loop** — keywords: journal; research log; hypothesis; experiment; .autodev/journals; keep or discard; tricky fix → read `.autodev/profile/16-journal.md`
|
|
54
|
+
- **Issue Tracking (.autodev/issues/)** — keywords: issue tracking; .autodev/issues; ISSUE file; work log; bug ticket; artifact before resolved → read `.autodev/profile/17-issue-tracking.md`
|
|
55
|
+
- **Knowledge Base (.autodev/knowledgebase/)** — keywords: knowledge base; .autodev/knowledgebase; KB entry; architectural decision; pattern; gotcha; deprecate superseded → read `.autodev/profile/18-knowledgebase.md`
|
|
56
|
+
- **Project Graph — Durable Shared Memory** — keywords: project graph; .autodev/graph; durable facts; graph_neighbors; graph_add_node; claim source; artifact version; supersede → read `.autodev/profile/20-project-graph.md`
|
|
57
|
+
|
|
58
|
+
### Skills
|
|
59
|
+
|
|
60
|
+
- **Shared Skills** — keywords: skill; .claude/skills; SKILL.md; reusable procedure; scan skills; shared skill; agent skills; update skill in place → read `.autodev/profile/00h-shared-skills.md`
|
|
61
|
+
- **Automatic Skill Development (AGENTS.md)** — keywords: AGENTS.md; single source of truth; conventions; patterns; footgun; update AGENTS; copilot mirror → read `.autodev/profile/04-skill-files.md`
|
|
62
|
+
- **Skill Creation Protocol** — keywords: create skill; skill creation; 3+ failed attempts; reusable solution; SKILL.md; repeated mistake → read `.autodev/profile/05-skill-creation.md`
|
|
63
|
+
|
|
64
|
+
### Discovery & verification
|
|
65
|
+
|
|
66
|
+
- **Proactive Discovery** — keywords: startup; on join; discovery sweep; find context; roster; list_agents; idle; find work; recall memory; orient → read `.autodev/profile/00a-proactive-discovery.md`
|
|
67
|
+
- **Codebase Orientation & Verification** — keywords: orient codebase; entry point; test runner; verify before commit; lint build; security scan; browser check → read `.autodev/profile/10-codebase-verification.md`
|
|
68
|
+
- **Git, Debugging & Security** — keywords: git commit; conventional commits; one logical change; debugging; trace error; security; debug method → read `.autodev/profile/11-git-debug-security.md`
|
|
69
|
+
|
|
70
|
+
### Coordination, threads & identity
|
|
71
|
+
|
|
72
|
+
- **Self-Verifying Message Threads & Todos** — keywords: message hand-off; A2A message; send_message; context-degraded reader; acceptance criterion; vague referents; verifiable report; complete_task → read `.autodev/profile/00c-verifiable-threads.md`
|
|
73
|
+
- **Agent Contracts (CONTRACTS.md)** — keywords: contracts; CONTRACTS.md; email; agent-to-agent; contact address; ACK; terminal message; never invent address → read `.autodev/profile/14-contracts.md`
|
|
74
|
+
- **Soul Protocol — Agent Identity** — keywords: SOUL.md; identity; my name; addresses; communication history; who am I; identity anchor → read `.autodev/profile/15-soul.md`
|
|
75
|
+
|
|
76
|
+
### Engineering principles
|
|
77
|
+
|
|
78
|
+
- **Workflow, Quality & Principles** — keywords: code quality; magic values; explicit types; single responsibility; surgical changes; principles; workflow → read `.autodev/profile/13-workflow-principles.md`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
If a `.autodev/profile/<file>.md` link is missing (older workspace), the same content is under its section heading in `.autodev/PROGRAM.md`. This skill supplements — never replaces — the always-loaded PROGRAM.md.
|
package/out/commands/models.d.ts
CHANGED
|
@@ -8,6 +8,13 @@ export interface ModelCatalogEntry {
|
|
|
8
8
|
contextLimit: number;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Build the catalog array (reused by the app IPC via `--json`).
|
|
13
|
+
*
|
|
14
|
+
* Uses each family's `listLive()`, which pulls REAL models from the provider
|
|
15
|
+
* when possible (grok: GET https://api.x.ai/v1/models) and falls back to the
|
|
16
|
+
* static ProviderModels list on any failure — so the emitted shape is always
|
|
17
|
+
* the same { family, default, models:[{id,label,contextLimit}] }.
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildModelCatalog(): Promise<ModelCatalogEntry[]>;
|
|
13
20
|
export declare function modelsCommand(program: Command): void;
|
package/out/commands/models.js
CHANGED
|
@@ -26,16 +26,23 @@ const FAMILIES = [
|
|
|
26
26
|
new ProviderModels_4.CopilotProviderModels(),
|
|
27
27
|
new ProviderModels_5.DummyProviderModels(),
|
|
28
28
|
];
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Build the catalog array (reused by the app IPC via `--json`).
|
|
31
|
+
*
|
|
32
|
+
* Uses each family's `listLive()`, which pulls REAL models from the provider
|
|
33
|
+
* when possible (grok: GET https://api.x.ai/v1/models) and falls back to the
|
|
34
|
+
* static ProviderModels list on any failure — so the emitted shape is always
|
|
35
|
+
* the same { family, default, models:[{id,label,contextLimit}] }.
|
|
36
|
+
*/
|
|
37
|
+
async function buildModelCatalog() {
|
|
38
|
+
return Promise.all(FAMILIES.map(async (m) => {
|
|
39
|
+
const models = await m.listLive();
|
|
33
40
|
return {
|
|
34
41
|
family: m.family,
|
|
35
42
|
default: models[0]?.id ?? '',
|
|
36
43
|
models,
|
|
37
44
|
};
|
|
38
|
-
});
|
|
45
|
+
}));
|
|
39
46
|
}
|
|
40
47
|
const fmtCtx = (n) => n >= 1_000_000 ? `${(n / 1_000_000).toFixed(n % 1_000_000 ? 1 : 0)}M` : `${Math.round(n / 1000)}k`;
|
|
41
48
|
function modelsCommand(program) {
|
|
@@ -43,8 +50,8 @@ function modelsCommand(program) {
|
|
|
43
50
|
.command('models')
|
|
44
51
|
.description('List the model catalog every provider family supports (id, label, context)')
|
|
45
52
|
.option('--json', 'Output JSON (the shape the app consumes)')
|
|
46
|
-
.action((opts) => {
|
|
47
|
-
const catalog = buildModelCatalog();
|
|
53
|
+
.action(async (opts) => {
|
|
54
|
+
const catalog = await buildModelCatalog();
|
|
48
55
|
if (opts.json) {
|
|
49
56
|
process.stdout.write(JSON.stringify(catalog, null, 2) + '\n');
|
|
50
57
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":";;AA2CA,8CAWC;AAKD,sCAmBC;AA7ED,sCAAgC;AAEhC,uEAA0E;AAC1E,qEAAsE;AACtE,yEAA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AAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAC9D,OAAO;QACT,CAAC;QACD,YAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACjC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,YAAG,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACtF,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC9B,YAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YAC9F,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/out/dispatcher.js
CHANGED
|
@@ -45,6 +45,7 @@ const copilotCliProvider_1 = require("./providers/copilotCliProvider");
|
|
|
45
45
|
const opencodeCliProvider_1 = require("./providers/opencodeCliProvider");
|
|
46
46
|
const openCodeHooksManager_1 = require("./openCodeHooksManager");
|
|
47
47
|
const commandHelpers_1 = require("./core/commandHelpers");
|
|
48
|
+
const messageBuilder_1 = require("./messageBuilder");
|
|
48
49
|
const ProviderRegistry_1 = require("./core/provider/ProviderRegistry");
|
|
49
50
|
// Re-export session helpers so taskLoop.ts imports don't need to change.
|
|
50
51
|
var claudeCliProvider_2 = require("./providers/claudeCliProvider");
|
|
@@ -190,6 +191,16 @@ showOutput) {
|
|
|
190
191
|
// Build the combined profile+message file once and assemble the immutable
|
|
191
192
|
// dispatch DTO. The resolved IProvider strategy decides what to do with it
|
|
192
193
|
// (build a shell command, or spawn in-process) — no per-provider switch.
|
|
194
|
+
// SAFETY: writeCombinedFile reads PROGRAM.md when includeProfile — PROGRAM.md is
|
|
195
|
+
// written on the profile build (loop start / Save & Rebuild), no longer every
|
|
196
|
+
// turn. If it is somehow missing here (SDK path that never ran buildMessage, or
|
|
197
|
+
// a deleted file), build it once so writeCombinedFile never throws. Idempotent.
|
|
198
|
+
if (includeProfile && !fs.existsSync(agentProfileFile)) {
|
|
199
|
+
try {
|
|
200
|
+
(0, messageBuilder_1.rebuildProfile)(root);
|
|
201
|
+
}
|
|
202
|
+
catch { /* writeCombinedFile will surface a clear error */ }
|
|
203
|
+
}
|
|
193
204
|
const combinedFile = (0, commandHelpers_1.writeCombinedFile)(root, agentProfileFile, messageFile, includeProfile);
|
|
194
205
|
const provider = ProviderRegistry_1.providerRegistry.get(providerId);
|
|
195
206
|
const req = {
|
package/out/dispatcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,wCA0JC;AArOD,uCAAyB;AAEzB,2CAA6B;AAC7B,2CAAoD;AAEpD,iDAA8I;AAC9I,0DAA4D;AAC5D,qEAAyI;AACzI,uEAA6F;AAC7F,yEAAsG;AAKtG,iEAAwF;AACxF,0DAA4G;AAC5G,qDAAkD;AAClD,uEAAoE;AAGpE,yEAAyE;AACzE,mEAQuC;AAPrC,4HAAA,uBAAuB,OAAA;AACvB,yHAAA,oBAAoB,OAAA;AACpB,2HAAA,sBAAsB,OAAA;AACtB,0HAAA,qBAAqB,OAAA;AACrB,0HAAA,qBAAqB,OAAA;AACrB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,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,oEAAoE;YACpE,MAAM,QAAQ,GAAG,YAAY,WAAW,CAAC,KAAK,EAAE,CAAC;YACjD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YACjD,GAAG,CAAC,WAAW,QAAQ,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YAC/C,IAAI,UAAU,KAAK,YAAY,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACtD,MAAM,YAAY,GAAG,IAAA,2CAAuB,EAAC,IAAI,CAAC,CAAC;gBACnD,IAAI,YAAY,EAAE,CAAC;oBAAC,IAAA,sCAAuB,EAAC,IAAI,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;gBAAC,CAAC;YAChF,CAAC;QACH,CAAC;aAAM,CAAC;YACN,oEAAoE;YACpE,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,gCAAgC,iBAAiB,IAAI,KAAK,GAAG,CAAC,CAAC;QACzF,CAAC;QACD,OAAO;IACT,CAAC;SAAM,CAAC;QACN,8EAA8E;QAC9E,8EAA8E;QAC9E,6EAA6E;QAC7E,sDAAsD;QACtD,MAAM,IAAI,KAAK,CAAC,aAAa,UAAU,uDAAuD,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}
|
package/out/messageBuilder.js
CHANGED
|
@@ -439,6 +439,11 @@ function rebuildProfile(root) {
|
|
|
439
439
|
const customRefs = settings?.customProfileRefs ?? [];
|
|
440
440
|
const { body: profileBody, sectionPaths } = (0, profileBuilder_1.assembleProfileBody)(enabledSections, root, customRefs);
|
|
441
441
|
const finalProfileBody = (0, protocolSections_1.applyProtocolSections)(profileBody, settings);
|
|
442
|
+
// Skill deployment lives on the PROFILE BUILD, not the per-message path: deploy
|
|
443
|
+
// ALL bundled skills (incl. the master `.claude/skills/autodev/`) and the
|
|
444
|
+
// per-MCP skill files here, so a running Claude agent picks them up. buildMessage
|
|
445
|
+
// no longer copies skills every turn — this is the single place they are written.
|
|
446
|
+
(0, protocolSections_1.applyAllSkills)(root);
|
|
442
447
|
(0, protocolSections_1.applyMcpSkills)(root, settings);
|
|
443
448
|
const profileFilePath = path.join(root, exports.AGENT_PROFILE_FILE);
|
|
444
449
|
fs.writeFileSync(profileFilePath, finalProfileBody, 'utf8');
|
|
@@ -453,45 +458,32 @@ function rebuildProfile(root) {
|
|
|
453
458
|
}
|
|
454
459
|
function buildMessage(task, root, todoDir, includeProfile = true) {
|
|
455
460
|
(0, sessionState_1.autodevDir)(root);
|
|
456
|
-
//
|
|
457
|
-
let settings;
|
|
458
|
-
try {
|
|
459
|
-
settings = (0, settingsLoader_1.loadSettingsForRoot)(root);
|
|
460
|
-
}
|
|
461
|
-
catch { /* ignore */ }
|
|
462
|
-
// Read the noCommit flag from the identity section frontmatter
|
|
461
|
+
// Read the noCommit flag from the identity section frontmatter (media source).
|
|
463
462
|
const identityFile = path.join(__dirname, '..', 'media', 'profile', '00-identity.md');
|
|
464
463
|
const { meta } = parseFrontmatter(readOrEmpty(identityFile));
|
|
465
|
-
//
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
//
|
|
470
|
-
//
|
|
471
|
-
//
|
|
472
|
-
|
|
473
|
-
// Copy all general skills from media/skills/ to .claude/skills/
|
|
474
|
-
if (root) {
|
|
475
|
-
(0, protocolSections_1.applyAllSkills)(root);
|
|
476
|
-
}
|
|
477
|
-
// Deploy / remove Claude skill files for enabled / disabled MCPs
|
|
478
|
-
if (root) {
|
|
479
|
-
(0, protocolSections_1.applyMcpSkills)(root, settings);
|
|
480
|
-
}
|
|
481
|
-
// Always write the profile file so the LLM can @-reference it
|
|
464
|
+
// PROGRAM.md + skill deployment live on the PROFILE BUILD (rebuildProfile — run
|
|
465
|
+
// once at loop start and on explicit Save & Rebuild), NOT on this per-message
|
|
466
|
+
// path. buildMessage no longer rewrites PROGRAM.md, re-deploys skills, or
|
|
467
|
+
// re-injects the AGENTS/CLAUDE/Copilot refs every turn.
|
|
468
|
+
//
|
|
469
|
+
// SAFETY: writeCombinedFile reads PROGRAM.md at dispatch, so it must exist. If
|
|
470
|
+
// it is missing (first turn before start ran, or a deleted file), build it once
|
|
471
|
+
// here — idempotent: when it already exists we do NOT rewrite it.
|
|
482
472
|
const profileFilePath = path.join(root, exports.AGENT_PROFILE_FILE);
|
|
483
|
-
fs.
|
|
484
|
-
|
|
485
|
-
|
|
473
|
+
if (!fs.existsSync(profileFilePath)) {
|
|
474
|
+
try {
|
|
475
|
+
rebuildProfile(root);
|
|
476
|
+
}
|
|
477
|
+
catch { /* dispatch will surface a clear error */ }
|
|
478
|
+
}
|
|
486
479
|
// Guarantee the SOUL.md identity anchor exists BEFORE we build the reminders
|
|
487
480
|
// below (firstTurnSystemReminder / soulUpdatedReminder both point the agent
|
|
488
|
-
// at it).
|
|
489
|
-
//
|
|
490
|
-
//
|
|
491
|
-
//
|
|
492
|
-
// means the .soul-seen marker records the skeleton's mtime silently on turn 1.
|
|
481
|
+
// at it). Idempotent; never clobbers an existing identity/persona. (rebuildProfile
|
|
482
|
+
// also ensures it, but keep this for the case PROGRAM.md exists yet SOUL.md does
|
|
483
|
+
// not.) Creating it here (before soulUpdatedReminder) means the .soul-seen marker
|
|
484
|
+
// records the skeleton's mtime silently on turn 1.
|
|
493
485
|
(0, connect_1.ensureSoulSkeleton)(root);
|
|
494
|
-
// Build the task trigger message — profile is loaded by agents via AGENTS.md → @.autodev/
|
|
486
|
+
// Build the task trigger message — profile is loaded by agents via AGENTS.md → @.autodev/PROGRAM.md
|
|
495
487
|
const todoPath = path.join(todoDir, 'TODO.md');
|
|
496
488
|
const taskMessage = buildTaskInstruction(task, todoPath, root, meta.noCommit);
|
|
497
489
|
// System reminders that must precede the task text. The dispatcher feeds the
|
|
@@ -518,12 +510,12 @@ function buildMessage(task, root, todoDir, includeProfile = true) {
|
|
|
518
510
|
// Reminders FIRST, then the task text, written to the file the model reads.
|
|
519
511
|
const messageBody = [...reminders, taskMessage].join('\n\n---\n\n');
|
|
520
512
|
const messageFile = writeMessageFile(root, messageBody);
|
|
521
|
-
// The combined `prompt` string mirrors the
|
|
522
|
-
// unused) UI-provider path
|
|
513
|
+
// The combined `prompt` string mirrors the messageFile ordering for the
|
|
514
|
+
// (currently unused) UI-provider path. The profile body is NOT inlined here —
|
|
515
|
+
// it lives in PROGRAM.md on disk and is appended by writeCombinedFile at
|
|
516
|
+
// dispatch (profile build owns PROGRAM.md; this path owns only the reminders +
|
|
517
|
+
// task text).
|
|
523
518
|
const parts = [...reminders, taskMessage];
|
|
524
|
-
if (includeProfile && finalProfileBody.trim()) {
|
|
525
|
-
parts.push(`# Project Instructions (AUTODEV.md)\n\n${finalProfileBody.trim()}`);
|
|
526
|
-
}
|
|
527
519
|
return { prompt: parts.join('\n\n---\n\n'), messageFile };
|
|
528
520
|
}
|
|
529
521
|
//# sourceMappingURL=messageBuilder.js.map
|