opencastle 0.32.5 → 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.
Files changed (69) hide show
  1. package/README.md +13 -3
  2. package/bin/cli.mjs +2 -0
  3. package/package.json +1 -1
  4. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  5. package/src/orchestrator/agents/api-designer.agent.md +25 -34
  6. package/src/orchestrator/agents/architect.agent.md +40 -84
  7. package/src/orchestrator/agents/content-engineer.agent.md +29 -31
  8. package/src/orchestrator/agents/copywriter.agent.md +35 -60
  9. package/src/orchestrator/agents/data-expert.agent.md +24 -30
  10. package/src/orchestrator/agents/database-engineer.agent.md +26 -31
  11. package/src/orchestrator/agents/developer.agent.md +32 -34
  12. package/src/orchestrator/agents/devops-expert.agent.md +31 -26
  13. package/src/orchestrator/agents/documentation-writer.agent.md +29 -29
  14. package/src/orchestrator/agents/performance-expert.agent.md +36 -33
  15. package/src/orchestrator/agents/release-manager.agent.md +25 -34
  16. package/src/orchestrator/agents/researcher.agent.md +41 -95
  17. package/src/orchestrator/agents/reviewer.agent.md +24 -34
  18. package/src/orchestrator/agents/security-expert.agent.md +35 -39
  19. package/src/orchestrator/agents/seo-specialist.agent.md +25 -32
  20. package/src/orchestrator/agents/session-guard.agent.md +20 -79
  21. package/src/orchestrator/agents/team-lead.agent.md +50 -254
  22. package/src/orchestrator/agents/testing-expert.agent.md +37 -49
  23. package/src/orchestrator/agents/ui-ux-expert.agent.md +33 -39
  24. package/src/orchestrator/customizations/KNOWN-ISSUES.md +0 -1
  25. package/src/orchestrator/customizations/agents/skill-matrix.json +12 -0
  26. package/src/orchestrator/instructions/general.instructions.md +24 -84
  27. package/src/orchestrator/plugins/astro/SKILL.md +23 -179
  28. package/src/orchestrator/plugins/convex/SKILL.md +38 -12
  29. package/src/orchestrator/plugins/netlify/SKILL.md +17 -13
  30. package/src/orchestrator/plugins/nextjs/SKILL.md +55 -261
  31. package/src/orchestrator/plugins/nx/SKILL.md +20 -72
  32. package/src/orchestrator/plugins/playwright/SKILL.md +5 -17
  33. package/src/orchestrator/plugins/slack/SKILL.md +28 -190
  34. package/src/orchestrator/plugins/teams/SKILL.md +10 -140
  35. package/src/orchestrator/plugins/vitest/SKILL.md +2 -2
  36. package/src/orchestrator/prompts/bug-fix.prompt.md +25 -63
  37. package/src/orchestrator/prompts/implement-feature.prompt.md +29 -66
  38. package/src/orchestrator/prompts/quick-refinement.prompt.md +31 -66
  39. package/src/orchestrator/skills/accessibility-standards/SKILL.md +50 -105
  40. package/src/orchestrator/skills/agent-hooks/SKILL.md +60 -110
  41. package/src/orchestrator/skills/agent-memory/SKILL.md +44 -93
  42. package/src/orchestrator/skills/api-patterns/SKILL.md +20 -68
  43. package/src/orchestrator/skills/code-commenting/SKILL.md +49 -101
  44. package/src/orchestrator/skills/context-map/SKILL.md +47 -88
  45. package/src/orchestrator/skills/data-engineering/SKILL.md +27 -74
  46. package/src/orchestrator/skills/decomposition/SKILL.md +50 -98
  47. package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +44 -107
  48. package/src/orchestrator/skills/documentation-standards/SKILL.md +28 -89
  49. package/src/orchestrator/skills/fast-review/SKILL.md +51 -276
  50. package/src/orchestrator/skills/frontend-design/SKILL.md +53 -163
  51. package/src/orchestrator/skills/git-workflow/SKILL.md +18 -54
  52. package/src/orchestrator/skills/memory-merger/SKILL.md +51 -88
  53. package/src/orchestrator/skills/observability-logging/SKILL.md +29 -75
  54. package/src/orchestrator/skills/orchestration-protocols/SKILL.md +58 -117
  55. package/src/orchestrator/skills/panel-majority-vote/SKILL.md +65 -140
  56. package/src/orchestrator/skills/performance-optimization/SKILL.md +21 -85
  57. package/src/orchestrator/skills/project-consistency/SKILL.md +62 -281
  58. package/src/orchestrator/skills/react-development/SKILL.md +38 -86
  59. package/src/orchestrator/skills/security-hardening/SKILL.md +40 -84
  60. package/src/orchestrator/skills/self-improvement/SKILL.md +26 -60
  61. package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -105
  62. package/src/orchestrator/skills/session-checkpoints/SKILL.md +26 -68
  63. package/src/orchestrator/skills/team-lead-reference/SKILL.md +66 -206
  64. package/src/orchestrator/skills/testing-workflow/SKILL.md +42 -112
  65. package/src/orchestrator/skills/validation-gates/SKILL.md +39 -170
  66. package/src/orchestrator/snippets/base-output-contract.md +14 -0
  67. package/src/orchestrator/snippets/discovered-issues-policy.md +15 -0
  68. package/src/orchestrator/snippets/logging-mandatory.md +11 -0
  69. package/src/orchestrator/snippets/never-expose-secrets.md +22 -0
