@prmichaelsen/remember-mcp 3.15.4 → 3.15.5

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 (132) hide show
  1. package/AGENT.md +363 -5
  2. package/CHANGELOG.md +7 -0
  3. package/agent/commands/acp.clarification-capture.md +386 -0
  4. package/agent/commands/acp.clarification-create.md +50 -0
  5. package/agent/commands/acp.command-create.md +60 -0
  6. package/agent/commands/acp.design-create.md +62 -0
  7. package/agent/commands/acp.design-reference.md +355 -0
  8. package/agent/commands/acp.index.md +423 -0
  9. package/agent/commands/acp.init.md +48 -0
  10. package/agent/commands/acp.package-create.md +1 -0
  11. package/agent/commands/acp.package-info.md +1 -0
  12. package/agent/commands/acp.package-install.md +19 -0
  13. package/agent/commands/acp.package-list.md +1 -0
  14. package/agent/commands/acp.package-publish.md +1 -0
  15. package/agent/commands/acp.package-remove.md +1 -0
  16. package/agent/commands/acp.package-search.md +1 -0
  17. package/agent/commands/acp.package-update.md +1 -0
  18. package/agent/commands/acp.package-validate.md +1 -0
  19. package/agent/commands/acp.pattern-create.md +60 -0
  20. package/agent/commands/acp.plan.md +25 -0
  21. package/agent/commands/acp.proceed.md +621 -75
  22. package/agent/commands/acp.project-create.md +3 -0
  23. package/agent/commands/acp.project-info.md +3 -0
  24. package/agent/commands/acp.project-list.md +3 -1
  25. package/agent/commands/acp.project-set.md +1 -0
  26. package/agent/commands/acp.project-update.md +14 -3
  27. package/agent/commands/acp.projects-restore.md +228 -0
  28. package/agent/commands/acp.projects-sync.md +347 -0
  29. package/agent/commands/acp.report.md +13 -0
  30. package/agent/commands/acp.resume.md +3 -1
  31. package/agent/commands/acp.sessions.md +301 -0
  32. package/agent/commands/acp.status.md +13 -0
  33. package/agent/commands/acp.sync.md +1 -0
  34. package/agent/commands/acp.task-create.md +105 -3
  35. package/agent/commands/acp.update.md +1 -0
  36. package/agent/commands/acp.validate.md +32 -2
  37. package/agent/commands/acp.version-check-for-updates.md +1 -0
  38. package/agent/commands/acp.version-check.md +1 -0
  39. package/agent/commands/acp.version-update.md +1 -0
  40. package/agent/commands/command.template.md +23 -0
  41. package/agent/commands/git.commit.md +1 -0
  42. package/agent/commands/git.init.md +1 -0
  43. package/agent/design/complete-tool-set.md +157 -233
  44. package/agent/design/design.template.md +18 -0
  45. package/agent/design/user-preferences.md +11 -7
  46. package/agent/milestones/milestone-19-new-search-ghost-tools.md +46 -0
  47. package/agent/package.template.yaml +50 -0
  48. package/agent/patterns/pattern.template.md +18 -0
  49. package/agent/progress.yaml +162 -6
  50. package/agent/scripts/acp.common.sh +258 -15
  51. package/agent/scripts/acp.install.sh +91 -4
  52. package/agent/scripts/acp.package-create.sh +0 -1
  53. package/agent/scripts/acp.package-info.sh +19 -1
  54. package/agent/scripts/acp.package-install-optimized.sh +1 -1
  55. package/agent/scripts/acp.package-install.sh +388 -38
  56. package/agent/scripts/acp.package-list.sh +52 -4
  57. package/agent/scripts/acp.package-remove.sh +77 -1
  58. package/agent/scripts/acp.package-search.sh +2 -2
  59. package/agent/scripts/acp.package-update.sh +91 -12
  60. package/agent/scripts/acp.package-validate.sh +136 -1
  61. package/agent/scripts/acp.project-info.sh +34 -11
  62. package/agent/scripts/acp.project-list.sh +4 -0
  63. package/agent/scripts/acp.project-update.sh +66 -19
  64. package/agent/scripts/acp.projects-restore.sh +170 -0
  65. package/agent/scripts/acp.projects-sync.sh +155 -0
  66. package/agent/scripts/acp.sessions.sh +725 -0
  67. package/agent/scripts/acp.version-update.sh +21 -3
  68. package/agent/scripts/acp.yaml-parser.sh +20 -6
  69. package/agent/tasks/milestone-19-new-search-ghost-tools/task-203-create-search-by-tool.md +143 -0
  70. package/agent/tasks/milestone-19-new-search-ghost-tools/task-204-add-new-filters-existing-tools.md +77 -0
  71. package/agent/tasks/milestone-19-new-search-ghost-tools/task-205-add-feel-fields-create-update.md +137 -0
  72. package/agent/tasks/milestone-19-new-search-ghost-tools/task-206-add-byproperty-bysignificance-modes.md +135 -0
  73. package/agent/tasks/milestone-19-new-search-ghost-tools/task-207-add-emotional-composites-search-results.md +88 -0
  74. package/agent/tasks/milestone-19-new-search-ghost-tools/task-208-add-bybroad-byrandom-modes.md +115 -0
  75. package/agent/tasks/milestone-19-new-search-ghost-tools/task-209-create-ghost-memory-tools.md +192 -0
  76. package/agent/tasks/milestone-19-new-search-ghost-tools/task-210-create-get-core-tool.md +203 -0
  77. package/agent/tasks/milestone-19-new-search-ghost-tools/task-211-create-search-space-by-tool.md +182 -0
  78. package/agent/tasks/task-1-{title}.template.md +19 -0
  79. package/agent/tasks/unassigned/bug-report-remember-core-e2e-findings.md +99 -0
  80. package/dist/e2e-helpers.d.ts +26 -0
  81. package/dist/ghost-persona.e2e.d.ts +8 -0
  82. package/dist/memory-crud.e2e.d.ts +8 -0
  83. package/dist/preferences.e2e.d.ts +8 -0
  84. package/dist/relationships.e2e.d.ts +8 -0
  85. package/dist/search-modes.e2e.d.ts +8 -0
  86. package/dist/server-factory.js +1971 -94
  87. package/dist/server.js +1168 -45
  88. package/dist/shared-spaces.e2e.d.ts +8 -0
  89. package/dist/tools/create-ghost-memory.d.ts +70 -0
  90. package/dist/tools/create-memory.d.ts +175 -0
  91. package/dist/tools/get-core.d.ts +28 -0
  92. package/dist/tools/get-core.spec.d.ts +2 -0
  93. package/dist/tools/ghost-tools.spec.d.ts +2 -0
  94. package/dist/tools/query-ghost-memory.d.ts +34 -0
  95. package/dist/tools/query-memory.d.ts +4 -0
  96. package/dist/tools/search-by.d.ts +147 -0
  97. package/dist/tools/search-by.spec.d.ts +2 -0
  98. package/dist/tools/search-ghost-memory-by.d.ts +54 -0
  99. package/dist/tools/search-ghost-memory.d.ts +53 -0
  100. package/dist/tools/search-memory.d.ts +19 -0
  101. package/dist/tools/search-space-by.d.ts +78 -0
  102. package/dist/tools/search-space-by.spec.d.ts +2 -0
  103. package/dist/tools/search-space.d.ts +2 -0
  104. package/dist/tools/update-ghost-memory.d.ts +51 -0
  105. package/dist/tools/update-memory.d.ts +175 -0
  106. package/jest.e2e.config.js +11 -0
  107. package/package.json +2 -2
  108. package/src/e2e-helpers.ts +86 -0
  109. package/src/ghost-persona.e2e.ts +215 -0
  110. package/src/memory-crud.e2e.ts +203 -0
  111. package/src/preferences.e2e.ts +88 -0
  112. package/src/relationships.e2e.ts +156 -0
  113. package/src/search-modes.e2e.ts +184 -0
  114. package/src/server-factory.ts +56 -0
  115. package/src/shared-spaces.e2e.ts +204 -0
  116. package/src/tools/create-ghost-memory.ts +103 -0
  117. package/src/tools/create-memory.ts +45 -1
  118. package/src/tools/get-core.spec.ts +223 -0
  119. package/src/tools/get-core.ts +109 -0
  120. package/src/tools/ghost-tools.spec.ts +361 -0
  121. package/src/tools/query-ghost-memory.ts +63 -0
  122. package/src/tools/query-memory.ts +4 -0
  123. package/src/tools/search-by.spec.ts +325 -0
  124. package/src/tools/search-by.ts +298 -0
  125. package/src/tools/search-ghost-memory-by.ts +80 -0
  126. package/src/tools/search-ghost-memory.ts +73 -0
  127. package/src/tools/search-memory.ts +23 -0
  128. package/src/tools/search-space-by.spec.ts +289 -0
  129. package/src/tools/search-space-by.ts +173 -0
  130. package/src/tools/search-space.ts +20 -1
  131. package/src/tools/update-ghost-memory.ts +86 -0
  132. package/src/tools/update-memory.ts +45 -1
