@prmichaelsen/remember-mcp 2.3.0 → 2.3.1
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 +95 -2
- package/agent/commands/acp.package-install.md +347 -0
- package/agent/commands/acp.report.md +392 -0
- package/agent/commands/acp.sync.md +323 -0
- package/agent/commands/acp.update.md +301 -0
- package/agent/commands/acp.validate.md +385 -0
- package/agent/tasks/task-44-implement-remember-retract.md +263 -0
- package/agent/tasks/task-45-fix-publish-false-success-bug.md +230 -0
- package/dist/server-factory.js +89 -3
- package/dist/server.js +89 -3
- package/package.json +1 -1
- package/src/services/confirmation-token.service.ts +33 -0
- package/src/tools/confirm.ts +43 -0
- package/src/tools/create-memory.ts +7 -0
- package/src/tools/publish.ts +26 -3
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# Command: report
|
|
2
|
+
|
|
3
|
+
> **🤖 Agent Directive**: If you are reading this file, the command `@acp.report` has been invoked. Follow the steps below to execute this command.
|
|
4
|
+
|
|
5
|
+
**Namespace**: acp
|
|
6
|
+
**Version**: 1.0.0
|
|
7
|
+
**Created**: 2026-02-16
|
|
8
|
+
**Last Updated**: 2026-02-16
|
|
9
|
+
**Status**: Active
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
**Purpose**: Generate a comprehensive project status report including progress, accomplishments, and next steps
|
|
14
|
+
**Category**: Documentation
|
|
15
|
+
**Frequency**: As Needed
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## What This Command Does
|
|
20
|
+
|
|
21
|
+
This command generates a comprehensive markdown report summarizing the project's current status, progress, accomplishments, and plans. It reads all ACP documentation and creates a formatted report suitable for sharing with stakeholders, team members, or for project records.
|
|
22
|
+
|
|
23
|
+
Use this command when you need to communicate project status, before milestone reviews, for weekly/monthly updates, or when onboarding new team members. The report provides a complete snapshot of the project at a point in time.
|
|
24
|
+
|
|
25
|
+
Unlike `@acp.status` which provides a quick console summary, `@acp.report` generates a detailed markdown document that can be saved, shared, or archived.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Prerequisites
|
|
30
|
+
|
|
31
|
+
- [ ] ACP installed in project
|
|
32
|
+
- [ ] `agent/progress.yaml` exists and is current
|
|
33
|
+
- [ ] Documentation exists in `agent/` directory
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
### 1. Read Project Information
|
|
40
|
+
|
|
41
|
+
Load basic project details from progress.yaml.
|
|
42
|
+
|
|
43
|
+
**Actions**:
|
|
44
|
+
- Read `agent/progress.yaml`
|
|
45
|
+
- Extract project name, version, start date
|
|
46
|
+
- Note current status and milestone
|
|
47
|
+
- Get project description
|
|
48
|
+
|
|
49
|
+
**Expected Outcome**: Project basics loaded
|
|
50
|
+
|
|
51
|
+
### 2. Gather Milestone Information
|
|
52
|
+
|
|
53
|
+
Collect data about all milestones.
|
|
54
|
+
|
|
55
|
+
**Actions**:
|
|
56
|
+
- Read all milestone documents
|
|
57
|
+
- Extract milestone goals and deliverables
|
|
58
|
+
- Note progress percentages
|
|
59
|
+
- Identify completed vs in-progress vs not-started
|
|
60
|
+
- Calculate overall project progress
|
|
61
|
+
|
|
62
|
+
**Expected Outcome**: Milestone data collected
|
|
63
|
+
|
|
64
|
+
### 3. Gather Task Information
|
|
65
|
+
|
|
66
|
+
Collect data about all tasks.
|
|
67
|
+
|
|
68
|
+
**Actions**:
|
|
69
|
+
- Read task data from progress.yaml
|
|
70
|
+
- Count total tasks, completed, in-progress
|
|
71
|
+
- Calculate completion percentages
|
|
72
|
+
- Identify current task
|
|
73
|
+
- Note any blocked tasks
|
|
74
|
+
|
|
75
|
+
**Expected Outcome**: Task data collected
|
|
76
|
+
|
|
77
|
+
### 4. Summarize Recent Work
|
|
78
|
+
|
|
79
|
+
Extract recent accomplishments.
|
|
80
|
+
|
|
81
|
+
**Actions**:
|
|
82
|
+
- Read recent_work from progress.yaml
|
|
83
|
+
- Format accomplishments by date
|
|
84
|
+
- Highlight major achievements
|
|
85
|
+
- Note any significant milestones reached
|
|
86
|
+
|
|
87
|
+
**Expected Outcome**: Recent work summarized
|
|
88
|
+
|
|
89
|
+
### 5. Identify Next Steps
|
|
90
|
+
|
|
91
|
+
Extract and prioritize next steps.
|
|
92
|
+
|
|
93
|
+
**Actions**:
|
|
94
|
+
- Read next_steps from progress.yaml
|
|
95
|
+
- Read current task for immediate next steps
|
|
96
|
+
- Identify upcoming milestones
|
|
97
|
+
- Note any dependencies
|
|
98
|
+
|
|
99
|
+
**Expected Outcome**: Next steps identified
|
|
100
|
+
|
|
101
|
+
### 6. Document Blockers and Risks
|
|
102
|
+
|
|
103
|
+
List current blockers and risks.
|
|
104
|
+
|
|
105
|
+
**Actions**:
|
|
106
|
+
- Read current_blockers from progress.yaml
|
|
107
|
+
- Note any risks mentioned in milestone docs
|
|
108
|
+
- Identify dependencies on external factors
|
|
109
|
+
- Assess impact of blockers
|
|
110
|
+
|
|
111
|
+
**Expected Outcome**: Blockers documented
|
|
112
|
+
|
|
113
|
+
### 7. Generate Statistics
|
|
114
|
+
|
|
115
|
+
Calculate project metrics.
|
|
116
|
+
|
|
117
|
+
**Actions**:
|
|
118
|
+
- Total milestones and completion rate
|
|
119
|
+
- Total tasks and completion rate
|
|
120
|
+
- Overall project progress percentage
|
|
121
|
+
- Time elapsed since project start
|
|
122
|
+
- Estimated time remaining (if available)
|
|
123
|
+
- Documentation count (design docs, patterns, etc.)
|
|
124
|
+
|
|
125
|
+
**Expected Outcome**: Metrics calculated
|
|
126
|
+
|
|
127
|
+
### 8. Format Report
|
|
128
|
+
|
|
129
|
+
Create formatted markdown report.
|
|
130
|
+
|
|
131
|
+
**Actions**:
|
|
132
|
+
- Create report header with project info
|
|
133
|
+
- Add executive summary
|
|
134
|
+
- Include progress section with charts/percentages
|
|
135
|
+
- List milestones with status
|
|
136
|
+
- Summarize recent accomplishments
|
|
137
|
+
- Document next steps
|
|
138
|
+
- List blockers and risks
|
|
139
|
+
- Include statistics
|
|
140
|
+
- Add footer with generation date
|
|
141
|
+
|
|
142
|
+
**Expected Outcome**: Report formatted
|
|
143
|
+
|
|
144
|
+
### 9. Save Report
|
|
145
|
+
|
|
146
|
+
Write report to file.
|
|
147
|
+
|
|
148
|
+
**Actions**:
|
|
149
|
+
- Generate filename with date (e.g., `report-2026-02-16.md`)
|
|
150
|
+
- Save to `agent/reports/` directory (create if needed)
|
|
151
|
+
- Confirm file written successfully
|
|
152
|
+
- Display report location
|
|
153
|
+
|
|
154
|
+
**Expected Outcome**: Report saved
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Verification
|
|
159
|
+
|
|
160
|
+
- [ ] Project information extracted
|
|
161
|
+
- [ ] Milestone data collected
|
|
162
|
+
- [ ] Task data collected
|
|
163
|
+
- [ ] Recent work summarized
|
|
164
|
+
- [ ] Next steps identified
|
|
165
|
+
- [ ] Blockers documented
|
|
166
|
+
- [ ] Statistics calculated
|
|
167
|
+
- [ ] Report formatted as markdown
|
|
168
|
+
- [ ] Report saved to file
|
|
169
|
+
- [ ] Report location displayed
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Expected Output
|
|
174
|
+
|
|
175
|
+
### Files Modified
|
|
176
|
+
- `agent/reports/report-YYYY-MM-DD.md` - Generated report file
|
|
177
|
+
|
|
178
|
+
### Console Output
|
|
179
|
+
```
|
|
180
|
+
📊 Generating Project Report
|
|
181
|
+
|
|
182
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
183
|
+
|
|
184
|
+
Gathering project information...
|
|
185
|
+
✓ Project: agent-context-protocol v1.1.0
|
|
186
|
+
✓ Started: 2026-02-16
|
|
187
|
+
✓ Current milestone: M2
|
|
188
|
+
|
|
189
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
190
|
+
|
|
191
|
+
Collecting milestone data...
|
|
192
|
+
✓ Milestone 1: Complete (100%)
|
|
193
|
+
✓ Milestone 2: In Progress (60%)
|
|
194
|
+
|
|
195
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
196
|
+
|
|
197
|
+
Analyzing tasks...
|
|
198
|
+
✓ Total tasks: 7
|
|
199
|
+
✓ Completed: 5 (71%)
|
|
200
|
+
✓ In progress: 1
|
|
201
|
+
✓ Not started: 1
|
|
202
|
+
|
|
203
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
204
|
+
|
|
205
|
+
Calculating statistics...
|
|
206
|
+
✓ Overall progress: 75%
|
|
207
|
+
✓ Documentation: 8 design docs, 3 patterns
|
|
208
|
+
✓ Commands: 11 implemented
|
|
209
|
+
|
|
210
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
211
|
+
|
|
212
|
+
Formatting report...
|
|
213
|
+
✓ Report generated (2,500 words)
|
|
214
|
+
|
|
215
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
216
|
+
|
|
217
|
+
✅ Report Complete!
|
|
218
|
+
|
|
219
|
+
Saved to: agent/reports/report-2026-02-16.md
|
|
220
|
+
|
|
221
|
+
Summary:
|
|
222
|
+
- Overall progress: 75%
|
|
223
|
+
- Milestones: 1 complete, 1 in progress
|
|
224
|
+
- Tasks: 5/7 complete
|
|
225
|
+
- Blockers: 0
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Report Structure
|
|
229
|
+
```markdown
|
|
230
|
+
# Project Status Report
|
|
231
|
+
## agent-context-protocol
|
|
232
|
+
|
|
233
|
+
**Generated**: 2026-02-16
|
|
234
|
+
**Version**: 1.1.0
|
|
235
|
+
**Status**: In Progress
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Executive Summary
|
|
240
|
+
|
|
241
|
+
[2-3 paragraph summary of project status]
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Progress Overview
|
|
246
|
+
|
|
247
|
+
**Overall Progress**: 75%
|
|
248
|
+
|
|
249
|
+
### Milestones
|
|
250
|
+
- ✅ Milestone 1: ACP Commands Infrastructure (100%)
|
|
251
|
+
- 🔄 Milestone 2: Documentation & Utility Commands (60%)
|
|
252
|
+
|
|
253
|
+
### Tasks
|
|
254
|
+
- Total: 7
|
|
255
|
+
- Completed: 5 (71%)
|
|
256
|
+
- In Progress: 1
|
|
257
|
+
- Not Started: 1
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Recent Accomplishments
|
|
262
|
+
|
|
263
|
+
[List of recent work with dates]
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Next Steps
|
|
268
|
+
|
|
269
|
+
[Prioritized list of next steps]
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Current Blockers
|
|
274
|
+
|
|
275
|
+
[List of blockers, or "None"]
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Statistics
|
|
280
|
+
|
|
281
|
+
[Detailed metrics and counts]
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
**Report generated by ACP v1.1.0**
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Examples
|
|
291
|
+
|
|
292
|
+
### Example 1: Weekly Status Report
|
|
293
|
+
|
|
294
|
+
**Context**: End of week, need to report progress
|
|
295
|
+
|
|
296
|
+
**Invocation**: `@acp.report`
|
|
297
|
+
|
|
298
|
+
**Result**: Generates comprehensive report showing week's accomplishments, current status, and next week's plans
|
|
299
|
+
|
|
300
|
+
### Example 2: Milestone Review
|
|
301
|
+
|
|
302
|
+
**Context**: Just completed milestone 1, need review document
|
|
303
|
+
|
|
304
|
+
**Invocation**: `@acp.report`
|
|
305
|
+
|
|
306
|
+
**Result**: Report highlights milestone 1 completion, shows deliverables achieved, documents lessons learned
|
|
307
|
+
|
|
308
|
+
### Example 3: Stakeholder Update
|
|
309
|
+
|
|
310
|
+
**Context**: Monthly update for stakeholders
|
|
311
|
+
|
|
312
|
+
**Invocation**: `@acp.report`
|
|
313
|
+
|
|
314
|
+
**Result**: Executive-friendly report with high-level progress, key achievements, and timeline
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Related Commands
|
|
319
|
+
|
|
320
|
+
- [`@acp.status`](acp.status.md) - Quick console status (not a full report)
|
|
321
|
+
- [`@acp.update`](acp.update.md) - Update progress before generating report
|
|
322
|
+
- [`@acp.validate`](acp.validate.md) - Validate documentation before reporting
|
|
323
|
+
- [`@acp.sync`](acp.sync.md) - Sync docs before generating report
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Troubleshooting
|
|
328
|
+
|
|
329
|
+
### Issue 1: Report is empty or incomplete
|
|
330
|
+
|
|
331
|
+
**Symptom**: Generated report missing sections
|
|
332
|
+
|
|
333
|
+
**Cause**: progress.yaml not up to date or missing data
|
|
334
|
+
|
|
335
|
+
**Solution**: Run `@acp.update` first to ensure progress.yaml is current, then generate report
|
|
336
|
+
|
|
337
|
+
### Issue 2: Statistics don't match reality
|
|
338
|
+
|
|
339
|
+
**Symptom**: Numbers in report seem wrong
|
|
340
|
+
|
|
341
|
+
**Cause**: Progress tracking out of sync
|
|
342
|
+
|
|
343
|
+
**Solution**: Review and update progress.yaml manually, verify task counts, then regenerate report
|
|
344
|
+
|
|
345
|
+
### Issue 3: Report too long or too short
|
|
346
|
+
|
|
347
|
+
**Symptom**: Report length not appropriate
|
|
348
|
+
|
|
349
|
+
**Cause**: Too much or too little detail
|
|
350
|
+
|
|
351
|
+
**Solution**: Adjust report generation to include/exclude sections, customize for audience
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Security Considerations
|
|
356
|
+
|
|
357
|
+
### File Access
|
|
358
|
+
- **Reads**: All files in `agent/` directory, especially `agent/progress.yaml`
|
|
359
|
+
- **Writes**: `agent/reports/report-YYYY-MM-DD.md` (creates report file)
|
|
360
|
+
- **Executes**: None
|
|
361
|
+
|
|
362
|
+
### Network Access
|
|
363
|
+
- **APIs**: None
|
|
364
|
+
- **Repositories**: None
|
|
365
|
+
|
|
366
|
+
### Sensitive Data
|
|
367
|
+
- **Secrets**: Does not access secrets or credentials
|
|
368
|
+
- **Credentials**: Does not access credentials files
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Notes
|
|
373
|
+
|
|
374
|
+
- Reports are saved with date in filename for easy tracking
|
|
375
|
+
- Reports are markdown for easy sharing and version control
|
|
376
|
+
- Generate reports regularly for historical record
|
|
377
|
+
- Customize report format for different audiences
|
|
378
|
+
- Include reports in project documentation
|
|
379
|
+
- Consider automating report generation (weekly/monthly)
|
|
380
|
+
- Reports can be converted to PDF or HTML if needed
|
|
381
|
+
- Keep reports in version control for history
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
**Namespace**: acp
|
|
386
|
+
**Command**: report
|
|
387
|
+
**Version**: 1.0.0
|
|
388
|
+
**Created**: 2026-02-16
|
|
389
|
+
**Last Updated**: 2026-02-16
|
|
390
|
+
**Status**: Active
|
|
391
|
+
**Compatibility**: ACP 1.1.0+
|
|
392
|
+
**Author**: ACP Project
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Command: sync
|
|
2
|
+
|
|
3
|
+
> **🤖 Agent Directive**: If you are reading this file, the command `@acp.sync` has been invoked. Follow the steps below to execute this command.
|
|
4
|
+
|
|
5
|
+
**Namespace**: acp
|
|
6
|
+
**Version**: 1.0.0
|
|
7
|
+
**Created**: 2026-02-16
|
|
8
|
+
**Last Updated**: 2026-02-16
|
|
9
|
+
**Status**: Active
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
**Purpose**: Synchronize documentation with source code by identifying and updating stale documentation
|
|
14
|
+
**Category**: Documentation
|
|
15
|
+
**Frequency**: As Needed
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## What This Command Does
|
|
20
|
+
|
|
21
|
+
This command synchronizes ACP documentation with the actual source code implementation. It reads source files, compares them with design documents and patterns, identifies documentation drift, and updates stale documentation to match reality.
|
|
22
|
+
|
|
23
|
+
Use this command after making significant code changes, when you suspect documentation is outdated, or periodically to ensure documentation stays current. It's particularly useful after implementing features, refactoring code, or completing milestones.
|
|
24
|
+
|
|
25
|
+
Unlike `@acp.update` which updates progress tracking, `@acp.sync` focuses on keeping design documents, patterns, and technical documentation aligned with the actual codebase.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Prerequisites
|
|
30
|
+
|
|
31
|
+
- [ ] ACP installed in project
|
|
32
|
+
- [ ] Source code exists to compare against
|
|
33
|
+
- [ ] Design documents exist in `agent/design/`
|
|
34
|
+
- [ ] You have understanding of what changed in code
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Steps
|
|
39
|
+
|
|
40
|
+
### 1. Read Design Documents
|
|
41
|
+
|
|
42
|
+
Load all design documents to understand documented architecture.
|
|
43
|
+
|
|
44
|
+
**Actions**:
|
|
45
|
+
- Read all files in `agent/design/`
|
|
46
|
+
- Note documented features, patterns, and architecture
|
|
47
|
+
- Understand documented API contracts
|
|
48
|
+
- Identify documented dependencies
|
|
49
|
+
- List documented file structures
|
|
50
|
+
|
|
51
|
+
**Expected Outcome**: Documented architecture understood
|
|
52
|
+
|
|
53
|
+
### 2. Read Source Code
|
|
54
|
+
|
|
55
|
+
Review actual implementation in source files.
|
|
56
|
+
|
|
57
|
+
**Actions**:
|
|
58
|
+
- Identify main source directories (src/, lib/, etc.)
|
|
59
|
+
- Read key implementation files
|
|
60
|
+
- Note actual features implemented
|
|
61
|
+
- Understand actual architecture
|
|
62
|
+
- Identify actual dependencies
|
|
63
|
+
- Document actual file structures
|
|
64
|
+
|
|
65
|
+
**Expected Outcome**: Actual implementation understood
|
|
66
|
+
|
|
67
|
+
### 3. Compare Documentation vs Reality
|
|
68
|
+
|
|
69
|
+
Identify discrepancies between docs and code.
|
|
70
|
+
|
|
71
|
+
**Actions**:
|
|
72
|
+
- Compare documented features with implemented features
|
|
73
|
+
- Check if documented patterns match actual patterns
|
|
74
|
+
- Verify API contracts match implementation
|
|
75
|
+
- Compare file structures
|
|
76
|
+
- Note undocumented features in code
|
|
77
|
+
- Identify documented features not yet implemented
|
|
78
|
+
|
|
79
|
+
**Expected Outcome**: Documentation drift identified
|
|
80
|
+
|
|
81
|
+
### 4. Identify Stale Documentation
|
|
82
|
+
|
|
83
|
+
Determine which documents need updates.
|
|
84
|
+
|
|
85
|
+
**Actions**:
|
|
86
|
+
- List design docs that are outdated
|
|
87
|
+
- Note patterns that don't match code
|
|
88
|
+
- Identify missing documentation for new features
|
|
89
|
+
- Flag incorrect technical specifications
|
|
90
|
+
- Prioritize updates by importance
|
|
91
|
+
|
|
92
|
+
**Expected Outcome**: Update priorities established
|
|
93
|
+
|
|
94
|
+
### 5. Update Design Documents
|
|
95
|
+
|
|
96
|
+
Refresh design documents to match reality.
|
|
97
|
+
|
|
98
|
+
**Actions**:
|
|
99
|
+
- Update feature descriptions
|
|
100
|
+
- Correct technical specifications
|
|
101
|
+
- Update code examples to match actual code
|
|
102
|
+
- Add notes about implementation differences
|
|
103
|
+
- Update status fields (Proposal → Implemented)
|
|
104
|
+
- Add "Last Updated" dates
|
|
105
|
+
|
|
106
|
+
**Expected Outcome**: Design docs reflect reality
|
|
107
|
+
|
|
108
|
+
### 6. Update Pattern Documents
|
|
109
|
+
|
|
110
|
+
Refresh patterns to match actual usage.
|
|
111
|
+
|
|
112
|
+
**Actions**:
|
|
113
|
+
- Update pattern examples with real code
|
|
114
|
+
- Correct pattern descriptions
|
|
115
|
+
- Add new patterns discovered in code
|
|
116
|
+
- Update anti-patterns based on lessons learned
|
|
117
|
+
- Ensure code examples compile/work
|
|
118
|
+
|
|
119
|
+
**Expected Outcome**: Patterns match actual usage
|
|
120
|
+
|
|
121
|
+
### 7. Document New Features
|
|
122
|
+
|
|
123
|
+
Add documentation for undocumented features.
|
|
124
|
+
|
|
125
|
+
**Actions**:
|
|
126
|
+
- Create design docs for undocumented features
|
|
127
|
+
- Document new patterns found in code
|
|
128
|
+
- Add technical specifications
|
|
129
|
+
- Include code examples
|
|
130
|
+
- Link related documents
|
|
131
|
+
|
|
132
|
+
**Expected Outcome**: All features documented
|
|
133
|
+
|
|
134
|
+
### 8. Update Progress Tracking
|
|
135
|
+
|
|
136
|
+
Update progress.yaml to reflect sync activity.
|
|
137
|
+
|
|
138
|
+
**Actions**:
|
|
139
|
+
- Add recent work entry for sync
|
|
140
|
+
- Note what was updated
|
|
141
|
+
- Update documentation counts if needed
|
|
142
|
+
- Add notes about documentation status
|
|
143
|
+
|
|
144
|
+
**Expected Outcome**: Sync activity tracked
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Verification
|
|
149
|
+
|
|
150
|
+
- [ ] All design documents reviewed
|
|
151
|
+
- [ ] Source code reviewed and compared
|
|
152
|
+
- [ ] Documentation drift identified
|
|
153
|
+
- [ ] Stale documents updated
|
|
154
|
+
- [ ] New features documented
|
|
155
|
+
- [ ] Pattern documents current
|
|
156
|
+
- [ ] Code examples work correctly
|
|
157
|
+
- [ ] progress.yaml updated with sync notes
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Expected Output
|
|
162
|
+
|
|
163
|
+
### Files Modified
|
|
164
|
+
- `agent/design/*.md` - Updated design documents
|
|
165
|
+
- `agent/patterns/*.md` - Updated pattern documents
|
|
166
|
+
- `agent/progress.yaml` - Sync activity logged
|
|
167
|
+
- Potentially new design/pattern documents created
|
|
168
|
+
|
|
169
|
+
### Console Output
|
|
170
|
+
```
|
|
171
|
+
🔄 Synchronizing Documentation with Code
|
|
172
|
+
|
|
173
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
174
|
+
|
|
175
|
+
Reading design documents...
|
|
176
|
+
✓ Read 5 design documents
|
|
177
|
+
✓ Read 3 pattern documents
|
|
178
|
+
|
|
179
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
180
|
+
|
|
181
|
+
Reviewing source code...
|
|
182
|
+
✓ Reviewed src/services/
|
|
183
|
+
✓ Reviewed src/models/
|
|
184
|
+
✓ Reviewed src/utils/
|
|
185
|
+
|
|
186
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
187
|
+
|
|
188
|
+
Comparing documentation vs reality...
|
|
189
|
+
⚠️ Found 3 discrepancies:
|
|
190
|
+
1. auth-design.md: Documented OAuth, implemented API keys
|
|
191
|
+
2. data-pattern.md: Example code outdated
|
|
192
|
+
3. api-design.md: Missing /health endpoint documentation
|
|
193
|
+
|
|
194
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
195
|
+
|
|
196
|
+
Updating documentation...
|
|
197
|
+
✓ Updated auth-design.md (OAuth → API keys)
|
|
198
|
+
✓ Updated data-pattern.md (refreshed examples)
|
|
199
|
+
✓ Updated api-design.md (added /health endpoint)
|
|
200
|
+
|
|
201
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
202
|
+
|
|
203
|
+
✅ Sync Complete!
|
|
204
|
+
|
|
205
|
+
Summary:
|
|
206
|
+
- Documents reviewed: 8
|
|
207
|
+
- Discrepancies found: 3
|
|
208
|
+
- Documents updated: 3
|
|
209
|
+
- New documents created: 0
|
|
210
|
+
- Documentation is now current
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Status Update
|
|
214
|
+
- Design documents synchronized
|
|
215
|
+
- Patterns updated
|
|
216
|
+
- New features documented
|
|
217
|
+
- Sync logged in progress.yaml
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Examples
|
|
222
|
+
|
|
223
|
+
### Example 1: After Major Refactoring
|
|
224
|
+
|
|
225
|
+
**Context**: Refactored authentication system, docs are outdated
|
|
226
|
+
|
|
227
|
+
**Invocation**: `@acp.sync`
|
|
228
|
+
|
|
229
|
+
**Result**: Identifies auth-design.md is stale, updates it to reflect new implementation, updates related patterns
|
|
230
|
+
|
|
231
|
+
### Example 2: After Adding Features
|
|
232
|
+
|
|
233
|
+
**Context**: Added 3 new API endpoints, not yet documented
|
|
234
|
+
|
|
235
|
+
**Invocation**: `@acp.sync`
|
|
236
|
+
|
|
237
|
+
**Result**: Identifies undocumented endpoints, updates api-design.md with new endpoints, adds code examples
|
|
238
|
+
|
|
239
|
+
### Example 3: Periodic Maintenance
|
|
240
|
+
|
|
241
|
+
**Context**: Monthly documentation review
|
|
242
|
+
|
|
243
|
+
**Invocation**: `@acp.sync`
|
|
244
|
+
|
|
245
|
+
**Result**: Reviews all docs, finds minor drift in 2 files, updates them, confirms rest is current
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Related Commands
|
|
250
|
+
|
|
251
|
+
- [`@acp.update`](acp.update.md) - Update progress tracking (not documentation)
|
|
252
|
+
- [`@acp.validate`](acp.validate.md) - Validate documentation structure and consistency
|
|
253
|
+
- [`@acp.init`](acp.init.md) - Includes sync as part of initialization
|
|
254
|
+
- [`@acp.report`](acp.report.md) - Generate report including documentation status
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Troubleshooting
|
|
259
|
+
|
|
260
|
+
### Issue 1: Can't determine what changed
|
|
261
|
+
|
|
262
|
+
**Symptom**: Unclear what documentation needs updating
|
|
263
|
+
|
|
264
|
+
**Cause**: Too many changes or unclear code
|
|
265
|
+
|
|
266
|
+
**Solution**: Review git commits since last sync, focus on major changes first, update incrementally
|
|
267
|
+
|
|
268
|
+
### Issue 2: Documentation and code both seem wrong
|
|
269
|
+
|
|
270
|
+
**Symptom**: Neither docs nor code match expected behavior
|
|
271
|
+
|
|
272
|
+
**Cause**: Requirements changed or misunderstood
|
|
273
|
+
|
|
274
|
+
**Solution**: Clarify requirements first, then update both code and docs to match correct requirements
|
|
275
|
+
|
|
276
|
+
### Issue 3: Too many discrepancies to fix
|
|
277
|
+
|
|
278
|
+
**Symptom**: Overwhelming number of outdated docs
|
|
279
|
+
|
|
280
|
+
**Cause**: Long time since last sync
|
|
281
|
+
|
|
282
|
+
**Solution**: Prioritize by importance, fix critical docs first, schedule time for rest, sync more frequently going forward
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Security Considerations
|
|
287
|
+
|
|
288
|
+
### File Access
|
|
289
|
+
- **Reads**: All files in `agent/design/`, `agent/patterns/`, source code directories
|
|
290
|
+
- **Writes**: `agent/design/*.md`, `agent/patterns/*.md`, `agent/progress.yaml`
|
|
291
|
+
- **Executes**: None
|
|
292
|
+
|
|
293
|
+
### Network Access
|
|
294
|
+
- **APIs**: None
|
|
295
|
+
- **Repositories**: None
|
|
296
|
+
|
|
297
|
+
### Sensitive Data
|
|
298
|
+
- **Secrets**: Does not access secrets or credentials
|
|
299
|
+
- **Credentials**: Does not access credentials files
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Notes
|
|
304
|
+
|
|
305
|
+
- This command can be time-consuming for large projects
|
|
306
|
+
- Focus on high-priority documentation first
|
|
307
|
+
- Sync regularly to avoid large drift
|
|
308
|
+
- Use git diff to see what changed in code
|
|
309
|
+
- Document the "why" not just the "what"
|
|
310
|
+
- Keep code examples working and tested
|
|
311
|
+
- Update "Last Updated" dates in documents
|
|
312
|
+
- Consider running after each milestone completion
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
**Namespace**: acp
|
|
317
|
+
**Command**: sync
|
|
318
|
+
**Version**: 1.0.0
|
|
319
|
+
**Created**: 2026-02-16
|
|
320
|
+
**Last Updated**: 2026-02-16
|
|
321
|
+
**Status**: Active
|
|
322
|
+
**Compatibility**: ACP 1.1.0+
|
|
323
|
+
**Author**: ACP Project
|