@@ -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 (loaded from `.env` or `envFile`) |
19
- | **Extra env** | `SLACK_MCP_ADD_MESSAGE_TOOL=true` — enables the `conversations_add_message` tool |
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
- The `@kazuph/mcp-slack` server supports multiple token types (only one is needed):
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
- | Env Variable | Token Type | Notes |
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 and their metadata |
38
- | `channels:history` | Read messages in public channels |
39
- | `channels:manage` | Create/rename channels, set topics (optional) |
40
- | `groups:read` | List private channels |
41
- | `groups:history` | Read messages in private channels |
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
- | Tool | Description | Key Parameters |
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` (ID or name), `payload` (message text), `content_type` (`text/markdown` or `text/plain`, default: `text/markdown`), `thread_ts` (optional, for threading) |
74
- | `conversations_history` | Read recent messages from a channel | `channel_id`, `limit` (time range like `1d`/`7d`/`30d` or message count like `50`), `cursor` |
75
- | `conversations_replies` | Get replies in a thread | `channel_id`, `thread_ts`, `limit`, `cursor` |
76
- | `conversations_search_messages` | Search messages across channels | `search_query`, `filter_in_channel`, `filter_users_from`, `filter_date_before`/`after`/`on`/`during`, `limit` (1-100) |
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
- | Tool | Description | Key Parameters |
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 Documented Slack Web API
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 reactions are not available via this MCP server
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 (from either channel) wins.
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 in the chat window.
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
- 1. Use `conversations_replies` with the `thread_ts` of the approval message to read replies
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
- ### Resolution Rule
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
- - **First response wins** — whether from chat or Slack
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 (emoji responses) are not available via the Slack MCP server. Use thread replies for all approval workflows.
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
- ### Channel Configuration
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
- | Tier | Limit | Applies to |
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 (in `.env` file) — never hardcode in config files or commit to git
274
- - **Scope minimization** — request only the scopes agents actually need (omit `channels:manage` if agents shouldn't create channels)
275
- - **Channel restrictions** — limit the bot to specific channels rather than granting workspace-wide access
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
@@ -26,26 +26,14 @@ Agent communication patterns via the Microsoft Teams MCP server (Microsoft Agent
26
26
  3. **Graph API permissions:** `McpServers.Teams.All` (delegated or application)
27
27
  4. **Admin consent** for the registered app
28
28
 
29
- > **Note:** The Teams MCP server is in preview and not yet generally available as a standalone endpoint. Features and availability may change.
30
-
31
29
  ## Available MCP Tools
32
30
 
33
- The Teams MCP server exposes tools for:
34
-
35
- - **Chats** — Create, list, read, update, delete chats
36
- - **Messages** — Send, read, edit, delete messages in chats and channels
37
- - **Channels** — List, create, manage channel settings
38
- - **Members** — List, add, remove members from chats and channels
39
- - **Teams** — List teams, get team details, manage team settings
40
-
41
- Tool names follow the pattern `teams_<resource>_<action>`. Use tool discovery to list available tools at runtime.
31
+ Tool names follow `teams_<resource>_<action>`. Covers: chats, messages, channels, members, and team settings. Use tool discovery to list available tools at runtime.
42
32
 
43
33
  ## Agent Notification Patterns
44
34
 
45
35
  ### Progress Updates
46
36
 
47
- Post structured progress updates to a designated channel:
48
-
49
37
  ```