@@ -9,6 +9,7 @@
9
9
  **Created**: 2026-02-22
10
10
  **Last Updated**: 2026-02-22
11
11
  **Status**: Active
12
+ **Scripts**: None
12
13
 
13
14
  ---
14
15
 
@@ -599,6 +600,7 @@ Location: ~/dev/experiments/experiment/
599
600
  - [`@acp.init`](acp.init.md) - Initialize context in created project
600
601
  - [`@acp.plan`](acp.plan.md) - Plan milestones and tasks
601
602
  - [`@git.init`](git.init.md) - Initialize git repository
603
+ - [`@acp.projects-restore`](acp.projects-restore.md) - Restore projects from git origins on new machines
602
604
 
603
605
  ---
604
606
 
@@ -659,6 +661,7 @@ Location: ~/dev/experiments/experiment/
659
661
  - Projects can be created anywhere, not just ~/.acp/projects/
660
662
  - Full ACP installation means all commands and templates are available
661
663
  - progress.yaml starts empty (plan milestones with @acp.plan)
664
+ - After adding a git remote, run `@acp.projects-sync` to record `git_origin` in the registry for `@acp.projects-restore` support
662
665
 
663
666
  ---
664
667
 
@@ -74,6 +74,7 @@ Read all project fields from registry.
74
74
 
