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,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slack-notifications
|
|
3
|
+
description: "Slack MCP integration for agent-to-human notifications and bi-directional communication. Use when agents need to post progress updates, request approvals, or read user responses via Slack channels and threads."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Slack Notifications
|
|
7
|
+
|
|
8
|
+
Agent communication patterns via the Slack MCP server. Enables agents to post progress updates, request human approvals, and read responses — all through Slack channels and threads.
|
|
9
|
+
|
|
10
|
+
## MCP Server
|
|
11
|
+
|
|
12
|
+
| Field | Value |
|
|
13
|
+
|-------|-------|
|
|
14
|
+
| **URL** | `https://mcp.slack.com/mcp` |
|
|
15
|
+
| **Type** | Streamable HTTP (JSON-RPC 2.0) |
|
|
16
|
+
| **Auth** | OAuth 2.0 via registered Slack app (`client_id` + `client_secret`) |
|
|
17
|
+
| **Supported clients** | Claude.ai, Claude Code, Cursor, Perplexity |
|
|
18
|
+
|
|
19
|
+
### Required OAuth Scopes
|
|
20
|
+
|
|
21
|
+
The Slack app must be granted scopes for the operations agents will perform:
|
|
22
|
+
|
|
23
|
+
| Scope | Purpose |
|
|
24
|
+
|-------|---------|
|
|
25
|
+
| `channels:read` | List and search public channels |
|
|
26
|
+
| `channels:history` | Read messages in public channels |
|
|
27
|
+
| `chat:write` | Post messages and replies |
|
|
28
|
+
| `users:read` | Look up user profiles for mentions |
|
|
29
|
+
| `reactions:read` | Read emoji reactions (approval signals) |
|
|
30
|
+
| `reactions:write` | Add emoji reactions (acknowledgments) |
|
|
31
|
+
| `search:read` | Search messages and files |
|
|
32
|
+
|
|
33
|
+
Admin approval is required. Work with the workspace admin to install the app.
|
|
34
|
+
|
|
35
|
+
## Available MCP Tools
|
|
36
|
+
|
|
37
|
+
The Slack MCP server exposes tools for:
|
|
38
|
+
|
|
39
|
+
- **Search** — `slack_search_messages`, `slack_search_channels`, `slack_search_users`
|
|
40
|
+
- **Read** — `slack_get_channel_history`, `slack_get_thread_replies`, `slack_get_channel_info`
|
|
41
|
+
- **Write** — `slack_post_message`, `slack_reply_to_thread`, `slack_add_reaction`
|
|
42
|
+
- **Canvases** — `slack_create_canvas`, `slack_update_canvas`
|
|
43
|
+
|
|
44
|
+
Tool names may vary by MCP server version. Use tool discovery to list available tools at runtime.
|
|
45
|
+
|
|
46
|
+
## Agent Notification Patterns
|
|
47
|
+
|
|
48
|
+
### Progress Updates
|
|
49
|
+
|
|
50
|
+
Post structured progress updates to a designated channel:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Channel: #agent-updates (or project-specific channel)
|
|
54
|
+
Format:
|
|
55
|
+
🔄 **Task:** TAS-42 — Add price filter component
|
|
56
|
+
**Status:** In progress — implementing unit tests
|
|
57
|
+
**Files changed:** 3 (PriceFilter.tsx, PriceFilter.test.tsx, index.ts)
|
|
58
|
+
**ETA:** ~5 minutes
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Completion Notifications
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
✅ **Task:** TAS-42 — Add price filter component
|
|
65
|
+
**Status:** Complete — PR opened
|
|
66
|
+
**PR:** https://github.com/org/repo/pull/123
|
|
67
|
+
**Summary:** Added PriceRangeFilter with 4 range options, 12 unit tests passing
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Error / Blocking Notifications
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
🚨 **Task:** TAS-42 — Add price filter component
|
|
74
|
+
**Status:** Blocked — needs human input
|
|
75
|
+
**Issue:** Cannot determine correct price ranges for the market
|
|
76
|
+
**Action needed:** Reply in this thread with the desired price range values
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Bi-Directional Communication
|
|
80
|
+
|
|
81
|
+
### Human-in-the-Loop Approval
|
|
82
|
+
|
|
83
|
+
When an agent needs approval before proceeding (destructive operations, production deployments, large refactors):
|
|
84
|
+
|
|
85
|
+
1. **Post approval request** to the channel with clear options:
|
|
86
|
+
```
|
|
87
|
+
⏳ **Approval Required**
|
|
88
|
+
Task: TAS-42 — Database migration adds `price_range` column
|
|
89
|
+
Action: Run migration on production database
|
|
90
|
+
|
|
91
|
+
React with:
|
|
92
|
+
✅ — Approve and proceed
|
|
93
|
+
❌ — Reject and stop
|
|
94
|
+
💬 — Reply in thread with questions
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
2. **Poll for response** — Read reactions or thread replies to determine the decision
|
|
98
|
+
3. **Acknowledge** — Post confirmation of the action taken
|
|
99
|
+
|
|
100
|
+
### Reading User Responses
|
|
101
|
+
|
|
102
|
+
To check for approvals or instructions:
|
|
103
|
+
|
|
104
|
+
1. Use `slack_get_thread_replies` to read replies to the approval message
|
|
105
|
+
2. Use `slack_get_channel_history` with a time range to find recent directives
|
|
106
|
+
3. Parse reactions on messages for quick yes/no signals
|
|
107
|
+
|
|
108
|
+
### Parsing Conventions
|
|
109
|
+
|
|
110
|
+
| Signal | Meaning |
|
|
111
|
+
|--------|---------|
|
|
112
|
+
| ✅ reaction | Approved — proceed |
|
|
113
|
+
| ❌ reaction | Rejected — stop and report |
|
|
114
|
+
| 👀 reaction | Acknowledged — user is reviewing |
|
|
115
|
+
| Thread reply | Detailed instructions or questions |
|
|
116
|
+
| `@agent` mention | Direct command or question for the agent |
|
|
117
|
+
|
|
118
|
+
## Channel & Thread Conventions
|
|
119
|
+
|
|
120
|
+
### Channel Structure
|
|
121
|
+
|
|
122
|
+
| Channel | Purpose |
|
|
123
|
+
|---------|---------|
|
|
124
|
+
| `#agent-updates` | General agent activity feed |
|
|
125
|
+
| `#agent-approvals` | Approval requests requiring human action |
|
|
126
|
+
| `#agent-errors` | Error reports and blocked tasks |
|
|
127
|
+
| Project-specific channel | All activity for a specific project |
|
|
128
|
+
|
|
129
|
+
### Threading Rules
|
|
130
|
+
|
|
131
|
+
- **Always thread replies** — never post top-level messages for follow-ups
|
|
132
|
+
- **One thread per task** — keep all updates for a single task in one thread
|
|
133
|
+
- **Include task ID** — every message references the Linear/Jira issue ID
|
|
134
|
+
- **Pin important threads** — pin approval requests and blocking issues
|
|
135
|
+
|
|
136
|
+
## Message Formatting
|
|
137
|
+
|
|
138
|
+
Slack uses a markdown-like syntax with some differences:
|
|
139
|
+
|
|
140
|
+
| Format | Syntax |
|
|
141
|
+
|--------|--------|
|
|
142
|
+
| Bold | `*bold*` |
|
|
143
|
+
| Italic | `_italic_` |
|
|
144
|
+
| Strikethrough | `~strikethrough~` |
|
|
145
|
+
| Code | `` `inline code` `` |
|
|
146
|
+
| Code block | ` ```code block``` ` |
|
|
147
|
+
| Link | `<https://example.com|Display Text>` |
|
|
148
|
+
| User mention | `<@U12345>` |
|
|
149
|
+
| Channel mention | `<#C12345>` |
|
|
150
|
+
| Emoji | `:emoji_name:` |
|
|
151
|
+
| Blockquote | `> quoted text` |
|
|
152
|
+
| List | `• item` or `1. item` |
|
|
153
|
+
|
|
154
|
+
## Rate Limits
|
|
155
|
+
|
|
156
|
+
| Tier | Limit | Applies to |
|
|
157
|
+
|------|-------|------------|
|
|
158
|
+
| Tier 1 | 1 per minute | Rare admin actions |
|
|
159
|
+
| Tier 2 | 20 per minute | Most write operations (`chat:write`) |
|
|
160
|
+
| Tier 3 | 50 per minute | Most read operations |
|
|
161
|
+
| Tier 4 | 100+ per minute | Search, history reads |
|
|
162
|
+
|
|
163
|
+
**Best practices:**
|
|
164
|
+
- Batch updates into single messages rather than posting many small messages
|
|
165
|
+
- Use threads to consolidate related updates
|
|
166
|
+
- Add 1-second delays between consecutive write operations
|
|
167
|
+
- Cache channel/user IDs — don't look them up repeatedly
|
|
168
|
+
|
|
169
|
+
## Security Considerations
|
|
170
|
+
|
|
171
|
+
- **OAuth tokens** are managed by the MCP server — agents never see raw tokens
|
|
172
|
+
- **Scope minimization** — request only the scopes agents actually need
|
|
173
|
+
- **Channel restrictions** — limit the app to specific channels rather than granting workspace-wide access
|
|
174
|
+
- **Audit logging** — Slack Enterprise Grid provides audit logs for all API activity
|
|
175
|
+
- **No secrets in messages** — never post tokens, passwords, or credentials in Slack messages (per Constitution #1)
|
|
176
|
+
|
|
177
|
+
## Integration with Agent Workflows
|
|
178
|
+
|
|
179
|
+
### Session Start
|
|
180
|
+
|
|
181
|
+
At the beginning of a work session, post a brief status message:
|
|
182
|
+
```
|
|
183
|
+
🏁 **Session started**
|
|
184
|
+
Agent: Frontend Engineer
|
|
185
|
+
Task: TAS-42 — Add price filter component
|
|
186
|
+
Mode: Autonomous (will request approval for destructive actions)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Session End
|
|
190
|
+
|
|
191
|
+
At the end of a work session, post a summary:
|
|
192
|
+
```
|
|
193
|
+
🏁 **Session complete**
|
|
194
|
+
Agent: Frontend Engineer
|
|
195
|
+
Task: TAS-42 — Add price filter component
|
|
196
|
+
Result: ✅ PR opened (#123)
|
|
197
|
+
Duration: 12 minutes
|
|
198
|
+
Files changed: 5
|
|
199
|
+
Tests: 12 passing, 0 failing
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Error Recovery
|
|
203
|
+
|
|
204
|
+
If an agent encounters an unrecoverable error, notify before stopping:
|
|
205
|
+
```
|
|
206
|
+
💥 **Session failed**
|
|
207
|
+
Agent: Frontend Engineer
|
|
208
|
+
Task: TAS-42 — Add price filter component
|
|
209
|
+
Error: TypeScript compilation failed — 3 type errors in PriceFilter.tsx
|
|
210
|
+
Action: Posted details in thread. Needs manual fix or re-delegation.
|
|
211
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strapi-cms
|
|
3
|
+
description: "Strapi CMS development patterns, REST/GraphQL API usage, content type building, plugin development, and deployment best practices. Use when working with Strapi content types, controllers, services, or plugins."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Strapi CMS
|
|
7
|
+
|
|
8
|
+
Generic Strapi CMS development methodology. For project-specific configuration, content types, and deployment details, see [cms-config.md](../../customizations/stack/cms-config.md).
|
|
9
|
+
|
|
10
|
+
## Critical Development Rules
|
|
11
|
+
|
|
12
|
+
1. **Use Content-Type Builder** — define content types through the admin panel or `content-types` directory
|
|
13
|
+
2. **REST API by default** — Strapi exposes REST endpoints automatically; enable GraphQL plugin if needed
|
|
14
|
+
3. **Customize controllers** — extend auto-generated controllers in `src/api/<type>/controllers/`
|
|
15
|
+
4. **Services for business logic** — keep business logic in services, not controllers
|
|
16
|
+
5. **Lifecycle hooks** — use model lifecycle hooks for side effects (e.g., `beforeCreate`, `afterUpdate`)
|
|
17
|
+
6. **Permissions and roles** — configure permissions via the Users & Permissions plugin
|
|
18
|
+
7. **Draft/Publish system** — enable draft/publish on content types that need editorial workflow
|
|
19
|
+
8. **Media Library** — use Strapi's media library for asset management; configure providers for S3/Cloudinary
|
|
20
|
+
9. **Environment configs** — use `config/env/<env>/` for environment-specific configuration
|
|
21
|
+
10. **Never modify `node_modules`** — extend functionality through plugins and customizations
|
|
22
|
+
|
|
23
|
+
## API Patterns
|
|
24
|
+
|
|
25
|
+
### REST API
|
|
26
|
+
- Endpoints follow `/api/<content-type>` convention
|
|
27
|
+
- Use `populate` parameter to include relations
|
|
28
|
+
- Use `filters` parameter with operators (`$eq`, `$contains`, `$in`, etc.)
|
|
29
|
+
- Pagination via `pagination[page]` and `pagination[pageSize]`
|
|
30
|
+
- Use `fields` to select specific attributes
|
|
31
|
+
|
|
32
|
+
### GraphQL Plugin
|
|
33
|
+
- Enable via `@strapi/plugin-graphql`
|
|
34
|
+
- Auto-generates types and resolvers from content types
|
|
35
|
+
- Use `filters`, `pagination`, and `sort` arguments
|
|
36
|
+
- Custom resolvers in `src/api/<type>/graphql/`
|
|
37
|
+
|
|
38
|
+
## Plugin Development
|
|
39
|
+
|
|
40
|
+
- Scaffold with `strapi generate plugin <name>`
|
|
41
|
+
- Follow the plugin structure: `admin/`, `server/`, `content-types/`
|
|
42
|
+
- Register plugin in `config/plugins.ts`
|
|
43
|
+
- Use the Plugin SDK for admin panel extensions
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supabase-database
|
|
3
|
+
description: "Supabase database migration rules, RLS policy patterns, and auth integration best practices. Use when designing database tables, writing migrations, configuring RLS policies, implementing auth, or managing user roles."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Supabase Database
|
|
7
|
+
|
|
8
|
+
Generic Supabase development methodology. For project-specific schema, roles, migration history, auth flow, and key files, see [supabase-config.md](../../customizations/stack/supabase-config.md).
|
|
9
|
+
|
|
10
|
+
## Migration Rules
|
|
11
|
+
|
|
12
|
+
1. Always write migrations for schema changes — never modify schema directly.
|
|
13
|
+
2. Use RLS on all tables — no exceptions.
|
|
14
|
+
3. Test RLS from different roles (anon, user, moderator, admin).
|
|
15
|
+
4. `CASCADE DELETE` where appropriate.
|
|
16
|
+
5. Add indexes for frequently queried columns.
|
|
17
|
+
6. Naming: `NNN_description.sql` or `YYYYMMDD_description.sql`.
|
|
18
|
+
7. Write idempotent migrations — they must be safe to re-run.
|
|
19
|
+
8. Document migration purpose with SQL comments.
|
|
20
|
+
9. Validate schema changes don't break existing RLS policies.
|
|
21
|
+
10. Use `auth.uid()` in RLS policies — never pass user ID from the client.
|
|
22
|
+
11. Prefer database functions for complex authorization logic.
|
|
23
|
+
12. Test migrations in a development dataset before production.
|
|
24
|
+
13. Always generate TypeScript types after schema changes.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-management
|
|
3
|
+
description: "Linear board conventions for tracking feature work — issue naming, labels, priorities, status workflow, and session continuity. Use when decomposing features into tasks or resuming interrupted sessions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Management with Linear
|
|
7
|
+
|
|
8
|
+
Conventions for tracking feature work on the Linear board via MCP tools. For project-specific team ID, workflow state UUIDs, and label UUIDs, see [linear-config.md](../../customizations/project/linear-config.md).
|
|
9
|
+
|
|
10
|
+
## Discovered Issues (Bug Tickets)
|
|
11
|
+
|
|
12
|
+
When an agent encounters a pre-existing bug or issue unrelated to the current task, it must be tracked. Follow this flow:
|
|
13
|
+
|
|
14
|
+
1. **Check** known issues docs and Linear (search for open bugs) to see if it's already tracked
|
|
15
|
+
2. **If tracked** — skip it, continue with current work
|
|
16
|
+
3. **If NOT tracked:**
|
|
17
|
+
- **Unfixable limitation** — add to known issues with Issue ID, Status, Severity, Evidence, Root Cause, Solution Options
|
|
18
|
+
- **Fixable bug** — create a Linear ticket:
|
|
19
|
+
- **Name:** `[Bug] Short description of the symptom`
|
|
20
|
+
- **Label:** `bug` (plus the relevant domain label, e.g., `ui`, `nextjs`)
|
|
21
|
+
- **Priority:** P2 if it affects users, P3 if cosmetic or non-blocking
|
|
22
|
+
- **Description:** Include symptoms, reproduction steps, affected files, and any error messages or screenshots
|
|
23
|
+
- **Status:** Backlog (unless it's blocking current work, then Todo)
|
|
24
|
+
|
|
25
|
+
## Issue Naming
|
|
26
|
+
|
|
27
|
+
Use `[Area] Short description` format:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
[Schema] Add priceRange field to place type
|
|
31
|
+
[DB] Add price_range column and migration
|
|
32
|
+
[Query] Update GROQ query with priceRange filter
|
|
33
|
+
[UI] Build PriceRangeFilter component
|
|
34
|
+
[Page] Integrate price filter into /places
|
|
35
|
+
[Test] E2E test price range filtering
|
|
36
|
+
[Docs] Update data model documentation
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Area prefixes:** `[Schema]`, `[DB]`, `[Query]`, `[UI]`, `[Page]`, `[API]`, `[Auth]`, `[Test]`, `[Docs]`, `[Deploy]`, `[Data]`, `[Perf]`, `[Security]`
|
|
40
|
+
|
|
41
|
+
## Priority
|
|
42
|
+
|
|
43
|
+
| Level | Meaning | When to use |
|
|
44
|
+
|-------|---------|-------------|
|
|
45
|
+
| P1 (Urgent) | Blocker | Blocks other tasks, critical path |
|
|
46
|
+
| P2 (High) | Important | Core feature work, on critical path |
|
|
47
|
+
| P3 (Medium) | Normal | Supporting tasks, can be parallelized |
|
|
48
|
+
| P4 (Low) | Nice-to-have | Docs, cleanup, polish |
|
|
49
|
+
|
|
50
|
+
## Status Workflow
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Backlog -> Todo -> In Progress -> In Review -> Done -> Cancelled
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- **Backlog** — Captured but not yet planned
|
|
57
|
+
- **Todo** — Planned for current feature, ready to start
|
|
58
|
+
- **In Progress** — Actively being worked on by an agent
|
|
59
|
+
- **In Review** — PR opened, awaiting review/merge
|
|
60
|
+
- **Done** — Completed and verified
|
|
61
|
+
- **Cancelled** — Dropped or no longer relevant
|
|
62
|
+
|
|
63
|
+
### Status Drivers
|
|
64
|
+
|
|
65
|
+
Issue status is driven by **two sources** — the Team Lead agent (via MCP) and the GitHub integration (automatically). Both can move issues through the workflow.
|
|
66
|
+
|
|
67
|
+
**Agent-driven transitions (via MCP):**
|
|
68
|
+
- **Todo -> In Progress** — when the agent starts working on a task
|
|
69
|
+
- **In Progress -> Done** — when non-PR tasks are verified (e.g., docs, config changes)
|
|
70
|
+
- **Any -> Cancelled** — when a task is dropped
|
|
71
|
+
|
|
72
|
+
**GitHub-driven transitions (automatic):**
|
|
73
|
+
|
|
74
|
+
The Linear-GitHub integration auto-updates issue status based on PR lifecycle events. This is configured in Linear under *Settings -> Team -> Issue statuses & automations -> Pull request and commit automation*.
|
|
75
|
+
|
|
76
|
+
| PR Event | Linear Status Change |
|
|
77
|
+
|----------|---------------------|
|
|
78
|
+
| Branch pushed / PR drafted | -> **In Progress** |
|
|
79
|
+
| PR opened | -> **In Progress** |
|
|
80
|
+
| Review requested | -> **In Review** |
|
|
81
|
+
| PR ready for merge (all checks pass) | -> **In Review** |
|
|
82
|
+
| PR merged to `main` | -> **Done** |
|
|
83
|
+
|
|
84
|
+
**Linking issues to PRs:** Include the Linear issue ID (e.g., `TAS-123`) in the branch name or PR title. Linear auto-detects the link and begins status automation. Use the branch name format from Linear: copy with `Cmd+Shift+.` on any issue.
|
|
85
|
+
|
|
86
|
+
**Multiple PRs per issue:** When multiple PRs are linked to one issue, the status only advances to Done when the *last* linked PR is merged.
|
|
87
|
+
|
|
88
|
+
**Important:** When GitHub automation handles status transitions, the agent does not need to update status manually — avoid conflicting updates. Only use MCP to move status when there is no linked PR (e.g., documentation-only tasks, config changes, schema deploys).
|
|
89
|
+
|
|
90
|
+
## Issue Descriptions
|
|
91
|
+
|
|
92
|
+
Every issue must include:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
**Objective:** One sentence describing the deliverable
|
|
96
|
+
|
|
97
|
+
**Files (partition):**
|
|
98
|
+
- `path/to/relevant/file.ts`
|
|
99
|
+
- `path/to/another/file.ts`
|
|
100
|
+
|
|
101
|
+
**Acceptance Criteria:**
|
|
102
|
+
- [ ] Specific, verifiable outcome 1
|
|
103
|
+
- [ ] Specific, verifiable outcome 2
|
|
104
|
+
|
|
105
|
+
**Dependencies:** #TAS-XX (if any)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The **Files (partition)** section defines which files this agent is allowed to modify. This prevents merge conflicts when multiple agents work in parallel — no two issues in the same phase should list overlapping files.
|
|
109
|
+
|
|
110
|
+
## Feature Grouping
|
|
111
|
+
|
|
112
|
+
- Use a **Linear project** for each major feature
|
|
113
|
+
- Create projects via the Linear UI — no create_project API is available via MCP
|
|
114
|
+
- All related issues belong to that project
|
|
115
|
+
- Issues track individual subtasks within the feature
|
|
116
|
+
|
|
117
|
+
## Session Workflow
|
|
118
|
+
|
|
119
|
+
### Starting a new feature
|
|
120
|
+
|
|
121
|
+
1. Read the board to check for existing in-progress work
|
|
122
|
+
2. Decompose the feature into issues following the conventions above
|
|
123
|
+
3. Create all issues on Linear with correct naming, labels, priority, and descriptions
|
|
124
|
+
4. Note dependencies in issue descriptions — Linear MCP has no dependency API
|
|
125
|
+
5. Begin delegation
|
|
126
|
+
|
|
127
|
+
### During execution
|
|
128
|
+
|
|
129
|
+
- Move issue to **In Progress** before delegating to an agent
|
|
130
|
+
- Move issue to **Done** immediately after the agent completes and output is verified
|
|
131
|
+
- If a task is blocked, update the issue description explaining the blocker (Linear MCP has no comment API)
|
|
132
|
+
|
|
133
|
+
### Resuming an interrupted session
|
|
134
|
+
|
|
135
|
+
1. List issues filtered by **In Progress** and **Todo** status
|
|
136
|
+
2. Read issue descriptions to restore context
|
|
137
|
+
3. Pick up where work left off — no need to re-analyze from scratch
|
|
138
|
+
|
|
139
|
+
### Completing a feature
|
|
140
|
+
|
|
141
|
+
1. Verify all issues are **Done** or **Cancelled**
|
|
142
|
+
2. Run final build/lint/test checks
|
|
143
|
+
3. Mark all project issues as Done or Cancelled (closing the project requires the Linear UI)
|