diff --git a/.agent-context-manifest.yml b/.agent-context-manifest.yml new file mode 100644 index 0000000..f9c4ddf --- /dev/null +++ b/.agent-context-manifest.yml @@ -0,0 +1,133 @@ +# .agent-context-manifest.yml +# +# Generated by agent-pipeline. Tracks which artifacts the bootstrap skill +# installed in this repo, where they came from, and what version of the +# pipeline they correspond to. +# +# Read by `sync-agent-context` skill to detect drift and propose updates. +# Don't edit by hand — use the bootstrap or sync skill in Cursor. + +schema_version: 1 +pipeline_version: "0.3.0" +pipeline_source: "https://github.com/varutasu/agent-pipeline" +installed_at: "2026-05-21T05:37:06Z" +last_synced_at: "2026-05-21T05:37:06Z" + +layers: + - L1 + - L2 + - L3 + +artifacts: + - path: ".convoys/README.md" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/_common/convoys-readme.md.template" + version: "0.3.0" + installed_hash: "sha256:a48548cd3f5d0c40fc179106890661c3be5fcdc13eb705af7cfe9233e0b8b209" + - path: ".cursor/agents/role-a11y-auditor.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-a11y-auditor.md" + version: "0.3.0" + installed_hash: "sha256:a59938deceb0246ebd7e477f1f9a442102f9fcbb81b0364f0ddc5f86e95a7930" + - path: ".cursor/agents/role-architect.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-architect.md" + version: "0.3.0" + installed_hash: "sha256:6033e27438875e837f2b4b1fd6d56daf3c362948a9ec19bce9d3c1aa2854a90e" + - path: ".cursor/agents/role-conductor.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-conductor.md" + version: "0.3.0" + installed_hash: "sha256:bc75a3e6646217a015f7bb60c3610afd9b57ae91c7d2fc7a7971f4709b19368a" + - path: ".cursor/agents/role-design-system-auditor.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-design-system-auditor.md" + version: "0.3.0" + installed_hash: "sha256:d214cecb1e8482fc24f2815c8220c860191f08526614f89cf9a5797e4ee9110a" + - path: ".cursor/agents/role-doc-writer.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-doc-writer.md" + version: "0.3.0" + installed_hash: "sha256:d4e8bf8cee93153506b7b742848462422dbe5cc7fd012c62f6ffd50460e344d4" + - path: ".cursor/agents/role-ia-architect.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-ia-architect.md" + version: "0.3.0" + installed_hash: "sha256:69685a3a407c4ee25e2606d426c3107d6b917abee80f907e16ade4a16b439839" + - path: ".cursor/agents/role-implementer.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-implementer.md" + version: "0.3.0" + installed_hash: "sha256:b4f4d8596068679b90ffc3a2b6d2e1b6548caf8c68a50f7ed640ba8f638c1c4c" + - path: ".cursor/agents/role-reviewer.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-reviewer.md" + version: "0.3.0" + installed_hash: "sha256:1ff38349321402a0ac2be37878dc2c0bcab62e54caf74c422b919aa6d75f9b67" + - path: ".cursor/agents/role-ux-reviewer.md" + source: "skills/bootstrap-agent-context/templates/L2-roles/role-ux-reviewer.md" + version: "0.3.0" + installed_hash: "sha256:3a1d4b66981f469b15e23a1cd34ab41352759966179e126b3d56ddc1eca4a03e" + - path: ".cursor/rules/api-routes.mdc" + source: "skills/bootstrap-agent-context/templates/L1-context/api-routes.mdc.template" + version: "0.3.0" + installed_hash: "sha256:f6016edb6a84ba6d669dc43f6c683636a5d5bbc5f3c03c51155cc78f8db77cff" + - path: ".cursor/rules/no-go-zones.mdc" + source: "skills/bootstrap-agent-context/templates/L1-context/no-go-zones.mdc" + version: "0.3.0" + installed_hash: "sha256:3336cce7ec9fe6c979cd89aee649a08d7af9b487b367ecf29ced644cb8799dcb" + - path: ".cursor/rules/prisma-schema-map.mdc" + source: "skills/bootstrap-agent-context/templates/L1-context/prisma-schema-map.mdc.template" + version: "0.3.0" + installed_hash: "sha256:8d72241ec5c7d93a3dba843afdcdffade411698660500aab944525a8d83b7e60" + - path: ".cursor/rules/prisma.mdc" + source: "skills/bootstrap-agent-context/templates/L1-context/prisma.mdc.template" + version: "0.3.0" + installed_hash: "sha256:e8f35617033cfebbc0f690739511412e898f72c5ce6a0433ba607ae427a64e9d" + - path: ".cursor/skills/add-api-route/SKILL.md" + source: "skills/bootstrap-agent-context/templates/L1-context/skills/add-api-route/SKILL.md" + version: "0.3.0" + installed_hash: "sha256:36f3c23cf36d13c664c3675030913d1fec276cab2e2f7a811b363f59f63d05ac" + - path: ".cursor/skills/add-prisma-model/SKILL.md" + source: "skills/bootstrap-agent-context/templates/L1-context/skills/add-prisma-model/SKILL.md" + version: "0.3.0" + installed_hash: "sha256:99b34e108a05f93a7e398ddb62dbbe25199d4b9dc363bcde6f8c6aedd5e68017" + - path: ".github/CODEOWNERS" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/CODEOWNERS.template" + version: "0.3.0" + installed_hash: "sha256:736f23a8c82b8008541714bcd87d00212ad7508dcbb6da0c13c435ecc68b5caa" + - path: ".github/PULL_REQUEST_TEMPLATE.md" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/_common/PULL_REQUEST_TEMPLATE.md.template" + version: "0.3.0" + installed_hash: "sha256:89863e58b9ec194aef1c94d3596e892467833e8bc880a28994acca401b6d9635" + - path: ".github/workflows/ci.yml" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/ci.yml.template" + version: "0.3.0" + installed_hash: "sha256:14f3f1580ee169931fb5b780a3871b866e0531e20df969115ea27f22b8972ca6" + - path: ".github/workflows/pr-health-rollup.yml" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/pr-health-rollup.yml.template" + version: "0.3.0" + installed_hash: "sha256:358d1523da599ee5365058e41aa21fe8deef55ed156d79864b5b0464867b6ff2" + - path: ".github/workflows/preview-smoke.yml" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/preview-smoke.yml.template" + version: "0.3.0" + installed_hash: "sha256:ad882f3cd5b8694ffc6c2572ca7ff900227f3a011fe59fffe437121afd583961" + - path: ".github/workflows/visual-diff.yml" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/visual-diff.yml.template" + version: "0.3.0" + installed_hash: "sha256:c03eb64a9485e816b16aca7fbbc252e47761109ff2627a843bf36b727783685d" + - path: "docs/agent-context/README.md" + source: "skills/bootstrap-agent-context/templates/L1-context/agent-context-readme.md.template" + version: "0.3.0" + installed_hash: "sha256:372776fa0854b107e0aad57878b581b95762e00f06f6c2883ad9a8cf17c1894c" + - path: "scripts/generate-schema-map.ts" + source: "skills/bootstrap-agent-context/templates/L1-context/generate-schema-map.ts" + version: "0.3.0" + installed_hash: "sha256:c2cfd377b23f25d034887649d7565227ea2bcbcbccdc9fca5db0f5123c9b2054" + - path: "scripts/log-convoy-event.sh" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/_common/log-convoy-event.sh" + version: "0.3.0" + installed_hash: "sha256:cd0413691066a177b6b4e6164a9a0978c20a853ad60222ae833b5d53b255818d" + - path: "scripts/wt.sh" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/_common/wt.sh" + version: "0.3.0" + installed_hash: "sha256:2a4f44a159f80a8ea6fe53ac507c01a2f91a4e2118d997a98b051808ac35e9a5" + - path: "src/lib/flags/index.ts" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/flags-index.ts.template" + version: "0.3.0" + installed_hash: "sha256:5073b836d455290e733592dd69383dbf3f027179519ccbfbbfe1a99e00d69da8" + - path: "tests/smoke/app.smoke.spec.ts" + source: "skills/bootstrap-agent-context/templates/L3-pipeline/nextjs-prisma/playwright-smoke.spec.ts.template" + version: "0.3.0" + installed_hash: "sha256:a62c10edb712a61f1cfece43705bfff75a5a66ad6bc8b53f7e69a43c3efb962c" diff --git a/.convoys/README.md b/.convoys/README.md new file mode 100644 index 0000000..07502c4 --- /dev/null +++ b/.convoys/README.md @@ -0,0 +1,121 @@ +# Convoys + +A **convoy** is a multi-PR work-stream coordinated by an agent pipeline. One convoy = one feature, bug fix, or epic. Each convoy is a Markdown file in this directory plus an optional sub-directory of implementer briefs. + +## File layout + +``` +.convoys/ +├── README.md (this file) +├── .md (the convoy file — written by role-conductor) +└── / + ├── brief-1-.md (written by role-architect) + ├── brief-2-.md + └── ... +``` + +## Convoy file format + +Frontmatter (set by `role-conductor`, then appended-to by other roles): + +```yaml +--- +name: +classification: feature | hotfix | docs-only | infra-only | server-only | config-only +success_metric: +skip: + - +status: open | in-progress | merged | shipped | abandoned +created: +--- +``` + +Body sections (added in order by the pipeline roles): + +1. `## Why` (Conductor) +2. `## Scope` (Conductor) +3. `## Roles invoked` (Conductor) +4. `## Todos` (Conductor → refined by Architect) +5. `## IA` (IA Architect) +6. `## UX` (UX Reviewer) +7. `## Architecture` (Architect) + +After Architect, briefs live in `.convoys//brief-N-*.md`. Implementers read only their brief, not the whole convoy. + +## Skip flags + +The Conductor sets `skip:` based on classification. These flags map to pipeline stages that no-op when set: + +| Flag | Skips | +| --- | --- | +| `ia` | IA Architect | +| `ux` | UX Reviewer | +| `arch` | Architect | +| `test` | Component tests | +| `review` | Reviewer | +| `visual` | Visual diff | +| `a11y` | A11y auditor | +| `design` | Design-system auditor | +| `smoke` | Staging smoke | +| `qa` | Manual QA | +| `docs` | Doc Writer | +| `flag` | Flag rollout | + +Never skipped (mandatory human gates): `plan-approval`, `pr-merge`, `prod-promote`. + +## Status lifecycle + +- `open` — Conductor created the convoy; no work started. +- `in-progress` — At least one brief has an open or merged PR. +- `merged` — All briefs merged to umbrella; release PR to develop pending. +- `shipped` — Release to main complete; flag rollout (if any) underway. +- `abandoned` — Convoy closed without shipping; reason in convoy body. + +Update status by editing the convoy frontmatter as you progress. + +## Adding a new convoy + +1. Open Cursor in this repo. +2. Prompt: *"Start a new convoy: . Success = ."* +3. The `role-conductor` subagent writes `.convoys/.md`. +4. Run subsequent roles in order per the convoy's `Roles invoked` list. + +See `.cursor/agents/role-conductor.md` for the Conductor's full spec. + +## Multitask + worktrees (Cursor 3.2+) + +[Cursor 3.2 (Apr 24, 2026)](https://cursor.com/changelog/04-24-26) added `/multitask` async subagents and native worktree management in the Agents Window. The pipeline uses both: + +**Audit fan-out** — after an implementer ships a PR draft: + +``` +/multitask role-reviewer + role-design-system-auditor + role-a11y-auditor +``` + +All three read the same diff and emit independent comments. Use group id `audit--` so analytics can compute wall-clock savings. + +**Implementer fleet** — after architect's plan is approved (gate 1), if `slice_dependencies:` declares parallel-safe briefs (`depends_on: []`, disjoint `files:`): + +``` +/multitask role-implementer briefs 1, 2, 3 +``` + +Use Cursor's Agents Window to create a worktree per brief — one click each. The legacy `scripts/wt.sh` is now a deprecation stub. + +See the [multitask playbook](https://github.com/varutasu/agent-pipeline/blob/main/docs/multitask-playbook.md) for the full guardrail set. + +## Self-analytics + +Each L2 role appends one event to `.convoys/.metrics.jsonl` via `scripts/log-convoy-event.sh`. The file is gitignored by default — events stay local. To opt-in to commit team-shared metrics, remove `.convoys/.metrics.jsonl` from `.gitignore`. + +Aggregate across repos and render a dashboard with the [agent-pipeline analytics scripts](https://github.com/varutasu/agent-pipeline/tree/main/analytics): + +```bash +cd ~/code/agent-pipeline/analytics +npx tsx analyze-convoys.ts [...] +npx tsx render-dashboard.ts +open ~/agent-pipeline-data/dashboard.html +``` + +Schema: [`analytics/schemas/convoy-event.json`](https://github.com/varutasu/agent-pipeline/blob/main/analytics/schemas/convoy-event.json). + diff --git a/.cursor/agents/role-a11y-auditor.md b/.cursor/agents/role-a11y-auditor.md new file mode 100644 index 0000000..ddd7031 --- /dev/null +++ b/.cursor/agents/role-a11y-auditor.md @@ -0,0 +1,105 @@ +--- +name: role-a11y-auditor +description: >- + Accessibility audit on a UI diff. Checks for missing labels, keyboard + navigation, focus management, color contrast, semantic HTML, and ARIA + correctness. Read-only. Use after the implementer's PR draft on PRs that + touch UI files. Does not require a browser MCP — works from the diff + + static analysis. Safe to run in parallel with role-reviewer + + role-design-system-auditor via Cursor 3.2 /multitask. +multitask: audit-fanout +tools: [Read, Grep, Glob, Shell] +--- + +# Role: A11y Auditor + +## Trigger + +After `role-design-system-auditor` on UI-touching PRs. Skip when convoy frontmatter has `skip: a11y`. + +## Inputs + +- The PR diff (UI files only). +- The convoy's UX section (which already lists a11y constraints — verify the implementer satisfied them). +- Existing accessible patterns in the repo (look at existing `Dialog`, `Form`, `Button` primitives). + +## Outputs + +A structured comment for the PR Health rollup: + +```markdown +## A11y Audit + +| Check | Status | Count | +| --- | --- | --- | +| Labels | ✅ / ❌ | | +| Keyboard nav | ✅ / ❌ | | +| Focus management | ✅ / ❌ | | +| Color contrast | ✅ / ⚠️ | | +| Semantic HTML | ✅ / ❌ | | +| ARIA correctness | ✅ / ⚠️ | | +| UX constraint match | ✅ / ❌ | | + +### Critical (must fix) +- +... + +### Warnings (recommended) +- +... + +### Notes +- ... +``` + +## Checklist (apply per file) + +1. **Labels**: every ``, `