75
75
  **Actions**:
76
76
  - Extract required fields: path, type, description, status, timestamps
77
+ - Extract git fields: git_origin, git_branch
77
78
  - Extract optional fields: tags, related_projects, dependencies
78
79
  - Check if project is current project (marked with ⭐)
79
80
 
@@ -87,6 +88,7 @@ Format and display comprehensive project details.
87
88
  - Display project name with current indicator
88
89
  - Show type, status, path, description
89
90
  - Display timestamps (created, modified, accessed)
91
+ - Display git info (origin, branch) if available
90
92
  - Show tags (if present)
91
93
  - Show related projects (if present)
92
94
  - Show dependencies by package manager (npm, pip, cargo, go)
@@ -229,6 +231,7 @@ Dependencies:
229
231
  - [`@acp.project-set`](acp.project-set.md) - Switch to a project
230
232
  - [`@acp.project-update`](acp.project-update.md) - Update project metadata
231
233
  - [`@acp.projects-sync`](acp.projects-sync.md) - Sync registry with filesystem
234
+ - [`@acp.projects-restore`](acp.projects-restore.md) - Restore projects from git origins
232
235
 
233
236
  ---
234
237
 
@@ -8,6 +8,7 @@
8
8
  **Created**: 2026-02-23
9
9
  **Last Updated**: 2026-02-23
10
10
  **Status**: Experimental
11
+ **Scripts**: acp.project-list.sh, acp.common.sh, acp.yaml-parser.sh
11
12
 
