@prmichaelsen/reddit-mcp 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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +23 -0
  2. package/.env.example +13 -0
  3. package/AGENT.md +1772 -0
  4. package/README.md +54 -0
  5. package/agent/commands/acp.clarification-capture.md +386 -0
  6. package/agent/commands/acp.clarification-create.md +432 -0
  7. package/agent/commands/acp.clarifications-research.md +326 -0
  8. package/agent/commands/acp.command-create.md +432 -0
  9. package/agent/commands/acp.design-create.md +286 -0
  10. package/agent/commands/acp.design-reference.md +355 -0
  11. package/agent/commands/acp.index.md +423 -0
  12. package/agent/commands/acp.init.md +546 -0
  13. package/agent/commands/acp.package-create.md +895 -0
  14. package/agent/commands/acp.package-info.md +212 -0
  15. package/agent/commands/acp.package-install.md +539 -0
  16. package/agent/commands/acp.package-list.md +280 -0
  17. package/agent/commands/acp.package-publish.md +541 -0
  18. package/agent/commands/acp.package-remove.md +293 -0
  19. package/agent/commands/acp.package-search.md +307 -0
  20. package/agent/commands/acp.package-update.md +361 -0
  21. package/agent/commands/acp.package-validate.md +540 -0
  22. package/agent/commands/acp.pattern-create.md +386 -0
  23. package/agent/commands/acp.plan.md +577 -0
  24. package/agent/commands/acp.proceed.md +882 -0
  25. package/agent/commands/acp.project-create.md +675 -0
  26. package/agent/commands/acp.project-info.md +312 -0
  27. package/agent/commands/acp.project-list.md +226 -0
  28. package/agent/commands/acp.project-remove.md +379 -0
  29. package/agent/commands/acp.project-set.md +227 -0
  30. package/agent/commands/acp.project-update.md +307 -0
  31. package/agent/commands/acp.projects-restore.md +228 -0
  32. package/agent/commands/acp.projects-sync.md +347 -0
  33. package/agent/commands/acp.report.md +407 -0
  34. package/agent/commands/acp.resume.md +239 -0
  35. package/agent/commands/acp.sessions.md +301 -0
  36. package/agent/commands/acp.status.md +293 -0
  37. package/agent/commands/acp.sync.md +364 -0
  38. package/agent/commands/acp.task-create.md +500 -0
  39. package/agent/commands/acp.update.md +302 -0
  40. package/agent/commands/acp.validate.md +466 -0
  41. package/agent/commands/acp.version-check-for-updates.md +276 -0
  42. package/agent/commands/acp.version-check.md +191 -0
  43. package/agent/commands/acp.version-update.md +289 -0
  44. package/agent/commands/command.template.md +339 -0
  45. package/agent/commands/git.commit.md +526 -0
  46. package/agent/commands/git.init.md +514 -0
  47. package/agent/design/.gitkeep +0 -0
  48. package/agent/design/design.template.md +154 -0
  49. package/agent/design/requirements.md +332 -0
  50. package/agent/design/requirements.template.md +387 -0
  51. package/agent/index/.gitkeep +0 -0
  52. package/agent/index/local.main.template.yaml +37 -0
  53. package/agent/manifest.template.yaml +13 -0
  54. package/agent/manifest.yaml +61 -0
  55. package/agent/milestones/.gitkeep +0 -0
  56. package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
  57. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  58. package/agent/milestones/milestone-2-content-interaction.md +56 -0
  59. package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
  60. package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
  61. package/agent/milestones/milestone-5-moderation.md +53 -0
  62. package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
  63. package/agent/package.template.yaml +86 -0
  64. package/agent/patterns/.gitkeep +0 -0
  65. package/agent/patterns/bootstrap.template.md +1237 -0
  66. package/agent/patterns/pattern.template.md +382 -0
  67. package/agent/progress.template.yaml +161 -0
  68. package/agent/progress.yaml +223 -0
  69. package/agent/schemas/package.schema.yaml +276 -0
  70. package/agent/scripts/acp.common.sh +1781 -0
  71. package/agent/scripts/acp.yaml-parser.sh +985 -0
  72. package/agent/tasks/.gitkeep +0 -0
  73. package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
  74. package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
  75. package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
  76. package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
  77. package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
  78. package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
  79. package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
  80. package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
  81. package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
  82. package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
  83. package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
  84. package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
  85. package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
  86. package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
  87. package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
  88. package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
  89. package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
  90. package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
  91. package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
  92. package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
  93. package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
  94. package/agent/tasks/task-1-{title}.template.md +244 -0
  95. package/dist/auth/oauth.d.ts +15 -0
  96. package/dist/auth/oauth.d.ts.map +1 -0
  97. package/dist/client/reddit.d.ts +28 -0
  98. package/dist/client/reddit.d.ts.map +1 -0
  99. package/dist/factory.d.ts +2 -0
  100. package/dist/factory.d.ts.map +1 -0
  101. package/dist/factory.js +30394 -0
  102. package/dist/factory.js.map +7 -0
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +31955 -0
  106. package/dist/index.js.map +7 -0
  107. package/dist/server.d.ts +5 -0
  108. package/dist/server.d.ts.map +1 -0
  109. package/dist/server.js +30401 -0
  110. package/dist/server.js.map +7 -0
  111. package/dist/tools/listings.d.ts +4 -0
  112. package/dist/tools/listings.d.ts.map +1 -0
  113. package/dist/tools/search.d.ts +4 -0
  114. package/dist/tools/search.d.ts.map +1 -0
  115. package/dist/transport/http.d.ts +7 -0
  116. package/dist/transport/http.d.ts.map +1 -0
  117. package/dist/types/index.d.ts +78 -0
  118. package/dist/types/index.d.ts.map +1 -0
  119. package/esbuild.build.js +21 -0
  120. package/jest.config.js +18 -0
  121. package/package.json +46 -0
  122. package/src/auth/oauth.ts +200 -0
  123. package/src/client/reddit.ts +245 -0
  124. package/src/factory.ts +5 -0
  125. package/src/index.ts +31 -0
  126. package/src/server.ts +36 -0
  127. package/src/tools/listings.ts +202 -0
  128. package/src/tools/search.ts +85 -0
  129. package/src/transport/http.ts +49 -0
  130. package/src/types/index.ts +83 -0
  131. package/tests/fixtures/reddit-responses.ts +132 -0
  132. package/tests/helpers/mock-client.ts +36 -0
  133. package/tests/unit/auth.test.ts +89 -0
  134. package/tests/unit/client.test.ts +218 -0
  135. package/tests/unit/listings.test.ts +113 -0
  136. package/tests/unit/search.test.ts +59 -0
  137. package/tests/unit/server.test.ts +14 -0
  138. package/tsconfig.json +21 -0
