$curl -o .claude/agents/BACKGROUND-OUTPUT.md https://raw.githubusercontent.com/heymegabyte/claude-skills/HEAD/agents/BACKGROUND-OUTPUT.mdThis document defines the standard output contract for background agents spawned by the meta-orchestrator or any plugin skill.
| 1 | # Background Agent Output Contract |
| 2 | |
| 3 | This document defines the standard output contract for background agents spawned by the meta-orchestrator or any plugin skill. |
| 4 | |
| 5 | ## Output directory |
| 6 | |
| 7 | Every background agent MUST write its final output as a Markdown file to: |
| 8 | |
| 9 | ``` |
| 10 | $CLAUDE_PLUGIN_DATA/agent-output/<agent-name>-<iso-timestamp>.md |
| 11 | ``` |
| 12 | |
| 13 | - `$CLAUDE_PLUGIN_DATA` — defaults to `~/.claude/plugins/heymegabyte-claude-skills/data/` if unset. |
| 14 | - `<agent-name>` — the agent's slug (e.g. `deploy-verifier`, `seo-auditor`). |
| 15 | - `<iso-timestamp>` — ISO 8601 with `T` and `Z`, no spaces, no colons (e.g. `2026-06-28T143022Z`). |
| 16 | |
| 17 | ## Output format |
| 18 | |
| 19 | Each output file follows this structure: |
| 20 | |
| 21 | ```markdown |
| 22 | # <agent-name> — <iso-timestamp> |
| 23 | |
| 24 | ## Task |
| 25 | |
| 26 | One-line description of what was requested. |
| 27 | |
| 28 | ## Summary |
| 29 | |
| 30 | 2–5 sentences covering what was done, key findings, and any blockers. |
| 31 | |
| 32 | ## Results |
| 33 | |
| 34 | - **Result 1**: description with evidence |
| 35 | - **Result 2**: description with evidence |
| 36 | - ... |
| 37 | |
| 38 | ## Artifacts |
| 39 | |
| 40 | - `<path/to/generated/file>` — purpose of the file |
| 41 | - `<pull-request-url>` — if a PR was created |
| 42 | |
| 43 | ## Recommendations |
| 44 | |
| 45 | Optional list of follow-up actions or suggestions for the main thread. |
| 46 | |
| 47 | ## Status |
| 48 | |
| 49 | PASS | FAIL | PARTIAL |
| 50 | ``` |
| 51 | |
| 52 | ## SessionStart hook behavior |
| 53 | |
| 54 | The SessionStart hook MUST check for unread output files: |
| 55 | |
| 56 | 1. List `$CLAUDE_PLUGIN_DATA/agent-output/*.md` sorted by modification time (newest first). |
| 57 | 2. For any file not yet read (tracked via a `.read_stamp` file or `$CLAUDE_PLUGIN_DATA/agent-output/.read-stamp`), prepend a system reminder: |
| 58 | |
| 59 | > Unread agent output available: `<path>` |
| 60 | |
| 61 | 3. The user or main thread reads the file on demand. |
| 62 | |
| 63 | ## Cleanup |
| 64 | |
| 65 | - Output files are retained indefinitely for audit — never delete automatically. |
| 66 | - The user or a periodic cron may archive files older than 90 days to `agent-output/archive/`. |
| 67 | |
| 68 | ## Example output file |
| 69 | |
| 70 | ```markdown |
| 71 | # deploy-verifier — 2026-06-28T143022Z |
| 72 | |
| 73 | ## Task |
| 74 | |
| 75 | Verify example.com after deploy. |
| 76 | |
| 77 | ## Summary |
| 78 | |
| 79 | All checks passed. Site loads in 1.2s, axe reports 0 violations, all 6 breakpoints clean. |
| 80 | |
| 81 | ## Results |
| 82 | |
| 83 | - Page loads: 200 OK in 1.2s |
| 84 | - Console errors: 0 |
| 85 | - Visual: clean at 375/390/768/1024/1280/1920 |
| 86 | - Accessibility: 0 axe violations |
| 87 | - SEO: title (58 chars), meta (142 chars), OG tags present, canonical set |
| 88 | - Performance: LCP 1.4s, CLS 0.03, INP 48ms |
| 89 | |
| 90 | ## Artifacts |
| 91 | |
| 92 | - `e2e/screenshots/deploy-verifier/2026-06-28/` — all breakpoint screenshots |
| 93 | |
| 94 | ## Status |
| 95 | |
| 96 | PASS |
| 97 | ``` |