@prmichaelsen/acp-visualizer 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 (180) hide show
  1. package/README.md +68 -0
  2. package/agent/commands/acp.clarification-address.md +417 -0
  3. package/agent/commands/acp.clarification-capture.md +386 -0
  4. package/agent/commands/acp.clarification-create.md +437 -0
  5. package/agent/commands/acp.clarifications-research.md +326 -0
  6. package/agent/commands/acp.command-create.md +432 -0
  7. package/agent/commands/acp.design-create.md +286 -0
  8. package/agent/commands/acp.design-reference.md +355 -0
  9. package/agent/commands/acp.handoff.md +270 -0
  10. package/agent/commands/acp.index.md +423 -0
  11. package/agent/commands/acp.init.md +546 -0
  12. package/agent/commands/acp.package-create.md +895 -0
  13. package/agent/commands/acp.package-info.md +212 -0
  14. package/agent/commands/acp.package-install.md +539 -0
  15. package/agent/commands/acp.package-list.md +280 -0
  16. package/agent/commands/acp.package-publish.md +541 -0
  17. package/agent/commands/acp.package-remove.md +293 -0
  18. package/agent/commands/acp.package-search.md +307 -0
  19. package/agent/commands/acp.package-update.md +361 -0
  20. package/agent/commands/acp.package-validate.md +540 -0
  21. package/agent/commands/acp.pattern-create.md +386 -0
  22. package/agent/commands/acp.plan.md +587 -0
  23. package/agent/commands/acp.proceed.md +882 -0
  24. package/agent/commands/acp.project-create.md +675 -0
  25. package/agent/commands/acp.project-info.md +312 -0
  26. package/agent/commands/acp.project-list.md +226 -0
  27. package/agent/commands/acp.project-remove.md +379 -0
  28. package/agent/commands/acp.project-set.md +227 -0
  29. package/agent/commands/acp.project-update.md +307 -0
  30. package/agent/commands/acp.projects-restore.md +228 -0
  31. package/agent/commands/acp.projects-sync.md +347 -0
  32. package/agent/commands/acp.report.md +407 -0
  33. package/agent/commands/acp.resume.md +239 -0
  34. package/agent/commands/acp.sessions.md +301 -0
  35. package/agent/commands/acp.status.md +293 -0
  36. package/agent/commands/acp.sync.md +364 -0
  37. package/agent/commands/acp.task-create.md +500 -0
  38. package/agent/commands/acp.update.md +302 -0
  39. package/agent/commands/acp.validate.md +466 -0
  40. package/agent/commands/acp.version-check-for-updates.md +276 -0
  41. package/agent/commands/acp.version-check.md +191 -0
  42. package/agent/commands/acp.version-update.md +289 -0
  43. package/agent/commands/command.template.md +339 -0
  44. package/agent/commands/git.commit.md +526 -0
  45. package/agent/commands/git.init.md +514 -0
  46. package/agent/commands/tanstack-cloudflare.deploy.md +272 -0
  47. package/agent/commands/tanstack-cloudflare.tail.md +275 -0
  48. package/agent/design/.gitkeep +0 -0
  49. package/agent/design/design.template.md +154 -0
  50. package/agent/design/local.dashboard-layout-routing.md +288 -0
  51. package/agent/design/local.data-model-yaml-parsing.md +310 -0
  52. package/agent/design/local.search-filtering.md +331 -0
  53. package/agent/design/local.server-api-auto-refresh.md +235 -0
  54. package/agent/design/local.table-tree-views.md +299 -0
  55. package/agent/design/local.visualizer-requirements.md +349 -0
  56. package/agent/design/requirements.template.md +387 -0
  57. package/agent/index/.gitkeep +0 -0
  58. package/agent/index/acp.core.yaml +137 -0
  59. package/agent/index/local.main.template.yaml +37 -0
  60. package/agent/manifest.template.yaml +13 -0
  61. package/agent/manifest.yaml +302 -0
  62. package/agent/milestones/.gitkeep +0 -0
  63. package/agent/milestones/milestone-1-project-scaffold-data-pipeline.md +67 -0
  64. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  65. package/agent/milestones/milestone-2-dashboard-views-interaction.md +79 -0
  66. package/agent/package.template.yaml +86 -0
  67. package/agent/patterns/.gitkeep +0 -0
  68. package/agent/patterns/bootstrap.template.md +1237 -0
  69. package/agent/patterns/pattern.template.md +382 -0
  70. package/agent/patterns/tanstack-cloudflare.acl-permissions.md +332 -0
  71. package/agent/patterns/tanstack-cloudflare.action-bar-item.md +416 -0
  72. package/agent/patterns/tanstack-cloudflare.api-route-handlers.md +401 -0
  73. package/agent/patterns/tanstack-cloudflare.auth-session-management.md +387 -0
  74. package/agent/patterns/tanstack-cloudflare.card-and-list.md +271 -0
  75. package/agent/patterns/tanstack-cloudflare.chat-engine.md +353 -0
  76. package/agent/patterns/tanstack-cloudflare.confirmation-tokens.md +346 -0
  77. package/agent/patterns/tanstack-cloudflare.durable-objects-websocket.md +516 -0
  78. package/agent/patterns/tanstack-cloudflare.email-service.md +431 -0
  79. package/agent/patterns/tanstack-cloudflare.expander.md +98 -0
  80. package/agent/patterns/tanstack-cloudflare.fcm-push.md +115 -0
  81. package/agent/patterns/tanstack-cloudflare.firebase-anonymous-sessions.md +441 -0
  82. package/agent/patterns/tanstack-cloudflare.firebase-auth.md +348 -0
  83. package/agent/patterns/tanstack-cloudflare.firebase-firestore.md +550 -0
  84. package/agent/patterns/tanstack-cloudflare.firebase-storage.md +369 -0
  85. package/agent/patterns/tanstack-cloudflare.form-controls.md +145 -0
  86. package/agent/patterns/tanstack-cloudflare.global-search-context.md +93 -0
  87. package/agent/patterns/tanstack-cloudflare.image-carousel.md +126 -0
  88. package/agent/patterns/tanstack-cloudflare.library-services.md +553 -0
  89. package/agent/patterns/tanstack-cloudflare.lightbox.md +169 -0
  90. package/agent/patterns/tanstack-cloudflare.markdown-content.md +115 -0
  91. package/agent/patterns/tanstack-cloudflare.mention-suggestions.md +98 -0
  92. package/agent/patterns/tanstack-cloudflare.modal.md +156 -0
  93. package/agent/patterns/tanstack-cloudflare.nextjs-to-tanstack-routing.md +461 -0
  94. package/agent/patterns/tanstack-cloudflare.notifications-engine.md +151 -0
  95. package/agent/patterns/tanstack-cloudflare.oauth-token-refresh.md +90 -0
  96. package/agent/patterns/tanstack-cloudflare.og-metadata.md +296 -0
  97. package/agent/patterns/tanstack-cloudflare.pagination.md +442 -0
  98. package/agent/patterns/tanstack-cloudflare.pill-input.md +220 -0
  99. package/agent/patterns/tanstack-cloudflare.provider-adapter.md +401 -0
  100. package/agent/patterns/tanstack-cloudflare.rate-limiting.md +323 -0
  101. package/agent/patterns/tanstack-cloudflare.scheduled-tasks.md +338 -0
  102. package/agent/patterns/tanstack-cloudflare.searchable-settings.md +375 -0
  103. package/agent/patterns/tanstack-cloudflare.slide-over.md +129 -0
  104. package/agent/patterns/tanstack-cloudflare.ssr-preload.md +571 -0
  105. package/agent/patterns/tanstack-cloudflare.third-party-api-integration.md +508 -0
  106. package/agent/patterns/tanstack-cloudflare.toast-system.md +142 -0
  107. package/agent/patterns/tanstack-cloudflare.unified-header.md +280 -0
  108. package/agent/patterns/tanstack-cloudflare.user-scoped-collections.md +628 -0
  109. package/agent/patterns/tanstack-cloudflare.websocket-manager.md +237 -0
  110. package/agent/patterns/tanstack-cloudflare.wrangler-configuration.md +358 -0
  111. package/agent/patterns/tanstack-cloudflare.zod-schema-validation.md +336 -0
  112. package/agent/progress.template.yaml +161 -0
  113. package/agent/progress.yaml +145 -0
  114. package/agent/schemas/package.schema.yaml +276 -0
  115. package/agent/scripts/acp.common.sh +1781 -0
  116. package/agent/scripts/acp.install.sh +333 -0
  117. package/agent/scripts/acp.package-create.sh +924 -0
  118. package/agent/scripts/acp.package-info.sh +288 -0
  119. package/agent/scripts/acp.package-install.sh +893 -0
  120. package/agent/scripts/acp.package-list.sh +311 -0
  121. package/agent/scripts/acp.package-publish.sh +420 -0
  122. package/agent/scripts/acp.package-remove.sh +348 -0
  123. package/agent/scripts/acp.package-search.sh +156 -0
  124. package/agent/scripts/acp.package-update.sh +517 -0
  125. package/agent/scripts/acp.package-validate.sh +1018 -0
  126. package/agent/scripts/acp.uninstall.sh +85 -0
  127. package/agent/scripts/acp.version-check-for-updates.sh +98 -0
  128. package/agent/scripts/acp.version-check.sh +47 -0
  129. package/agent/scripts/acp.version-update.sh +176 -0
  130. package/agent/scripts/acp.yaml-parser.sh +985 -0
  131. package/agent/scripts/acp.yaml-validate.sh +205 -0
  132. package/agent/tasks/.gitkeep +0 -0
  133. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-1-initialize-tanstack-start-project.md +210 -0
  134. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-2-implement-data-model-yaml-parser.md +294 -0
  135. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-3-build-server-api-data-loading.md +193 -0
  136. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-4-add-auto-refresh-sse.md +262 -0
  137. package/agent/tasks/milestone-2-dashboard-views-interaction/task-10-polish-integration-testing.md +156 -0
  138. package/agent/tasks/milestone-2-dashboard-views-interaction/task-5-build-dashboard-layout-routing.md +178 -0
  139. package/agent/tasks/milestone-2-dashboard-views-interaction/task-6-build-overview-page.md +141 -0
  140. package/agent/tasks/milestone-2-dashboard-views-interaction/task-7-implement-milestone-table-view.md +153 -0
  141. package/agent/tasks/milestone-2-dashboard-views-interaction/task-8-implement-milestone-tree-view.md +174 -0
  142. package/agent/tasks/milestone-2-dashboard-views-interaction/task-9-implement-search-filtering.md +233 -0
  143. package/agent/tasks/task-1-{title}.template.md +244 -0
  144. package/bin/visualize.mjs +84 -0
  145. package/package.json +48 -0
  146. package/src/components/ExtraFieldsBadge.tsx +15 -0
  147. package/src/components/FilterBar.tsx +33 -0
  148. package/src/components/Header.tsx +23 -0
  149. package/src/components/MilestoneTable.tsx +167 -0
  150. package/src/components/MilestoneTree.tsx +84 -0
  151. package/src/components/ProgressBar.tsx +20 -0
  152. package/src/components/SearchInput.tsx +22 -0
  153. package/src/components/Sidebar.tsx +54 -0
  154. package/src/components/StatusBadge.tsx +23 -0
  155. package/src/components/StatusDot.tsx +12 -0
  156. package/src/components/TaskList.tsx +36 -0
  157. package/src/components/ViewToggle.tsx +31 -0
  158. package/src/lib/config.ts +8 -0
  159. package/src/lib/file-watcher.ts +43 -0
  160. package/src/lib/search.ts +48 -0
  161. package/src/lib/types.ts +73 -0
  162. package/src/lib/useAutoRefresh.ts +31 -0
  163. package/src/lib/useCollapse.ts +31 -0
  164. package/src/lib/useFilteredData.ts +55 -0
  165. package/src/lib/yaml-loader-real.spec.ts +47 -0
  166. package/src/lib/yaml-loader.spec.ts +201 -0
  167. package/src/lib/yaml-loader.ts +265 -0
  168. package/src/routeTree.gen.ts +140 -0
  169. package/src/router.tsx +10 -0
  170. package/src/routes/__root.tsx +75 -0
  171. package/src/routes/api/watch.ts +29 -0
  172. package/src/routes/index.tsx +115 -0
  173. package/src/routes/milestones.tsx +50 -0
  174. package/src/routes/search.tsx +84 -0
  175. package/src/routes/tasks.tsx +63 -0
  176. package/src/services/progress-database.service.ts +46 -0
  177. package/src/styles.css +25 -0
  178. package/tsconfig.json +24 -0
  179. package/vite.config.ts +16 -0
  180. package/vitest.config.ts +27 -0