@@ -0,0 +1,355 @@
1
+ # Directive: design-reference
2
+
3
+ > **🤖 Agent Directive**: This is a **SHARED DIRECTIVE**, not a user-invocable command.
4
+ > It is referenced by `@acp.task-create`, `@acp.plan` (via task-create delegation), and `@acp.proceed` to discover and cross-reference design documents, ensuring tasks contain all implementation detail.
5
+ >
6
+ > **Do NOT invoke this directive directly.** It is called internally by commands that need design document context.
7
+ >
8
+ > If you are a command reading this file, follow the steps below to discover relevant design documents, extract actionable elements, and return them to the calling command.
9
+
10
+ **Namespace**: acp
11
+ **Version**: 1.0.0
12
+ **Created**: 2026-03-07
13
+ **Last Updated**: 2026-03-07
14
+ **Status**: Active
15
+ **Scripts**: None
16
+
17
+ ---
18
+
19
+ **Purpose**: Discover and cross-reference design documents to ensure tasks have complete implementation detail
20
+ **Category**: Workflow (Internal Directive)
21
+ **Frequency**: Called by task-create and proceed when design context is needed
22
+
23
+ ---
24
+
25
+ ## Arguments
26
+
27
+ These arguments are passed as context from the calling command. The directive uses them to determine search scope.
28
+
29
+ | Input | Source | Description |
30
+ |---|---|---|
31
+ | `topic_keywords` | Calling command | Keywords extracted from task name, milestone name, or user description |
32
+ | `milestone_name` | Calling command | Current milestone name (optional, improves search accuracy) |
33
+ | `user_description` | Calling command | User's description of the task or feature (optional) |
34
+ | `draft_content` | Calling command | Draft file content if provided (optional) |
35
+
36
+ The directive combines these inputs to form a search query. More inputs produce better matches.
37
+
38
+ ---
39
+
40
+ ## What This Directive Does
41
+
42
+ This directive dynamically discovers design documents relevant to the current task or feature, reads them, extracts all actionable implementation elements, and returns them to the calling command. The calling command uses these elements to generate self-contained tasks or to load supplementary context during implementation.
43
+
44
+ **Key behaviors**:
45
+ - Always searches `agent/design/` — no explicit links or configuration required
46
+ - Uses keyword matching against filenames and content
47
+ - Reads all relevant documents (not just the first match)
48
+ - Extracts 8 categories of actionable elements
49
+ - Flags incomplete or vague design areas
50
+ - Returns structured data to the calling command
51
+ - Read-only — never modifies any files
52
+
53
+ ---
54
+
55
+ ## Prerequisites
56
+
57
+ - [ ] Called from within a command that needs design context (task-create, plan, proceed)
58
+ - [ ] `agent/design/` directory exists
59
+ - [ ] At least one design document exists (non-template)
60
+
61
+ ---
62
+
63
+ ## Steps
64
+
65
+ ### 1. Determine Topic
66
+
67
+ Extract topic keywords from the calling context to form a search query.
68
+
69
+ **Actions**:
70
+ - Collect keywords from all available inputs:
71
+ - **Task name**: e.g., "Create @acp.clarification-capture Directive" → keywords: `clarification`, `capture`, `directive`
72
+ - **Milestone name**: e.g., "Clarification Capture System" → keywords: `clarification`, `capture`, `system`
73
+ - **User description**: Extract nouns and action words
74
+ - **Draft content**: Extract topic-relevant terms from first ~20 lines
75
+ - Deduplicate keywords
76
+ - Combine into a search query (e.g., `clarification capture system directive`)
77
+ - Strip common ACP terms that would match too broadly (`acp`, `command`, `task`, `system`, `implement`, `create`, `update`)
78
+
79
+ **Expected Outcome**: Set of topic keywords for search
80
+
81
+ ### 2. Search for Design Documents
82
+
83
+ Search `agent/design/` for documents matching the topic.
84
+
85
+ **Actions**:
86
+ - List all files in `agent/design/` excluding `*.template.md`
87
+ - For each file, score relevance:
88
+ - **Filename match** (high confidence): Convert filename to keywords (e.g., `local.clarification-capture-system.md` → `clarification`, `capture`, `system`). Count keyword overlaps with topic.
89
+ - **Content match** (medium confidence): If filename match is borderline (1 keyword overlap), read first ~50 lines and check for topic keyword presence in Overview/Problem Statement sections.
90
+ - Classify each file:
91
+ - **Relevant**: 2+ keyword overlaps in filename, or 1 filename + 3+ content overlaps
92
+ - **Not relevant**: 0 keyword overlaps, or only 1 generic overlap
93
+ - **Borderline**: 1 specific keyword overlap — read content to decide
94
+ - Read all relevant documents in full
95
+ - Sort by relevance score (filename matches > content matches)
96
+
97
+ **Expected Outcome**: List of relevant design documents read and scored
98
+
99
+ ### 3. Report Findings
100
+
101
+ Display what was found to the user.
102
+
103
+ **When designs found**:
104
+ ```
105
+ Design Reference: Searching agent/design/...
106
+ Found: local.clarification-capture-system.md (relevant)
107
+ Found: acp-commands-design.md (not relevant, skipped)
108
+ Found: local.key-file-index-system.md (not relevant, skipped)
109
+
110
+ 1 design document loaded for cross-reference
111
+ ```
112
+
113
+ **When no designs found**:
114
+ ```
115
+ Design Reference: No design documents found for topic "{topic keywords}"
116
+ Tasks will be created from available context only.
117
+ ```
118
+
119
+ **Expected Outcome**: User informed of which designs were found/skipped
120
+
121
+ ### 4. Extract Design Elements
122
+
123
+ Parse the relevant design document(s) and extract all actionable elements organized by category.
124
+
125
+ **Actions**:
126
+ - Read each relevant design document section by section
127
+ - Extract elements into these 8 categories:
128
+
129
+ | Category | What to Extract | Where to Look |
130
+ |---|---|---|
131
+ | Implementation steps/flows | Specific sequences of operations, numbered steps, flow diagrams, invocation flows | Solution, Implementation sections |
132
+ | Argument/parameter tables | Inputs, flags, aliases, behaviors — preserve exact table format | Solution, Implementation sections |
133
+ | UX specifications | Warning messages, prompt text, display formats — preserve exact text including code blocks | Implementation section, any "Display format" subsections |
134
+ | Edge cases and error handling | Boundary conditions, failure modes, what-if scenarios | Testing Strategy, Trade-offs, Implementation sections |
135
+ | Format specifications | Output structure, naming conventions, file format rules, template formats | Implementation, Solution sections |
136
+ | Integration points | Connections to other commands/systems, affected commands tables, which files are modified | Implementation section, "Affected Commands" subsections |
137
+ | Lifecycle rules | Status transitions, cleanup behavior, ordering constraints, migration steps | Implementation, Migration Path sections |
138
+ | Decision rationale | Why choices were made, alternatives rejected, trade-offs accepted | Key Design Decisions, Trade-offs, Benefits sections |
139
+
140
+ - For each element, record:
141
+ - The element content (preserve verbatim where possible, especially tables and code blocks)
142
+ - Which design section it came from
143
+ - Which category it belongs to
144
+
145
+ **Expected Outcome**: Complete inventory of design elements organized by category
146
+
147
+ ### 5. Flag Design Gaps
148
+
149
+ If any section of the design document is vague, incomplete, or marked TBD, flag it.
150
+
151
+ **Actions**:
152
+ - Scan for indicators of incompleteness:
153
+ - Sections with only placeholder text or one-liners
154
+ - "TBD", "TODO", "to be determined" markers
155
+ - Empty sections (heading with no content)
156
+ - Vague language without specifics ("appropriate handling", "as needed")
157
+ - If gaps found, display:
158
+
159
+ ```
160
+ Design gaps detected in {filename}:
161
+ - {Section name}: {description of gap}
162
+ - {Section name}: {description of gap}
163
+
164
+ Suggest creating a clarification? (yes/no)
165
+ ```
166
+
167
+ - If user says **yes**: Suggest invoking `@acp.clarification-create` targeting the specific gaps. Halt the directive and let the user address gaps first.
168
+ - If user says **no**: Proceed with available detail. Include a note about gaps in the returned data so the calling command can mention them in the task.
169
+
170
+ **Expected Outcome**: Design gaps identified and user informed; decision made on whether to address them
171
+
172
+ ### 6. Return Elements to Calling Command
173
+
174
+ Pass the extracted data back to the calling command.
175
+
176
+ **Return data**:
177
+ - **design_elements**: List of elements grouped by category (8 categories)
178
+ - **design_gaps**: List of identified gaps (section name + description), or empty if none
179
+ - **design_paths**: Path(s) to the relevant design document(s) found (for the Design Reference metadata field)
180
+ - **design_names**: Human-readable name(s) of the design document(s)
181
+
182
+ **The calling command uses this data to**:
183
+ - **task-create**: Expand task steps with implementation detail from design elements; add verification items for each design requirement; set Design Reference metadata field; carry Key Design Decisions into the task
184
+ - **proceed**: Load design context as supplementary "why" information during implementation; consult when ambiguity or edge cases arise
185
+
186
+ **Expected Outcome**: Calling command receives structured design data for integration
187
+
188
+ ---
189
+
190
+ ## Verification
191
+
192
+ - [ ] Step 1 (Determine Topic) extracts keywords from task name, milestone name, user description, and draft content
193
+ - [ ] Step 1 strips overly common ACP terms to avoid false matches
194
+ - [ ] Step 2 (Search) lists all non-template files in `agent/design/`
195
+ - [ ] Step 2 scores by filename keyword overlap and content keyword overlap
196
+ - [ ] Step 2 reads first ~50 lines for borderline matches
197
+ - [ ] Step 2 reads all relevant documents in full (not just first match)
198
+ - [ ] Step 3 (Report) uses the exact "found"/"not found" display formats specified
199
+ - [ ] Step 4 (Extract) covers all 8 categories with specific extraction guidance per category
200
+ - [ ] Step 4 preserves verbatim content for tables, code blocks, and UX text
201
+ - [ ] Step 5 (Flag Gaps) detects TBD, TODO, placeholder text, empty sections, vague language
202
+ - [ ] Step 5 offers clarification creation for gaps
203
+ - [ ] Step 5 allows user to skip gaps and proceed
204
+ - [ ] Step 6 (Return) returns design_elements, design_gaps, design_paths, design_names
205
+ - [ ] Step 6 documents how each calling command uses the returned data
206
+ - [ ] Directive is read-only (never modifies files)
207
+
208
+ ---
209
+
210
+ ## Expected Output
211
+
212
+ ### Console Output (during execution)
213
+ ```
214
+ Design Reference: Searching agent/design/...
215
+ Found: local.design-reference-system.md (relevant)
216
+ Found: acp-commands-design.md (not relevant, skipped)
217
+
218
+ 1 design document loaded for cross-reference
219
+ Extracted: 15 elements across 6 categories
220
+ Gaps: None detected
221
+ ```
222
+
223
+ ### Data Returned to Calling Command
224
+ ```
225
+ design_elements:
226
+ implementation_steps: [...]
227
+ argument_tables: [...]
228
+ ux_specifications: [...]
229
+ edge_cases: [...]
230
+ format_specifications: [...]
231
+ integration_points: [...]
232
+ lifecycle_rules: [...]
233
+ decision_rationale: [...]
234
+
235
+ design_gaps: []
236
+
237
+ design_paths:
238
+ - agent/design/local.design-reference-system.md
239
+
240
+ design_names:
241
+ - Design Reference System
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Examples
247
+
248
+ ### Example 1: task-create finds relevant design
249
+
250
+ **Context**: User invokes `@acp.task-create` for a task about "clarification capture"
251
+
252
+ **Flow**: Directive searches `agent/design/`, matches `local.clarification-capture-system.md` by filename keywords, reads it, extracts 8-step directive flow + argument table + UX warning format + affected commands table + lifecycle rules. Returns all to task-create. Task is generated with full implementation detail.
253
+
254
+ ### Example 2: No design document exists
255
+
256
+ **Context**: User invokes `@acp.task-create` for a task about "user preferences"
257
+
258
+ **Flow**: Directive searches `agent/design/`, no filenames match "preferences" (M6 has no design doc yet). Reports "No design documents found." Task is created from available context only (user input, draft, clarifications).
259
+
260
+ ### Example 3: Multiple relevant designs
261
+
262
+ **Context**: User invokes `@acp.task-create` for a task about "package validation"
263
+
264
+ **Flow**: Directive finds both `acp-package-management-system.md` and `local.experimental-features-system.md` as relevant. Reads both. Extracts elements from each. Returns combined elements to task-create.
265
+
266
+ ### Example 4: Design has gaps
267
+
268
+ **Context**: User invokes `@acp.task-create` for a feature whose design has a TBD Testing Strategy
269
+
270
+ **Flow**: Directive reads design, extracts elements, flags "Testing Strategy: marked TBD". Asks user whether to create clarification. User says no. Task is created with a note about the gap.
271
+
272
+ ### Example 5: proceed loads design context
273
+
274
+ **Context**: Agent runs `@acp.proceed` on a task with `Design Reference: [Clarification Capture System](../design/local.clarification-capture-system.md)`
275
+
276
+ **Flow**: Proceed reads the linked design document. Uses it as supplementary context during implementation — consulting it when the task step is ambiguous or when an unlisted edge case arises.
277
+
278
+ ---
279
+
280
+ ## Related Commands
281
+
282
+ - [`@acp.clarification-capture`](acp.clarification-capture.md) - Sister shared directive for clarification context capture
283
+ - [`@acp.task-create`](acp.task-create.md) - Calls this directive during task creation (Step 5.5)
284
+ - [`@acp.plan`](acp.plan.md) - Calls this directive via task-create delegation
285
+ - [`@acp.proceed`](acp.proceed.md) - Calls this directive during implementation for design context
286
+ - [`@acp.design-create`](acp.design-create.md) - Creates the design documents this directive discovers
287
+
288
+ ---
289
+
290
+ ## Troubleshooting
291
+
292
+ ### Issue 1: Wrong design document matched
293
+
294
+ **Symptom**: Directive loads an unrelated design document
295
+
296
+ **Cause**: Keyword overlap on generic terms (e.g., "system", "command")
297
+
298
+ **Solution**: Step 1 strips overly common terms. If false matches persist, the user can indicate which design is relevant when the report is displayed.
299
+
300
+ ### Issue 2: Design document not found despite existing
301
+
302
+ **Symptom**: Directive reports "no design documents found" but one exists
303
+
304
+ **Cause**: Filename keywords don't overlap with topic keywords
305
+
306
+ **Solution**: User can provide additional context (mention the design doc name) or use a more specific task/milestone name. The calling command can also pass the design path explicitly if known.
307
+
308
+ ### Issue 3: Too many elements extracted
309
+
310
+ **Symptom**: Returned elements are overwhelming for a single task
311
+
312
+ **Cause**: Design document covers a broad feature with many tasks
313
+
314
+ **Solution**: The calling command (task-create) filters elements by relevance to the specific task being created. Not all elements from the design need to appear in every task — only those relevant to the task's scope.
315
+
316
+ ---
317
+
318
+ ## Security Considerations
319
+
320
+ ### File Access
321
+ - **Reads**: `agent/design/*.md` (non-template), first ~50 lines for borderline matches
322
+ - **Writes**: None (read-only directive)
323
+ - **Executes**: None
324
+
325
+ ### Network Access
326
+ - **APIs**: None
327
+ - **Repositories**: None
328
+
329
+ ### Sensitive Data
330
+ - **Secrets**: Never include secrets in extracted elements
331
+ - **Credentials**: Never include credentials in output
332
+
333
+ ---
334
+
335
+ ## Notes
336
+
337
+ - This directive is modeled after `@acp.clarification-capture` (same shared directive pattern)
338
+ - Discovery is always dynamic — no explicit links or configuration required
339
+ - Multiple design documents can be loaded and cross-referenced
340
+ - The directive is read-only — it never modifies any files
341
+ - Context window cost is mitigated by keyword filtering (only relevant docs loaded, borderline checked via first ~50 lines)
342
+ - The calling command decides how to use the returned elements — the directive just extracts and returns
343
+ - When called by `@acp.proceed`, the design context is supplementary (task is primary)
344
+ - When called by `@acp.task-create`, the design elements are mandatory inputs for task generation
345
+
346
+ ---
347
+
348
+ **Namespace**: acp
349
+ **Command**: design-reference
350
+ **Version**: 1.0.0
351
+ **Created**: 2026-03-07
352
+ **Last Updated**: 2026-03-07
353
+ **Status**: Active
354
+ **Compatibility**: ACP 5.13.1+
355
+ **Author**: ACP Project