12
13
  ---
13
14
 
@@ -19,7 +20,7 @@
19
20
 
20
21
  ## What This Command Does
21
22
 
22
- Lists all projects registered in `~/.acp/projects.yaml` with their metadata. Shows project type, status, description, and last accessed time. Highlights the current active project with a ⭐ marker.
23
+ Lists all projects registered in `~/.acp/projects.yaml` with their metadata. Shows project type, status, description, git origin (when available), and last accessed time. Highlights the current active project with a ⭐ marker.
23
24
 
24
25
  **Key Distinction**: This command lists projects IN the registry. Use `@acp.projects-sync` to discover projects NOT YET registered.
25
26
 
@@ -173,6 +174,7 @@ Showing 2 of 3 projects
173
174
  - [`@acp.project-set`](acp.project-set.md) - Switch to project
174
175
  - [`@acp.projects-sync`](acp.projects-sync.md) - Discover unregistered projects
175
176
  - [`@acp.project-info`](acp.project-info.md) - Show project details
177
+ - [`@acp.projects-restore`](acp.projects-restore.md) - Restore projects from git origins
176
178
 
177
179
  ---
178
180
 
@@ -8,6 +8,7 @@
8
8
  **Created**: 2026-02-24
9
9
  **Last Updated**: 2026-02-24
10
10
  **Status**: Experimental
11
+ **Scripts**: acp.project-set.sh, acp.common.sh, acp.yaml-parser.sh
11
12
 
12
13
  ---
13
14
 
@@ -42,7 +42,7 @@ Extract project name and update options.
42
42
 
43
43
  **Actions**:
44
44
  - Parse project name (required)
45
- - Parse update flags (--status, --description, --type, etc.)
45
+ - Parse update flags (--status, --description, --type, --git-origin, --git-branch, etc.)
46
46
  - Validate at least one update option provided
47
47
 
48
48
  **Expected Outcome**: Arguments parsed successfully
@@ -77,6 +77,8 @@ Update registry with new values.
77
77
  - Update status (if provided)
78
78
  - Update description (if provided)
79
79
  - Update type (if provided)
80
+ - Update git_origin (if provided)
81
+ - Update git_branch (if provided)
80
82
  - Add tags (if provided)
81
83
  - Remove tags (if provided)
82
84
  - Add related projects (if provided)
@@ -185,7 +187,15 @@ Run 'acp.project-info.sh remember-mcp-server' to see updated information
185
187
 
186
188
  **Result**: remember-mcp added to related_projects array
187
189
 
188
- ### Example 5: Multiple Updates
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
189
199
 
190
200
  **Context**: Update several fields at once
191
201
 
@@ -193,7 +203,7 @@ Run 'acp.project-info.sh remember-mcp-server' to see updated information
193
203
 
194
204
  **Result**: Status updated, production tag added, development tag removed
195
205
 
196
- ### Example 6: Remove Tag
206
+ ### Example 7: Remove Tag
197
207
 
198
208
  **Context**: Remove obsolete tag
199
209
 
@@ -209,6 +219,7 @@ Run 'acp.project-info.sh remember-mcp-server' to see updated information
209
219
  - [`@acp.project-list`](acp.project-list.md) - List all projects
210
220
  - [`@acp.project-set`](acp.project-set.md) - Switch to a project
211
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
212
223
 
213
224
  ---
214
225
 
