Appendix - Script Assistant Case Study

Architecture

~/.claude/plugins/local/script-asst/
├── agents/
│   ├── migrator.md               runs. Opus 5.5
│   ├── migration-verifier.md     runs. Opus 5.5, read-only tools
│   ├── research-planner.md       runs. Opus 5.5
│   ├── researcher.md             runs. Sonnet 5.5, web tools
│   ├── research-writer.md        runs. Opus 5.5
│   ├── research-evaluator.md     runs. Sonnet 5.5, read-only
│   └── (Brainstormer, Gap finder, Reviewer)   designed, not built
├── bin/
│   ├── runmanager                runs. launcher
│   └── editguard                 runs. launcher
├── lib/
│   ├── runmanager/               runs. Python, standard library only
│   ├── editguard/                runs. Python, shares no code with runmanager
│   ├── research.js               runs. the Research workflow script
│   └── workflowtests/            runs. fake-agent tests for research.js
├── skills/
│   ├── run/                      runs. /script-asst:run
│   └── story-graph/              writing phase, built earlier, outside the MVP
├── hooks/
│   ├── hooks.json                runs
│   └── scripts/                  runs. the permission hook and its tests
├── references/                   the Migrator's rulebook, research example
└── evals/                        61 eval case folders and their results

Edges

In the order they first appear. Lettered edges have an explainer on the page.

Edges

EdgeFrom → ToTypeRule or data
AWriter → Run managerTriggerrun kind + targets + request
Run manager → Before-snapshotDatacopies, fingerprints
Before-snapshot → Run managerDatacopies
Run state → Run managerDataopen run, handled list, unit index
Run manager → Run stateDataopen run, handled list, unit index
BRun manager → migratorConditionalmigration run, one batch at a time
Cmigrator → Run managerFailure path2 retries failed
Brain Dump doc → migratorDatatags, comments
Story notes → migratorDatasources, destinations
Brain Dump doc → Run managerDatatrigger lines, - [r] requests
Story notes → Run managerDatatrigger lines, - [r] requests
Run manager → Brain Dump docDatapointers, link lines, closes, request comments
Run manager → Story notesDatapointers, link lines, closes, request comments
migrator → Brain Dump docDataedits a comment or request asks for
migrator → Story notesDatacopies, Rejected moves
Run manager → migratorDatabatch, typed request, fix findings
Run manager → Story notesFailure pathrestored line
Run manager → Story notesFailure pathunit undone
Run manager → Brain Dump docFailure pathrestored line
Run manager → Brain Dump docFailure pathunit undone
Dmigration-verifier → migratorConditional · loop-backfix, through the Run manager · code counts, max 2 rounds per unit
Emigration-verifier → Run managerFailure pathnot asked for
Fmigration-verifier → Run managerFailure path2 retries failed
GRun manager → migration-verifierConditionalother flags, migration runs only
Run manager → migration-verifierAlwaysafter each batch’s migrator pass
Run manager → migration-verifierDatacut-down record, batch, typed request
migration-verifier → Run managerDatafindings
Story notes → migration-verifierDatasources, copies
Brain Dump doc → migration-verifierDatasources
HRun manager → Edit guardConditional · loop-backafter an act changed a note
Run manager → Edit guardAlwaysafter pointers, or after mark
Run manager → Edit guardDatarequests, outcomes, earlier flags and findings
Edit guard → Run managerDataflags
Before-snapshot → Edit guardDatacopies, fingerprints
Run state → Edit guardDataunit index
Run manager → Edit guardOnly sometimesa batch’s record failed: right away
Run manager → Edit guardOnly sometimesrecover run: its own check
IGap finder → Run managerFailure path2 retries failed
Run manager → Gap finderOnly sometimesGaps run
Story notes → Gap finderDatatargets
Gap finder → Story notesData- [g] lines
Writer’s Statement → Gap finderDataprimer
Run manager → ReviewerOnly sometimesReview run
Story notes → ReviewerDatatargets, change
Reviewer → Story notesData- [R] lines
Writer’s Statement → ReviewerDataprimer
Run manager → BrainstormerOnly sometimesBrainstorm run
Brainstormer → Story notesData[AGENT] units
Brainstormer → Brain Dump docData[AGENT] units
Writer’s Statement → BrainstormerDataprimer
JResearch workflow → Run managerFailure pathworkflow call fails
Run manager → Research workflowOnly sometimesResearch run
Research notes → Run managerDatapassed notes
Research notes → Edit guardDatanew notes, link targets
Research notes → Research workflowDatatemplate, name check
Run manager → Research workflowDatarequests, run id, project
Research workflow → Research notesDataresearch note
Research workflow → Run managerDataoutcomes, one per request
Writer’s Statement → Research workflowDataprimer, when a comment says to
Run manager → Run logDatarun log
Run log → WriterDatarun log
migrator → Unit record filesDatarecord, before any copy
Unit record files → Run managerDataunit records
Unit record files → Edit guardDataunit records
Unit record files → migratorDatarecord, on a fix round
Run manager → Unit record filesDatainvalid record moved out, last valid copy
Research workflow → LLM filesDataplans, findings files
LLM files → Research workflowDataplans, findings files