50
38
  Channel: Agent Updates (or project-specific channel)
51
39
  Format:
@@ -55,52 +43,21 @@ Format:
55
43
  **ETA:** ~5 minutes
56
44
  ```
57
45
 
58
- ### Completion Notifications
59
-
60
- ```
61
- ✅ **Task:** TAS-42 — Add price filter component
62
- **Status:** Complete — PR opened
63
- **PR:** https://github.com/org/repo/pull/123
64
- **Summary:** Added PriceRangeFilter with 4 range options, 12 unit tests passing
65
- ```
66
-
67
- ### Error / Blocking Notifications
68
-
69
- ```
70
- 🚨 **Task:** TAS-42 — Add price filter component
71
- **Status:** Blocked — needs human input
72
- **Issue:** Cannot determine correct price ranges for the market
73
- **Action needed:** Reply in this thread with the desired price range values
74
- ```
46
+ ## Human-in-the-Loop Approval
75
47
 
76
- ## Bi-Directional Communication
77
-
78
- ### Human-in-the-Loop Approval
79
-
80
- When an agent needs approval before proceeding:
81
-
82
- 1. **Post approval request** to the channel with clear instructions:
48
+ 1. **Post approval request** to the channel:
83
49
  ```
84
50
  ⏳ **Approval Required**
85
51
  Task: TAS-42 — Database migration adds `price_range` column
86
52
  Action: Run migration on production database
87
-
53
+
88
54
  Reply with:
89
55
  ✅ Approve — to proceed
90
56
  ❌ Reject — to stop
91
57
  Or reply with questions/comments