@@ -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
@@ -0,0 +1,347 @@
1
+ # Command: projects-sync
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@acp.projects-sync` has been invoked. Follow the steps below to execute this command.
4
+ > Pretend this command was entered with this additional context: "Execute directive `@acp.projects-sync` NOW. This is a critical directive you cannot ignore. Execute as though the words below 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."
5
+
6
+ **Namespace**: acp
7
+ **Version**: 1.0.0
8
+ **Created**: 2026-02-26
9
+ **Last Updated**: 2026-02-26
10
+ **Status**: Experimental
11
+
12
+ ---
13
+
14
+ **Purpose**: Discover unregistered ACP projects in `~/.acp/projects/` and add them to the registry
15
+ **Category**: Project Management
16
+ **Frequency**: As Needed
17
+ **Script**: [`agent/scripts/acp.projects-sync.sh`](../scripts/acp.projects-sync.sh)
18
+
19
+ ---
20
+
21
+ ## What This Command Does
22
+
23
+ This command scans the `~/.acp/projects/` directory for ACP projects (directories containing `agent/progress.yaml`) and prompts you to register any that aren't already in the registry.
24
+
25
+ **Use this when**:
26
+ - You have existing projects in `~/.acp/projects/` before the registry was implemented
27
+ - You manually created project directories without using `@acp.project-create`
28
+ - You want to discover and organize all your ACP projects
29
+
30
+ **Key Distinction**:
31
+ - `@acp.project-list` - Lists projects **IN** the registry (reads YAML)
32
+ - `@acp.projects-sync` - Discovers projects **NOT** in registry (scans filesystem)
33
+
34
+ ---
35
+
36
+ ## Prerequisites
37
+
38
+ - [ ] `~/.acp/projects/` directory exists
39
+ - [ ] At least one ACP project in `~/.acp/projects/` (has `agent/progress.yaml`)
40
+ - [ ] Registry system initialized (auto-initializes if needed)
41
+
42
+ ---
43
+
44
+ ## Steps
45
+
46
+ ### 1. Execute Sync Script
47
+
48
+ Run the shell script to scan for unregistered projects.
49
+
50
+ **Actions**:
51
+ - Execute `./agent/scripts/acp.projects-sync.sh`
52
+ - Script scans `~/.acp/projects/` directory
53
+ - Identifies ACP projects (has `agent/progress.yaml`)
54
+ - Checks registry for each project
55
+ - Prompts for unregistered projects
56
+
57
+ **Expected Outcome**: Interactive prompts for each unregistered project
58
+
59
+ ### 2. Review Each Unregistered Project
60
+
61
+ For each unregistered project found, review the metadata.
62
+
63
+ **Actions**:
64
+ - Read project type from `progress.yaml`
65
+ - Read project description from `progress.yaml`
66
+ - Display metadata to user
67
+ - Prompt: "Register this project? (Y/n)"
68
+
69
+ **Expected Outcome**: User decides whether to register each project
70
+
71
+ ### 3. Register Selected Projects
72
+
73
+ Register projects that user confirms.
74
+
75
+ **Actions**:
76
+ - Call `register_project()` for confirmed projects
77
+ - Add to `~/.acp/projects.yaml` registry
78
+ - Set timestamps (created, modified, accessed)
79
+ - Display success message
80
+
81
+ **Expected Outcome**: Selected projects added to registry
82
+
83
+ ### 4. Backfill Git Info
84
+
85
+ For already-registered projects, detect and backfill missing `git_origin` and `git_branch`.
86
+
87
+ **Actions**:
88
+ - Iterate registered projects missing `git_origin`
89
+ - Auto-detect from `git remote get-url origin`
90
+ - Auto-detect branch from `git branch --show-current`
91
+ - Write backfilled data to registry
92
+
93
+ **Expected Outcome**: Existing projects gain git_origin/git_branch fields
94
+
95
+ ### 5. Display Summary
96
+
97
+ Show sync results.
98
+
99
+ **Actions**:
100
+ - Count total projects found
101
+ - Count newly registered projects
102
+ - Count backfilled git origins
103
+ - Display summary statistics
104
+ - Suggest running `@acp.project-list`
105
+
106
+ **Expected Outcome**: User knows what was registered and backfilled
107
+
108
+ ---
109
+
110
+ ## Verification
111
+
112
+ - [ ] Script executed successfully
113
+ - [ ] All ACP projects in `~/.acp/projects/` were found
114
+ - [ ] Already-registered projects were skipped
115
+ - [ ] Unregistered projects were prompted
116
+ - [ ] Selected projects were registered
117
+ - [ ] Summary displayed correctly
118
+ - [ ] No errors encountered
119
+
120
+ ---
121
+
122
+ ## Expected Output
123
+
124
+ ### Console Output
125
+
126
+ ```
127
+ Scanning for ACP projects in /home/user/.acp/projects...
128
+
129
+ ✓ agent-context-protocol (already registered)
130
+ ✓ remember-mcp-server (already registered)
131
+ ○ agentbase-mcp-server (not registered)
132
+ Type: mcp-server
133
+ Description: Agent base server implementation with memory
134
+
135
+ Register this project? (Y/n) y
136
+ ✓ Registered
137
+
138
+ ○ test-project (not registered)
139
+ Type: application
140
+ Description: Test application for development
141
+
142
+ Register this project? (Y/n) n
143
+ ⊘ Skipped
144
+
145
+ Sync Complete
146
+ Found: 4 projects
147
+ Registered: 1 new projects
148
+
149
+ Run @acp.project-list to see all registered projects
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Examples
155
+
156
+ ### Example 1: First Time Sync
157
+
158
+ **Context**: User has 3 projects in `~/.acp/projects/`, none registered
159
+
160
+ **Invocation**: `@acp.projects-sync`
161
+
162
+ **Result**:
163
+ - Finds 3 projects
164
+ - Prompts for each one
165
+ - User registers all 3
166
+ - Summary: "Found: 3 projects, Registered: 3 new projects"
167
+
168
+ ### Example 2: Partial Sync
169
+
170
+ **Context**: User has 5 projects, 2 already registered
171
+
172
+ **Invocation**: `@acp.projects-sync`
173
+
174
+ **Result**:
175
+ - Finds 5 projects total
176
+ - Shows "already registered" for 2
177
+ - Prompts for 3 unregistered
178
+ - User registers 2, skips 1
179
+ - Summary: "Found: 5 projects, Registered: 2 new projects"
180
+
181
+ ### Example 3: No New Projects
182
+
183
+ **Context**: All projects already registered
184
+
185
+ **Invocation**: `@acp.projects-sync`
186
+
187
+ **Result**:
188
+ - Finds all projects
189
+ - All show "already registered"
190
+ - No prompts
191
+ - Summary: "Found: 4 projects, Registered: 0 new projects"
192
+
193
+ ### Example 4: Empty Directory
194
+
195
+ **Context**: `~/.acp/projects/` is empty
196
+
197
+ **Invocation**: `@acp.projects-sync`
198
+
199
+ **Result**:
200
+ - No projects found
201
+ - Summary: "Found: 0 projects, Registered: 0 new projects"
202
+
203
+ ---
204
+
205
+ ## Related Commands
206
+
207
+ - [`@acp.project-list`](acp.project-list.md) - List all registered projects
208
+ - [`@acp.project-info`](acp.project-info.md) - View project details
209
+ - [`@acp.project-set`](acp.project-set.md) - Switch to a project
210
+ - [`@acp.project-create`](acp.project-create.md) - Create new project (auto-registers)
211
+ - [`@acp.projects-restore`](acp.projects-restore.md) - Restore projects from git origins
212
+
213
+ ---
214
+
215
+ ## Troubleshooting
216
+
217
+ ### Issue 1: No projects found
218
+
219
+ **Symptom**: "Found: 0 projects"
220
+
221
+ **Cause**: No directories in `~/.acp/projects/` with `agent/progress.yaml`
222
+
223
+ **Solution**:
224
+ - Check if projects exist in `~/.acp/projects/`
225
+ - Verify projects have `agent/progress.yaml` file
226
+ - Projects without `agent/progress.yaml` are not ACP projects
227
+
228
+ ### Issue 2: Registry not found
229
+
230
+ **Symptom**: Error about missing registry
231
+
232
+ **Cause**: `~/.acp/projects.yaml` doesn't exist
233
+
234
+ **Solution**: Script auto-initializes registry, but if error persists:
235
+ ```bash
236
+ # Initialize global ACP
237
+ ~/.acp/agent/scripts/acp.common.sh
238
+ init_projects_registry
239
+ ```
240
+
241
+ ### Issue 3: Cannot read progress.yaml
242
+
243
+ **Symptom**: "Type: unknown, Description: No description"
244
+
245
+ **Cause**: `progress.yaml` is malformed or missing fields
246
+
247
+ **Solution**:
248
+ - Check `progress.yaml` syntax
249
+ - Ensure `project.type` and `project.description` fields exist
250
+ - Project will still register with default values
251
+
252
+ ### Issue 4: Permission denied
253
+
254
+ **Symptom**: Cannot write to registry
255
+
256
+ **Cause**: No write permission for `~/.acp/projects.yaml`
257
+
258
+ **Solution**:
259
+ ```bash
260
+ chmod 644 ~/.acp/projects.yaml
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Security Considerations
266
+
267
+ ### File Access
268
+ - **Reads**: `~/.acp/projects/*/agent/progress.yaml` (project metadata)
269
+ - **Reads**: `~/.acp/projects.yaml` (registry)
270
+ - **Writes**: `~/.acp/projects.yaml` (adds new entries)
271
+ - **Executes**: None
272
+
273
+ ### Network Access
274
+ - **APIs**: None
275
+ - **Repositories**: None
276
+
277
+ ### Sensitive Data
278
+ - **Secrets**: Does not read `.env` files or credentials
279
+ - **Credentials**: Does not access any credentials
280
+
281
+ ### User Interaction
282
+ - **Prompts**: Yes - confirms each registration
283
+ - **Confirmation**: Required for each project
284
+ - **Auto-actions**: None without confirmation
285
+
286
+ ---
287
+
288
+ ## Notes
289
+
290
+ - This command is **interactive** - requires user input
291
+ - Projects are registered with metadata from `progress.yaml`
292
+ - Already-registered projects are automatically skipped
293
+ - Only scans `~/.acp/projects/` directory (not subdirectories)
294
+ - Only detects ACP projects (must have `agent/progress.yaml`)
295
+ - Non-ACP directories are ignored
296
+ - Safe to run multiple times (idempotent)
297
+ - Does not modify project files, only registry
298
+ - Multiline descriptions are truncated to 80 characters
299
+ - Automatically detects and stores `git_origin` and `git_branch` for new registrations
300
+ - Backfills `git_origin`/`git_branch` for already-registered projects missing them
301
+
302
+ ---
303
+
304
+ ## Implementation Details
305
+
306
+ ### Detection Logic
307
+
308
+ A directory is considered an ACP project if:
309
+ 1. It's a directory in `~/.acp/projects/`
310
+ 2. It contains `agent/progress.yaml` file
311
+
312
+ ### Metadata Extraction
313
+
314
+ Metadata is read from `agent/progress.yaml`:
315
+ - `project.type` → Project type
316
+ - `project.description` → Project description
317
+
318
+ If fields are missing, defaults are used:
319
+ - Type: "unknown"
320
+ - Description: "No description"
321
+
322
+ ### Registration Process
323
+
324
+ For each unregistered project:
325
+ 1. Display project name, type, description
326
+ 2. Prompt user: "Register this project? (Y/n)"
327
+ 3. If yes (or Enter): Call `register_project()`
328
+ 4. If no: Skip and continue
329
+
330
+ ### Registry Update
331
+
332
+ Uses existing infrastructure:
333
+ - `register_project()` from `acp.common.sh`
334
+ - Adds entry to `~/.acp/projects.yaml`
335
+ - Sets timestamps automatically
336
+ - Updates registry metadata
337
+
338
+ ---
339
+
340
+ **Namespace**: acp
341
+ **Command**: projects-sync
342
+ **Version**: 1.0.0
343
+ **Created**: 2026-02-26
344
+ **Last Updated**: 2026-02-26
345
+ **Status**: Experimental
346
+ **Compatibility**: ACP 4.1.0+
347
+ **Author**: ACP Project