opencastle 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +215 -0
- package/bin/cli.mjs +69 -0
- package/dist/cli/adapters/claude-code.d.ts +22 -0
- package/dist/cli/adapters/claude-code.d.ts.map +1 -0
- package/dist/cli/adapters/claude-code.js +237 -0
- package/dist/cli/adapters/claude-code.js.map +1 -0
- package/dist/cli/adapters/cursor.d.ts +20 -0
- package/dist/cli/adapters/cursor.d.ts.map +1 -0
- package/dist/cli/adapters/cursor.js +231 -0
- package/dist/cli/adapters/cursor.js.map +1 -0
- package/dist/cli/adapters/vscode.d.ts +20 -0
- package/dist/cli/adapters/vscode.d.ts.map +1 -0
- package/dist/cli/adapters/vscode.js +132 -0
- package/dist/cli/adapters/vscode.js.map +1 -0
- package/dist/cli/copy.d.ts +14 -0
- package/dist/cli/copy.d.ts.map +1 -0
- package/dist/cli/copy.js +62 -0
- package/dist/cli/copy.js.map +1 -0
- package/dist/cli/dashboard.d.ts +3 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +183 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/diff.d.ts +3 -0
- package/dist/cli/diff.d.ts.map +1 -0
- package/dist/cli/diff.js +27 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/eject.d.ts +3 -0
- package/dist/cli/eject.d.ts.map +1 -0
- package/dist/cli/eject.js +27 -0
- package/dist/cli/eject.js.map +1 -0
- package/dist/cli/init.d.ts +3 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +92 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/manifest.d.ts +14 -0
- package/dist/cli/manifest.d.ts.map +1 -0
- package/dist/cli/manifest.js +34 -0
- package/dist/cli/manifest.js.map +1 -0
- package/dist/cli/mcp.d.ts +14 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +35 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/prompt.d.ts +12 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +104 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/run/adapters/claude-code.d.ts +16 -0
- package/dist/cli/run/adapters/claude-code.d.ts.map +1 -0
- package/dist/cli/run/adapters/claude-code.js +82 -0
- package/dist/cli/run/adapters/claude-code.js.map +1 -0
- package/dist/cli/run/adapters/copilot.d.ts +16 -0
- package/dist/cli/run/adapters/copilot.d.ts.map +1 -0
- package/dist/cli/run/adapters/copilot.js +84 -0
- package/dist/cli/run/adapters/copilot.js.map +1 -0
- package/dist/cli/run/adapters/cursor.d.ts +16 -0
- package/dist/cli/run/adapters/cursor.d.ts.map +1 -0
- package/dist/cli/run/adapters/cursor.js +81 -0
- package/dist/cli/run/adapters/cursor.js.map +1 -0
- package/dist/cli/run/adapters/index.d.ts +14 -0
- package/dist/cli/run/adapters/index.d.ts.map +1 -0
- package/dist/cli/run/adapters/index.js +35 -0
- package/dist/cli/run/adapters/index.js.map +1 -0
- package/dist/cli/run/executor.d.ts +15 -0
- package/dist/cli/run/executor.d.ts.map +1 -0
- package/dist/cli/run/executor.js +249 -0
- package/dist/cli/run/executor.js.map +1 -0
- package/dist/cli/run/reporter.d.ts +10 -0
- package/dist/cli/run/reporter.d.ts.map +1 -0
- package/dist/cli/run/reporter.js +112 -0
- package/dist/cli/run/reporter.js.map +1 -0
- package/dist/cli/run/schema.d.ts +28 -0
- package/dist/cli/run/schema.d.ts.map +1 -0
- package/dist/cli/run/schema.js +511 -0
- package/dist/cli/run/schema.js.map +1 -0
- package/dist/cli/run.d.ts +6 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +123 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/stack-config.d.ts +12 -0
- package/dist/cli/stack-config.d.ts.map +1 -0
- package/dist/cli/stack-config.js +146 -0
- package/dist/cli/stack-config.js.map +1 -0
- package/dist/cli/types.d.ts +169 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/update.d.ts +3 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +50 -0
- package/dist/cli/update.js.map +1 -0
- package/package.json +48 -0
- package/src/cli/adapters/claude-code.ts +287 -0
- package/src/cli/adapters/cursor.ts +377 -0
- package/src/cli/adapters/vscode.ts +168 -0
- package/src/cli/copy.ts +79 -0
- package/src/cli/dashboard.ts +225 -0
- package/src/cli/diff.ts +44 -0
- package/src/cli/eject.ts +39 -0
- package/src/cli/init.ts +120 -0
- package/src/cli/manifest.ts +45 -0
- package/src/cli/mcp.ts +49 -0
- package/src/cli/prompt.ts +115 -0
- package/src/cli/run/adapters/claude-code.ts +95 -0
- package/src/cli/run/adapters/copilot.ts +97 -0
- package/src/cli/run/adapters/cursor.ts +94 -0
- package/src/cli/run/adapters/index.ts +40 -0
- package/src/cli/run/executor.ts +292 -0
- package/src/cli/run/reporter.ts +129 -0
- package/src/cli/run/schema.ts +595 -0
- package/src/cli/run.ts +137 -0
- package/src/cli/stack-config.ts +180 -0
- package/src/cli/types.ts +207 -0
- package/src/cli/update.ts +75 -0
- package/src/dashboard/astro.config.mjs +6 -0
- package/src/dashboard/package-lock.json +5455 -0
- package/src/dashboard/package.json +14 -0
- package/src/dashboard/public/data/delegations.ndjson +35 -0
- package/src/dashboard/public/data/panels.ndjson +13 -0
- package/src/dashboard/public/data/sessions.ndjson +50 -0
- package/src/dashboard/public/icon-192.png +0 -0
- package/src/dashboard/scripts/generate-seed-data.ts +355 -0
- package/src/dashboard/src/layouts/Layout.astro +25 -0
- package/src/dashboard/src/pages/index.astro +1070 -0
- package/src/dashboard/src/styles/dashboard.css +1078 -0
- package/src/dashboard/tsconfig.json +6 -0
- package/src/orchestrator/agent-workflows/README.md +22 -0
- package/src/orchestrator/agent-workflows/bug-fix.md +128 -0
- package/src/orchestrator/agent-workflows/data-pipeline.md +145 -0
- package/src/orchestrator/agent-workflows/database-migration.md +159 -0
- package/src/orchestrator/agent-workflows/feature-implementation.md +223 -0
- package/src/orchestrator/agent-workflows/performance-optimization.md +125 -0
- package/src/orchestrator/agent-workflows/refactoring.md +142 -0
- package/src/orchestrator/agent-workflows/schema-changes.md +164 -0
- package/src/orchestrator/agent-workflows/security-audit.md +148 -0
- package/src/orchestrator/agent-workflows/shared-delivery-phase.md +33 -0
- package/src/orchestrator/agents/api-designer.agent.md +68 -0
- package/src/orchestrator/agents/architect.agent.md +129 -0
- package/src/orchestrator/agents/content-engineer.agent.md +57 -0
- package/src/orchestrator/agents/copywriter.agent.md +95 -0
- package/src/orchestrator/agents/data-expert.agent.md +63 -0
- package/src/orchestrator/agents/database-engineer.agent.md +62 -0
- package/src/orchestrator/agents/developer.agent.md +66 -0
- package/src/orchestrator/agents/devops-expert.agent.md +57 -0
- package/src/orchestrator/agents/documentation-writer.agent.md +60 -0
- package/src/orchestrator/agents/performance-expert.agent.md +58 -0
- package/src/orchestrator/agents/release-manager.agent.md +72 -0
- package/src/orchestrator/agents/researcher.agent.md +145 -0
- package/src/orchestrator/agents/reviewer.agent.md +62 -0
- package/src/orchestrator/agents/security-expert.agent.md +64 -0
- package/src/orchestrator/agents/seo-specialist.agent.md +67 -0
- package/src/orchestrator/agents/team-lead.agent.md +644 -0
- package/src/orchestrator/agents/testing-expert.agent.md +85 -0
- package/src/orchestrator/agents/ui-ux-expert.agent.md +63 -0
- package/src/orchestrator/copilot-instructions.md +3 -0
- package/src/orchestrator/customizations/AGENT-EXPERTISE.md +325 -0
- package/src/orchestrator/customizations/AGENT-FAILURES.md +69 -0
- package/src/orchestrator/customizations/AGENT-PERFORMANCE.md +58 -0
- package/src/orchestrator/customizations/DISPUTES.md +162 -0
- package/src/orchestrator/customizations/KNOWLEDGE-GRAPH.md +10 -0
- package/src/orchestrator/customizations/LESSONS-LEARNED.md +70 -0
- package/src/orchestrator/customizations/README.md +59 -0
- package/src/orchestrator/customizations/agents/agent-registry.md +46 -0
- package/src/orchestrator/customizations/agents/skill-matrix.md +142 -0
- package/src/orchestrator/customizations/logs/README.md +181 -0
- package/src/orchestrator/customizations/logs/delegations.ndjson +1 -0
- package/src/orchestrator/customizations/logs/panels.ndjson +1 -0
- package/src/orchestrator/customizations/logs/sessions.ndjson +1 -0
- package/src/orchestrator/customizations/project/docs-structure.md +23 -0
- package/src/orchestrator/customizations/project/tracker-config.md +45 -0
- package/src/orchestrator/customizations/project.instructions.md +64 -0
- package/src/orchestrator/customizations/stack/api-config.md +37 -0
- package/src/orchestrator/customizations/stack/cms-config.md +26 -0
- package/src/orchestrator/customizations/stack/data-pipeline-config.md +41 -0
- package/src/orchestrator/customizations/stack/database-config.md +44 -0
- package/src/orchestrator/customizations/stack/deployment-config.md +45 -0
- package/src/orchestrator/customizations/stack/testing-config.md +56 -0
- package/src/orchestrator/instructions/ai-optimization.instructions.md +143 -0
- package/src/orchestrator/instructions/general.instructions.md +194 -0
- package/src/orchestrator/mcp.json +55 -0
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +235 -0
- package/src/orchestrator/prompts/brainstorm.prompt.md +115 -0
- package/src/orchestrator/prompts/bug-fix.prompt.md +141 -0
- package/src/orchestrator/prompts/create-skill.prompt.md +103 -0
- package/src/orchestrator/prompts/generate-task-spec.prompt.md +154 -0
- package/src/orchestrator/prompts/implement-feature.prompt.md +124 -0
- package/src/orchestrator/prompts/metrics-report.prompt.md +142 -0
- package/src/orchestrator/prompts/quick-refinement.prompt.md +137 -0
- package/src/orchestrator/prompts/resolve-pr-comments.prompt.md +100 -0
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +164 -0
- package/src/orchestrator/skills/agent-hooks/SKILL.md +147 -0
- package/src/orchestrator/skills/agent-memory/SKILL.md +144 -0
- package/src/orchestrator/skills/api-patterns/SKILL.md +106 -0
- package/src/orchestrator/skills/browser-testing/SKILL.md +203 -0
- package/src/orchestrator/skills/code-commenting/SKILL.md +133 -0
- package/src/orchestrator/skills/contentful-cms/SKILL.md +43 -0
- package/src/orchestrator/skills/context-map/SKILL.md +135 -0
- package/src/orchestrator/skills/convex-database/SKILL.md +80 -0
- package/src/orchestrator/skills/data-engineering/SKILL.md +99 -0
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +49 -0
- package/src/orchestrator/skills/documentation-standards/SKILL.md +85 -0
- package/src/orchestrator/skills/fast-review/SKILL.md +327 -0
- package/src/orchestrator/skills/frontend-design/SKILL.md +42 -0
- package/src/orchestrator/skills/jira-management/SKILL.md +168 -0
- package/src/orchestrator/skills/memory-merger/SKILL.md +123 -0
- package/src/orchestrator/skills/nextjs-patterns/SKILL.md +75 -0
- package/src/orchestrator/skills/nx-workspace/SKILL.md +192 -0
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +184 -0
- package/src/orchestrator/skills/panel-majority-vote/panel-report.template.md +38 -0
- package/src/orchestrator/skills/performance-optimization/SKILL.md +101 -0
- package/src/orchestrator/skills/react-development/SKILL.md +117 -0
- package/src/orchestrator/skills/sanity-cms/SKILL.md +18 -0
- package/src/orchestrator/skills/security-hardening/SKILL.md +118 -0
- package/src/orchestrator/skills/self-improvement/SKILL.md +137 -0
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -0
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +205 -0
- package/src/orchestrator/skills/slack-notifications/SKILL.md +211 -0
- package/src/orchestrator/skills/strapi-cms/SKILL.md +43 -0
- package/src/orchestrator/skills/supabase-database/SKILL.md +24 -0
- package/src/orchestrator/skills/task-management/SKILL.md +143 -0
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +317 -0
- package/src/orchestrator/skills/teams-notifications/SKILL.md +249 -0
- package/src/orchestrator/skills/testing-workflow/SKILL.md +134 -0
- package/src/orchestrator/skills/validation-gates/SKILL.md +100 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Handle follow-up refinements after a roadmap task — bug fixes, UI tweaks, polish, and adjustments that are too small for Linear tracking.'
|
|
3
|
+
agent: Team Lead
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Follow-Up Refinement
|
|
7
|
+
|
|
8
|
+
You are the Team Lead. Handle the follow-up refinement described below. This is a **post-task adjustment** — a bug fix, UI tweak, or polish item that came up after reviewing a completed roadmap task. It does NOT require Linear tracking.
|
|
9
|
+
|
|
10
|
+
## Request
|
|
11
|
+
|
|
12
|
+
{{followUpRequest}}
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## How Follow-Ups Differ from Roadmap Tasks
|
|
17
|
+
|
|
18
|
+
| Aspect | Roadmap Task | Follow-Up |
|
|
19
|
+
|--------|-------------|-----------|
|
|
20
|
+
| Linear issues | Required (hard gate) | Depends on scope (see triage) |
|
|
21
|
+
| Panel review | For high-stakes changes | Only if security/data-related |
|
|
22
|
+
| Documentation updates | Roadmap + known issues + ADRs | Only if behavior changes significantly |
|
|
23
|
+
| Scope | Multi-step feature | Focused fix or adjustment |
|
|
24
|
+
| Branch strategy | Dedicated feature branch | Current branch (already in progress) |
|
|
25
|
+
|
|
26
|
+
**Despite being lighter-weight, follow-ups still require the same code quality and verification standards.** Never skip linting, testing, or browser checks just because the change is "small."
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
### 1. Triage: Decide Tracking Level
|
|
31
|
+
|
|
32
|
+
Before doing anything, decide whether this follow-up needs Linear tracking:
|
|
33
|
+
|
|
34
|
+
**Create a Linear issue if ANY of these are true:**
|
|
35
|
+
- The change affects user-visible behavior (not just cosmetic)
|
|
36
|
+
- It touches more than 2–3 files
|
|
37
|
+
- It modifies shared library code (`libs/`)
|
|
38
|
+
- It changes data queries, API routes, or Server Actions
|
|
39
|
+
- It could introduce regressions in other features
|
|
40
|
+
- You want a record for future reference (e.g., "why was this changed?")
|
|
41
|
+
|
|
42
|
+
**Skip Linear if ALL of these are true:**
|
|
43
|
+
- Pure cosmetic/spacing/copy tweak
|
|
44
|
+
- Isolated to a single component or page
|
|
45
|
+
- No behavioral change
|
|
46
|
+
- Trivial to verify visually
|
|
47
|
+
|
|
48
|
+
If creating a Linear issue, use:
|
|
49
|
+
- **Title**: `[Follow-up] Short description`
|
|
50
|
+
- **Label**: agent name + `follow-up`
|
|
51
|
+
- **Priority**: Low or Medium
|
|
52
|
+
- **Description**: What changed, why, and which files
|
|
53
|
+
|
|
54
|
+
### 2. Understand the Request
|
|
55
|
+
|
|
56
|
+
Before touching any code:
|
|
57
|
+
|
|
58
|
+
1. **Clarify scope** — Identify exactly which pages, components, or behaviors need to change
|
|
59
|
+
2. **Find affected files** — Search the codebase for the relevant components, styles, queries, and tests
|
|
60
|
+
3. **Check known issues** — Scan `docs/KNOWN-ISSUES.md` in case this is a documented limitation
|
|
61
|
+
4. **Read lessons learned** — Check `.github/customizations/LESSONS-LEARNED.md` for relevant pitfalls before starting
|
|
62
|
+
5. **Assess complexity** — If the request turns out to be larger than expected (touches >5 files, needs a migration, or affects auth/security), escalate it:
|
|
63
|
+
- Inform the user that this should be a tracked task
|
|
64
|
+
- Create a Linear issue (if not already created in triage) and switch to the `implement-feature` workflow
|
|
65
|
+
|
|
66
|
+
### 3. Plan the Fix
|
|
67
|
+
|
|
68
|
+
Think before you act:
|
|
69
|
+
|
|
70
|
+
1. **Identify root cause** — For bugs, find why it happens, not just where. For UI tweaks, understand the current styling/layout chain
|
|
71
|
+
2. **Check for shared impact** — Will the fix affect other pages or apps? Check component usage across the codebase
|
|
72
|
+
3. **Determine the minimal change** — Follow the principle of least surprise. Change only what's necessary
|
|
73
|
+
4. **Reuse existing patterns** — Use components, utilities, and styles that already exist in the codebase. Never introduce a new pattern for a one-off fix
|
|
74
|
+
|
|
75
|
+
### 4. Implement
|
|
76
|
+
|
|
77
|
+
Delegate to the appropriate specialist agent(s). Since follow-ups are scoped and focused, prefer **sub-agents** (inline) over background agents.
|
|
78
|
+
|
|
79
|
+
#### Delegation Prompt Must Include
|
|
80
|
+
|
|
81
|
+
- **What to fix** — clear description of the problem and desired outcome
|
|
82
|
+
- **Where** — exact file paths to read and modify
|
|
83
|
+
- **How to verify** — what the result should look like or how to test it
|
|
84
|
+
- **Boundaries** — "Only modify files listed above. Do not refactor unrelated code."
|
|
85
|
+
- **Self-improvement reminder** — include per `general.instructions.md` § Self-Improvement Protocol
|
|
86
|
+
|
|
87
|
+
#### Implementation Rules
|
|
88
|
+
|
|
89
|
+
- **No scope creep** — Fix what was asked. If you notice other issues, note them but don't fix them in this pass
|
|
90
|
+
- **DRY** — Search before creating. Reuse existing components and utilities
|
|
91
|
+
- **Visual consistency** — Match the existing design system (spacing, colors, typography)
|
|
92
|
+
- **Cross-app check** — If the change is in shared code (`libs/`), verify it works for both apps
|
|
93
|
+
- **Accessibility** — Don't regress keyboard navigation, screen reader support, or contrast ratios
|
|
94
|
+
|
|
95
|
+
### 5. Validate
|
|
96
|
+
|
|
97
|
+
> Load the **validation-gates** skill for detailed steps on each gate.
|
|
98
|
+
|
|
99
|
+
Every follow-up, no matter how small, must pass these checks:
|
|
100
|
+
|
|
101
|
+
1. **Deterministic Checks** — `yarn nx run <project>:lint --fix`, `:test`, `:build` — all zero errors
|
|
102
|
+
2. **Browser Testing** (MANDATORY for any visual change) — clear cache, start server, verify scenario + responsive + screenshot evidence
|
|
103
|
+
3. **Regression Check** — if shared component/library modified, run tests for all consuming projects and browser-test at least one page per affected app
|
|
104
|
+
|
|
105
|
+
### 6. Delivery
|
|
106
|
+
|
|
107
|
+
If triage determined this follow-up needs Linear tracking, follow the **Delivery Outcome** defined in `general.instructions.md` — commit, push, open PR (not merged), and link to Linear.
|
|
108
|
+
|
|
109
|
+
If triage determined no Linear tracking is needed (pure cosmetic/isolated/trivial), commit the changes to the current working branch. A dedicated branch and PR are not required because the Team Lead will include these changes in the parent task's existing PR — the "every change goes through a PR" rule is still satisfied via the parent PR.
|
|
110
|
+
|
|
111
|
+
### 7. Escalation Triggers
|
|
112
|
+
|
|
113
|
+
Stop the follow-up workflow and switch to a full roadmap task if:
|
|
114
|
+
|
|
115
|
+
- The fix requires a **database migration**
|
|
116
|
+
- The fix involves **authentication or authorization** changes
|
|
117
|
+
- The fix touches **more than 5 files** across multiple libraries
|
|
118
|
+
- The fix introduces a **new dependency** or **new API endpoint**
|
|
119
|
+
- The fix changes **data models** (CMS schemas, database tables)
|
|
120
|
+
- You discover the "small fix" is actually a **systemic issue** requiring architectural changes
|
|
121
|
+
|
|
122
|
+
When escalating, explain to the user what you found and why it needs proper tracking.
|
|
123
|
+
|
|
124
|
+
### 8. Completion
|
|
125
|
+
|
|
126
|
+
The follow-up is complete when:
|
|
127
|
+
|
|
128
|
+
- [ ] The specific request is resolved
|
|
129
|
+
- [ ] Linear issue created and moved to Done (if triage determined tracking was needed)
|
|
130
|
+
- [ ] Lint, test, and build pass for all affected projects
|
|
131
|
+
- [ ] **Dev server started with CLEAN cache** (`rm -rf .next && yarn nx reset` before serving)
|
|
132
|
+
- [ ] **Visual changes verified in Chrome with screenshot taken as proof**
|
|
133
|
+
- [ ] No regressions in adjacent functionality
|
|
134
|
+
- [ ] Shared component changes tested across all consuming apps
|
|
135
|
+
- [ ] Delivery Outcome completed if tracked (see `general.instructions.md`) — branch pushed, PR opened (not merged), Linear linked
|
|
136
|
+
- [ ] Lessons learned captured if any retries occurred
|
|
137
|
+
- [ ] Known issues updated if a new limitation was discovered
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Resolve GitHub PR review comments by reading them, grouping by file, and applying fixes systematically.'
|
|
3
|
+
agent: Team Lead
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Resolve PR Comments
|
|
7
|
+
|
|
8
|
+
You are the Team Lead. A pull request has review comments that need to be resolved. Read the comments, group them by file, and delegate fixes efficiently.
|
|
9
|
+
|
|
10
|
+
## PR Reference
|
|
11
|
+
|
|
12
|
+
{{prReference}}
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Phase 1: Gather Comments
|
|
19
|
+
|
|
20
|
+
1. **Read the PR** — Use `gh pr view <number> --comments` and `gh pr diff <number>` to understand the full context
|
|
21
|
+
2. **List review comments** — Use `gh api repos/{owner}/{repo}/pulls/{number}/comments` to get all inline review comments
|
|
22
|
+
3. **Group by file** — Organize comments by file path. Comments on the same file should be resolved together
|
|
23
|
+
4. **Classify each comment:**
|
|
24
|
+
- **Must-fix** — Correctness issues, security concerns, logic errors, test gaps
|
|
25
|
+
- **Should-fix** — Style issues, naming improvements, missing edge cases
|
|
26
|
+
- **Discussion** — Questions, alternative suggestions, design debates (flag for human)
|
|
27
|
+
|
|
28
|
+
### Phase 2: Plan Fixes
|
|
29
|
+
|
|
30
|
+
1. **Map file ownership** — Ensure no two parallel agents touch the same file
|
|
31
|
+
2. **Check dependencies** — Some comments may depend on others (e.g., "rename this type" affects all files using it)
|
|
32
|
+
3. **Order by dependency** — Resolve foundational changes first (types, shared utilities) before downstream files
|
|
33
|
+
4. **Estimate scope** — If >10 must-fix comments, consider splitting into multiple delegation rounds
|
|
34
|
+
|
|
35
|
+
### Phase 3: Apply Fixes
|
|
36
|
+
|
|
37
|
+
For each file group, delegate to the appropriate specialist agent:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Fix the following PR review comments in [file path]:
|
|
41
|
+
|
|
42
|
+
1. [Comment 1]: [reviewer's feedback] (Line X)
|
|
43
|
+
2. [Comment 2]: [reviewer's feedback] (Line Y)
|
|
44
|
+
|
|
45
|
+
Context: This file is part of [feature/area]. The PR is [brief PR description].
|
|
46
|
+
|
|
47
|
+
Acceptance criteria:
|
|
48
|
+
- [ ] Each comment is addressed (fixed or documented why not)
|
|
49
|
+
- [ ] No new lint/type errors introduced
|
|
50
|
+
- [ ] Existing tests still pass
|
|
51
|
+
- [ ] New tests added if the comment identified a gap
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Discussion comments** — Do not fix these. Instead, compile them into a summary for the human reviewer with your recommendation.
|
|
55
|
+
|
|
56
|
+
### Phase 4: Verify & Report
|
|
57
|
+
|
|
58
|
+
1. **Run verification** — `yarn nx affected -t lint,test,build` on all affected projects
|
|
59
|
+
2. **Commit fixes** — Use descriptive commit messages referencing the PR: `TAS-XX: Address PR review — [summary]`
|
|
60
|
+
3. **Push to the same branch** — The PR updates automatically
|
|
61
|
+
4. **Report back** — Provide a structured summary of what was resolved
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
|
|
65
|
+
After resolving comments, report:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
## PR Comment Resolution: #<number>
|
|
69
|
+
|
|
70
|
+
### Resolved (Must-Fix)
|
|
71
|
+
| File | Comment | Resolution |
|
|
72
|
+
|------|---------|------------|
|
|
73
|
+
| path/to/file.ts | [feedback summary] | [what was changed] |
|
|
74
|
+
|
|
75
|
+
### Resolved (Should-Fix)
|
|
76
|
+
| File | Comment | Resolution |
|
|
77
|
+
|------|---------|------------|
|
|
78
|
+
| path/to/file.ts | [feedback summary] | [what was changed] |
|
|
79
|
+
|
|
80
|
+
### Flagged for Discussion
|
|
81
|
+
| File | Comment | Recommendation |
|
|
82
|
+
|------|---------|---------------|
|
|
83
|
+
| path/to/file.ts | [question/debate] | [your take + options] |
|
|
84
|
+
|
|
85
|
+
### Verification
|
|
86
|
+
- Lint: PASS/FAIL
|
|
87
|
+
- Tests: PASS/FAIL
|
|
88
|
+
- Build: PASS/FAIL
|
|
89
|
+
|
|
90
|
+
### Commits
|
|
91
|
+
- `abc1234` TAS-XX: Address PR review — [summary]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Rules
|
|
95
|
+
|
|
96
|
+
- **Never dismiss a must-fix comment** — if you disagree, flag it for discussion instead
|
|
97
|
+
- **Preserve the reviewer's intent** — don't just technically satisfy the comment, address the underlying concern
|
|
98
|
+
- **Don't over-fix** — resolve only what was commented on. Save unrelated improvements for a separate PR
|
|
99
|
+
- **Respond to every comment** — nothing should be silently ignored
|
|
100
|
+
- **Self-improvement** — Follow `general.instructions.md` § Self-Improvement Protocol
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessibility-standards
|
|
3
|
+
description: "WCAG 2.2 Level AA accessibility patterns for React/HTML/CSS. Use when creating or modifying UI components, forms, navigation, tables, images, or any user-facing elements. Covers keyboard navigation, screen reader semantics, low vision contrast, voice access, and inclusive language."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Accessibility Standards
|
|
7
|
+
|
|
8
|
+
Code must conform to [WCAG 2.2 Level AA](https://www.w3.org/TR/WCAG22/). Go beyond minimal conformance wherever possible.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Before generating code, plan how to implement it accessibly.
|
|
13
|
+
2. After generating code, review against WCAG 2.2 and these patterns. Iterate until compliant.
|
|
14
|
+
3. Inform the user the code was built with accessibility in mind but may still have issues. Suggest [Accessibility Insights](https://accessibilityinsights.io/) for testing.
|
|
15
|
+
|
|
16
|
+
## Inclusive Language
|
|
17
|
+
|
|
18
|
+
- Use people-first language ("person using a screen reader," not "blind user").
|
|
19
|
+
- Avoid stereotypes or assumptions about ability.
|
|
20
|
+
- Flag uncertain implementations — include reasoning or references to standards.
|
|
21
|
+
|
|
22
|
+
## Cognitive
|
|
23
|
+
|
|
24
|
+
- Prefer plain language.
|
|
25
|
+
- Use consistent page structure (landmarks) across the application.
|
|
26
|
+
- Keep navigation items in the same order across pages.
|
|
27
|
+
- Keep the interface clean — reduce unnecessary distractions.
|
|
28
|
+
|
|
29
|
+
## Keyboard
|
|
30
|
+
|
|
31
|
+
- All interactive elements must be keyboard navigable with predictable focus order (reading order).
|
|
32
|
+
- Focus must be clearly visible at all times.
|
|
33
|
+
- All interactive elements must be operable (buttons, links, dropdowns, etc.).
|
|
34
|
+
- Static (non-interactive) elements should NOT have `tabindex`. Exception: elements receiving programmatic focus (e.g., headings) get `tabindex="-1"`.
|
|
35
|
+
- Hidden elements must not be keyboard focusable.
|
|
36
|
+
|
|
37
|
+
### Composite Components (grids, listboxes, menus, tabs, toolbars)
|
|
38
|
+
|
|
39
|
+
- Tab stop on the container with appropriate interactive role.
|
|
40
|
+
- Arrow keys navigate children (roving tabindex or `aria-activedescendant`).
|
|
41
|
+
- On focus: show selected child, or previously focused child, or first interactive child.
|
|
42
|
+
|
|
43
|
+
### Bypass Blocks
|
|
44
|
+
|
|
45
|
+
Provide "Skip to main" link as first focusable element:
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<header>
|
|
49
|
+
<a href="#maincontent" class="sr-only">Skip to main</a>
|
|
50
|
+
</header>
|
|
51
|
+
<main id="maincontent"></main>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```css
|
|
55
|
+
.sr-only:not(:focus):not(:active) {
|
|
56
|
+
clip: rect(0 0 0 0);
|
|
57
|
+
clip-path: inset(50%);
|
|
58
|
+
height: 1px;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
position: absolute;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
width: 1px;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Common Keys
|
|
67
|
+
|
|
68
|
+
| Key | Action |
|
|
69
|
+
|-----|--------|
|
|
70
|
+
| `Tab` | Next interactive element |
|
|
71
|
+
| `Arrow` | Navigate within composite component |
|
|
72
|
+
| `Enter` | Activate focused control |
|
|
73
|
+
| `Escape` | Close open surfaces (dialogs, menus) |
|
|
74
|
+
|
|
75
|
+
### Roving Tabindex Pattern
|
|
76
|
+
|
|
77
|
+
1. Initial: `tabindex="0"` on first focusable child, `tabindex="-1"` on rest.
|
|
78
|
+
2. On arrow key: set previous to `-1`, new target to `0`, call `element.focus()`.
|
|
79
|
+
|
|
80
|
+
### `aria-activedescendant` Pattern
|
|
81
|
+
|
|
82
|
+
- Container has `tabindex="0"` and `aria-activedescendant="IDREF"`.
|
|
83
|
+
- CSS draws focus outline on referenced element.
|
|
84
|
+
- Arrow keys update `aria-activedescendant`.
|
|
85
|
+
|
|
86
|
+
## Low Vision
|
|
87
|
+
|
|
88
|
+
- Dark text on light backgrounds (or vice versa).
|
|
89
|
+
- Text contrast ≥4.5:1 (≥3:1 for large text: 18.5px bold or 24px).
|
|
90
|
+
- Graphics/controls contrast ≥3:1 with adjacent colors.
|
|
91
|
+
- Control state indicators (pressed, focus, checked) ≥3:1 contrast.
|
|
92
|
+
- Color must NOT be the only way to convey information — use text/shapes in addition.
|
|
93
|
+
|
|
94
|
+
## Screen Reader
|
|
95
|
+
|
|
96
|
+
- All elements must convey correct semantics (name, role, value, states/properties). Prefer native HTML; use ARIA when necessary.
|
|
97
|
+
- Use landmarks: `<header>`, `<nav>`, `<main>`, `<footer>`.
|
|
98
|
+
- Use headings (`<h1>`–`<h6>`) to introduce sections. One `<h1>` per page. Avoid skipping levels.
|
|
99
|
+
|
|
100
|
+
## Voice Access
|
|
101
|
+
|
|
102
|
+
- Accessible name of interactive elements must contain the visual label (so voice users can say "Click [label]").
|
|
103
|
+
- `aria-label` must contain the visual label text.
|
|
104
|
+
|
|
105
|
+
## Forms
|
|
106
|
+
|
|
107
|
+
- Labels must accurately describe control purpose.
|
|
108
|
+
- Required fields: asterisk in label + `aria-required="true"`.
|
|
109
|
+
- Errors: `aria-invalid="true"` on invalid fields. Error messages via `aria-describedby`.
|
|
110
|
+
- Inline errors next to fields (common) or form-level errors at top identifying specific fields.
|
|
111
|
+
- Submit buttons should NOT be disabled — trigger error messages instead.
|
|
112
|
+
- On submit with invalid input, focus the first invalid field.
|
|
113
|
+
|
|
114
|
+
## Graphics and Images
|
|
115
|
+
|
|
116
|
+
- All graphics must have correct role (`<img>` implicit, `<svg>` needs `role="img"`, icon fonts/emojis need `role="img"` on `<span>`).
|
|
117
|
+
- **Informative**: `alt` text conveying meaning/purpose (concise, meaningful). Avoid `title` attribute.
|
|
118
|
+
- **Decorative**: `alt=""` for `<img>`, `aria-hidden="true"` for `role="img"`.
|
|
119
|
+
|
|
120
|
+
## Input Labels
|
|
121
|
+
|
|
122
|
+
- All interactive elements need visual labels.
|
|
123
|
+
- `<label for="id">` for form inputs.
|
|
124
|
+
- Multiple controls with same label (e.g., "Remove"): use `aria-label` for disambiguation.
|
|
125
|
+
- Help text: associate via `aria-describedby`.
|
|
126
|
+
|
|
127
|
+
## Navigation
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<nav>
|
|
131
|
+
<ul>
|
|
132
|
+
<li>
|
|
133
|
+
<button aria-expanded="false" tabindex="0">Section 1</button>
|
|
134
|
+
<ul hidden>
|
|
135
|
+
<li><a href="..." tabindex="-1">Link 1</a></li>
|
|
136
|
+
</ul>
|
|
137
|
+
</li>
|
|
138
|
+
<li>
|
|
139
|
+
<button aria-expanded="false" tabindex="-1">Section 2</button>
|
|
140
|
+
<ul hidden>
|
|
141
|
+
<li><a href="..." tabindex="-1">Link 1</a></li>
|
|
142
|
+
</ul>
|
|
143
|
+
</li>
|
|
144
|
+
</ul>
|
|
145
|
+
</nav>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- Navigation menus use `<nav>` with `<ul>`, NOT `menu`/`menubar` roles.
|
|
149
|
+
- Toggle `aria-expanded` on expand/collapse.
|
|
150
|
+
- Roving tabindex for main items (arrow across), arrow down into sub-menus.
|
|
151
|
+
- `Escape` closes expanded menus.
|
|
152
|
+
|
|
153
|
+
## Page Title
|
|
154
|
+
|
|
155
|
+
- Defined in `<title>` in `<head>`.
|
|
156
|
+
- Describes page purpose, unique per page.
|
|
157
|
+
- Front-load unique information: `"[Page] - [Section] - [Site]"`.
|
|
158
|
+
|
|
159
|
+
## Tables and Grids
|
|
160
|
+
|
|
161
|
+
- Column headers via `<th>` in first `<tr>`. Row headers via `<th>` in each row.
|
|
162
|
+
- `role="gridcell"` must be nested within `role="row"`.
|
|
163
|
+
- Prefer simple tables (one set of headers, no spanning cells).
|
|
164
|
+
- Use `<table>` for static data, `role="grid"` for interactive data (date pickers, calendars).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-hooks
|
|
3
|
+
description: "Lifecycle hooks for AI agent sessions — reusable actions that run at specific points (session start, session end, pre-delegation, post-delegation). Defines what to do at each lifecycle event so agents behave consistently."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Lifecycle Hooks
|
|
7
|
+
|
|
8
|
+
Hooks are **standardized actions** that agents execute at specific points during their lifecycle. They enforce consistency across sessions and prevent common oversights (missing lessons, forgotten checkpoints, untracked issues).
|
|
9
|
+
|
|
10
|
+
## Hook Execution Model
|
|
11
|
+
|
|
12
|
+
Hooks are **conventions, not automated triggers**. Agents must explicitly follow them. The Team Lead includes hook reminders in delegation prompts; specialist agents include them in their own workflow.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Session Lifecycle:
|
|
16
|
+
on-session-start → [work loop] → on-session-end
|
|
17
|
+
↓ ↑
|
|
18
|
+
on-pre-delegate → on-post-delegate
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Hook: on-session-start
|
|
24
|
+
|
|
25
|
+
**When:** First action in any agent session (Team Lead or specialist).
|
|
26
|
+
|
|
27
|
+
### Actions
|
|
28
|
+
|
|
29
|
+
1. **Read lessons learned** — Scan `.github/customizations/LESSONS-LEARNED.md` for entries relevant to the current task domain. Apply proactively.
|
|
30
|
+
2. **Check for checkpoint** — If `docs/SESSION-CHECKPOINT.md` exists, read it. Resume from last known state instead of re-analyzing.
|
|
31
|
+
3. **Check dead letter queue** — Scan `.github/customizations/AGENT-FAILURES.md` for pending failures related to the current scope.
|
|
32
|
+
4. **Load domain skills** — Based on the task description, load the appropriate skills before writing code. Don't start coding without the relevant skill loaded.
|
|
33
|
+
|
|
34
|
+
### Template for Delegation Prompts
|
|
35
|
+
|
|
36
|
+
Include this reminder in every delegation:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
**Session Start:** Read `.github/customizations/LESSONS-LEARNED.md` before starting.
|
|
40
|
+
Check `docs/SESSION-CHECKPOINT.md` for prior state. Load relevant skills
|
|
41
|
+
before writing code.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Hook: on-session-end
|
|
47
|
+
|
|
48
|
+
**When:** Before the agent yields control back to the user or completes its task.
|
|
49
|
+
|
|
50
|
+
### Actions
|
|
51
|
+
|
|
52
|
+
1. **Log the session** — Append a JSON line to `.github/customizations/logs/sessions.ndjson` with: agent name, task summary, files changed, duration estimate, outcome (success/partial/failed), and lessons count.
|
|
53
|
+
2. **Save checkpoint** (Team Lead only) — If work is incomplete, write `docs/SESSION-CHECKPOINT.md` with current state so the next session can resume. Load **session-checkpoints** skill for format.
|
|
54
|
+
3. **Verify lessons captured** — If any retries occurred during the session, confirm that each retry resulted in a lesson entry in `LESSONS-LEARNED.md`.
|
|
55
|
+
4. **Memory merge check** — If `LESSONS-LEARNED.md` has grown significantly (5+ new entries this session), flag for memory merge consideration.
|
|
56
|
+
5. **Clean up** — Remove any temporary files created during the session (e.g., test fixtures, debug outputs).
|
|
57
|
+
|
|
58
|
+
### Template for Delegation Prompts
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
**Session End:** Log your session to `.github/customizations/logs/sessions.ndjson`.
|
|
62
|
+
If you retried anything with a different approach that worked, add a lesson
|
|
63
|
+
to `.github/customizations/LESSONS-LEARNED.md`. Clean up temp files.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Hook: on-pre-delegate
|
|
69
|
+
|
|
70
|
+
**When:** Team Lead only — before every delegation (sub-agent or background agent).
|
|
71
|
+
|
|
72
|
+
### Actions
|
|
73
|
+
|
|
74
|
+
1. **Linear issue exists** — Verify the task has a Linear issue. If not, create one first.
|
|
75
|
+
2. **File partition clean** — Confirm no overlap with other active agents' file ownership.
|
|
76
|
+
3. **Dependencies verified** — All prerequisite tasks are marked Done with independent verification.
|
|
77
|
+
4. **Prompt is specific** — Includes: objective, file paths, acceptance criteria, patterns to follow, self-improvement reminder.
|
|
78
|
+
5. **Context map** (optional, for complex tasks) — If modifying 5+ files, generate a context map first (load **context-map** skill).
|
|
79
|
+
6. **Cost check** — Estimate token usage based on task complexity and model tier. Check against session budget.
|
|
80
|
+
|
|
81
|
+
### Quick Checklist
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Pre-Delegate:
|
|
85
|
+
☐ Linear issue ID included
|
|
86
|
+
☐ File partition specified
|
|
87
|
+
☐ Dependencies are Done
|
|
88
|
+
☐ Prompt has file paths + acceptance criteria
|
|
89
|
+
☐ Self-improvement reminder included
|
|
90
|
+
☐ Budget check passes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Hook: on-post-delegate
|
|
96
|
+
|
|
97
|
+
**When:** Team Lead only — after receiving results from a delegated agent.
|
|
98
|
+
|
|
99
|
+
### Actions
|
|
100
|
+
|
|
101
|
+
0. **Fast review (mandatory)** — Run the `fast-review` skill against the agent's output. This is a **non-skippable gate**. See the fast-review skill for the full procedure (single reviewer sub-agent, automatic retry, escalation). Only after the fast review passes do you proceed to the remaining post-delegate actions below.
|
|
102
|
+
1. **Verify output** — Read changed files. Check that changes stay within the agent's file partition.
|
|
103
|
+
2. **Run verification** — Execute appropriate checks: lint, type-check, tests, or visual inspection.
|
|
104
|
+
3. **Check acceptance criteria** — Compare output against the Linear issue's acceptance criteria. Each criterion must be independently verified.
|
|
105
|
+
4. **Discovered issues tracked** — Verify the agent followed the Discovered Issues Policy. If they found issues, check that they're in KNOWN-ISSUES.md or a new Linear ticket.
|
|
106
|
+
5. **Lessons captured** — If the agent retried anything, verify a lesson was added to LESSONS-LEARNED.md.
|
|
107
|
+
6. **Update Linear** — Move the issue to Done (if passing) or add failure notes and re-delegate (if failing).
|
|
108
|
+
|
|
109
|
+
### Quick Checklist
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Post-Delegate:
|
|
113
|
+
☐ Changed files reviewed
|
|
114
|
+
☐ Files within partition
|
|
115
|
+
☐ Lint/test/build passes
|
|
116
|
+
☐ Fast review PASS (mandatory — load fast-review skill)
|
|
117
|
+
☐ Acceptance criteria met
|
|
118
|
+
☐ Discovered issues tracked (not ignored)
|
|
119
|
+
☐ Lessons captured (if retries occurred)
|
|
120
|
+
☐ Issue updated
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Hook Integration
|
|
126
|
+
|
|
127
|
+
### For Team Lead
|
|
128
|
+
|
|
129
|
+
The on-pre-delegate and on-post-delegate hooks are already encoded in the Team Lead's orchestration workflow. Reference this skill to ensure consistency.
|
|
130
|
+
|
|
131
|
+
### For Specialist Agents
|
|
132
|
+
|
|
133
|
+
Include on-session-start and on-session-end actions in every delegation prompt. Use the templates above.
|
|
134
|
+
|
|
135
|
+
### For Workflow Templates
|
|
136
|
+
|
|
137
|
+
Each workflow's **Compound phase** naturally serves as the on-session-end hook for that workflow type. The Compound phase steps should include session logging, lesson verification, and memory merge checks.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Anti-Patterns
|
|
142
|
+
|
|
143
|
+
- **Skipping on-session-start** — Leads to repeated mistakes already documented in lessons learned
|
|
144
|
+
- **Forgetting session logging** — Makes performance tracking and agent improvement impossible
|
|
145
|
+
- **Partial post-delegate checks** — "It compiled, ship it" without checking acceptance criteria
|
|
146
|
+
- **No cleanup** — Temp files accumulate and confuse future sessions
|
|
147
|
+
- **Hooks as blockers** — Hooks should add ~2 minutes overhead, not 20. If a hook takes too long, skip the optional parts
|