opencastle 0.32.4 → 0.32.6
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/README.md +13 -3
- package/bin/cli.mjs +2 -0
- package/dist/cli/bootstrap.js +1 -1
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/bootstrap.test.js +16 -0
- package/dist/cli/bootstrap.test.js.map +1 -1
- package/dist/cli/init.test.js +38 -0
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/stack-config-update.test.js +18 -0
- package/dist/cli/stack-config-update.test.js.map +1 -1
- package/dist/cli/stack-config.d.ts.map +1 -1
- package/dist/cli/stack-config.js +1 -0
- package/dist/cli/stack-config.js.map +1 -1
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/orchestrator/plugins/index.d.ts.map +1 -1
- package/dist/orchestrator/plugins/index.js +4 -0
- package/dist/orchestrator/plugins/index.js.map +1 -1
- package/dist/orchestrator/plugins/notion/config.d.ts +3 -0
- package/dist/orchestrator/plugins/notion/config.d.ts.map +1 -0
- package/dist/orchestrator/plugins/notion/config.js +46 -0
- package/dist/orchestrator/plugins/notion/config.js.map +1 -0
- package/dist/orchestrator/plugins/trello/config.d.ts +3 -0
- package/dist/orchestrator/plugins/trello/config.d.ts.map +1 -0
- package/dist/orchestrator/plugins/trello/config.js +43 -0
- package/dist/orchestrator/plugins/trello/config.js.map +1 -0
- package/dist/orchestrator/plugins/types.d.ts +1 -1
- package/dist/orchestrator/plugins/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/bootstrap.test.ts +21 -0
- package/src/cli/bootstrap.ts +1 -1
- package/src/cli/init.test.ts +46 -0
- package/src/cli/stack-config-update.test.ts +20 -0
- package/src/cli/stack-config.ts +1 -0
- package/src/cli/types.ts +1 -1
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/api-designer.agent.md +25 -34
- package/src/orchestrator/agents/architect.agent.md +40 -84
- package/src/orchestrator/agents/content-engineer.agent.md +29 -31
- package/src/orchestrator/agents/copywriter.agent.md +35 -60
- package/src/orchestrator/agents/data-expert.agent.md +24 -30
- package/src/orchestrator/agents/database-engineer.agent.md +26 -31
- package/src/orchestrator/agents/developer.agent.md +32 -34
- package/src/orchestrator/agents/devops-expert.agent.md +31 -26
- package/src/orchestrator/agents/documentation-writer.agent.md +29 -29
- package/src/orchestrator/agents/performance-expert.agent.md +36 -33
- package/src/orchestrator/agents/release-manager.agent.md +25 -34
- package/src/orchestrator/agents/researcher.agent.md +41 -95
- package/src/orchestrator/agents/reviewer.agent.md +24 -34
- package/src/orchestrator/agents/security-expert.agent.md +35 -39
- package/src/orchestrator/agents/seo-specialist.agent.md +25 -32
- package/src/orchestrator/agents/session-guard.agent.md +20 -79
- package/src/orchestrator/agents/team-lead.agent.md +50 -254
- package/src/orchestrator/agents/testing-expert.agent.md +37 -49
- package/src/orchestrator/agents/ui-ux-expert.agent.md +33 -39
- package/src/orchestrator/customizations/KNOWN-ISSUES.md +0 -1
- package/src/orchestrator/customizations/agents/skill-matrix.json +20 -4
- package/src/orchestrator/customizations/agents/skill-matrix.md +20 -0
- package/src/orchestrator/instructions/general.instructions.md +24 -84
- package/src/orchestrator/plugins/astro/SKILL.md +23 -179
- package/src/orchestrator/plugins/convex/SKILL.md +38 -12
- package/src/orchestrator/plugins/index.ts +4 -0
- package/src/orchestrator/plugins/netlify/SKILL.md +17 -13
- package/src/orchestrator/plugins/nextjs/SKILL.md +55 -261
- package/src/orchestrator/plugins/notion/SKILL.md +205 -0
- package/src/orchestrator/plugins/notion/config.ts +47 -0
- package/src/orchestrator/plugins/nx/SKILL.md +20 -72
- package/src/orchestrator/plugins/playwright/SKILL.md +5 -17
- package/src/orchestrator/plugins/slack/SKILL.md +28 -190
- package/src/orchestrator/plugins/teams/SKILL.md +10 -140
- package/src/orchestrator/plugins/trello/SKILL.md +151 -0
- package/src/orchestrator/plugins/trello/config.ts +44 -0
- package/src/orchestrator/plugins/types.ts +1 -1
- package/src/orchestrator/plugins/vitest/SKILL.md +2 -2
- package/src/orchestrator/prompts/bug-fix.prompt.md +25 -63
- package/src/orchestrator/prompts/implement-feature.prompt.md +29 -66
- package/src/orchestrator/prompts/quick-refinement.prompt.md +31 -66
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +50 -105
- package/src/orchestrator/skills/agent-hooks/SKILL.md +60 -110
- package/src/orchestrator/skills/agent-memory/SKILL.md +44 -93
- package/src/orchestrator/skills/api-patterns/SKILL.md +20 -68
- package/src/orchestrator/skills/code-commenting/SKILL.md +49 -101
- package/src/orchestrator/skills/context-map/SKILL.md +47 -88
- package/src/orchestrator/skills/data-engineering/SKILL.md +27 -74
- package/src/orchestrator/skills/decomposition/SKILL.md +50 -98
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +44 -107
- package/src/orchestrator/skills/documentation-standards/SKILL.md +28 -89
- package/src/orchestrator/skills/fast-review/SKILL.md +51 -276
- package/src/orchestrator/skills/frontend-design/SKILL.md +53 -163
- package/src/orchestrator/skills/git-workflow/SKILL.md +18 -54
- package/src/orchestrator/skills/memory-merger/SKILL.md +51 -88
- package/src/orchestrator/skills/observability-logging/SKILL.md +29 -75
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +58 -117
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +65 -140
- package/src/orchestrator/skills/performance-optimization/SKILL.md +21 -85
- package/src/orchestrator/skills/project-consistency/SKILL.md +62 -281
- package/src/orchestrator/skills/react-development/SKILL.md +38 -86
- package/src/orchestrator/skills/security-hardening/SKILL.md +40 -84
- package/src/orchestrator/skills/self-improvement/SKILL.md +26 -60
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -105
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +26 -68
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +66 -206
- package/src/orchestrator/skills/testing-workflow/SKILL.md +42 -112
- package/src/orchestrator/skills/validation-gates/SKILL.md +39 -170
- package/src/orchestrator/snippets/base-output-contract.md +14 -0
- package/src/orchestrator/snippets/discovered-issues-policy.md +15 -0
- package/src/orchestrator/snippets/logging-mandatory.md +11 -0
- package/src/orchestrator/snippets/never-expose-secrets.md +22 -0
|
@@ -96,98 +96,46 @@ The NX MCP server provides tools for understanding and working with the workspac
|
|
|
96
96
|
|
|
97
97
|
## Code Generation Workflow
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
Always prefer generators over manual file creation when a generator exists.
|
|
100
100
|
|
|
101
101
|
### Phase 1: Discover
|
|
102
102
|
|
|
103
|
-
1.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
3. **Prefer local generators** — when both local and plugin generators could work, **always prefer local** (they're customized for this repo's patterns)
|
|
107
|
-
4. **If no generator fits** — check `nx_available_plugins` for installable plugins. Only fall back to manual creation after exhausting all generator options
|
|
103
|
+
1. List available generators using `nx_generators` MCP tool (plugin + local workspace generators)
|
|
104
|
+
2. Prefer local generators over plugin generators — they're customized for this repo
|
|
105
|
+
3. If no generator fits, check `nx_available_plugins`; only fall back to manual creation after exhausting all generator options
|
|
108
106
|
|
|
109
107
|
### Phase 2: Understand
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- Identify required vs optional options
|
|
115
|
-
- Note default values that may need overriding
|
|
116
|
-
- Pay attention to options that affect file structure or naming
|
|
117
|
-
|
|
118
|
-
2. **Read generator source code** (for unfamiliar generators)
|
|
119
|
-
- Find source: `node -e "console.log(require.resolve('@nx/<plugin>/generators.json'));"`
|
|
120
|
-
- If that fails: read from `node_modules/<plugin>/generators.json`
|
|
121
|
-
- Local generators: check `tools/generators/` or local plugin directories
|
|
122
|
-
- Understanding the source reveals side effects (config updates, dep installs) and files created/modified
|
|
123
|
-
|
|
124
|
-
3. **Reevaluate generator choice** — after understanding what the generator does, confirm it's the right one. If not, go back to Phase 1 and select a different generator.
|
|
125
|
-
|
|
126
|
-
4. **Examine repo context** — study existing similar artifacts in the codebase:
|
|
127
|
-
- Look at how similar projects are structured (naming, test runner, build tool, linter)
|
|
128
|
-
- Match conventions when configuring the generator
|
|
129
|
-
- Note directory structures, file patterns, and config styles
|
|
130
|
-
|
|
131
|
-
5. **Validate required options** — map the user's request to generator options:
|
|
132
|
-
- Infer values from context where possible
|
|
133
|
-
- Ask for critical missing information if it cannot be inferred
|
|
109
|
+
1. Fetch generator schema using `nx_generator_schema` — note required options, defaults, and file structure impacts
|
|
110
|
+
2. Read generator source to understand side effects (config updates, dep installs, files created/modified)
|
|
111
|
+
3. Examine existing similar artifacts for naming, structure, test runner, and config conventions; map user's request to generator options
|
|
134
112
|
|
|
135
113
|
### Phase 3: Execute
|
|
136
114
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- Shows files that would be created/deleted/modified (but not content)
|
|
142
|
-
- Some generators don't support dry-run (e.g., if they install packages) — skip and run for real
|
|
143
|
-
- For simple, well-understood generators, you may skip dry-run
|
|
115
|
+
```bash
|
|
116
|
+
yarn nx generate <generator-name> <options> --dry-run --no-interactive # optional preview
|
|
117
|
+
yarn nx generate <generator-name> <options> --no-interactive
|
|
118
|
+
```
|
|
144
119
|
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
yarn nx generate <generator-name> <options> --no-interactive
|
|
148
|
-
```
|
|
149
|
-
**CRITICAL**: Always include `--no-interactive` to prevent prompts that hang execution.
|
|
120
|
+
**CRITICAL**: Always include `--no-interactive` to prevent prompts that hang execution.
|
|
150
121
|
|
|
151
|
-
|
|
122
|
+
**CRITICAL**: Verify cwd before running — generators may use it to determine file placement.
|
|
152
123
|
|
|
153
|
-
|
|
154
|
-
- Read the error message carefully
|
|
155
|
-
- Common causes: missing required options, invalid values, conflicting files, missing dependencies
|
|
156
|
-
- Adjust options and retry
|
|
157
|
-
- Use the **self-improvement** skill to add a lesson if the fix was non-obvious
|
|
124
|
+
On failure: read the error, adjust options, and retry. Use the **self-improvement** skill for non-obvious fixes.
|
|
158
125
|
|
|
159
126
|
### Phase 4: Post-Generation
|
|
160
127
|
|
|
161
|
-
1.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- Integrate with existing code patterns
|
|
165
|
-
|
|
166
|
-
2. **Format code**:
|
|
167
|
-
```bash
|
|
168
|
-
yarn nx format --fix
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
3. **Run verification** on generated/affected projects:
|
|
172
|
-
```bash
|
|
173
|
-
yarn nx run <new-project>:lint --fix
|
|
174
|
-
yarn nx run <new-project>:test
|
|
175
|
-
yarn nx run <new-project>:build
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
4. **Handle verification failures**:
|
|
179
|
-
- **Small scope** (few lint errors, minor type issues) — fix directly, re-verify
|
|
180
|
-
- **Large scope** (many errors, complex problems) — fix obvious issues first, escalate remaining with description of what was generated, what's failing, and what was attempted
|
|
128
|
+
1. Modify generated code to match requirements (imports, exports, config, integrations)
|
|
129
|
+
2. Format: `yarn nx format --fix`
|
|
130
|
+
3. Verify lint, test, and build on generated/affected projects; fix small-scope issues directly, escalate large-scope failures
|
|
181
131
|
|
|
182
132
|
## Running Tasks Workflow
|
|
183
133
|
|
|
184
|
-
When helping with build, test, lint, or serve tasks:
|
|
185
|
-
|
|
186
134
|
1. Use `nx_current_running_tasks_details` to check for active/completed/failed tasks
|
|
187
|
-
2.
|
|
135
|
+
2. Use `nx_current_running_task_output` to get terminal output for a specific task
|
|
188
136
|
3. Diagnose issues from the output and apply fixes
|
|
189
|
-
4. To rerun
|
|
190
|
-
5. **Continuous tasks** (like `serve`) are already running — don't
|
|
137
|
+
4. To rerun, use `yarn nx run <taskId>` to preserve NX context
|
|
138
|
+
5. **Continuous tasks** (like `serve`) are already running — don't rerun, just check output
|
|
191
139
|
|
|
192
140
|
## Project Names
|
|
193
141
|
|
|
@@ -103,25 +103,12 @@ export class LoginPage {
|
|
|
103
103
|
}
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
## API Mocking
|
|
107
107
|
|
|
108
108
|
```typescript
|
|
109
|
-
// tests
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type AuthFixtures = {
|
|
113
|
-
authenticatedPage: Page;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export const test = base.extend<AuthFixtures>({
|
|
117
|
-
authenticatedPage: async ({ page }, use) => {
|
|
118
|
-
await page.goto('/login');
|
|
119
|
-
await page.getByTestId('email-input').fill('test@example.com');
|
|
120
|
-
await page.getByTestId('password-input').fill('password');
|
|
121
|
-
await page.getByTestId('login-button').click();
|
|
122
|
-
await page.waitForURL('**/dashboard');
|
|
123
|
-
await use(page);
|
|
124
|
-
},
|
|
109
|
+
// Mock API responses for deterministic tests
|
|
110
|
+
await page.route('/api/login', (route) => {
|
|
111
|
+
route.fulfill({ status: 200, body: JSON.stringify({ token: 'test' }) });
|
|
125
112
|
});
|
|
126
113
|
```
|
|
127
114
|
|
|
@@ -189,3 +176,4 @@ The Playwright MCP server enables AI agents to interact with browsers directly:
|
|
|
189
176
|
- Run tests in parallel (`fullyParallel: true`) for speed
|
|
190
177
|
- Use `trace: 'on-first-retry'` to debug flaky tests
|
|
191
178
|
- Use `codegen` to bootstrap tests, then refactor into page objects
|
|
179
|
+
- Use `page.route()` to mock API responses — create isolated, deterministic tests without backend dependencies
|
|
@@ -15,95 +15,55 @@ Agent communication patterns via the Slack MCP server. Enables agents to post pr
|
|
|
15
15
|
|-------|-------|
|
|
16
16
|
| **Package** | [`@kazuph/mcp-slack`](https://www.npmjs.com/package/@kazuph/mcp-slack) |
|
|
17
17
|
| **Type** | stdio (spawned via `npx -y @kazuph/mcp-slack`) |
|
|
18
|
-
| **Auth** | Bot token (`xoxb-…`) via `SLACK_MCP_XOXB_TOKEN` env var
|
|
19
|
-
| **Extra env** | `SLACK_MCP_ADD_MESSAGE_TOOL=true` — enables
|
|
20
|
-
| **Supported clients** | VS Code, Claude Code, Cursor, any MCP-compatible client with stdio support |
|
|
18
|
+
| **Auth** | Bot token (`xoxb-…`) via `SLACK_MCP_XOXB_TOKEN` env var |
|
|
19
|
+
| **Extra env** | `SLACK_MCP_ADD_MESSAGE_TOOL=true` — enables `conversations_add_message` |
|
|
21
20
|
|
|
22
21
|
### Authentication
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
Use a **bot token** (`SLACK_MCP_XOXB_TOKEN`). For message search, a user token (`xoxp-…`) via `SLACK_MCP_XOXP_TOKEN` is required instead.
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|-------------|------------|-------|
|
|
28
|
-
| `SLACK_MCP_XOXB_TOKEN` | Bot token (`xoxb-…`) | Limited to invited channels only, no search |
|
|
29
|
-
| `SLACK_MCP_XOXP_TOKEN` | User OAuth token (`xoxp-…`) | Full access, requires OAuth app setup |
|
|
30
|
-
| `SLACK_MCP_XOXC_TOKEN` + `SLACK_MCP_XOXD_TOKEN` | Browser tokens | "Stealth mode" — no app install needed |
|
|
31
|
-
|
|
32
|
-
This project uses a **bot token** (`SLACK_MCP_XOXB_TOKEN`). Add these under **Bot Token Scopes** in the Slack app configuration:
|
|
25
|
+
**Bot Token Scopes:**
|
|
33
26
|
|
|
34
27
|
| Scope | Purpose |
|
|
35
28
|
|-------|---------|
|
|
36
29
|
| `chat:write` | Post messages and replies |
|
|
37
|
-
| `channels:read` | List public channels
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `im:read` | List direct message conversations |
|
|
43
|
-
| `im:history` | Read direct messages |
|
|
44
|
-
| `mpim:read` | List group DM conversations |
|
|
45
|
-
| `mpim:history` | Read group DMs |
|
|
46
|
-
| `users:read` | Look up user profiles |
|
|
47
|
-
| `users:read.email` | Look up user emails |
|
|
48
|
-
|
|
49
|
-
> **Note:** `channels:manage` is optional — only needed if agents should create channels or rename them. Without it, `conversations_create` and `conversations_rename` will return `missing_scope`.
|
|
50
|
-
>
|
|
51
|
-
> **Note:** Bot tokens cannot search messages. If search is needed, use a user token (`xoxp-…`) instead.
|
|
52
|
-
|
|
53
|
-
Admin approval is required. Work with the workspace admin to install the app.
|
|
30
|
+
| `channels:read`, `channels:history` | List and read public channels |
|
|
31
|
+
| `groups:read`, `groups:history` | List and read private channels |
|
|
32
|
+
| `im:read`, `im:history`, `mpim:read`, `mpim:history` | DMs and group DMs |
|
|
33
|
+
| `users:read`, `users:read.email` | Look up user profiles and emails |
|
|
34
|
+
| `channels:manage` | Create/rename channels (optional) |
|
|
54
35
|
|
|
55
36
|
## Available MCP Tools
|
|
56
37
|
|
|
57
|
-
The Slack MCP server exposes the following tools (prefixed with `mcp_slack_` in VS Code / Copilot):
|
|
58
|
-
|
|
59
38
|
### Channel Management
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|------|-------------|----------------|
|
|
63
|
-
| `channels_list` | List workspace channels | `channel_types` (public/private), `limit`, `cursor` |
|
|
64
|
-
| `conversations_create` | Create a new channel | `name` (required). Needs `channels:manage` scope |
|
|
65
|
-
| `conversations_rename` | Rename a channel | `channel_id`, `name`. Needs `channels:manage` scope |
|
|
66
|
-
| `conversations_set_topic` | Set a channel's topic | `channel_id`, `topic` |
|
|
67
|
-
| `conversations_invite` | Invite user(s) to a channel | `channel_id`, `users` (comma-separated user IDs) |
|
|
40
|
+
`channels_list`, `conversations_create`, `conversations_rename`, `conversations_set_topic`, `conversations_invite`
|
|
68
41
|
|
|
69
42
|
### Messaging
|
|
70
43
|
|
|
71
44
|
| Tool | Description | Key Parameters |
|
|
72
45
|
|------|-------------|----------------|
|
|
73
|
-
| `conversations_add_message` | Post a message to a channel or thread | `channel_id
|
|
74
|
-
| `conversations_history` | Read recent messages from a channel | `channel_id`, `limit` (
|
|
75
|
-
| `conversations_replies` | Get replies in a thread | `channel_id`, `thread_ts`, `limit
|
|
76
|
-
| `conversations_search_messages` | Search messages across channels | `search_query`, `filter_in_channel`, `
|
|
46
|
+
| `conversations_add_message` | Post a message to a channel or thread | `channel_id`, `payload`, `content_type` (`text/markdown`), `thread_ts` |
|
|
47
|
+
| `conversations_history` | Read recent messages from a channel | `channel_id`, `limit` (e.g. `1d`, `50`) |
|
|
48
|
+
| `conversations_replies` | Get replies in a thread | `channel_id`, `thread_ts`, `limit` |
|
|
49
|
+
| `conversations_search_messages` | Search messages across channels | `search_query`, `filter_in_channel`, `filter_date_*` |
|
|
77
50
|
|
|
78
51
|
### Users
|
|
79
52
|
|
|
80
|
-
|
|
81
|
-
|------|-------------|----------------|
|
|
82
|
-
| `users_resolve` | Look up a user by name or email | Returns user ID for mentions |
|
|
83
|
-
|
|
84
|
-
### Channel ID Resolution
|
|
85
|
-
|
|
86
|
-
The `channel_id` parameter in messaging tools accepts:
|
|
87
|
-
- **Channel ID** — e.g., `C0AHAQFJ7C1` (most reliable)
|
|
88
|
-
- **Channel name** — e.g., `new-channel` (without `#` prefix)
|
|
89
|
-
|
|
90
|
-
When a channel name is ambiguous or not found, use `channels_list` first to get the correct ID.
|
|
53
|
+
`users_resolve` — look up a user by name or email; returns user ID for mentions.
|
|
91
54
|
|
|
92
|
-
### Key Differences from
|
|
55
|
+
### Key Differences from Slack Web API
|
|
93
56
|
|
|
94
57
|
- Tool names use `conversations_*` pattern, not `chat.postMessage` etc.
|
|
95
58
|
- Message body is sent via `payload` parameter, not `text`
|
|
96
59
|
- Message posting is **disabled by default** — requires `SLACK_MCP_ADD_MESSAGE_TOOL=true` env var
|
|
97
60
|
- `limit` on history/replies accepts time ranges (`1d`, `7d`, `30d`) or message counts (`50`)
|
|
98
|
-
- No reaction tools
|
|
99
|
-
- No canvas tools — canvases are not exposed
|
|
61
|
+
- No reaction tools or canvas tools available via this MCP server
|
|
100
62
|
|
|
101
63
|
## Agent Notification Patterns
|
|
102
64
|
|
|
103
65
|
### Progress Updates
|
|
104
66
|
|
|
105
|
-
Post structured progress updates to a designated channel:
|
|
106
|
-
|
|
107
67
|
```
|
|
108
68
|
Channel: #agent-updates (or project-specific channel)
|
|
109
69
|
Format:
|
|
@@ -113,29 +73,11 @@ Format:
|
|
|
113
73
|
**ETA:** ~5 minutes
|
|
114
74
|
```
|
|
115
75
|
|
|
116
|
-
### Completion Notifications
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
✅ **Task:** TAS-42 — Add price filter component
|
|
120
|
-
**Status:** Complete — PR opened
|
|
121
|
-
**PR:** https://github.com/org/repo/pull/123
|
|
122
|
-
**Summary:** Added PriceRangeFilter with 4 range options, 12 unit tests passing
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Error / Blocking Notifications
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
🚨 **Task:** TAS-42 — Add price filter component
|
|
129
|
-
**Status:** Blocked — needs human input
|
|
130
|
-
**Issue:** Cannot determine correct price ranges for the market
|
|
131
|
-
**Action needed:** Reply in this thread with the desired price range values
|
|
132
|
-
```
|
|
133
|
-
|
|
134
76
|
## Bi-Directional Communication
|
|
135
77
|
|
|
136
78
|
### Dual-Channel Approval Pattern
|
|
137
79
|
|
|
138
|
-
Approval requests are always **dual-channel** — posted to Slack AND asked in the chat window. The first response
|
|
80
|
+
Approval requests are always **dual-channel** — posted to Slack AND asked in the chat window. The first response wins.
|
|
139
81
|
|
|
140
82
|
```
|
|
141
83
|
Agent needs approval
|
|
@@ -150,8 +92,6 @@ Agent needs approval
|
|
|
150
92
|
(immediate, no polling needed)
|
|
151
93
|
```
|
|
152
94
|
|
|
153
|
-
**Why dual-channel:** The chat path is instant (user's next message is the answer). The Slack path covers the case where the user is away from VS Code (mobile, another machine) and wants to unblock the agent remotely.
|
|
154
|
-
|
|
155
95
|
### Approval Flow
|
|
156
96
|
|
|
157
97
|
1. **Post to Slack** with a structured approval request:
|
|
@@ -166,40 +106,13 @@ Agent needs approval
|
|
|
166
106
|
💬 Or reply with questions
|
|
167
107
|
```
|
|
168
108
|
|
|
169
|
-
2. **Ask in chat** — Yield to the user with the same question so they can respond directly
|
|
170
|
-
|
|
171
|
-
3. **If the user responds in chat** — The agent receives the answer immediately. Post confirmation to the Slack thread:
|
|
172
|
-
```
|
|
173
|
-
✅ Approved via VS Code chat. Proceeding.
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
4. **If waiting for Slack reply** — While the agent has non-blocked work, poll every 30 seconds:
|
|
177
|
-
- Use `conversations_replies` with the message's `thread_ts`
|
|
178
|
-
- Continue with independent subtasks between polls
|
|
179
|
-
- When a reply arrives, parse it and proceed
|
|
180
|
-
|
|
181
|
-
5. **If session ends before reply** — Save to checkpoint (see session-checkpoints skill):
|
|
182
|
-
```markdown
|
|
183
|
-
## Pending Approvals
|
|
184
|
-
| Provider | Channel | Thread ID | Question | Posted At |
|
|
185
|
-
|----------|---------|-----------|----------|-----------|
|
|
186
|
-
| slack | C0AHAQFJ7C1 | 1772393542.345149 | Run migration on production? | 2026-03-01 14:30 |
|
|
187
|
-
```
|
|
188
|
-
The next session's `on-session-start` hook checks for replies.
|
|
189
|
-
|
|
190
|
-
### Reading User Responses
|
|
191
|
-
|
|
192
|
-
To check for approvals or instructions:
|
|
109
|
+
2. **Ask in chat** — Yield to the user with the same question so they can respond directly.
|
|
193
110
|
|
|
194
|
-
|
|
195
|
-
2. Use `conversations_history` with `oldest`/`latest` time range to find recent directives
|
|
196
|
-
3. Thread replies are the primary mechanism — reactions are not available via MCP
|
|
111
|
+
3. **If the user responds in chat** — Post confirmation to the Slack thread: `✅ Approved via VS Code chat. Proceeding.`
|
|
197
112
|
|
|
198
|
-
|
|
113
|
+
4. **If waiting for Slack reply** — Poll every 30 seconds using `conversations_replies` with the message's `thread_ts`. Continue independent subtasks between polls.
|
|
199
114
|
|
|
200
|
-
|
|
201
|
-
- **Cross-post confirmation** — when answered in one channel, post confirmation to the other
|
|
202
|
-
- **Conflicting responses** — if both arrive simultaneously, prefer the chat response (it's more intentional)
|
|
115
|
+
5. **If session ends before reply** — Save to checkpoint with channel, thread ID, question, and timestamp. The next session's `on-session-start` hook checks for replies.
|
|
203
116
|
|
|
204
117
|
### Parsing Conventions
|
|
205
118
|
|
|
@@ -211,22 +124,11 @@ To check for approvals or instructions:
|
|
|
211
124
|
| Thread reply with detailed text | Instructions or questions |
|
|
212
125
|
| `@agent` mention | Direct command or question for the agent |
|
|
213
126
|
|
|
214
|
-
> **Note:** Reactions
|
|
127
|
+
> **Note:** Reactions are not available via the Slack MCP server. Use thread replies for all approval workflows.
|
|
215
128
|
|
|
216
129
|
## Channel & Thread Conventions
|
|
217
130
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Project-specific channel mappings are defined in `.opencastle/stack/notifications-config.md`. Agents read that file to determine which channel to post to for each event type. Always prefer channel IDs from the config over hardcoded names.
|
|
221
|
-
|
|
222
|
-
### Default Channel Structure
|
|
223
|
-
|
|
224
|
-
| Channel | Purpose |
|
|
225
|
-
|---------|---------|
|
|
226
|
-
| `#agent-updates` | General agent activity feed |
|
|
227
|
-
| `#agent-approvals` | Approval requests requiring human action |
|
|
228
|
-
| `#agent-errors` | Error reports and blocked tasks |
|
|
229
|
-
| Project-specific channel | All activity for a specific project |
|
|
131
|
+
Project-specific channel mappings are defined in `.opencastle/stack/notifications-config.md`. Always prefer channel IDs from the config over hardcoded names.
|
|
230
132
|
|
|
231
133
|
### Threading Rules
|
|
232
134
|
|
|
@@ -235,79 +137,15 @@ Project-specific channel mappings are defined in `.opencastle/stack/notification
|
|
|
235
137
|
- **Include task ID** — every message references the tracker issue ID
|
|
236
138
|
- **Pin important threads** — pin approval requests and blocking issues
|
|
237
139
|
|
|
238
|
-
## Message Formatting
|
|
239
|
-
|
|
240
|
-
Slack uses a markdown-like syntax with some differences:
|
|
241
|
-
|
|
242
|
-
| Format | Syntax |
|
|
243
|
-
|--------|--------|
|
|
244
|
-
| Bold | `*bold*` |
|
|
245
|
-
| Italic | `_italic_` |
|
|
246
|
-
| Strikethrough | `~strikethrough~` |
|
|
247
|
-
| Code | `` `inline code` `` |
|
|
248
|
-
| Code block | ` ```code block``` ` |
|
|
249
|
-
| Link | `<https://example.com|Display Text>` |
|
|
250
|
-
| User mention | `<@U12345>` |
|
|
251
|
-
| Channel mention | `<#C12345>` |
|
|
252
|
-
| Emoji | `:emoji_name:` |
|
|
253
|
-
| Blockquote | `> quoted text` |
|
|
254
|
-
| List | `• item` or `1. item` |
|
|
255
|
-
|
|
256
140
|
## Rate Limits
|
|
257
141
|
|
|
258
|
-
|
|
259
|
-
|------|-------|------------|
|
|
260
|
-
| Tier 1 | 1 per minute | Rare admin actions |
|
|
261
|
-
| Tier 2 | 20 per minute | Most write operations (`chat:write`) |
|
|
262
|
-
| Tier 3 | 50 per minute | Most read operations |
|
|
263
|
-
| Tier 4 | 100+ per minute | Search, history reads |
|
|
264
|
-
|
|
265
|
-
**Best practices:**
|
|
142
|
+
Write ops are Tier 2 (20/min); read ops Tier 3 (50/min). Best practices:
|
|
266
143
|
- Batch updates into single messages rather than posting many small messages
|
|
267
144
|
- Use threads to consolidate related updates
|
|
268
|
-
- Add 1-second delays between consecutive write operations
|
|
269
145
|
- Cache channel/user IDs — don't look them up repeatedly
|
|
270
146
|
|
|
271
147
|
## Security Considerations
|
|
272
148
|
|
|
273
|
-
- **Bot tokens** are passed via `SLACK_MCP_XOXB_TOKEN` env var
|
|
274
|
-
- **Scope minimization** — request only the scopes agents actually need
|
|
275
|
-
- **
|
|
276
|
-
- **Audit logging** — Slack Enterprise Grid provides audit logs for all API activity
|
|
277
|
-
- **No secrets in messages** — never post tokens, passwords, or credentials in Slack messages (per Constitution #1)
|
|
278
|
-
|
|
279
|
-
## Integration with Agent Workflows
|
|
280
|
-
|
|
281
|
-
### Session Start
|
|
282
|
-
|
|
283
|
-
At the beginning of a work session, post a brief status message:
|
|
284
|
-
```
|
|
285
|
-
🏁 **Session started**
|
|
286
|
-
Agent: Frontend Engineer
|
|
287
|
-
Task: TAS-42 — Add price filter component
|
|
288
|
-
Mode: Autonomous (will request approval for destructive actions)
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Session End
|
|
292
|
-
|
|
293
|
-
At the end of a work session, post a summary:
|
|
294
|
-
```
|
|
295
|
-
🏁 **Session complete**
|
|
296
|
-
Agent: Frontend Engineer
|
|
297
|
-
Task: TAS-42 — Add price filter component
|
|
298
|
-
Result: ✅ PR opened (#123)
|
|
299
|
-
Duration: 12 minutes
|
|
300
|
-
Files changed: 5
|
|
301
|
-
Tests: 12 passing, 0 failing
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Error Recovery
|
|
305
|
-
|
|
306
|
-
If an agent encounters an unrecoverable error, notify before stopping:
|
|
307
|
-
```
|
|
308
|
-
💥 **Session failed**
|
|
309
|
-
Agent: Frontend Engineer
|
|
310
|
-
Task: TAS-42 — Add price filter component
|
|
311
|
-
Error: TypeScript compilation failed — 3 type errors in PriceFilter.tsx
|
|
312
|
-
Action: Posted details in thread. Needs manual fix or re-delegation.
|
|
313
|
-
```
|
|
149
|
+
- **Bot tokens** are passed via `SLACK_MCP_XOXB_TOKEN` env var — never hardcode in config files or commit to git
|
|
150
|
+
- **Scope minimization** — request only the scopes agents actually need
|
|
151
|
+
- **No secrets in messages** — never post tokens, passwords, or credentials in Slack messages
|