@@ -0,0 +1,307 @@
1
+ # Command: project-update
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp.project-update` has been invoked. Follow the steps below to execute this command.
4
+
5
+ **Namespace**: acp
6
+ **Version**: 1.0.0
7
+ **Created**: 2026-02-25
8
+ **Last Updated**: 2026-02-25
9
+ **Status**: Experimental
10
+
11
+ ---
12
+
13
+ **Purpose**: Update project metadata in the global registry
14
+ **Category**: Project Management
15
+ **Frequency**: As Needed
16
+
17
+ ---
18
+
19
+ ## What This Command Does
20
+
21
+ This command updates metadata for a project in `~/.acp/projects.yaml`, allowing you to modify status, description, type, tags, and related projects. It provides granular control over project metadata without requiring manual YAML editing.
22
+
23
+ Use this command to keep project metadata current as projects evolve, mark projects as archived when completed, add tags for organization, link related projects, or correct project information. All updates automatically update the `last_modified` timestamp.
24
+
25
+ Unlike [`@acp.project-info`](acp.project-info.md:1) which displays information, this command modifies the registry. It supports multiple update operations in a single invocation.
26
+
27
+ ---
28
+
29
+ ## Prerequisites
30
+
31
+ - [ ] Global ACP infrastructure initialized (`~/.acp/` exists)
32
+ - [ ] Project registry exists (`~/.acp/projects.yaml`)
33
+ - [ ] Project is registered in the registry
34
+
35
+ ---
36
+
37
+ ## Steps
38
+
39
+ ### 1. Parse Arguments
40
+
41
+ Extract project name and update options.
42
+
43
+ **Actions**:
44
+ - Parse project name (required)
45
+ - Parse update flags (--status, --description, --type, --git-origin, --git-branch, etc.)
46
+ - Validate at least one update option provided
47
+
48
+ **Expected Outcome**: Arguments parsed successfully
49
+
50
+ ### 2. Validate Project Exists
51
+
52
+ Check that the project is in the registry.
53
+
54
+ **Actions**:
55
+ - Load registry with `yaml_parse()`
56
+ - Check project exists with `yaml_has_key()`
57
+ - Show error if not found
58
+
59
+ **Expected Outcome**: Project found in registry
60
+
61
+ ### 3. Validate Update Values
62
+
63
+ Check that provided values are valid.
64
+
65
+ **Actions**:
66
+ - Validate status is one of: active, archived, paused
67
+ - Validate other fields as needed
68
+ - Show errors for invalid values
69
+
70
+ **Expected Outcome**: All values validated
71
+
72
+ ### 4. Apply Updates
73
+
74
+ Update registry with new values.
75
+
76
+ **Actions**:
77
+ - Update status (if provided)
78
+ - Update description (if provided)
79
+ - Update type (if provided)
80
+ - Update git_origin (if provided)
81
+ - Update git_branch (if provided)
82
+ - Add tags (if provided)
83
+ - Remove tags (if provided)
84
+ - Add related projects (if provided)
85
+ - Remove related projects (if provided)
86
+ - Update last_modified timestamp
87
+ - Update registry last_updated timestamp
88
+
89
+ **Expected Outcome**: All updates applied to AST
90
+
91
+ ### 5. Write Changes
92
+
93
+ Save updated registry to disk.
94
+
95
+ **Actions**:
96
+ - Write changes with `yaml_write()`
97
+ - Report number of updates applied
98
+ - Show success message
99
+
100
+ **Expected Outcome**: Registry updated on disk
101
+
102
+ ---
103
+
104
+ ## Verification
105
+
106
+ - [ ] Script created and executable
107
+ - [ ] Command document created
108
+ - [ ] Validates project name argument
109
+ - [ ] Validates at least one update option provided
110
+ - [ ] Validates status values (active|archived|paused)
111
+ - [ ] Updates status correctly
112
+ - [ ] Updates description correctly
113
+ - [ ] Updates type correctly
114
+ - [ ] Adds tags correctly (prevents duplicates)
115
+ - [ ] Removes tags correctly
116
+ - [ ] Adds related projects correctly (prevents duplicates)
117
+ - [ ] Removes related projects correctly
118
+ - [ ] Updates last_modified timestamp
119
+ - [ ] Updates registry last_updated timestamp
120
+ - [ ] Writes changes to disk
121
+ - [ ] No syntax errors
122
+
123
+ ---
124
+
125
+ ## Expected Output
126
+
127
+ ### Files Created
128
+ - `agent/scripts/acp.project-update.sh` - Shell script for updating projects
129
+ - `agent/commands/acp.project-update.md` - This command documentation
130
+
131
+ ### Console Output
132
+ ```
133
+ Updating project: remember-mcp-server
134
+
135
+ ✓ Updated status: archived
136
+ ✓ Added tag: production
137
+ ✓ Added tag: critical
138
+ ✓ Removed tag: development
139
+
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+
142
+ ✅ Project updated successfully!
143
+ Updates applied: 4
144
+ Registry: ~/.acp/projects.yaml
145
+
146
+ Run 'acp.project-info.sh remember-mcp-server' to see updated information
147
+ ```
148
+
149
+ ### Status Update
150
+ - Project metadata updated in registry
151
+ - Timestamps updated
152
+ - Changes persisted to disk
153
+
154
+ ---
155
+
156
+ ## Examples
157
+
158
+ ### Example 1: Update Project Status
159
+
160
+ **Context**: Mark project as archived when completed
161
+
162
+ **Invocation**: `@acp.project-update old-project --status archived`
163
+
164
+ **Result**: Status changed to "archived", last_modified timestamp updated
165
+
166
+ ### Example 2: Add Multiple Tags
167
+
168
+ **Context**: Add organization tags to project
169
+
170
+ **Invocation**: `@acp.project-update my-project --add-tag production --add-tag critical --add-tag backend`
171
+
172
+ **Result**: Three tags added, duplicates prevented if tags already exist
173
+
174
+ ### Example 3: Update Description
175
+
176
+ **Context**: Improve project description
177
+
178
+ **Invocation**: `@acp.project-update my-project --description "Multi-tenant memory system with vector search and relationship tracking"`
179
+
180
+ **Result**: Description updated in registry
181
+
182
+ ### Example 4: Link Related Projects
183
+
184
+ **Context**: Connect server and client projects
185
+
186
+ **Invocation**: `@acp.project-update remember-mcp-server --add-related remember-mcp`
187
+
188
+ **Result**: remember-mcp added to related_projects array
189
+
190
+ ### Example 5: Set Git Origin
191
+
192
+ **Context**: Manually set git remote URL for a project
193
+
194
+ **Invocation**: `@acp.project-update my-project --git-origin git@github.com:user/my-project.git --git-branch main`
195
+
196
+ **Result**: git_origin and git_branch set in registry, enabling `@acp.projects-restore`
197
+
198
+ ### Example 6: Multiple Updates
199
+
200
+ **Context**: Update several fields at once
201
+
202
+ **Invocation**: `@acp.project-update my-project --status active --add-tag production --remove-tag development`
203
+
204
+ **Result**: Status updated, production tag added, development tag removed
205
+
206
+ ### Example 7: Remove Tag
207
+
208
+ **Context**: Remove obsolete tag
209
+
210
+ **Invocation**: `@acp.project-update my-project --remove-tag deprecated`
211
+
212
+ **Result**: Tag removed from tags array
213
+
214
+ ---
215
+
216
+ ## Related Commands
217
+
218
+ - [`@acp.project-info`](acp.project-info.md) - View project details before updating
219
+ - [`@acp.project-list`](acp.project-list.md) - List all projects
220
+ - [`@acp.project-set`](acp.project-set.md) - Switch to a project
221
+ - [`@acp.projects-sync`](acp.projects-sync.md) - Sync registry with filesystem
222
+ - [`@acp.projects-restore`](acp.projects-restore.md) - Restore projects from git origins
223
+
224
+ ---
225
+
226
+ ## Troubleshooting
227
+
228
+ ### Issue 1: Registry not found
229
+
230
+ **Symptom**: Error "Project registry not found"
231
+
232
+ **Cause**: `~/.acp/projects.yaml` doesn't exist
233
+
234
+ **Solution**: Create a project with `@acp.project-create` to initialize the registry
235
+
236
+ ### Issue 2: Project not found
237
+
238
+ **Symptom**: Error "Project 'name' not found in registry"
239
+
240
+ **Cause**: Project not registered or wrong name
241
+
242
+ **Solution**: Run `@acp.project-list` to see available projects
243
+
244
+ ### Issue 3: Invalid status value
245
+
246
+ **Symptom**: Error "Invalid status 'value'"
247
+
248
+ **Cause**: Status must be one of: active, archived, paused
249
+
250
+ **Solution**: Use a valid status value
251
+
252
+ ### Issue 4: No updates specified
253
+
254
+ **Symptom**: Error "No updates specified"
255
+
256
+ **Cause**: Command requires at least one update option
257
+
258
+ **Solution**: Provide at least one update flag (--status, --description, --add-tag, etc.)
259
+
260
+ ### Issue 5: Tag already exists
261
+
262
+ **Symptom**: Message "Tag already exists: tag-name"
263
+
264
+ **Cause**: Trying to add a tag that's already in the tags array
265
+
266
+ **Solution**: This is informational, not an error. The tag won't be duplicated.
267
+
268
+ ---
269
+
270
+ ## Security Considerations
271
+
272
+ ### File Access
273
+ - **Reads**: `~/.acp/projects.yaml` (project registry)
274
+ - **Writes**: `~/.acp/projects.yaml` (updates project metadata)
275
+ - **Executes**: None
276
+
277
+ ### Network Access
278
+ - **APIs**: None
279
+ - **Repositories**: None
280
+
281
+ ### Sensitive Data
282
+ - **Secrets**: Does not access any secrets or credentials
283
+ - **Credentials**: Does not access credentials
284
+
285
+ ---
286
+
287
+ ## Notes
288
+
289
+ - Updates are applied immediately to the registry file
290
+ - Multiple updates can be applied in a single command
291
+ - Timestamps are automatically updated (last_modified, last_updated)
292
+ - Tags and related projects prevent duplicates automatically
293
+ - Status values are validated (active, archived, paused)
294
+ - Does not modify the project directory itself, only registry metadata
295
+ - Part of Milestone 7 (Global ACP Project Registry)
296
+ - Marked as Experimental until M7 is complete
297
+
298
+ ---
299
+
300
+ **Namespace**: acp
301
+ **Command**: project-update
302
+ **Version**: 1.0.0
303
+ **Created**: 2026-02-25
304
+ **Last Updated**: 2026-02-25
305
+ **Status**: Experimental
306
+ **Compatibility**: ACP 4.1.1+
307
+ **Author**: ACP Project
@@ -0,0 +1,228 @@
1
+ # Command: projects-restore
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp.projects-restore` has been invoked. Follow the steps below to execute this command.
4
+
5
+ **Namespace**: acp
6
+ **Version**: 1.0.0
7
+ **Created**: 2026-03-01
8
+ **Last Updated**: 2026-03-01
9
+ **Status**: Experimental
10
+
11
+ ---
12
+
13
+ **Purpose**: Restore/clone missing projects from their registered git origins
14
+ **Category**: Project Management
15
+ **Frequency**: As Needed
16
+ **Script**: [`agent/scripts/acp.projects-restore.sh`](../scripts/acp.projects-restore.sh)
17
+
18
+ ---
19
+
20
+ ## What This Command Does
21
+
22
+ This command reads `~/.acp/projects.yaml` and clones any missing project directories from their stored `git_origin` URLs. It's designed for restoring projects on a new machine after pushing your `~/.acp` configuration.
23
+
24
+ **Use this when**:
25
+ - You've set up `~/.acp` on a new machine and need to clone all your projects
26
+ - Project directories were deleted and need to be restored
27
+ - You want to preview what projects are missing with `--dry-run`
28
+
29
+ **Key Distinction**:
30
+ - `@acp.projects-sync` - Discovers projects on disk and registers them in the registry
31
+ - `@acp.projects-restore` - Reads the registry and clones projects that are missing from disk
32
+
33
+ ---
34
+
35
+ ## Prerequisites
36
+
37
+ - [ ] `~/.acp/projects.yaml` exists with project entries
38
+ - [ ] Projects have `git_origin` field set (run `@acp.projects-sync` to backfill)
39
+ - [ ] Git installed and network access available for cloning
40
+
41
+ ---
42
+
43
+ ## Steps
44
+
45
+ ### 1. Execute Restore Script
46
+
47
+ Run the shell script to restore missing projects.
48
+
49
+ **Actions**:
50
+ - Execute `./agent/scripts/acp.projects-restore.sh [--dry-run] [--install-acp]`
51
+ - Script reads `~/.acp/projects.yaml` registry
52
+ - Checks each project's directory existence
53
+ - Clones missing projects from `git_origin`
54
+
55
+ **Expected Outcome**: Missing projects cloned to their registered paths
56
+
57
+ ### 2. Review Results
58
+
59
+ Check the restore summary.
60
+
61
+ **Actions**:
62
+ - Review clone count (projects restored)
63
+ - Review skip count (already exist, archived, no origin)
64
+ - Review errors (failed clones)
65
+
66
+ **Expected Outcome**: All restorable projects cloned successfully
67
+
68
+ ---
69
+
70
+ ## Arguments
71
+
72
+ ### Optional Flags
73
+
74
+ - `--dry-run` - Preview what would be cloned without actually cloning
75
+ - `--install-acp` - Run ACP install in each cloned project after cloning
76
+
77
+ ---
78
+
79
+ ## Verification
80
+
81
+ - [ ] Script executed successfully
82
+ - [ ] Missing projects were cloned
83
+ - [ ] Existing directories were skipped
84
+ - [ ] Archived projects were skipped
85
+ - [ ] Projects without git_origin were skipped
86
+ - [ ] Summary displayed correctly
87
+ - [ ] No errors encountered
88
+
89
+ ---
90
+
91
+ ## Expected Output
92
+
93
+ ### Console Output (Dry Run)
94
+
95
+ ```
96
+ Restore Preview (dry run)
97
+
98
+ ✓ agent-context-protocol (already exists)
99
+ ○ old-project
100
+ Would clone: git@github.com:user/old-project.git
101
+ Branch: main
102
+ Into: /home/user/.acp/projects/old-project
103
+
104
+ ⊘ archived-project (archived, skipping)
105
+ ⊘ local-only (no git_origin, skipping)
106
+
107
+ Restore Complete
108
+ Would clone: 1 projects
109
+ Skipped: 3 projects
110
+ ```
111
+
112
+ ### Console Output (Actual Restore)
113
+
114
+ ```
115
+ Restoring projects from registry...
116
+
117
+ ✓ agent-context-protocol (already exists)
118
+ ○ old-project - cloning...
119
+ ✓ Cloned
120
+
121
+ Restore Complete
122
+ Cloned: 1 projects
123
+ Skipped: 1 projects
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Examples
129
+
130
+ ### Example 1: Preview Restore
131
+
132
+ **Context**: Check what would be restored on a new machine
133
+
134
+ **Invocation**: `@acp.projects-restore --dry-run`
135
+
136
+ **Result**: Lists projects that would be cloned, skipped projects, and reasons
137
+
138
+ ### Example 2: Full Restore
139
+
140
+ **Context**: Restore all projects on a new machine
141
+
142
+ **Invocation**: `@acp.projects-restore`
143
+
144
+ **Result**: Clones all missing projects from their git origins
145
+
146
+ ### Example 3: Restore with ACP Install
147
+
148
+ **Context**: Restore and set up ACP in each project
149
+
150
+ **Invocation**: `@acp.projects-restore --install-acp`
151
+
152
+ **Result**: Clones missing projects and installs ACP in each one
153
+
154
+ ---
155
+
156
+ ## Related Commands
157
+
158
+ - [`@acp.projects-sync`](acp.projects-sync.md) - Discover and register unregistered projects (opposite direction)
159
+ - [`@acp.project-list`](acp.project-list.md) - List all registered projects
160
+ - [`@acp.project-info`](acp.project-info.md) - View project details including git info
161
+ - [`@acp.project-update`](acp.project-update.md) - Manually set git_origin/git_branch
162
+
163
+ ---
164
+
165
+ ## Troubleshooting
166
+
167
+ ### Issue 1: No projects to restore
168
+
169
+ **Symptom**: All projects show "already exists" or "no git_origin"
170
+
171
+ **Cause**: Either all projects exist on disk, or git origins haven't been recorded
172
+
173
+ **Solution**: Run `@acp.projects-sync` first to backfill git_origin for existing projects
174
+
175
+ ### Issue 2: Clone failed
176
+
177
+ **Symptom**: "Clone failed" for a project
178
+
179
+ **Cause**: Network error, authentication required, or repository no longer exists
180
+
181
+ **Solution**: Check the git_origin URL, verify network access, and ensure you have repository permissions
182
+
183
+ ### Issue 3: Branch not found
184
+
185
+ **Symptom**: "Branch 'xyz' not found on remote, using default"
186
+
187
+ **Cause**: The stored branch no longer exists on the remote
188
+
189
+ **Solution**: This is handled automatically by falling back to the default branch. Update with `@acp.project-update <name> --git-branch <new-branch>`
190
+
191
+ ---
192
+
193
+ ## Security Considerations
194
+
195
+ ### File Access
196
+ - **Reads**: `~/.acp/projects.yaml` (project registry)
197
+ - **Writes**: Creates project directories via git clone
198
+ - **Executes**: `git clone`, optionally `acp.install.sh`
199
+
200
+ ### Network Access
201
+ - **APIs**: None
202
+ - **Repositories**: Clones from git_origin URLs (SSH or HTTPS)
203
+
204
+ ### Sensitive Data
205
+ - **Secrets**: Does not read `.env` files or credentials
206
+ - **Credentials**: Uses system git credentials for cloning
207
+
208
+ ---
209
+
210
+ ## Notes
211
+
212
+ - This command is the counterpart to `@acp.projects-sync` (sync discovers on disk, restore clones from registry)
213
+ - Archived projects are always skipped
214
+ - Projects without `git_origin` are skipped (use `@acp.projects-sync` to backfill)
215
+ - Falls back to default branch if the stored branch doesn't exist on the remote
216
+ - Safe to run multiple times (existing directories are skipped)
217
+ - Does not modify the registry, only creates directories
218
+
219
+ ---
220
+
221
+ **Namespace**: acp
222
+ **Command**: projects-restore
223
+ **Version**: 1.0.0
224
+ **Created**: 2026-03-01
225
+ **Last Updated**: 2026-03-01
226
+ **Status**: Experimental
227
+ **Compatibility**: ACP 5.7.3+
228
+ **Author**: ACP Project