@prmichaelsen/remember-mcp 3.19.3 → 4.0.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/AGENT.md +10 -3
- package/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/agent/commands/acp.artifact-glossary.md +530 -0
- package/agent/commands/acp.artifact-reference.md +591 -0
- package/agent/commands/acp.artifact-research.md +594 -0
- package/agent/commands/acp.audit.md +345 -0
- package/agent/commands/acp.clarification-address.md +185 -88
- package/agent/commands/acp.clarification-capture.md +44 -44
- package/agent/commands/acp.clarification-create.md +41 -42
- package/agent/commands/acp.command-create.md +49 -49
- package/agent/commands/acp.design-create.md +53 -35
- package/agent/commands/acp.design-reference.md +42 -42
- package/agent/commands/acp.handoff.md +35 -35
- package/agent/commands/acp.index.md +47 -47
- package/agent/commands/acp.init.md +105 -69
- package/agent/commands/acp.package-create.md +41 -41
- package/agent/commands/acp.package-info.md +40 -40
- package/agent/commands/acp.package-install.md +48 -48
- package/agent/commands/acp.package-list.md +40 -40
- package/agent/commands/acp.package-publish.md +62 -62
- package/agent/commands/acp.package-remove.md +41 -41
- package/agent/commands/acp.package-search.md +48 -48
- package/agent/commands/acp.package-update.md +50 -50
- package/agent/commands/acp.package-validate.md +52 -52
- package/agent/commands/acp.pattern-create.md +61 -43
- package/agent/commands/acp.plan.md +70 -47
- package/agent/commands/acp.proceed.md +188 -66
- package/agent/commands/acp.project-create.md +42 -42
- package/agent/commands/acp.project-info.md +46 -46
- package/agent/commands/acp.project-list.md +41 -41
- package/agent/commands/acp.project-remove.md +36 -36
- package/agent/commands/acp.project-set.md +33 -33
- package/agent/commands/acp.project-update.md +57 -57
- package/agent/commands/acp.projects-restore.md +37 -37
- package/agent/commands/acp.projects-sync.md +39 -39
- package/agent/commands/acp.report.md +50 -50
- package/agent/commands/acp.resume.md +36 -36
- package/agent/commands/acp.sessions.md +46 -46
- package/agent/commands/acp.status.md +43 -43
- package/agent/commands/acp.sync.md +109 -56
- package/agent/commands/acp.task-create.md +51 -49
- package/agent/commands/acp.update.md +66 -45
- package/agent/commands/acp.validate.md +110 -52
- package/agent/commands/acp.version-check-for-updates.md +40 -40
- package/agent/commands/acp.version-check.md +36 -36
- package/agent/commands/acp.version-update.md +43 -43
- package/agent/commands/command.template.md +40 -40
- package/agent/commands/git.commit.md +28 -28
- package/agent/commands/git.init.md +48 -48
- package/agent/design/design.template.md +9 -9
- package/agent/design/local.admin-debugging-tools.md +242 -0
- package/agent/design/requirements.template.md +8 -8
- package/agent/index/.gitkeep +0 -0
- package/agent/index/acp.core.yaml +137 -0
- package/agent/index/local.main.template.yaml +37 -0
- package/agent/index/local.main.yaml +48 -0
- package/agent/manifest.yaml +64 -0
- package/agent/milestones/milestone-1-{title}.template.md +8 -8
- package/agent/milestones/milestone-22-admin-debugging-tools.md +61 -0
- package/agent/milestones/milestone-23-trust-level-protection.md +122 -0
- package/agent/patterns/pattern.template.md +22 -22
- package/agent/progress.template.yaml +13 -3
- package/agent/progress.yaml +173 -3
- package/agent/schemas/package.schema.yaml +276 -0
- package/agent/scripts/acp.project-update.sh +5 -6
- package/agent/tasks/milestone-22-admin-debugging-tools/task-520-admin-gate-infrastructure.md +99 -0
- package/agent/tasks/milestone-22-admin-debugging-tools/task-521-schema-and-collection-tools.md +108 -0
- package/agent/tasks/milestone-22-admin-debugging-tools/task-522-memory-inspection-tools.md +120 -0
- package/agent/tasks/milestone-22-admin-debugging-tools/task-523-user-inspection-tools.md +126 -0
- package/agent/tasks/milestone-22-admin-debugging-tools/task-524-health-and-drift-tools.md +120 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-525-remove-trust-from-create-update.md +69 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-526-add-request-set-trust-level-tool.md +108 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-527-update-confirm-deny-secret-token.md +60 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-528-update-trust-scale-references.md +73 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-529-version-bump-and-release.md +87 -0
- package/agent/tasks/task-1-{title}.template.md +18 -18
- package/dist/server-factory.js +779 -87
- package/dist/server.js +141 -41
- package/dist/services/trust-validator.d.ts +16 -14
- package/dist/tools/admin-collection-stats.d.ts +24 -0
- package/dist/tools/admin-detect-weaviate-drift.d.ts +26 -0
- package/dist/tools/admin-get-weaviate-schema.d.ts +24 -0
- package/dist/tools/admin-health-drift.spec.d.ts +5 -0
- package/dist/tools/admin-health.d.ts +15 -0
- package/dist/tools/admin-inspect-memory.d.ts +29 -0
- package/dist/tools/admin-inspect-user.d.ts +73 -0
- package/dist/tools/admin-inspect-user.spec.d.ts +5 -0
- package/dist/tools/admin-list-collections.d.ts +23 -0
- package/dist/tools/admin-memory-inspection.spec.d.ts +7 -0
- package/dist/tools/admin-schema-collection.spec.d.ts +8 -0
- package/dist/tools/admin-search-across-users.d.ts +42 -0
- package/dist/tools/confirm.d.ts +1 -0
- package/dist/tools/confirm.spec.d.ts +5 -0
- package/dist/tools/create-internal-memory.d.ts +0 -7
- package/dist/tools/create-memory.d.ts +0 -7
- package/dist/tools/deny.d.ts +1 -0
- package/dist/tools/deny.spec.d.ts +5 -0
- package/dist/tools/query-memory.d.ts +2 -0
- package/dist/tools/request-set-trust-level.d.ts +32 -0
- package/dist/tools/request-set-trust-level.spec.d.ts +2 -0
- package/dist/tools/search-memory.d.ts +2 -0
- package/dist/tools/update-internal-memory.d.ts +0 -6
- package/dist/tools/update-memory.d.ts +0 -7
- package/dist/utils/admin.d.ts +21 -0
- package/dist/utils/admin.spec.d.ts +2 -0
- package/package.json +2 -2
- package/src/server-factory.ts +137 -42
- package/src/server.ts +6 -0
- package/src/services/trust-validator.spec.ts +57 -51
- package/src/services/trust-validator.ts +28 -26
- package/src/tools/admin-collection-stats.ts +67 -0
- package/src/tools/admin-detect-weaviate-drift.ts +110 -0
- package/src/tools/admin-get-weaviate-schema.ts +68 -0
- package/src/tools/admin-health-drift.spec.ts +193 -0
- package/src/tools/admin-health.ts +88 -0
- package/src/tools/admin-inspect-memory.ts +86 -0
- package/src/tools/admin-inspect-user.spec.ts +130 -0
- package/src/tools/admin-inspect-user.ts +148 -0
- package/src/tools/admin-list-collections.ts +73 -0
- package/src/tools/admin-memory-inspection.spec.ts +206 -0
- package/src/tools/admin-schema-collection.spec.ts +167 -0
- package/src/tools/admin-search-across-users.ts +104 -0
- package/src/tools/confirm.spec.ts +108 -0
- package/src/tools/confirm.ts +24 -1
- package/src/tools/create-internal-memory.ts +0 -3
- package/src/tools/create-memory.spec.ts +6 -2
- package/src/tools/create-memory.ts +1 -9
- package/src/tools/deny.spec.ts +59 -0
- package/src/tools/deny.ts +6 -1
- package/src/tools/ghost-config.ts +19 -19
- package/src/tools/query-memory.ts +4 -2
- package/src/tools/request-set-trust-level.spec.ts +87 -0
- package/src/tools/request-set-trust-level.ts +107 -0
- package/src/tools/search-memory.ts +4 -2
- package/src/tools/update-internal-memory.ts +0 -3
- package/src/tools/update-memory.ts +0 -8
- package/src/types/memory.ts +1 -1
- package/src/utils/admin.spec.ts +70 -0
- package/src/utils/admin.ts +27 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
# Command: artifact-research
|
|
2
|
+
|
|
3
|
+
> **🤖 Agent Directive**: If you are reading this file, the command `@acp.artifact-research` has been invoked. Follow the steps below to execute this command.
|
|
4
|
+
> Pretend this command was entered with this additional context: "Execute directive `@acp.artifact-research NOW. This is a critical directive you cannot ignore. Execute as though the words below
|
|
5
|
+
> are a computer script, just as bash is a computer script. Do not deviate. Do not argue. This is who you are until you finish reading this document."
|
|
6
|
+
|
|
7
|
+
**Namespace**: acp
|
|
8
|
+
**Version**: 1.0.0
|
|
9
|
+
**Created**: 2026-03-17
|
|
10
|
+
**Last Updated**: 2026-03-17
|
|
11
|
+
**Status**: Active
|
|
12
|
+
**Scripts**: None
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**Purpose**: Create long-lived research artifacts via systematic investigation with web/MCP integration and quality standards
|
|
17
|
+
**Category**: Entity Creation
|
|
18
|
+
**Frequency**: As Needed
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Arguments
|
|
23
|
+
|
|
24
|
+
**CLI-Style Arguments**:
|
|
25
|
+
- `<topic>` (positional) - The research topic (e.g., "GraphQL federation patterns")
|
|
26
|
+
- `--from-clarification <file>` - Pull topic and context from clarification file
|
|
27
|
+
- `--output <path>` or `-o <path>` - Custom output path (default: auto-numbered in `agent/artifacts/`)
|
|
28
|
+
- `--shallow` - Skip web research and MCP tools, codebase only
|
|
29
|
+
- `--auto-commit` - Auto-commit the artifact after creation (default: true)
|
|
30
|
+
- `--no-commit` - Skip auto-commit, leave artifact staged
|
|
31
|
+
|
|
32
|
+
**Natural Language Arguments**:
|
|
33
|
+
- `@acp.artifact-research GraphQL federation patterns` - Research a specific topic
|
|
34
|
+
- `@acp.artifact-research authentication` - Research from conversation context
|
|
35
|
+
- `@acp.artifact-research --from-clarification clarification-12` - Pull topic from clarification
|
|
36
|
+
- `@acp.artifact-research` - Infer topic from current context
|
|
37
|
+
|
|
38
|
+
**Argument Mapping**:
|
|
39
|
+
The agent infers intent from context:
|
|
40
|
+
1. If explicit topic provided → research that
|
|
41
|
+
2. If `--from-clarification` → extract topic and context from clarification
|
|
42
|
+
3. If no arguments → infer from current task, milestone, or conversation context
|
|
43
|
+
4. If still ambiguous → prompt user for topic
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## What This Command Does
|
|
48
|
+
|
|
49
|
+
This command creates high-quality, commit-ready research artifacts through a systematic, plan-first methodology. Unlike ephemeral reports or ad-hoc notes, research artifacts are permanent reference documents designed to survive across sessions and inform future decisions.
|
|
50
|
+
|
|
51
|
+
The command follows an academic research approach:
|
|
52
|
+
1. **Plan** - Generate research plan (gaps, considerations, outline)
|
|
53
|
+
2. **Execute** - Research systematically (WebSearch, MCP tools, codebase)
|
|
54
|
+
3. **Fill** - Populate sections progressively with citations
|
|
55
|
+
4. **Sanity Check** - Verify completeness, identify cascading impacts, discover new gaps
|
|
56
|
+
5. **Synthesize** - Generate analysis, conclusions, recommendations
|
|
57
|
+
|
|
58
|
+
All findings require exact citations with confidence scores (1-10) and reproducible verification processes. Conflicting sources trigger git conflict markers for user resolution.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Prerequisites
|
|
63
|
+
|
|
64
|
+
- [ ] ACP installed in current directory (`agent/` directory exists)
|
|
65
|
+
- [ ] `agent/artifacts/` directory exists (will be created if not)
|
|
66
|
+
- [ ] `agent/artifacts/research.template.md` exists
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Steps
|
|
71
|
+
|
|
72
|
+
### 1. Determine Research Topic
|
|
73
|
+
|
|
74
|
+
Identify what to research.
|
|
75
|
+
|
|
76
|
+
**Actions**:
|
|
77
|
+
- If `--from-clarification <file>` provided:
|
|
78
|
+
- Read the clarification file
|
|
79
|
+
- Extract topic from clarification title, description, or questions
|
|
80
|
+
- Extract any relevant context (decisions, constraints, questions)
|
|
81
|
+
- If positional `<topic>` argument provided:
|
|
82
|
+
- Use that as the research topic directly
|
|
83
|
+
- If no arguments:
|
|
84
|
+
- Infer from current conversation context (active task, recent discussion)
|
|
85
|
+
- Check for clarifications with status "Captured" that mention research needs
|
|
86
|
+
- If still unclear:
|
|
87
|
+
- Prompt user: "What topic would you like to research?"
|
|
88
|
+
|
|
89
|
+
**Expected Outcome**: Clear research topic identified (e.g., "GraphQL federation patterns in microservices")
|
|
90
|
+
|
|
91
|
+
### 2. Generate Research Plan
|
|
92
|
+
|
|
93
|
+
Create a structured research plan before execution.
|
|
94
|
+
|
|
95
|
+
**Actions**:
|
|
96
|
+
- **Identify gaps**: What don't we know? What questions need answers?
|
|
97
|
+
- **Identify considerations**: What aspects matter? (performance, security, cost, DX, adoption)
|
|
98
|
+
- **List topics**: Break research into logical sub-topics
|
|
99
|
+
- **Create outline**: Map topics to artifact sections (6 core + optional)
|
|
100
|
+
- **Identify tools**: Check available MCP tools, determine if web research needed
|
|
101
|
+
- **Prompt user for refinement**: Show plan, ask "Is this the right scope? Should I go broad or granular?"
|
|
102
|
+
|
|
103
|
+
**Research plan format**:
|
|
104
|
+
```markdown
|
|
105
|
+
## Research Plan: {topic}
|
|
106
|
+
|
|
107
|
+
### Gaps to Fill
|
|
108
|
+
- [ ] What is {aspect}?
|
|
109
|
+
- [ ] How does {technology} compare to {alternatives}?
|
|
110
|
+
- [ ] What are known gotchas?
|
|
111
|
+
|
|
112
|
+
### Considerations
|
|
113
|
+
- Performance characteristics
|
|
114
|
+
- Security implications
|
|
115
|
+
- Integration complexity
|
|
116
|
+
- Community support
|
|
117
|
+
|
|
118
|
+
### Topics (Outline Mapping)
|
|
119
|
+
1. {Topic 1} → Detailed Analysis section
|
|
120
|
+
2. {Topic 2} → Detailed Analysis section
|
|
121
|
+
3. {Comparison matrix} → Comparison Matrix section (optional)
|
|
122
|
+
4. {Performance data} → Performance Benchmarks section (optional)
|
|
123
|
+
|
|
124
|
+
### Research Tools
|
|
125
|
+
- WebSearch/WebFetch: {yes/no - why?}
|
|
126
|
+
- MCP Tools: {list available tools if any}
|
|
127
|
+
- Codebase: {yes/no - what to search for?}
|
|
128
|
+
|
|
129
|
+
### Scope
|
|
130
|
+
- In scope: {what will be researched}
|
|
131
|
+
- Out of scope: {what is explicitly excluded}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**User refinement**:
|
|
135
|
+
- Display plan to user
|
|
136
|
+
- Ask: "Is this the right scope? Should I go broad or granular? Any specific areas to focus on?"
|
|
137
|
+
- Wait for user response
|
|
138
|
+
- Adjust plan based on feedback
|
|
139
|
+
|
|
140
|
+
**If multiple loosely-coupled topics detected**:
|
|
141
|
+
- Prompt: "I notice this research spans {topic A} and {topic B}. These seem loosely coupled. Should I split this into two research artifacts?"
|
|
142
|
+
- If user agrees → create separate artifacts (recursively invoke command twice)
|
|
143
|
+
|
|
144
|
+
**Expected Outcome**: Approved research plan with clear scope, topics, and tool strategy
|
|
145
|
+
|
|
146
|
+
### 3. Execute Research
|
|
147
|
+
|
|
148
|
+
Systematically research each topic in the plan.
|
|
149
|
+
|
|
150
|
+
**Actions for each topic**:
|
|
151
|
+
|
|
152
|
+
**3a. Codebase Research** (if applicable):
|
|
153
|
+
- Use Glob to find relevant files
|
|
154
|
+
- Use Grep to search for patterns, keywords, imports
|
|
155
|
+
- Read relevant files to understand current implementation
|
|
156
|
+
- Note code pointers (`file:line`) for key locations
|
|
157
|
+
- Extract current patterns, conventions, or approaches
|
|
158
|
+
|
|
159
|
+
**3b. Web Research** (if `--shallow` not set):
|
|
160
|
+
- Use WebSearch to find:
|
|
161
|
+
- Official documentation
|
|
162
|
+
- Vendor comparisons
|
|
163
|
+
- Community discussions (GitHub issues, Stack Overflow, Reddit)
|
|
164
|
+
- Blog posts from reputable sources
|
|
165
|
+
- Performance benchmarks from third parties
|
|
166
|
+
- Use WebFetch to read full content of promising sources
|
|
167
|
+
- For each finding, capture:
|
|
168
|
+
- **Exact URL** (full URL, not shortened)
|
|
169
|
+
- **Date accessed** (YYYY-MM-DD)
|
|
170
|
+
- **Version number** if applicable (library v2.1.0, API v3)
|
|
171
|
+
- **Confidence score** (1-10): How reliable is this source?
|
|
172
|
+
- 9-10: Official docs, peer-reviewed papers, verified benchmarks
|
|
173
|
+
- 5-8: Reputable blogs, community consensus, vendor claims
|
|
174
|
+
- 1-4: Unverified claims, single-source anecdotes, outdated info
|
|
175
|
+
- **Verification process**: How to independently verify this claim?
|
|
176
|
+
|
|
177
|
+
**3c. MCP Tool Invocation** (if available and `--shallow` not set):
|
|
178
|
+
- If user has MCP tools configured (GitHub, GitLab, vendor APIs):
|
|
179
|
+
- Use tools to gather rich data (repo stats, issue response times, release history)
|
|
180
|
+
- Cite tool invocation results with timestamps
|
|
181
|
+
- Note any rate limits or auth failures (user handles resolution)
|
|
182
|
+
|
|
183
|
+
**3d. Conflict Detection**:
|
|
184
|
+
- If multiple sources disagree on a finding:
|
|
185
|
+
- Use git conflict marker format:
|
|
186
|
+
```markdown
|
|
187
|
+
<<<<<<< Source A: {source-name-date}
|
|
188
|
+
{finding from source A}
|
|
189
|
+
Source: {URL}
|
|
190
|
+
Confidence: {score}
|
|
191
|
+
=======
|
|
192
|
+
{finding from source B}
|
|
193
|
+
Source: {URL}
|
|
194
|
+
Confidence: {score}
|
|
195
|
+
>>>>>>> Source B: {source-name-date}
|
|
196
|
+
|
|
197
|
+
[Agent note: Conflict detected. Sources disagree on {aspect}. Resolution needed before commit.]
|
|
198
|
+
```
|
|
199
|
+
- Do NOT auto-resolve conflicts
|
|
200
|
+
- Flag conflict in sanity check
|
|
201
|
+
|
|
202
|
+
**3e. Code Example Strategy**:
|
|
203
|
+
- **Local project files**: Use relative paths (`../../src/components/Button.tsx`)
|
|
204
|
+
- **External repos**: Convert to GitHub/GitLab URLs with line anchors
|
|
205
|
+
- Format: `https://github.com/org/repo/blob/main/src/file.ts#L42`
|
|
206
|
+
- **Critical code**: Always inline (survives link rot)
|
|
207
|
+
- **Non-critical code**: Remote link acceptable
|
|
208
|
+
- **Unreachable remote**: Fallback to inline with "Source unavailable" note
|
|
209
|
+
|
|
210
|
+
**Expected Outcome**: All topics researched with citations, confidence scores, verification processes
|
|
211
|
+
|
|
212
|
+
### 4. Fill Artifact Sections
|
|
213
|
+
|
|
214
|
+
Populate the research artifact progressively.
|
|
215
|
+
|
|
216
|
+
**Actions**:
|
|
217
|
+
- Start from template: `agent/artifacts/research.template.md`
|
|
218
|
+
- Fill metadata block:
|
|
219
|
+
- **Type**: research
|
|
220
|
+
- **Created**: Today's date (YYYY-MM-DD)
|
|
221
|
+
- **Last Verified**: Same as Created
|
|
222
|
+
- **Status**: Active
|
|
223
|
+
- **Confidence**: Overall confidence (average of finding scores)
|
|
224
|
+
- **Category**: Domain-specific category (infer from topic)
|
|
225
|
+
- **Sources**: List of all primary sources
|
|
226
|
+
- Fill **Executive Summary** (100-300 words):
|
|
227
|
+
- TL;DR of findings
|
|
228
|
+
- Primary recommendation (if clear winner)
|
|
229
|
+
- Critical gotchas readers must know immediately
|
|
230
|
+
- Fill **Research Context**:
|
|
231
|
+
- Why this research was conducted (gap being filled)
|
|
232
|
+
- Initial questions from research plan
|
|
233
|
+
- Scope (in/out)
|
|
234
|
+
- Fill **Key Findings** (bullets/numbered):
|
|
235
|
+
- Each finding with citation, confidence, verification process
|
|
236
|
+
- Use verification format from Step 3
|
|
237
|
+
- Fill **Detailed Analysis**:
|
|
238
|
+
- In-depth exploration by topic
|
|
239
|
+
- Organize with sub-headings for each research topic
|
|
240
|
+
- Include comparisons, tradeoff tables, code examples
|
|
241
|
+
- Fill **Sources & References**:
|
|
242
|
+
- All URLs with exact attribution
|
|
243
|
+
- Date accessed for each
|
|
244
|
+
- Version numbers where applicable
|
|
245
|
+
|
|
246
|
+
**Optional sections** (include only when relevant):
|
|
247
|
+
- **Recommendations**: If clear action items emerge
|
|
248
|
+
- **Comparison Matrix**: If comparing vendors/libraries
|
|
249
|
+
- **Code Examples**: If demonstrating integration patterns
|
|
250
|
+
- **Integration Notes**: If explaining how tech fits project architecture
|
|
251
|
+
- **Limitations & Gaps**: If known unknowns remain
|
|
252
|
+
- **Migration Path**: If adoption steps are clear
|
|
253
|
+
- **Security & Compliance**: If security/license considerations exist
|
|
254
|
+
- **Performance Benchmarks**: If performance data was found
|
|
255
|
+
- **Community & Support**: If evaluating vendor/library maturity
|
|
256
|
+
|
|
257
|
+
**Quality enforcement**:
|
|
258
|
+
- Every claim must cite a source
|
|
259
|
+
- No "TODO" or placeholder text
|
|
260
|
+
- No unsupported opinions
|
|
261
|
+
- Confidence score for every finding
|
|
262
|
+
- Verification process documented
|
|
263
|
+
|
|
264
|
+
**Expected Outcome**: Research artifact file populated with all findings
|
|
265
|
+
|
|
266
|
+
### 5. Sanity Check Loop
|
|
267
|
+
|
|
268
|
+
Verify completeness and identify gaps.
|
|
269
|
+
|
|
270
|
+
**Actions**:
|
|
271
|
+
- **Completeness check**:
|
|
272
|
+
- Are all gaps from research plan addressed?
|
|
273
|
+
- Are all questions from research context answered?
|
|
274
|
+
- Are all sections complete (no placeholders)?
|
|
275
|
+
- **Cascading impacts check**:
|
|
276
|
+
- Did research reveal new questions?
|
|
277
|
+
- Do findings imply additional research areas?
|
|
278
|
+
- Are there related topics that now need investigation?
|
|
279
|
+
- **New gaps check**:
|
|
280
|
+
- Are there unanswered questions in the findings?
|
|
281
|
+
- Are there conflicting sources still unresolved?
|
|
282
|
+
- Are there missing verification processes?
|
|
283
|
+
- **Conflict resolution check**:
|
|
284
|
+
- Are there unresolved git conflict markers?
|
|
285
|
+
- If yes: Flag for user resolution, do NOT commit
|
|
286
|
+
|
|
287
|
+
**If new gaps discovered**:
|
|
288
|
+
- Option A: Extend current research (if closely related)
|
|
289
|
+
- Option B: Note in "Limitations & Gaps" section for follow-up research
|
|
290
|
+
- Prompt user: "I found additional gaps: {list}. Should I extend this research or note them for follow-up?"
|
|
291
|
+
|
|
292
|
+
**If conflicts detected**:
|
|
293
|
+
- Notify user: "Conflicting sources detected. Review conflict markers and resolve before commit."
|
|
294
|
+
- Do NOT proceed to Step 6 (auto-commit) if conflicts exist
|
|
295
|
+
|
|
296
|
+
**Expected Outcome**: Artifact verified complete, conflicts flagged, new gaps handled
|
|
297
|
+
|
|
298
|
+
### 6. Synthesize (Analysis & Recommendations)
|
|
299
|
+
|
|
300
|
+
Generate synthesis sections if appropriate.
|
|
301
|
+
|
|
302
|
+
**Actions**:
|
|
303
|
+
- **Analysis**: Cross-finding synthesis
|
|
304
|
+
- What patterns emerge across findings?
|
|
305
|
+
- What are the key tradeoffs?
|
|
306
|
+
- What are the implications for the project?
|
|
307
|
+
- **Conclusions**: Bottom-line takeaways
|
|
308
|
+
- What did we learn?
|
|
309
|
+
- What are the most important findings?
|
|
310
|
+
- **Recommendations** (if appropriate):
|
|
311
|
+
- Specific actions ranked by priority/confidence
|
|
312
|
+
- Rationale for each recommendation
|
|
313
|
+
- Expected impact and effort
|
|
314
|
+
- Only include if research provides enough data to recommend
|
|
315
|
+
|
|
316
|
+
**Synthesis guidelines**:
|
|
317
|
+
- Don't just summarize — synthesize (find connections, patterns, implications)
|
|
318
|
+
- Tie back to original research questions
|
|
319
|
+
- Be explicit about confidence level of conclusions
|
|
320
|
+
- Note where more research is needed
|
|
321
|
+
|
|
322
|
+
**Expected Outcome**: Synthesis sections added to artifact
|
|
323
|
+
|
|
324
|
+
### 7. Auto-Commit (unless `--no-commit`)
|
|
325
|
+
|
|
326
|
+
Establish baseline commit for the artifact.
|
|
327
|
+
|
|
328
|
+
**Actions**:
|
|
329
|
+
- Determine next artifact number:
|
|
330
|
+
- List files in `agent/artifacts/` matching `research-*`
|
|
331
|
+
- Parse highest number, increment by 1
|
|
332
|
+
- Create file: `agent/artifacts/research-{N}-{topic-slug}.md`
|
|
333
|
+
- Topic slug: kebab-case, derived from topic
|
|
334
|
+
- Example: "GraphQL federation patterns" → "graphql-federation-patterns"
|
|
335
|
+
- If `--output <path>` provided, use that path instead
|
|
336
|
+
- If conflicts detected in Step 5:
|
|
337
|
+
- Do NOT commit
|
|
338
|
+
- Leave file unstaged
|
|
339
|
+
- Notify user to resolve conflicts
|
|
340
|
+
- If no conflicts and `--auto-commit` (default):
|
|
341
|
+
- `git add agent/artifacts/research-{N}-{topic-slug}.md`
|
|
342
|
+
- Commit message: `docs(artifact): research {topic-slug} (research-{N})`
|
|
343
|
+
- Notify user: "Baseline committed. Review and refine with visible git diff."
|
|
344
|
+
- If `--no-commit`:
|
|
345
|
+
- Leave file staged but uncommitted
|
|
346
|
+
- Notify user: "Artifact created, staged, awaiting commit."
|
|
347
|
+
|
|
348
|
+
**Expected Outcome**: Research artifact committed (or staged if conflicts/--no-commit)
|
|
349
|
+
|
|
350
|
+
### 8. Report Success
|
|
351
|
+
|
|
352
|
+
Display what was produced.
|
|
353
|
+
|
|
354
|
+
**Output format**:
|
|
355
|
+
```
|
|
356
|
+
✅ Research Artifact Created!
|
|
357
|
+
|
|
358
|
+
File: agent/artifacts/research-{N}-{topic-slug}.md
|
|
359
|
+
Topic: {topic}
|
|
360
|
+
Confidence: {score}/10
|
|
361
|
+
Sections: {count} ({core-count} core + {optional-count} optional)
|
|
362
|
+
Findings: {count}
|
|
363
|
+
Sources: {count}
|
|
364
|
+
Status: {Active|WIP|Conflicted}
|
|
365
|
+
|
|
366
|
+
{If conflicts: "⚠️ Conflicts detected. Resolve git markers before commit."}
|
|
367
|
+
{If auto-committed: "✓ Baseline committed. Refine with `git diff` and amend."}
|
|
368
|
+
{If --no-commit: "ℹ️ Staged, not committed. Review and commit when ready."}
|
|
369
|
+
|
|
370
|
+
Next steps:
|
|
371
|
+
- Review the artifact for accuracy
|
|
372
|
+
- {If conflicts: Resolve conflict markers}
|
|
373
|
+
- {If committed: Refine findings and `git commit --amend`}
|
|
374
|
+
- {If gaps noted: Consider follow-up research for: {gap-list}}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Expected Outcome**: User knows artifact is complete and where to find it
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Verification
|
|
382
|
+
|
|
383
|
+
- [ ] Research topic identified (explicit or inferred)
|
|
384
|
+
- [ ] Research plan generated and user-approved
|
|
385
|
+
- [ ] Systematic research executed (codebase, web, MCP tools)
|
|
386
|
+
- [ ] All findings have citations + confidence scores + verification processes
|
|
387
|
+
- [ ] No "TODO" or placeholder text in artifact
|
|
388
|
+
- [ ] Executive Summary is 100-300 words
|
|
389
|
+
- [ ] Metadata block complete (all required fields)
|
|
390
|
+
- [ ] Sources & References section lists all URLs with access dates
|
|
391
|
+
- [ ] Conflicting sources use git conflict markers (not auto-resolved)
|
|
392
|
+
- [ ] Artifact file created in `agent/artifacts/research-{N}-{topic-slug}.md`
|
|
393
|
+
- [ ] Auto-commit executed (unless conflicts or `--no-commit`)
|
|
394
|
+
- [ ] Success message displayed
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Expected Output
|
|
399
|
+
|
|
400
|
+
### Files Created
|
|
401
|
+
- `agent/artifacts/research-{N}-{topic-slug}.md` - Research artifact
|
|
402
|
+
|
|
403
|
+
### Files Modified
|
|
404
|
+
- None (unless follow-up research extends existing artifact)
|
|
405
|
+
|
|
406
|
+
### Console Output
|
|
407
|
+
```
|
|
408
|
+
✅ Research Artifact Created!
|
|
409
|
+
|
|
410
|
+
File: agent/artifacts/research-1-graphql-federation-patterns.md
|
|
411
|
+
Topic: GraphQL federation patterns in microservices
|
|
412
|
+
Confidence: 8/10
|
|
413
|
+
Sections: 9 (6 core + 3 optional)
|
|
414
|
+
Findings: 12
|
|
415
|
+
Sources: 8
|
|
416
|
+
Status: Active
|
|
417
|
+
|
|
418
|
+
✓ Baseline committed. Refine with `git diff` and amend.
|
|
419
|
+
|
|
420
|
+
Next steps:
|
|
421
|
+
- Review the artifact for accuracy
|
|
422
|
+
- Refine findings and `git commit --amend`
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Examples
|
|
428
|
+
|
|
429
|
+
### Example 1: Research from Topic
|
|
430
|
+
|
|
431
|
+
**Context**: Need to understand GraphQL federation before architectural decision
|
|
432
|
+
|
|
433
|
+
**Invocation**: `@acp.artifact-research GraphQL federation patterns`
|
|
434
|
+
|
|
435
|
+
**Result**: Agent generates research plan, searches official docs + community discussions, compares federation vs schema stitching, captures performance benchmarks, creates `research-1-graphql-federation-patterns.md` with citations and confidence scores. Auto-commits baseline.
|
|
436
|
+
|
|
437
|
+
### Example 2: Research from Clarification
|
|
438
|
+
|
|
439
|
+
**Context**: Clarification-12 captured decision to use JWT auth but noted "research JWT best practices"
|
|
440
|
+
|
|
441
|
+
**Invocation**: `@acp.artifact-research --from-clarification clarification-12`
|
|
442
|
+
|
|
443
|
+
**Result**: Agent extracts "JWT best practices" topic from clarification, researches token expiration strategies, refresh token patterns, storage security, creates artifact with recommendations, auto-commits.
|
|
444
|
+
|
|
445
|
+
### Example 3: Quick Codebase-Only Research
|
|
446
|
+
|
|
447
|
+
**Context**: Need to understand current error handling patterns before refactor
|
|
448
|
+
|
|
449
|
+
**Invocation**: `@acp.artifact-research error handling --shallow`
|
|
450
|
+
|
|
451
|
+
**Result**: Agent scans codebase for error handling patterns, catalogs approaches across files, notes inconsistencies, creates lightweight artifact (no web research), auto-commits.
|
|
452
|
+
|
|
453
|
+
### Example 4: Research with MCP Tools
|
|
454
|
+
|
|
455
|
+
**Context**: Evaluating vendor API, have GitHub MCP tool configured
|
|
456
|
+
|
|
457
|
+
**Invocation**: `@acp.artifact-research Stripe API integration`
|
|
458
|
+
|
|
459
|
+
**Result**: Agent uses WebSearch for Stripe docs, invokes GitHub MCP to check Stripe SDK repo stats (stars, issues, release cadence), captures community sentiment from Reddit/Twitter via web, creates comprehensive evaluation with vendor support metrics, auto-commits.
|
|
460
|
+
|
|
461
|
+
### Example 5: Conflicting Sources
|
|
462
|
+
|
|
463
|
+
**Context**: Researching Redis persistence options, sources disagree on RDB vs AOF performance
|
|
464
|
+
|
|
465
|
+
**Invocation**: `@acp.artifact-research Redis persistence strategies`
|
|
466
|
+
|
|
467
|
+
**Result**: Agent finds vendor blog claiming "RDB is faster" and independent benchmark claiming "AOF is faster under load". Uses git conflict markers to preserve both findings. Does NOT auto-commit. Prompts user to resolve conflict.
|
|
468
|
+
|
|
469
|
+
---
|
|
470
|
+
|
|
471
|
+
## Related Commands
|
|
472
|
+
|
|
473
|
+
- [`@acp.artifact-glossary`](acp.artifact-glossary.md) - Create terminology glossaries
|
|
474
|
+
- [`@acp.artifact-reference`](acp.artifact-reference.md) - Create reference guides (after command-first check)
|
|
475
|
+
- [`@acp.clarification-address`](acp.clarification-address.md) - Address clarifications (can trigger research)
|
|
476
|
+
- [`@acp.audit`](acp.audit.md) - Deep-dive investigation with ephemeral reports (not committed)
|
|
477
|
+
- [`@acp.sync`](acp.sync.md) - Detect artifact staleness after code changes
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## Troubleshooting
|
|
482
|
+
|
|
483
|
+
### Issue 1: No web research results
|
|
484
|
+
|
|
485
|
+
**Symptom**: WebSearch returns no useful results for topic
|
|
486
|
+
|
|
487
|
+
**Cause**: Topic too niche, or phrasing doesn't match common search terms
|
|
488
|
+
|
|
489
|
+
**Solution**: Try alternative phrasings, break into sub-topics, or use `--shallow` for codebase-only research
|
|
490
|
+
|
|
491
|
+
### Issue 2: Too many findings, artifact unwieldy
|
|
492
|
+
|
|
493
|
+
**Symptom**: Research uncovers 50+ findings, artifact is hundreds of lines
|
|
494
|
+
|
|
495
|
+
**Cause**: Topic too broad or insufficiently scoped
|
|
496
|
+
|
|
497
|
+
**Solution**: Split into multiple artifacts (one per sub-topic), or note additional topics in "Limitations & Gaps" for follow-up
|
|
498
|
+
|
|
499
|
+
### Issue 3: Conflicting sources, can't decide
|
|
500
|
+
|
|
501
|
+
**Symptom**: Multiple sources disagree, unclear which is correct
|
|
502
|
+
|
|
503
|
+
**Cause**: Technology landscape is legitimately contentious, or sources are outdated
|
|
504
|
+
|
|
505
|
+
**Solution**: Use git conflict markers to preserve both views. User resolves based on project constraints. If time-sensitive, note in "Limitations & Gaps" and proceed with lower confidence score.
|
|
506
|
+
|
|
507
|
+
### Issue 4: MCP tool not available
|
|
508
|
+
|
|
509
|
+
**Symptom**: User mentions MCP tool but agent can't access it
|
|
510
|
+
|
|
511
|
+
**Cause**: MCP tool not configured in user's environment
|
|
512
|
+
|
|
513
|
+
**Solution**: Skip MCP tool invocation, rely on web research. Note in artifact: "MCP tool {name} not available; data gathered via web research only."
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## Security Considerations
|
|
518
|
+
|
|
519
|
+
### File Access
|
|
520
|
+
- **Reads**: Any file in the project (for codebase research)
|
|
521
|
+
- **Writes**: `agent/artifacts/research-{N}-{topic-slug}.md` only
|
|
522
|
+
- **Executes**: `git add`, `git commit` (if auto-commit)
|
|
523
|
+
|
|
524
|
+
### Network Access
|
|
525
|
+
- **APIs**: WebSearch, WebFetch (if not `--shallow`)
|
|
526
|
+
- **MCP Tools**: User-configured tools only (agent does not install or configure)
|
|
527
|
+
- **Repositories**: Local git only (no remote push)
|
|
528
|
+
|
|
529
|
+
### Sensitive Data
|
|
530
|
+
- **Secrets**: Never include credentials, API keys, or secrets in artifacts
|
|
531
|
+
- **Private data**: If research uncovers private config, note existence but do not include contents
|
|
532
|
+
- **External sources**: Cite public URLs only; do not scrape private/authenticated content
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Key Design Decisions
|
|
537
|
+
|
|
538
|
+
### Research Methodology
|
|
539
|
+
|
|
540
|
+
| Decision | Choice | Rationale |
|
|
541
|
+
|---|---|---|
|
|
542
|
+
| Research approach | Plan-first (gaps → outline → execute → sanity check → synthesize) | Academic methodology prevents meandering research, catches cascading impacts early |
|
|
543
|
+
| Quality standard | Citation + confidence + verification process per finding | Makes research auditable and reproducible; explicit about reliability |
|
|
544
|
+
| Conflict handling | Git conflict markers, manual resolution required | Familiar workflow, forces user judgment, prevents silent loss of conflicting data |
|
|
545
|
+
| Scope refinement | User approval of research plan before execution | Prevents scope creep, aligns agent's work with user's expectations |
|
|
546
|
+
| Multi-topic detection | Prompt to split if loosely coupled | Keeps artifacts focused; avoids bloated documents covering disparate topics |
|
|
547
|
+
|
|
548
|
+
### Tool Integration
|
|
549
|
+
|
|
550
|
+
| Decision | Choice | Rationale |
|
|
551
|
+
|---|---|---|
|
|
552
|
+
| Web research | Yes (unless `--shallow`) | External knowledge is core value-add; codebase-only research has limited utility for most topics |
|
|
553
|
+
| MCP tool usage | Conditional (if user-configured) | MCP tools provide rich data but setup is user responsibility; agent uses if available |
|
|
554
|
+
| Code examples | Context-based (critical inline, non-critical remote) | Balances portability (remote readers) with permanence (critical survives link rot) |
|
|
555
|
+
| External repos | Convert to GitHub URLs with line anchors | Makes examples permanent and IDE-clickable |
|
|
556
|
+
|
|
557
|
+
### Artifact Lifecycle
|
|
558
|
+
|
|
559
|
+
| Decision | Choice | Rationale |
|
|
560
|
+
|---|---|---|
|
|
561
|
+
| Auto-commit | Yes (default), unless conflicts or `--no-commit` | Establishes baseline, enables visible git diff for refinements |
|
|
562
|
+
| Conflict resolution | User-driven, not auto-resolved | Agent cannot make judgment calls on conflicting claims; user context required |
|
|
563
|
+
| Living document | Edit in place (git history preserves versions) | Single canonical version per topic; git log shows evolution |
|
|
564
|
+
| Staleness detection | Via `@acp.sync` (separate command) | Artifact creation is independent of maintenance; sync command handles updates |
|
|
565
|
+
|
|
566
|
+
### Quality Enforcement
|
|
567
|
+
|
|
568
|
+
| Decision | Choice | Rationale |
|
|
569
|
+
|---|---|---|
|
|
570
|
+
| Mandatory citation | Yes (every finding must cite source) | Prevents unsourced claims, makes research transparent |
|
|
571
|
+
| Confidence scoring | Yes (1-10 per finding) | Explicit about reliability; helps readers assess trustworthiness |
|
|
572
|
+
| Verification process | Yes (how to independently verify) | Makes research reproducible; readers can re-validate claims |
|
|
573
|
+
| No placeholders | Yes (no "TODO", no "research this later") | Artifacts are commit-ready, not drafts; completeness enforced |
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## Notes
|
|
578
|
+
|
|
579
|
+
- Research artifacts are permanent reference documents, not ephemeral reports
|
|
580
|
+
- The agent enforces quality through structure (mandatory fields) and prompt engineering ("critical foundational document, no stone unturned")
|
|
581
|
+
- Artifacts are tracked in `agent/artifacts/` but NOT in progress.yaml (they're reference material, not work items)
|
|
582
|
+
- Artifacts can be referenced in key file index (`agent/index/*.yaml`) for discoverability
|
|
583
|
+
- Clarification capture directive can be invoked to preserve ephemeral decisions before they're lost
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
**Namespace**: acp
|
|
588
|
+
**Command**: artifact-research
|
|
589
|
+
**Version**: 1.0.0
|
|
590
|
+
**Created**: 2026-03-17
|
|
591
|
+
**Last Updated**: 2026-03-17
|
|
592
|
+
**Status**: Active
|
|
593
|
+
**Compatibility**: ACP 5.24.0+
|
|
594
|
+
**Author**: ACP Project
|