Implement all 5 tasks: additive extension model, framework self-enforcement, changelog, project migration, dashboard review

This commit is contained in:
2026-06-13 12:26:27 -04:00
parent 46ceed0122
commit 52dcf8e309
15 changed files with 380 additions and 115 deletions
+22 -67
View File
@@ -5,10 +5,11 @@ Your only job is to set up the minimal agent framework structure in the target p
## Read These Files
1. ~/.automaton/.agent.md — global framework router
2. ~/.automaton/.onboarding.md — human reference for drop-in vs from-scratch scenarios
3. {project}/.automaton/.agent.md (if it exists — project override)
4. {project}/.automaton/.rules.md (if it exists — project override)
5. ~/.automaton/scripts/vram_detect.sh (if exists — for VRAM detection)
2. ~/.automaton/.rules.md — global framework rules
3. ~/.automaton/.onboarding.md — human reference for drop-in vs from-scratch scenarios
4. {project}/.automaton/.agent.md (if it exists — project override)
5. {project}/.automaton/.rules.md (if it exists — project override)
6. ~/.automaton/scripts/vram_detect.sh (if exists — for VRAM detection)
## Task
@@ -16,16 +17,6 @@ Your only job is to set up the minimal agent framework structure in the target p
## Onboarding Ritual (Strict Sequence)
### Step 0: Check if Framework Needs Upgrade
Before proceeding, check if the project is running an older version of the framework:
1. Compare the project's `.automaton/` files with the global `~/.automaton/` files.
2. If the project's `.automaton/` has a file that differs from the current global version, the project needs an upgrade.
3. If the project's `.automaton/` is missing files that exist in the global framework (e.g., new prompt files like `doc_review.md`, `test_design.md`), the project needs an upgrade.
4. If an upgrade is needed, report it to the user and offer to upgrade the project's framework files.
**Precedence**: The project's `.automaton/` files override the global `~/.automaton/` files. The Orchestrator reads from the project's directory first, then falls back to the global directory.
### Step 1: Discovery
1. Check if {project}/.automaton/ exists. If not, create it.
@@ -39,7 +30,7 @@ Before proceeding, check if the project is running an older version of the frame
5. Explore the project root at a high level (ls, key directories, README if present).
6. Produce a short onboarding report.
**Important**: The project's `.automaton/` directory should only contain .agent.md and .rules.md. All other framework files (prompts, contracts, scripts) are read from the global `~/.automaton/` directory. The project's directory is the override layer — if a file exists in both, the project's version takes precedence.
**Important**: The project's `.automaton/` directory should only contain .agent.md and .rules.md. All other framework files (prompts, contracts, scripts) are read from the global `~/.automaton/` directory. Projects can provide additive extensions under `.automaton/extensions/` — these extend, never replace, the framework files.
### Step 2: VRAM Configuration
@@ -80,7 +71,6 @@ Then produce a file called ONBOARDING_REPORT.md at {project}/tasks/onboarding/ON
- What process this project expects
- Key observations from the project structure
- Any missing pieces the human should provide next
- **Upgrade status**: Whether the project's framework files are up to date with the global framework
- **VRAM Configuration**: Whether VRAM config was auto-detected and applied (if available), or needs manual setup
When the ritual is complete, output "CONTRACT_MET" and stop.
@@ -96,60 +86,25 @@ Do not begin any research, implementation, or bug-finding tasks.
---
## Project Upgrade
## Migration Check
When a user asks to "upgrade automaton for this project," the agent should:
When a user asks to "upgrade automaton for this project" or during onboarding, the agent should first check if the project has stale copies of framework files (from the old model where files were copied into the project):
### Upgrade Process
### Migration Detection
1. **Compare the project's `~/.automaton/` files with the global `~/.automaton/` files.**
- For each file in the global framework, check if it exists in the project's framework.
- If it exists in both, compare their content.
1. Check if `{project}/.automaton/` contains any files beyond `.agent.md` and `.rules.md`:
- `prompts/` directory with files matching global prompts
- `contracts/` directory with files matching global contracts
- `scripts/` directory with files matching global scripts
- Any other files that exist in `~/.automaton/`
2. **Identify three categories of files:**
- **Customized** — The file exists in both, but they differ. The project has customized it. **Keep the project's version.**
- **Outdated** — The file exists in both, but they are identical. The project hasn't customized it, but the global version has changed. **Update from global.**
- **New** — The file exists in the global framework but not in the project. **Add from global.**
2. If stale files are found, offer to run migration:
- Run `~/.automaton/scripts/migrate-project.sh {project}` if available
- Or manually:
- Files identical to global → delete (framework provides them)
- Files different from global → move to `.automaton/extensions/`
- `.agent.md` and `.rules.md` → keep as-is
3. **Apply upgrades:**
- For **Outdated** files: Copy from the global framework to the project's framework (update the project's version).
- For **New** files: Copy from the global framework to the project's framework (add the file).
- For **Customized** files: **Do NOT overwrite** — keep the project's version and report it as "skipped (customized)."
### After Migration
4. **Report what was upgraded and what was already up to date.**
### Upgrade Report Format
The agent should report:
- **Upgraded**: Files that were updated from the global framework (Outdated → Upgraded)
- **Added**: New files added from the global framework (New → Added)
- **Skipped**: Files that were customized in the project and not overwritten (Customized → Skipped)
- **Already up to date**: Files that were already identical (shouldn't happen, but report for completeness)
### Example Upgrade Scenarios
**Scenario 1: New file added globally**
- User says: "Upgrade automaton for this project"
- Agent detects that `prompts/test_design.md` is missing from the project's framework
- Agent copies `prompts/test_design.md` from the global framework into the project's framework
- Agent reports: "Upgraded: Added prompts/test_design.md. Your framework is now up to date."
**Scenario 2: Global file changed, project hasn't customized it**
- User says: "Upgrade automaton for this project"
- Agent detects that `prompts/orchestrate.md` has changed in the global framework, and the project's version is identical to the old global version
- Agent copies `prompts/orchestrate.md` from the global framework into the project's framework
- Agent reports: "Upgraded: Updated prompts/orchestrate.md. Your framework is now up to date."
**Scenario 3: Global file changed, project has customized it**
- User says: "Upgrade automaton for this project"
- Agent detects that `prompts/orchestrate.md` has changed in the global framework, and the project's version differs from the global version
- Agent keeps the project's version of `prompts/orchestrate.md`
- Agent reports: "Skipped: prompts/orchestrate.md (customized in your project). Your framework is now up to date."
**Scenario 4: Multiple changes**
- User says: "Upgrade automaton for this project"
- Agent detects:
- `prompts/test_design.md` is new → **Added**
- `prompts/workflow.md` has changed, project hasn't customized → **Upgraded**
- `.agent.md` has changed, project has customized → **Skipped (customized)**
- Agent reports: "Upgraded: Updated prompts/workflow.md. Added: Added prompts/test_design.md. Skipped: .agent.md (customized in your project). Your framework is now up to date."
No further upgrade steps are needed. The framework is always read from `~/.automaton/` at runtime. Simply updating the global framework (`cd ~/.automaton && ./update.sh`) automatically applies all changes to every project.
+8 -5
View File
@@ -7,16 +7,19 @@ The Orchestrator reads files using a **layered approach** with a clear precedenc
1. **Project overrides** (highest precedence): `{project}/.automaton/` — contains project-specific customizations
2. **Global framework** (default): `~/.automaton/` — contains the base framework files
**Precedence rule**: If a file exists in the project's `.automaton/` directory, the Orchestrator reads it from there. If it doesn't exist, the Orchestrator reads it from the global `~/.automaton/` directory.
**Precedence rule**: Base framework files (prompts, contracts, scripts) are always read from `~/.automaton/`. Projects provide additive extensions under `{project}/.automaton/extensions/` — never copies of framework files. Only `.agent.md` and `.rules.md` can be overridden directly in the project root.
Specifically:
1. {project}/.automaton/.agent.md (if exists — project override) OR ~/.automaton/.agent.md (global default)
2. {project}/.automaton/.rules.md (if exists — project override) OR ~/.automaton/.rules.md (global default)
3. ~/.automaton/config.md — Global framework configuration (VRAM, model settings)
4. {project}/.automaton/prompts/*.md (if exists — project overrides) OR ~/.automaton/prompts/*.md (global default)
5. {project}/.automaton/contracts/*.md (if exists — project overrides) OR ~/.automaton/contracts/*.md (global default)
6. {project}/.automaton/scripts/*.sh (if exists — project overrides) OR ~/.automaton/scripts/*.sh (global default)
7. Any existing files under {project}/tasks/
4. ~/.automaton/prompts/*.md — Always from global framework
5. {project}/.automaton/extensions/prompts/*.md — Additive extensions loaded after the corresponding global prompt
6. ~/.automaton/contracts/*.md — Always from global framework
7. {project}/.automaton/extensions/contracts/*.md — Additive extensions loaded after global contracts
8. ~/.automaton/scripts/*.sh — Always from global framework
9. {project}/.automaton/extensions/scripts/*.sh — Additive extensions loaded before global scripts (pre-processing)
10. Any existing files under {project}/tasks/
## VRAM Detection