[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DC65FEH2YZJWW9F1KEX7NH":3,"skill-same:01M7DC65FEH2YZJWW9F1KEX7NH":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":13,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M7DC65FEH2YZJWW9F1KEX7NH","fleet-control",null,"Operate managed Aeon instances from memory\u002Finstances.json - health-check, dispatch, and status snapshots (control), plus a fleet scorecard of runs, tokens, cost, and reliability (scorecard).","Ditto190\u002FAeon-automaton-codeyourself-mm","Ditto190","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F110319982?v=4","01M7DBZRW755H8JSCQH6WFBM2P","01M7DBZRXAPWXAR6K6M6C53MCQ",0,"MIT","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Ffleet-control\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: fleet-control\ndescription: Operate managed Aeon instances from memory\u002Finstances.json - health-check, dispatch, and status snapshots (control), plus a fleet scorecard of runs, tokens, cost, and reliability (scorecard).\nmetadata:\n  title: Fleet Control\n  category: core\n  var: \"\"\n  tags:\n    - dev\n    - meta\n    - fleet\n    - report\n    - cost\n  requires:\n    - GH_READ_PAT?\n  cron: \"0 9,15 * * *\"\n---\n\u003C!-- autoresearch: variation B — sharper output: verdict line + delta vs prior + per-instance action column + state-change-gated notify -->\n\n> **${var}** — Command \u002F view selector. Empty (or unrecognized) → **Health Check** (default control view). `status` → full **Status Mode** (control view). `dispatch \u003Cinstance|*> \u003Cskill> [var=\u003Cvalue>]` → **Dispatch Mode**: trigger a skill on one child or all healthy\u002Fdegraded children (control view). `scorecard` → **Scorecard Mode**: fleet-wide runs\u002Ftokens\u002Fcost\u002Freliability scorecard with day-over-day deltas + alerts (scorecard view).\n\nToday is ${today}. Operate the fleet of Aeon instances registered in `memory\u002Finstances.json`. The **control view** (health\u002Fstatus\u002Fdispatch) is **decision-ready**: every run leads with a verdict, then a delta vs prior check, then per-instance lines that name the next concrete action. The **scorecard view** publishes the daily fleet-wide cost\u002Freliability scorecard.\n\nThe fleet is **discovered at runtime, never hardcoded**: it is this repo (\"self\") plus every non-archived entry in `memory\u002Finstances.json` (the registry `fleet-control` and `spawn-instance` maintain). With zero managed instances the scorecard simply covers the single self repo — still useful.\n\n## Shared preamble (every run)\n\n1. **Read memory** — read `memory\u002FMEMORY.md` for high-level context and scan the last ~3 days of `memory\u002Flogs\u002F` for recent activity; don't re-report a signal already logged there.\n\n2. **Voice** — if `soul\u002FSOUL.md` and `soul\u002FSTYLE.md` exist and are populated, read them and match the operator's voice in every notification. If they are empty templates or absent, use a clear, direct, neutral tone — terse, lowercase, no fluff.\n\n3. **Parse `${var}` → mode**:\n   - empty \u002F unrecognized → **Health Check Mode** (control view; default)\n   - exactly `status` → **Status Mode** (control view)\n   - starts with `dispatch ` → **Dispatch Mode** (control view)\n   - exactly `scorecard` → **Scorecard Mode** (scorecard view)\n\n4. **Route**:\n   - **Health Check \u002F Status \u002F Dispatch** → run the **Control-view pre-flight** below, then the matching mode section. These modes make live `gh` calls.\n   - **Scorecard** → skip the control-view pre-flight entirely and jump straight to **Scorecard Mode**, which gathers its own data in-run via `node scripts\u002Ffleet-scorecard.mjs`.\n\n---\n\n## Control-view pre-flight (health \u002F status \u002F dispatch only)\n\n1. **Verify gh auth** — `gh auth status` must succeed. If not, log `FLEET_NO_AUTH` to `memory\u002Flogs\u002F${today}.md` and notify `Fleet Control: gh auth missing — check GITHUB_TOKEN secret.` Stop.\n\n2. **Check rate limit** — `REMAINING=$(gh api rate_limit --jq '.resources.core.remaining')`. If `REMAINING \u003C 50`, log `FLEET_RATE_LIMITED:remaining=${REMAINING}` and notify a one-line warning, then stop.\n\n3. **Load the registry** — read `memory\u002Finstances.json`. If the file is missing, write `{\"instances\": []}` to bootstrap. If `.instances` is absent or `[]`:\n   - Log `FLEET_EMPTY: no managed instances` to `memory\u002Flogs\u002F${today}.md`.\n   - **Stop. Do NOT notify.**\n\n4. **Load prior state** — read `memory\u002Fstate\u002Ffleet-control-state.json` (create the directory and file with `{\"instances\": {}, \"last_full_summary_date\": \"\"}` if missing). Shape:\n   ```json\n   {\n     \"instances\": {\n       \"\u003Cname>\": { \"health\": \"\u003Cstatus>\", \"last_checked\": \"\u003CISO>\", \"consecutive_unreachable\": 0 }\n     },\n     \"last_full_summary_date\": \"YYYY-MM-DD\"\n   }\n   ```\n\n---\n\n## Health Check Mode (default — control view)\n\nFor each registered instance, skip rows with `archived: true` from per-instance work (count them separately). Run the three calls per instance in parallel using `&` + `wait` and write each to `\u002Ftmp\u002Ffleet\u002F${SAFE}.{repo,runs,cron}.json`:\n\na. **Repo metadata**:\n   ```bash\n   gh api \"repos\u002F${REPO}\" \\\n     --jq '{full_name, pushed_at, archived, default_branch, open_issues_count}' \\\n     > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.repo.json\" 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.repo.err\" &\n   ```\n\nb. **Workflow runs in last 24h** (precise window, not \"last 5\"):\n   ```bash\n   SINCE=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)\n   gh api \"repos\u002F${REPO}\u002Factions\u002Fruns?created=>${SINCE}&per_page=100&exclude_pull_requests=true\" \\\n     --jq '{total_count, runs:[.workflow_runs[]|{name,status,conclusion,created_at,html_url}]}' \\\n     > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.runs.json\" 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.runs.err\" &\n   ```\n\nc. **Cron-state from child**:\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Fmemory\u002Fcron-state.json\" --jq '.content' 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.cron.err\" \\\n     | base64 -d > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.cron.json\" &\n   ```\n\n`wait` after launching all three for an instance (or batch across all instances if you trust your parallelism — keep ≤16 concurrent calls to stay under rate limit).\n\n**Classify each instance** with precise thresholds:\n- **unreachable** — repo metadata call returned non-zero (404\u002F403\u002Fetc.)\n- **archived** — repo metadata returns `archived: true`\n- **pending_secrets** — `runs.total_count == 0` for the 24h window AND repo `pushed_at` ≥ 7 days old (newly-spawned instances under 7 days stay unclassified-but-tracked)\n- **stale** — `runs.total_count == 0` AND `pushed_at` > 7 days old AND not `archived`\n- **degraded** — ≥1 cron-state skill with `consecutive_failures ≥ 3` OR (24h failure_count \u002F total_count) ≥ 0.5 with total_count ≥ 2\n- **warning** — 24h failure_count ≥ 1 but ratio \u003C 0.5\n- **healthy** — has runs in last 24h, all conclusions `success` or `in_progress`\u002F`queued`, no degraded cron-state skills\n\nFor each instance compute a **next_action** (one short imperative phrase):\n- `pending_secrets` → `add ANTHROPIC_API_KEY at https:\u002F\u002Fgithub.com\u002F${REPO}\u002Fsettings\u002Fsecrets\u002Factions`\n- `degraded` → `investigate \u003Cskill_name> (\u003Cconsecutive_failures>× in a row, last_error: \u003Csignature, ≤60 chars>)`\n- `warning` → `monitor — \u003CN>\u002F\u003CTotal> runs failed in 24h`\n- `stale` → `confirm intent: no runs in 24h, last push \u003Crelative_date>; archive or re-enable` — if it *should* be running, dispatch `aeon-doctor` to that instance (Dispatch Mode) to lint for a silent config bug (unquoted `schedule:` \u002F duplicate key \u002F broken entry) before assuming it's abandoned\n- `unreachable` → `verify access: \u003Creason from repo.err>`\n- `healthy` → `none`\n- `archived` → `none (archived)`\n\n**Compute delta** vs prior state (per-instance `prior.health` vs `current.health`):\n- **NEW** — instance not in prior state\n- **DEGRADED** — was healthy\u002Fwarning, now degraded\u002Funreachable\u002Fstale\u002Fpending_secrets\n- **RECOVERED** — was degraded\u002Funreachable\u002Fstale\u002Fpending_secrets, now healthy\u002Fwarning\n- **DROPPED** — was in prior state, no longer in registry\n- (no change → no delta line)\n\n**Update the registry** — write back `health`, `last_checked` (ISO UTC), and `next_action` per instance to `memory\u002Finstances.json`. Preserve all other fields (`purpose`, `parent`, `created`, `skills_enabled`, etc.).\n\n**Update the state file** — write the current per-instance health snapshot to `memory\u002Fstate\u002Ffleet-control-state.json`. Update `last_full_summary_date` to today **only when this run notifies**. Increment `consecutive_unreachable` for unreachable instances; reset to 0 otherwise.\n\n**Log** to `memory\u002Flogs\u002F${today}.md` (under the consolidated heading — see **Log** section):\n```\n### fleet-control\n- Mode: health check\n- Verdict: [FLEET_OK | NEEDS_ATTENTION:N]\n- Sizes: total=N, healthy=N, warning=N, degraded=N, stale=N, pending=N, unreachable=N, archived=N\n- Deltas: [list NEW\u002FDEGRADED\u002FRECOVERED\u002FDROPPED, or \"none\"]\n- Sources: gh=ok, rate_remaining=N\n```\n\n**Notification gate** — send the notification if **any** of:\n- `len(deltas) > 0`\n- today != prior `last_full_summary_date` (first check of UTC day → daily rollup)\n- any current instance is `degraded` or `unreachable`\n\nOtherwise skip notify (silent no-op when nothing changed mid-day — operator isn't trained to ignore).\n\n**Notification body** (when sent):\n```\n*Fleet Control — ${today}*\nVerdict: \u003CFLEET_OK | NEEDS_ATTENTION:N>\n\n[If deltas exist]:\nWhat changed:\n- NEW: \u003Cname> (\u003Crepo>) — \u003Chealth>\n- DEGRADED: \u003Cname> — was \u003Cprior>, now \u003Ccurrent>: \u003Creason>\n- RECOVERED: \u003Cname> — was \u003Cprior>, now \u003Ccurrent>\n- DROPPED: \u003Cname> — no longer in registry\n\nFleet (N total):\n- \u003Cname> [\u003CHEALTH>]: \u003Crepo> — \u003Cnext_action>\n- ...\n\n[If first-of-day rollup]:\nCounts: healthy \u003CH> · warning \u003CW> · degraded \u003CD> · stale \u003CS> · pending \u003CP> · unreachable \u003CU> · archived \u003CA>\n\nSources: gh=ok · rate_remaining=N\n```\n\nCap the per-instance list at 12 lines; if more, append `...and N more — see memory\u002Finstances.json`. Always include archived in counts; never list archived rows in the per-instance section.\n\n---\n\n## Dispatch Mode (control view)\n\nParse var: `dispatch \u003Cinstance|*> \u003Cskill> [var=\u003Cvalue>]`.\n\n**Resolve targets**:\n- If `\u003Cinstance>` is `*`, target = every registry entry whose **current** health is `healthy`, `warning`, or `degraded` (skip unreachable, stale, pending, archived).\n- Otherwise, exact name match against the registry. Not found → notify `Fleet Dispatch: instance '\u003Cname>' not in registry` and stop.\n\nFor each target instance:\n\n1. **Validate skill exists in child**:\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Fskills\u002F${SKILL}\u002FSKILL.md\" >\u002Fdev\u002Fnull 2>&1 \\\n     || { OUTCOME=\"missing_skill\"; continue; }\n   ```\n\n2. **Check skill is enabled in child's aeon.yml** (best-effort warning, not a block — workflow_dispatch can override `enabled: false`):\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Faeon.yml\" --jq '.content' 2>\u002Fdev\u002Fnull | base64 -d \\\n     | grep -E \"^[[:space:]]*${SKILL}:.*enabled:[[:space:]]*true\" >\u002Fdev\u002Fnull \\\n     || NOT_ENABLED_WARN=1\n   ```\n\n3. **Trigger the skill**:\n   ```bash\n   if [ -n \"$DISPATCH_VAR\" ]; then\n     gh workflow run aeon.yml --repo \"${REPO}\" -f skill=\"${SKILL}\" -f var=\"${DISPATCH_VAR}\" \\\n       && OUTCOME=\"dispatched\" || OUTCOME=\"api_failed:$?\"\n   else\n     gh workflow run aeon.yml --repo \"${REPO}\" -f skill=\"${SKILL}\" \\\n       && OUTCOME=\"dispatched\" || OUTCOME=\"api_failed:$?\"\n   fi\n   ```\n\nCollect per-target outcomes: `dispatched | missing_skill | api_failed:\u003Ccode>` (with optional `not_enabled_warn` flag).\n\n**Log**:\n```\n### fleet-control\n- Mode: dispatch\n- Command: dispatch \u003Cinst|*> \u003Cskill> [var=...]\n- Targets: N\n- Dispatched: N | missing_skill: N | api_failed: N\n- Per-target: [\u003Cname>: \u003Coutcome>, ...]\n```\n\n**Notify** (always, in dispatch mode):\n```\n*Fleet Dispatch*\nCommand: dispatch \u003Cinst|*> \u003Cskill>\nTargets: \u003CN> — Dispatched: \u003CN>\nSuccessful: \u003Ccomma-sep names>\n[If failures]:\nFailed: \u003Cname>: \u003Creason>, ...\n[If not_enabled_warn]:\nWarning: \u003Cname> has skill disabled in aeon.yml — dispatched anyway\n```\n\nIf 0 dispatched out of N targets, the verdict line reads `Fleet Dispatch: 0\u002F${N} — see failures below` and exit code logged is `FLEET_DISPATCH_FAILED:no_targets_succeeded`.\n\n---\n\n## Status Mode (control view)\n\nGenerate the comprehensive snapshot, but make it scannable.\n\nFor each registered instance (skip `archived` from detail blocks but count them in the summary), gather in parallel:\n- Repo meta: `stargazers_count`, `pushed_at`, `open_issues_count`, `default_branch`\n- Last 10 workflow runs:\n  ```bash\n  gh api \"repos\u002F${REPO}\u002Factions\u002Fruns?per_page=10&exclude_pull_requests=true\" \\\n    --jq '[.workflow_runs[]|{name,status,conclusion,created_at,html_url}]'\n  ```\n- Full `cron-state.json`\n- `aeon.yml` (parse enabled skills)\n- Last 5 commits (one-line `gh api repos\u002F${REPO}\u002Fcommits?per_page=5 --jq ...`)\n\nCompute the same delta block, but compare against the most recent prior `output\u002Farticles\u002Ffleet-status-*.md` (parse the per-instance health rows; if none exists, mark the section \"no prior status to diff against\").\n\nWrite to `output\u002Farticles\u002Ffleet-status-${today}.md`:\n```markdown\n# Fleet Status — ${today}\n\n## Verdict\n\u003Cone line: FLEET_OK | NEEDS_ATTENTION:N | DEGRADED:N — top issue first>\n\n## Top Issue\n\u003Cone paragraph: the single highest-priority instance and what it needs, OR \"none\">\n\n## Fleet Health\n| Instance | Repo | Health | Last Active | Skills | Open Action |\n|----------|------|--------|-------------|--------|-------------|\n\n## What Changed Since Last Status\n\u003Clist of NEW\u002FDEGRADED\u002FRECOVERED\u002FWENT_STALE\u002FDROPPED instances since prior fleet-status article, or \"no changes\">\n\n## Per-Instance Detail\n\n### \u003Cname> — \u003Crepo>\n- Purpose: \u003Cfrom registry>\n- Health: \u003Cstatus>, last checked \u003CISO>\n- Last 10 runs:\n  | Skill | Status | Conclusion | When |\n  |-------|--------|-----------|------|\n- Skills enabled: \u003Ccomma list>\n- Recent commits:\n  - \u003Csha> \u003Cmessage>\n- Action: \u003Cnext_action>\n\n## Counts\n| Metric | Value |\n|--------|-------|\n\n## Sources\ngh=ok · rate_remaining=N · registry=N instances · prior_status=\u003Cfilename or \"none\">\n```\n\n**Log**:\n```\n### fleet-control\n- Mode: status\n- Article: output\u002Farticles\u002Ffleet-status-${today}.md\n- Verdict: \u003Cline>\n- Sizes: total=N, healthy=N, ...\n```\n\n**Notify** (always, in status mode):\n```\n*Fleet Status — ${today}*\n\u003Cverdict>\nTop issue: \u003Cone line, or \"none\">\nCounts: healthy \u003CH> · warning \u003CW> · degraded \u003CD> · stale \u003CS> · pending \u003CP> · unreachable \u003CU>\nArticle: output\u002Farticles\u002Ffleet-status-${today}.md\n```\n\n---\n\n## Scorecard Mode (scorecard view)\n\nPublish the daily **fleet scorecard** to `memory\u002Fscorecard.md` and append a trend row to `memory\u002Fscorecard-history.csv`. (Ran daily at 13:00 UTC as its own dispatch when this skill is scheduled with `var: scorecard`.)\n\n### 0. Gather the data in-run\n\nRun the committed collector — it discovers the fleet (self + non-archived `memory\u002Finstances.json`), fetches each repo's workflow runs + skill count + `token-usage.csv` from the GitHub API, computes the pricing\u002Faggregation, and writes the tables. It reads its token from the environment (`GH_READ_PAT` — the read-only PAT declared in this skill's `requires:`, needed to read **private** fleet members — falling back to `GH_TOKEN`\u002F`GITHUB_TOKEN`), so **no secret ever touches a command line**:\n\n```bash\nnode scripts\u002Ffleet-scorecard.mjs   # → \u002Ftmp\u002Ffleet-scorecard\u002F{scorecard-body.md,metrics.json}\n```\n\nThe deterministic maths lives in the script (not this run) — do **not** recompute or alter its numbers. A repo the token can't read is simply absent from the tables rather than crashing the collector.\n\n### Inputs (produced by step 0 — read these)\n\n- `\u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md` — the computed markdown tables (Fleet totals, Per-repo, Top skills by cost, Least reliable skills). Authoritative — **do not recompute or alter them.**\n- `\u002Ftmp\u002Ffleet-scorecard\u002Fmetrics.json` — today's key totals: `total_runs, total_failures, generations, prompt_tokens, cached_tokens, completion_tokens, total_tokens, est_cost_usd, cache_discount_usd`.\n\nIf `\u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md` is missing or empty, the collector failed or resolved an empty fleet — write a one-line note to `\u002Ftmp\u002Fskill-result.txt` saying so and stop (do not overwrite the existing scorecard, do not notify).\n\n### Steps\n\n#### 1. Load today's metrics and yesterday's baseline\n\n- Read `\u002Ftmp\u002Ffleet-scorecard\u002Fmetrics.json` (today).\n- Read the **last row** of `memory\u002Fscorecard-history.csv` if it exists (the previous run's metrics) to compute deltas. If the file doesn't exist yet, this is the first run — deltas are \"—\".\n\n#### 2. Compute day-over-day deltas\n\nFor `total_runs`, `total_failures`, `generations`, `total_tokens`, `est_cost_usd`, `cache_discount_usd`, compute `today − previous`. Format as signed (e.g. `+312 runs`, `+$148`, `+5 failures`). These are cumulative all-time figures, so deltas show the last ~24h of activity.\n\n#### 3. Build the Alerts block\n\nScan the computed tables in `scorecard-body.md` and flag:\n- Any skill in **\"Least reliable skills (last 14d)\"** with **fail rate ≥ 25%** (call it out by name + repo + rate). That table is already windowed to 14 days, so long-resolved incidents won't trigger false alarms — anything listed there is a *current* problem worth surfacing.\n- Any **cost spike**: `est_cost_usd` delta > 1.5× the median daily delta from history (if ≥7 history rows exist), or just note the day's cost increase otherwise.\n- If `total_failures` rose by **more than 10** since yesterday, flag it.\n- If no issues, write `✅ No anomalies — fleet healthy.`\n\n#### 4. Write `memory\u002Fscorecard.md`\n\nStructure (overwrite the file):\n\n```\n# 🛰️ Aeon Fleet Scorecard — as of ${today}\n\n_Auto-generated daily by skills\u002Ffleet-control (scorecard view). Tokens reported OpenRouter-style (cached_tokens ⊆ prompt_tokens)._\n\n## Since last update (~24h)\n| Metric | Δ |\n|---|---:|\n| Runs | \u003Csigned> |\n| Failures | \u003Csigned> |\n| Generations | \u003Csigned> |\n| Total tokens | \u003Csigned, humanized> |\n| Est. cost | \u003Csigned $> |\n| Cache discount | \u003Csigned $> |\n\n## Alerts\n\u003Cthe alerts block from step 3>\n\n\u003CPASTE the full contents of \u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md verbatim here>\n\n---\n_Sources: GitHub Actions run history + each repo's `memory\u002Ftoken-usage.csv`. Fleet resolved from memory\u002Finstances.json + self. Cost = Anthropic list price (estimate)._\n```\n\n#### 5. Append the trend row\n\nAppend one line to `memory\u002Fscorecard-history.csv` (create with a header if it doesn't exist):\n\n```\ndate,total_runs,total_failures,generations,prompt_tokens,cached_tokens,completion_tokens,total_tokens,est_cost_usd,cache_discount_usd\n```\n\nUse `${today}` for the date and the values straight from `metrics.json`. **Append, never rewrite** prior rows.\n\n#### 6. Notify\n\nWrite a terse daily pulse to `\u002Ftmp\u002Fscorecard-notify.md` and send it with `.\u002Fnotify -f \u002Ftmp\u002Fscorecard-notify.md`. One short paragraph — today's totals (runs, est. cost, total tokens), the headline deltas, and any alert. Example shape: _\"fleet at 12.5k runs, ~$7.8k notional. +312 runs \u002F +$148 since yesterday. cost-report still failing (88% fail). caching saved ~$43k.\"_ Also copy this text to `\u002Ftmp\u002Fskill-result.txt` so the framework captures it.\n\n#### 7. Memory log\n\nAppend the scorecard entry under the consolidated `### fleet-control` heading in `memory\u002Flogs\u002F${today}.md` (see **Log** section), noting the headline numbers (so future skills like self-improve\u002Freflect see it).\n\n### Scorecard notes\n- Numbers come only from the collector's output files (`\u002Ftmp\u002Ffleet-scorecard\u002F*`) — never invent or estimate figures yourself.\n- The scorecard is cumulative\u002Fall-time; the deltas are what make the daily run useful.\n- GitHub Actions retains runs ~90 days, so the run history is a rolling window; the token CSVs are the durable record committed in each repo.\n\n---\n\n## Log\n\nAll modes append under **one** `### fleet-control` heading in `memory\u002Flogs\u002F${today}.md`, with a `- Mode:` discriminator line (the health loop parses this shape). Use the per-mode block shown in each mode section above. For **Scorecard Mode** use:\n```\n### fleet-control\n- Mode: scorecard\n- Scorecard: memory\u002Fscorecard.md updated — \u003Ctotal_runs> runs, ~$\u003Cest_cost_usd> notional, \u003Ctotal_tokens humanized>\n- Deltas: \u003C+runs> \u002F \u003C+$cost> since yesterday\n- Alerts: \u003Calert summary or \"none\">\n```\n\n## Exit taxonomy\n\nEvery run logs exactly one of these to memory:\n- `FLEET_CONTROL_OK` — health\u002Fstatus\u002Fdispatch\u002Fscorecard completed normally\n- `FLEET_EMPTY` — no instances in registry (silent stop; control view)\n- `FLEET_NO_AUTH` — gh auth missing (control view)\n- `FLEET_RATE_LIMITED:remaining=N` — abandoned to preserve quota (control view)\n- `FLEET_DISPATCH_OK:N\u002FM` — dispatched N of M targets\n- `FLEET_DISPATCH_FAILED:\u003Creason>` — dispatch produced 0 dispatches\n- `FLEET_SCORECARD_EMPTY` — collector produced no data (empty fleet \u002F all repos unreadable); scorecard skipped without overwriting or notifying\n\n## Network note\n\n**Control view (health \u002F status \u002F dispatch):** always use `gh api` over raw curl (it handles auth internally, so no `$SECRET` appears on the command line for the Bash permission layer to refuse). All cross-repo calls go through `gh api` or `gh workflow run`. No outbound HTTP needed beyond what `gh` does internally.\n\n**Scorecard view:** gathers its data **in-run** by executing `node scripts\u002Ffleet-scorecard.mjs` (step 0), which fetches workflow runs + token usage from the GitHub API and computes the tables into `\u002Ftmp\u002Ffleet-scorecard\u002F`. The collector authenticates with `GH_READ_PAT` when set (a read-only PAT with cross-repo scope, declared in this skill's `requires:` and injected into the run) so **private** managed instances are readable; when unset, the run's `GH_TOKEN` (= `GH_GLOBAL`) reads the same private members, the standard single-key setup. It reads the token from `process.env` internally, so the secret never appears on a command line. A repo the token can't read is simply absent from the tables rather than crashing the collector.\n\n## Required env vars\n\n`GH_READ_PAT` (optional, read-only) — declared in `requires:` and read from `process.env` by `scripts\u002Ffleet-scorecard.mjs` (scorecard view) to reach private managed instances; it falls back to `GH_GLOBAL`\u002F`GH_TOKEN`\u002F`GITHUB_TOKEN` (the run's repo-wide token, which also reads private members) when unset, and reads `GITHUB_REPOSITORY` to resolve \"self\". The control view relies on the workflow-provided `GITHUB_TOKEN` for its live `gh` calls.\n\n## Constraints\n\n- Never delete an instance from `memory\u002Finstances.json` automatically — only update fields. Even `unreachable` instances stay in the registry until the operator removes them by hand.\n- Preserve all registry fields not explicitly written by this skill (purpose, parent, created, skills_enabled, etc.).\n- Never write secrets to logs or notifications.\n- Cap notification length at ~30 lines; truncate the per-instance list with `...and N more` when needed.\n- Health Check stays silent when nothing changed mid-day — the daily-rollup path handles the recurring \"is everything fine?\" question without spam.\n- Scorecard Mode never overwrites `memory\u002Fscorecard.md` when the collector output is missing\u002Fempty, and appends (never rewrites) prior rows in `memory\u002Fscorecard-history.csv`.\n- Do not change the skill's tags, var semantics, or schedule without strong justification.\n\nWrite complete, working code. No TODOs or placeholders.\n\n## Output\n\nAfter completing any task, end with a `## Summary` listing what you did, files created\u002Fmodified, and any follow-up actions needed.\n","\u003C!-- autoresearch: variation B — sharper output: verdict line + delta vs prior + per-instance action column + state-change-gated notify -->\n\n> **${var}** — Command \u002F view selector. Empty (or unrecognized) → **Health Check** (default control view). `status` → full **Status Mode** (control view). `dispatch \u003Cinstance|*> \u003Cskill> [var=\u003Cvalue>]` → **Dispatch Mode**: trigger a skill on one child or all healthy\u002Fdegraded children (control view). `scorecard` → **Scorecard Mode**: fleet-wide runs\u002Ftokens\u002Fcost\u002Freliability scorecard with day-over-day deltas + alerts (scorecard view).\n\nToday is ${today}. Operate the fleet of Aeon instances registered in `memory\u002Finstances.json`. The **control view** (health\u002Fstatus\u002Fdispatch) is **decision-ready**: every run leads with a verdict, then a delta vs prior check, then per-instance lines that name the next concrete action. The **scorecard view** publishes the daily fleet-wide cost\u002Freliability scorecard.\n\nThe fleet is **discovered at runtime, never hardcoded**: it is this repo (\"self\") plus every non-archived entry in `memory\u002Finstances.json` (the registry `fleet-control` and `spawn-instance` maintain). With zero managed instances the scorecard simply covers the single self repo — still useful.\n\n## Shared preamble (every run)\n\n1. **Read memory** — read `memory\u002FMEMORY.md` for high-level context and scan the last ~3 days of `memory\u002Flogs\u002F` for recent activity; don't re-report a signal already logged there.\n\n2. **Voice** — if `soul\u002FSOUL.md` and `soul\u002FSTYLE.md` exist and are populated, read them and match the operator's voice in every notification. If they are empty templates or absent, use a clear, direct, neutral tone — terse, lowercase, no fluff.\n\n3. **Parse `${var}` → mode**:\n   - empty \u002F unrecognized → **Health Check Mode** (control view; default)\n   - exactly `status` → **Status Mode** (control view)\n   - starts with `dispatch ` → **Dispatch Mode** (control view)\n   - exactly `scorecard` → **Scorecard Mode** (scorecard view)\n\n4. **Route**:\n   - **Health Check \u002F Status \u002F Dispatch** → run the **Control-view pre-flight** below, then the matching mode section. These modes make live `gh` calls.\n   - **Scorecard** → skip the control-view pre-flight entirely and jump straight to **Scorecard Mode**, which gathers its own data in-run via `node scripts\u002Ffleet-scorecard.mjs`.\n\n---\n\n## Control-view pre-flight (health \u002F status \u002F dispatch only)\n\n1. **Verify gh auth** — `gh auth status` must succeed. If not, log `FLEET_NO_AUTH` to `memory\u002Flogs\u002F${today}.md` and notify `Fleet Control: gh auth missing — check GITHUB_TOKEN secret.` Stop.\n\n2. **Check rate limit** — `REMAINING=$(gh api rate_limit --jq '.resources.core.remaining')`. If `REMAINING \u003C 50`, log `FLEET_RATE_LIMITED:remaining=${REMAINING}` and notify a one-line warning, then stop.\n\n3. **Load the registry** — read `memory\u002Finstances.json`. If the file is missing, write `{\"instances\": []}` to bootstrap. If `.instances` is absent or `[]`:\n   - Log `FLEET_EMPTY: no managed instances` to `memory\u002Flogs\u002F${today}.md`.\n   - **Stop. Do NOT notify.**\n\n4. **Load prior state** — read `memory\u002Fstate\u002Ffleet-control-state.json` (create the directory and file with `{\"instances\": {}, \"last_full_summary_date\": \"\"}` if missing). Shape:\n   ```json\n   {\n     \"instances\": {\n       \"\u003Cname>\": { \"health\": \"\u003Cstatus>\", \"last_checked\": \"\u003CISO>\", \"consecutive_unreachable\": 0 }\n     },\n     \"last_full_summary_date\": \"YYYY-MM-DD\"\n   }\n   ```\n\n---\n\n## Health Check Mode (default — control view)\n\nFor each registered instance, skip rows with `archived: true` from per-instance work (count them separately). Run the three calls per instance in parallel using `&` + `wait` and write each to `\u002Ftmp\u002Ffleet\u002F${SAFE}.{repo,runs,cron}.json`:\n\na. **Repo metadata**:\n   ```bash\n   gh api \"repos\u002F${REPO}\" \\\n     --jq '{full_name, pushed_at, archived, default_branch, open_issues_count}' \\\n     > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.repo.json\" 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.repo.err\" &\n   ```\n\nb. **Workflow runs in last 24h** (precise window, not \"last 5\"):\n   ```bash\n   SINCE=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)\n   gh api \"repos\u002F${REPO}\u002Factions\u002Fruns?created=>${SINCE}&per_page=100&exclude_pull_requests=true\" \\\n     --jq '{total_count, runs:[.workflow_runs[]|{name,status,conclusion,created_at,html_url}]}' \\\n     > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.runs.json\" 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.runs.err\" &\n   ```\n\nc. **Cron-state from child**:\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Fmemory\u002Fcron-state.json\" --jq '.content' 2>\"\u002Ftmp\u002Ffleet\u002F${SAFE}.cron.err\" \\\n     | base64 -d > \"\u002Ftmp\u002Ffleet\u002F${SAFE}.cron.json\" &\n   ```\n\n`wait` after launching all three for an instance (or batch across all instances if you trust your parallelism — keep ≤16 concurrent calls to stay under rate limit).\n\n**Classify each instance** with precise thresholds:\n- **unreachable** — repo metadata call returned non-zero (404\u002F403\u002Fetc.)\n- **archived** — repo metadata returns `archived: true`\n- **pending_secrets** — `runs.total_count == 0` for the 24h window AND repo `pushed_at` ≥ 7 days old (newly-spawned instances under 7 days stay unclassified-but-tracked)\n- **stale** — `runs.total_count == 0` AND `pushed_at` > 7 days old AND not `archived`\n- **degraded** — ≥1 cron-state skill with `consecutive_failures ≥ 3` OR (24h failure_count \u002F total_count) ≥ 0.5 with total_count ≥ 2\n- **warning** — 24h failure_count ≥ 1 but ratio \u003C 0.5\n- **healthy** — has runs in last 24h, all conclusions `success` or `in_progress`\u002F`queued`, no degraded cron-state skills\n\nFor each instance compute a **next_action** (one short imperative phrase):\n- `pending_secrets` → `add ANTHROPIC_API_KEY at https:\u002F\u002Fgithub.com\u002F${REPO}\u002Fsettings\u002Fsecrets\u002Factions`\n- `degraded` → `investigate \u003Cskill_name> (\u003Cconsecutive_failures>× in a row, last_error: \u003Csignature, ≤60 chars>)`\n- `warning` → `monitor — \u003CN>\u002F\u003CTotal> runs failed in 24h`\n- `stale` → `confirm intent: no runs in 24h, last push \u003Crelative_date>; archive or re-enable` — if it *should* be running, dispatch `aeon-doctor` to that instance (Dispatch Mode) to lint for a silent config bug (unquoted `schedule:` \u002F duplicate key \u002F broken entry) before assuming it's abandoned\n- `unreachable` → `verify access: \u003Creason from repo.err>`\n- `healthy` → `none`\n- `archived` → `none (archived)`\n\n**Compute delta** vs prior state (per-instance `prior.health` vs `current.health`):\n- **NEW** — instance not in prior state\n- **DEGRADED** — was healthy\u002Fwarning, now degraded\u002Funreachable\u002Fstale\u002Fpending_secrets\n- **RECOVERED** — was degraded\u002Funreachable\u002Fstale\u002Fpending_secrets, now healthy\u002Fwarning\n- **DROPPED** — was in prior state, no longer in registry\n- (no change → no delta line)\n\n**Update the registry** — write back `health`, `last_checked` (ISO UTC), and `next_action` per instance to `memory\u002Finstances.json`. Preserve all other fields (`purpose`, `parent`, `created`, `skills_enabled`, etc.).\n\n**Update the state file** — write the current per-instance health snapshot to `memory\u002Fstate\u002Ffleet-control-state.json`. Update `last_full_summary_date` to today **only when this run notifies**. Increment `consecutive_unreachable` for unreachable instances; reset to 0 otherwise.\n\n**Log** to `memory\u002Flogs\u002F${today}.md` (under the consolidated heading — see **Log** section):\n```\n### fleet-control\n- Mode: health check\n- Verdict: [FLEET_OK | NEEDS_ATTENTION:N]\n- Sizes: total=N, healthy=N, warning=N, degraded=N, stale=N, pending=N, unreachable=N, archived=N\n- Deltas: [list NEW\u002FDEGRADED\u002FRECOVERED\u002FDROPPED, or \"none\"]\n- Sources: gh=ok, rate_remaining=N\n```\n\n**Notification gate** — send the notification if **any** of:\n- `len(deltas) > 0`\n- today != prior `last_full_summary_date` (first check of UTC day → daily rollup)\n- any current instance is `degraded` or `unreachable`\n\nOtherwise skip notify (silent no-op when nothing changed mid-day — operator isn't trained to ignore).\n\n**Notification body** (when sent):\n```\n*Fleet Control — ${today}*\nVerdict: \u003CFLEET_OK | NEEDS_ATTENTION:N>\n\n[If deltas exist]:\nWhat changed:\n- NEW: \u003Cname> (\u003Crepo>) — \u003Chealth>\n- DEGRADED: \u003Cname> — was \u003Cprior>, now \u003Ccurrent>: \u003Creason>\n- RECOVERED: \u003Cname> — was \u003Cprior>, now \u003Ccurrent>\n- DROPPED: \u003Cname> — no longer in registry\n\nFleet (N total):\n- \u003Cname> [\u003CHEALTH>]: \u003Crepo> — \u003Cnext_action>\n- ...\n\n[If first-of-day rollup]:\nCounts: healthy \u003CH> · warning \u003CW> · degraded \u003CD> · stale \u003CS> · pending \u003CP> · unreachable \u003CU> · archived \u003CA>\n\nSources: gh=ok · rate_remaining=N\n```\n\nCap the per-instance list at 12 lines; if more, append `...and N more — see memory\u002Finstances.json`. Always include archived in counts; never list archived rows in the per-instance section.\n\n---\n\n## Dispatch Mode (control view)\n\nParse var: `dispatch \u003Cinstance|*> \u003Cskill> [var=\u003Cvalue>]`.\n\n**Resolve targets**:\n- If `\u003Cinstance>` is `*`, target = every registry entry whose **current** health is `healthy`, `warning`, or `degraded` (skip unreachable, stale, pending, archived).\n- Otherwise, exact name match against the registry. Not found → notify `Fleet Dispatch: instance '\u003Cname>' not in registry` and stop.\n\nFor each target instance:\n\n1. **Validate skill exists in child**:\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Fskills\u002F${SKILL}\u002FSKILL.md\" >\u002Fdev\u002Fnull 2>&1 \\\n     || { OUTCOME=\"missing_skill\"; continue; }\n   ```\n\n2. **Check skill is enabled in child's aeon.yml** (best-effort warning, not a block — workflow_dispatch can override `enabled: false`):\n   ```bash\n   gh api \"repos\u002F${REPO}\u002Fcontents\u002Faeon.yml\" --jq '.content' 2>\u002Fdev\u002Fnull | base64 -d \\\n     | grep -E \"^[[:space:]]*${SKILL}:.*enabled:[[:space:]]*true\" >\u002Fdev\u002Fnull \\\n     || NOT_ENABLED_WARN=1\n   ```\n\n3. **Trigger the skill**:\n   ```bash\n   if [ -n \"$DISPATCH_VAR\" ]; then\n     gh workflow run aeon.yml --repo \"${REPO}\" -f skill=\"${SKILL}\" -f var=\"${DISPATCH_VAR}\" \\\n       && OUTCOME=\"dispatched\" || OUTCOME=\"api_failed:$?\"\n   else\n     gh workflow run aeon.yml --repo \"${REPO}\" -f skill=\"${SKILL}\" \\\n       && OUTCOME=\"dispatched\" || OUTCOME=\"api_failed:$?\"\n   fi\n   ```\n\nCollect per-target outcomes: `dispatched | missing_skill | api_failed:\u003Ccode>` (with optional `not_enabled_warn` flag).\n\n**Log**:\n```\n### fleet-control\n- Mode: dispatch\n- Command: dispatch \u003Cinst|*> \u003Cskill> [var=...]\n- Targets: N\n- Dispatched: N | missing_skill: N | api_failed: N\n- Per-target: [\u003Cname>: \u003Coutcome>, ...]\n```\n\n**Notify** (always, in dispatch mode):\n```\n*Fleet Dispatch*\nCommand: dispatch \u003Cinst|*> \u003Cskill>\nTargets: \u003CN> — Dispatched: \u003CN>\nSuccessful: \u003Ccomma-sep names>\n[If failures]:\nFailed: \u003Cname>: \u003Creason>, ...\n[If not_enabled_warn]:\nWarning: \u003Cname> has skill disabled in aeon.yml — dispatched anyway\n```\n\nIf 0 dispatched out of N targets, the verdict line reads `Fleet Dispatch: 0\u002F${N} — see failures below` and exit code logged is `FLEET_DISPATCH_FAILED:no_targets_succeeded`.\n\n---\n\n## Status Mode (control view)\n\nGenerate the comprehensive snapshot, but make it scannable.\n\nFor each registered instance (skip `archived` from detail blocks but count them in the summary), gather in parallel:\n- Repo meta: `stargazers_count`, `pushed_at`, `open_issues_count`, `default_branch`\n- Last 10 workflow runs:\n  ```bash\n  gh api \"repos\u002F${REPO}\u002Factions\u002Fruns?per_page=10&exclude_pull_requests=true\" \\\n    --jq '[.workflow_runs[]|{name,status,conclusion,created_at,html_url}]'\n  ```\n- Full `cron-state.json`\n- `aeon.yml` (parse enabled skills)\n- Last 5 commits (one-line `gh api repos\u002F${REPO}\u002Fcommits?per_page=5 --jq ...`)\n\nCompute the same delta block, but compare against the most recent prior `output\u002Farticles\u002Ffleet-status-*.md` (parse the per-instance health rows; if none exists, mark the section \"no prior status to diff against\").\n\nWrite to `output\u002Farticles\u002Ffleet-status-${today}.md`:\n```markdown\n# Fleet Status — ${today}\n\n## Verdict\n\u003Cone line: FLEET_OK | NEEDS_ATTENTION:N | DEGRADED:N — top issue first>\n\n## Top Issue\n\u003Cone paragraph: the single highest-priority instance and what it needs, OR \"none\">\n\n## Fleet Health\n| Instance | Repo | Health | Last Active | Skills | Open Action |\n|----------|------|--------|-------------|--------|-------------|\n\n## What Changed Since Last Status\n\u003Clist of NEW\u002FDEGRADED\u002FRECOVERED\u002FWENT_STALE\u002FDROPPED instances since prior fleet-status article, or \"no changes\">\n\n## Per-Instance Detail\n\n### \u003Cname> — \u003Crepo>\n- Purpose: \u003Cfrom registry>\n- Health: \u003Cstatus>, last checked \u003CISO>\n- Last 10 runs:\n  | Skill | Status | Conclusion | When |\n  |-------|--------|-----------|------|\n- Skills enabled: \u003Ccomma list>\n- Recent commits:\n  - \u003Csha> \u003Cmessage>\n- Action: \u003Cnext_action>\n\n## Counts\n| Metric | Value |\n|--------|-------|\n\n## Sources\ngh=ok · rate_remaining=N · registry=N instances · prior_status=\u003Cfilename or \"none\">\n```\n\n**Log**:\n```\n### fleet-control\n- Mode: status\n- Article: output\u002Farticles\u002Ffleet-status-${today}.md\n- Verdict: \u003Cline>\n- Sizes: total=N, healthy=N, ...\n```\n\n**Notify** (always, in status mode):\n```\n*Fleet Status — ${today}*\n\u003Cverdict>\nTop issue: \u003Cone line, or \"none\">\nCounts: healthy \u003CH> · warning \u003CW> · degraded \u003CD> · stale \u003CS> · pending \u003CP> · unreachable \u003CU>\nArticle: output\u002Farticles\u002Ffleet-status-${today}.md\n```\n\n---\n\n## Scorecard Mode (scorecard view)\n\nPublish the daily **fleet scorecard** to `memory\u002Fscorecard.md` and append a trend row to `memory\u002Fscorecard-history.csv`. (Ran daily at 13:00 UTC as its own dispatch when this skill is scheduled with `var: scorecard`.)\n\n### 0. Gather the data in-run\n\nRun the committed collector — it discovers the fleet (self + non-archived `memory\u002Finstances.json`), fetches each repo's workflow runs + skill count + `token-usage.csv` from the GitHub API, computes the pricing\u002Faggregation, and writes the tables. It reads its token from the environment (`GH_READ_PAT` — the read-only PAT declared in this skill's `requires:`, needed to read **private** fleet members — falling back to `GH_TOKEN`\u002F`GITHUB_TOKEN`), so **no secret ever touches a command line**:\n\n```bash\nnode scripts\u002Ffleet-scorecard.mjs   # → \u002Ftmp\u002Ffleet-scorecard\u002F{scorecard-body.md,metrics.json}\n```\n\nThe deterministic maths lives in the script (not this run) — do **not** recompute or alter its numbers. A repo the token can't read is simply absent from the tables rather than crashing the collector.\n\n### Inputs (produced by step 0 — read these)\n\n- `\u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md` — the computed markdown tables (Fleet totals, Per-repo, Top skills by cost, Least reliable skills). Authoritative — **do not recompute or alter them.**\n- `\u002Ftmp\u002Ffleet-scorecard\u002Fmetrics.json` — today's key totals: `total_runs, total_failures, generations, prompt_tokens, cached_tokens, completion_tokens, total_tokens, est_cost_usd, cache_discount_usd`.\n\nIf `\u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md` is missing or empty, the collector failed or resolved an empty fleet — write a one-line note to `\u002Ftmp\u002Fskill-result.txt` saying so and stop (do not overwrite the existing scorecard, do not notify).\n\n### Steps\n\n#### 1. Load today's metrics and yesterday's baseline\n\n- Read `\u002Ftmp\u002Ffleet-scorecard\u002Fmetrics.json` (today).\n- Read the **last row** of `memory\u002Fscorecard-history.csv` if it exists (the previous run's metrics) to compute deltas. If the file doesn't exist yet, this is the first run — deltas are \"—\".\n\n#### 2. Compute day-over-day deltas\n\nFor `total_runs`, `total_failures`, `generations`, `total_tokens`, `est_cost_usd`, `cache_discount_usd`, compute `today − previous`. Format as signed (e.g. `+312 runs`, `+$148`, `+5 failures`). These are cumulative all-time figures, so deltas show the last ~24h of activity.\n\n#### 3. Build the Alerts block\n\nScan the computed tables in `scorecard-body.md` and flag:\n- Any skill in **\"Least reliable skills (last 14d)\"** with **fail rate ≥ 25%** (call it out by name + repo + rate). That table is already windowed to 14 days, so long-resolved incidents won't trigger false alarms — anything listed there is a *current* problem worth surfacing.\n- Any **cost spike**: `est_cost_usd` delta > 1.5× the median daily delta from history (if ≥7 history rows exist), or just note the day's cost increase otherwise.\n- If `total_failures` rose by **more than 10** since yesterday, flag it.\n- If no issues, write `✅ No anomalies — fleet healthy.`\n\n#### 4. Write `memory\u002Fscorecard.md`\n\nStructure (overwrite the file):\n\n```\n# 🛰️ Aeon Fleet Scorecard — as of ${today}\n\n_Auto-generated daily by skills\u002Ffleet-control (scorecard view). Tokens reported OpenRouter-style (cached_tokens ⊆ prompt_tokens)._\n\n## Since last update (~24h)\n| Metric | Δ |\n|---|---:|\n| Runs | \u003Csigned> |\n| Failures | \u003Csigned> |\n| Generations | \u003Csigned> |\n| Total tokens | \u003Csigned, humanized> |\n| Est. cost | \u003Csigned $> |\n| Cache discount | \u003Csigned $> |\n\n## Alerts\n\u003Cthe alerts block from step 3>\n\n\u003CPASTE the full contents of \u002Ftmp\u002Ffleet-scorecard\u002Fscorecard-body.md verbatim here>\n\n---\n_Sources: GitHub Actions run history + each repo's `memory\u002Ftoken-usage.csv`. Fleet resolved from memory\u002Finstances.json + self. Cost = Anthropic list price (estimate)._\n```\n\n#### 5. Append the trend row\n\nAppend one line to `memory\u002Fscorecard-history.csv` (create with a header if it doesn't exist):\n\n```\ndate,total_runs,total_failures,generations,prompt_tokens,cached_tokens,completion_tokens,total_tokens,est_cost_usd,cache_discount_usd\n```\n\nUse `${today}` for the date and the values straight from `metrics.json`. **Append, never rewrite** prior rows.\n\n#### 6. Notify\n\nWrite a terse daily pulse to `\u002Ftmp\u002Fscorecard-notify.md` and send it with `.\u002Fnotify -f \u002Ftmp\u002Fscorecard-notify.md`. One short paragraph — today's totals (runs, est. cost, total tokens), the headline deltas, and any alert. Example shape: _\"fleet at 12.5k runs, ~$7.8k notional. +312 runs \u002F +$148 since yesterday. cost-report still failing (88% fail). caching saved ~$43k.\"_ Also copy this text to `\u002Ftmp\u002Fskill-result.txt` so the framework captures it.\n\n#### 7. Memory log\n\nAppend the scorecard entry under the consolidated `### fleet-control` heading in `memory\u002Flogs\u002F${today}.md` (see **Log** section), noting the headline numbers (so future skills like self-improve\u002Freflect see it).\n\n### Scorecard notes\n- Numbers come only from the collector's output files (`\u002Ftmp\u002Ffleet-scorecard\u002F*`) — never invent or estimate figures yourself.\n- The scorecard is cumulative\u002Fall-time; the deltas are what make the daily run useful.\n- GitHub Actions retains runs ~90 days, so the run history is a rolling window; the token CSVs are the durable record committed in each repo.\n\n---\n\n## Log\n\nAll modes append under **one** `### fleet-control` heading in `memory\u002Flogs\u002F${today}.md`, with a `- Mode:` discriminator line (the health loop parses this shape). Use the per-mode block shown in each mode section above. For **Scorecard Mode** use:\n```\n### fleet-control\n- Mode: scorecard\n- Scorecard: memory\u002Fscorecard.md updated — \u003Ctotal_runs> runs, ~$\u003Cest_cost_usd> notional, \u003Ctotal_tokens humanized>\n- Deltas: \u003C+runs> \u002F \u003C+$cost> since yesterday\n- Alerts: \u003Calert summary or \"none\">\n```\n\n## Exit taxonomy\n\nEvery run logs exactly one of these to memory:\n- `FLEET_CONTROL_OK` — health\u002Fstatus\u002Fdispatch\u002Fscorecard completed normally\n- `FLEET_EMPTY` — no instances in registry (silent stop; control view)\n- `FLEET_NO_AUTH` — gh auth missing (control view)\n- `FLEET_RATE_LIMITED:remaining=N` — abandoned to preserve quota (control view)\n- `FLEET_DISPATCH_OK:N\u002FM` — dispatched N of M targets\n- `FLEET_DISPATCH_FAILED:\u003Creason>` — dispatch produced 0 dispatches\n- `FLEET_SCORECARD_EMPTY` — collector produced no data (empty fleet \u002F all repos unreadable); scorecard skipped without overwriting or notifying\n\n## Network note\n\n**Control view (health \u002F status \u002F dispatch):** always use `gh api` over raw curl (it handles auth internally, so no `$SECRET` appears on the command line for the Bash permission layer to refuse). All cross-repo calls go through `gh api` or `gh workflow run`. No outbound HTTP needed beyond what `gh` does internally.\n\n**Scorecard view:** gathers its data **in-run** by executing `node scripts\u002Ffleet-scorecard.mjs` (step 0), which fetches workflow runs + token usage from the GitHub API and computes the tables into `\u002Ftmp\u002Ffleet-scorecard\u002F`. The collector authenticates with `GH_READ_PAT` when set (a read-only PAT with cross-repo scope, declared in this skill's `requires:` and injected into the run) so **private** managed instances are readable; when unset, the run's `GH_TOKEN` (= `GH_GLOBAL`) reads the same private members, the standard single-key setup. It reads the token from `process.env` internally, so the secret never appears on a command line. A repo the token can't read is simply absent from the tables rather than crashing the collector.\n\n## Required env vars\n\n`GH_READ_PAT` (optional, read-only) — declared in `requires:` and read from `process.env` by `scripts\u002Ffleet-scorecard.mjs` (scorecard view) to reach private managed instances; it falls back to `GH_GLOBAL`\u002F`GH_TOKEN`\u002F`GITHUB_TOKEN` (the run's repo-wide token, which also reads private members) when unset, and reads `GITHUB_REPOSITORY` to resolve \"self\". The control view relies on the workflow-provided `GITHUB_TOKEN` for its live `gh` calls.\n\n## Constraints\n\n- Never delete an instance from `memory\u002Finstances.json` automatically — only update fields. Even `unreachable` instances stay in the registry until the operator removes them by hand.\n- Preserve all registry fields not explicitly written by this skill (purpose, parent, created, skills_enabled, etc.).\n- Never write secrets to logs or notifications.\n- Cap notification length at ~30 lines; truncate the per-instance list with `...and N more` when needed.\n- Health Check stays silent when nothing changed mid-day — the daily-rollup path handles the recurring \"is everything fine?\" question without spam.\n- Scorecard Mode never overwrites `memory\u002Fscorecard.md` when the collector output is missing\u002Fempty, and appends (never rewrites) prior rows in `memory\u002Fscorecard-history.csv`.\n- Do not change the skill's tags, var semantics, or schedule without strong justification.\n\nWrite complete, working code. No TODOs or placeholders.\n\n## Output\n\nAfter completing any task, end with a `## Summary` listing what you did, files created\u002Fmodified, and any follow-up actions needed.\n",{"name":5,"metadata":23,"description":7},{"var":24,"cron":25,"tags":26,"title":32,"category":33,"requires":34},"","0 9,15 * * *",[27,28,29,30,31],"dev","meta","fleet","report","cost","Fleet Control","core",[35],"GH_READ_PAT?","main","d272e2d5dc4795e777d85c731669e1978c0d7595","skills\u002Ffleet-control","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm","https:\u002F\u002Fgithub.com\u002FDitto190","2026-11-13 06:13:51",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Ditto190\u002FAeon-automaton-codeyourself-mm --skill fleet-control",{"tool":48,"command":49},"bunx","bunx skills add Ditto190\u002FAeon-automaton-codeyourself-mm --skill fleet-control",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Ditto190\u002FAeon-automaton-codeyourself-mm --skill fleet-control","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Ffleet-control\u002FSKILL.md",true,[],[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M7DCG5X4KFH7AB8485P75B8F","you-web-search","Web search using You.com Search API with high-quality, cited results and optional real-time web crawling","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fyou-web-search\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7DCFZSBXYJ5YD2RW2EYYBTR","write-tweet","Multi-format tweet studio - standalone drafts (10 across 5 size tiers), a 5-10 tweet thread, or 10 remixes of past tweets, selected via ${var}","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-tweet\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7DCFWHQ8A71VR7QR9HGWXFP","weekly-aeoncard","Build a weekly token-consumption recap image from memory\u002Ftoken-usage.csv - this week + all-time totals, top skills, rendered as a shareable SVG card.","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-aeoncard\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7DCFHZQJMV0VBJY9HPPG74R","vuln-tracker","One lifecycle poll over everything vuln-scanner produces - PR and advisory status, PVR triage transitions, and pending-disclosure aging, with a stars-secured impact headline and one action queue.","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fvuln-tracker\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7DCF5RBH2H7S5H6Y7PSJRRD","vuln-scanner","Audit trending repos for real security vulnerabilities and disclose responsibly - scan and route findings (PVR \u002F dependency PR), re-submit queued advisories, and send armed email disclosures","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fvuln-scanner\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7DCF140AXQARZJ5WNSB8BCA","video-script","Turn a repo, product page, or update into a recording-ready video script in a receipts-first format - verifies every claim against live sources, then writes timestamped VO + on-screen direction with a plain-language glossary, assets checklist, anti-tells, and a verify-before-recording list","https:\u002F\u002Fgithub.com\u002FDitto190\u002FAeon-automaton-codeyourself-mm\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-script\u002FSKILL.md",[],[]]