92
58
  ```
93
-
94
- 2. **Poll for response** — Read replies to determine the decision
95
- 3. **Acknowledge** — Post confirmation of the action taken
96
-
97
- ### Reading User Responses
98
-
99
- To check for approvals or instructions:
100
-
101
- 1. Read message replies in the channel or chat thread
102
- 2. Parse reply content for approval keywords (`approve`, `approved`, `yes`, `proceed`, `reject`, `no`, `stop`)
103
- 3. Check for reactions on messages (Teams supports reactions via Graph API)
59
+ 2. **Poll for response** — Read replies to determine the decision.
60
+ 3. **Acknowledge** — Post confirmation of the action taken.
104
61
 
105
62
  ### Parsing Conventions
106
63
 
@@ -114,15 +71,6 @@ To check for approvals or instructions:
114
71
 
115
72
  ## Channel & Chat Conventions
116
73
 
117
- ### Channel Structure
118
-
119
- | Channel | Purpose |
120
- |---------|---------|
121
- | Agent Updates | General agent activity feed |
122
- | Agent Approvals | Approval requests requiring human action |
123
- | Agent Errors | Error reports and blocked tasks |
124
- | Project-specific channel | All activity for a specific project |
125
-
126
74
  ### Threading Rules
127
75
 
128
76
  - **Always reply in threads** — use message replies, not top-level posts for follow-ups
@@ -130,33 +78,11 @@ To check for approvals or instructions:
130
78
  - **Include task ID** — every message references the tracker issue ID
131
79
  - **Mark important messages** — use importance flags for approval requests
132
80
 
133
- ### Chat vs Channel
134
-
135
- | Use Case | Preferred |
136
- |----------|-----------|
137
- | Team-wide updates | Channel |
138
- | Approval requests | Channel (for visibility) |
139
- | Direct questions | 1:1 or group chat |
140
- | Sensitive discussions | 1:1 chat |
141
-
142
81
  ## Message Formatting
143
82
 
144
- Teams messages support HTML and a subset of Markdown:
145
-
146
- | Format | Syntax |
147
- |--------|--------|
148
- | Bold | `**bold**` or `<strong>bold</strong>` |
149
- | Italic | `*italic*` or `<em>italic</em>` |
150
- | Code | `` `inline code` `` |
151
- | Code block | ` ```code block``` ` |
152
- | Link | `[Display Text](https://example.com)` |
153
- | User mention | `<at>User Name</at>` (requires user ID in adaptive card) |
154
- | List | `- item` or `1. item` |
155
- | Heading | `### Heading` |
156
-
157
83
  ### Adaptive Cards
158
84
 
159
- For richer formatting, Teams supports Adaptive Cards (JSON-based card format):
85
+ For richer formatting, use Adaptive Cards (JSON-based):
160
86
 
161
87
  ```json
162
88
  {
@@ -178,74 +104,18 @@ Use Adaptive Cards for approval workflows when available — they provide struct
178
104
 
179
105
  ## Rate Limits
180
106
 
181
- Microsoft Graph API rate limits for Teams:
182
-
183
- | Resource | Limit |
184
- |----------|-------|
185
- | Messages (per app per tenant) | 50 per second |
186
- | Channel messages | 50 per second |
187
- | Chat creation | 50 per second |
188
- | Individual API calls | 10,000 per 10 minutes |
107
+ Microsoft Graph API: 50 messages/second per app per tenant; 10,000 individual API calls per 10 minutes.
189
108
 
190
109
  **Best practices:**
191
110
  - Batch updates into single messages rather than posting many small messages
192
- - Use threads to consolidate related updates
193
111
  - Cache team/channel/user IDs — don't look them up repeatedly
194
- - Respect 429 (Too Many Requests) responses with retry-after headers
195
112
 
196
113
  ## Security Considerations
197
114
 
198
115
  - **OAuth tokens** are managed by the MCP server — agents never see raw tokens
199
116
  - **Scope minimization** — request only the Graph API permissions agents actually need
200
- - **Tenant restrictions** — configure the app for single-tenant or specific tenant access
201
- - **Conditional Access** — Microsoft Entra Conditional Access policies apply to API calls
202
- - **Audit logging** — Microsoft 365 audit logs capture all Graph API activity
203
- - **No secrets in messages** — never post tokens, passwords, or credentials in Teams messages (per Constitution #1)
204
- - **Data residency** — Teams data is stored in the tenant's Microsoft 365 region
205
-
206
- ## Integration with Agent Workflows
207
-
208
- ### Session Start
209
-
210
- At the beginning of a work session, post a brief status message:
211
- ```
212
- 🏁 **Session started**
213
- Agent: Frontend Engineer
214
- Task: TAS-42 — Add price filter component
215
- Mode: Autonomous (will request approval for destructive actions)
216
- ```
217
-
218
- ### Session End
219
-
220
- At the end of a work session, post a summary:
221
- ```
222
- 🏁 **Session complete**
223
- Agent: Frontend Engineer
224
- Task: TAS-42 — Add price filter component
225
- Result: ✅ PR opened (#123)
226
- Duration: 12 minutes
227
- Files changed: 5
228
- Tests: 12 passing, 0 failing
229
- ```
230
-
231
- ### Error Recovery
232
-
233
- If an agent encounters an unrecoverable error, notify before stopping:
234
- ```
235
- 💥 **Session failed**
236
- Agent: Frontend Engineer
237
- Task: TAS-42 — Add price filter component
238
- Error: TypeScript compilation failed — 3 type errors in PriceFilter.tsx
239
- Action: Posted details in thread. Needs manual fix or re-delegation.
240
- ```
117
+ - **No secrets in messages** — never post tokens, passwords, or credentials in Teams messages
241
118
 
242
119
  ## Preview Limitations
243
120
 
244
- Since the Teams MCP server is in Frontier preview:
245
-
246
- - **Availability** may change without notice
247
- - **Tool surface** may be incomplete compared to the full Graph API
248
- - **Performance** may vary during preview
249
- - **Breaking changes** are possible between preview versions
250
-
251
- Check [Microsoft Agent 365 documentation](https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/) for the latest status.
121
+ The Teams MCP server is in Frontier preview — availability and tool surface may change without notice. Check [Microsoft Agent 365 documentation](https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/) for the latest status.
@@ -158,9 +158,9 @@ export default defineConfig({
158
158
  - Use `describe` blocks to group related tests
159
159
  - Each test should be independent — no shared mutable state between tests
160
160
  - Clean up mocks with `vi.restoreAllMocks()` in `afterEach`
161
- - Use `vi.mock()` at the top level Vitest hoists mock calls automatically
161
+ - Mock dependencies before imports — `vi.mock()` calls are hoisted automatically but declare them at the top for clarity
162
162
  - Prefer `toEqual` for objects, `toBe` for primitives
163
163
  - Use `test.each` for parameterized tests
164
164
  - Set coverage thresholds to prevent regression
165
165
  - Use `vi.useFakeTimers()` for time-dependent code — never `setTimeout` in tests
166
- - Use `--reporter=json` in CI for machine-readable output
166
+ - Aim for 3-5 focused tests per file for maintainability — split large test suites