@prmichaelsen/reddit-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +23 -0
- package/.env.example +13 -0
- package/AGENT.md +1772 -0
- package/README.md +54 -0
- package/agent/commands/acp.clarification-capture.md +386 -0
- package/agent/commands/acp.clarification-create.md +432 -0
- package/agent/commands/acp.clarifications-research.md +326 -0
- package/agent/commands/acp.command-create.md +432 -0
- package/agent/commands/acp.design-create.md +286 -0
- package/agent/commands/acp.design-reference.md +355 -0
- package/agent/commands/acp.index.md +423 -0
- package/agent/commands/acp.init.md +546 -0
- package/agent/commands/acp.package-create.md +895 -0
- package/agent/commands/acp.package-info.md +212 -0
- package/agent/commands/acp.package-install.md +539 -0
- package/agent/commands/acp.package-list.md +280 -0
- package/agent/commands/acp.package-publish.md +541 -0
- package/agent/commands/acp.package-remove.md +293 -0
- package/agent/commands/acp.package-search.md +307 -0
- package/agent/commands/acp.package-update.md +361 -0
- package/agent/commands/acp.package-validate.md +540 -0
- package/agent/commands/acp.pattern-create.md +386 -0
- package/agent/commands/acp.plan.md +577 -0
- package/agent/commands/acp.proceed.md +882 -0
- package/agent/commands/acp.project-create.md +675 -0
- package/agent/commands/acp.project-info.md +312 -0
- package/agent/commands/acp.project-list.md +226 -0
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +227 -0
- package/agent/commands/acp.project-update.md +307 -0
- package/agent/commands/acp.projects-restore.md +228 -0
- package/agent/commands/acp.projects-sync.md +347 -0
- package/agent/commands/acp.report.md +407 -0
- package/agent/commands/acp.resume.md +239 -0
- package/agent/commands/acp.sessions.md +301 -0
- package/agent/commands/acp.status.md +293 -0
- package/agent/commands/acp.sync.md +364 -0
- package/agent/commands/acp.task-create.md +500 -0
- package/agent/commands/acp.update.md +302 -0
- package/agent/commands/acp.validate.md +466 -0
- package/agent/commands/acp.version-check-for-updates.md +276 -0
- package/agent/commands/acp.version-check.md +191 -0
- package/agent/commands/acp.version-update.md +289 -0
- package/agent/commands/command.template.md +339 -0
- package/agent/commands/git.commit.md +526 -0
- package/agent/commands/git.init.md +514 -0
- package/agent/design/.gitkeep +0 -0
- package/agent/design/design.template.md +154 -0
- package/agent/design/requirements.md +332 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/index/.gitkeep +0 -0
- package/agent/index/local.main.template.yaml +37 -0
- package/agent/manifest.template.yaml +13 -0
- package/agent/manifest.yaml +61 -0
- package/agent/milestones/.gitkeep +0 -0
- package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/milestones/milestone-2-content-interaction.md +56 -0
- package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
- package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
- package/agent/milestones/milestone-5-moderation.md +53 -0
- package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
- package/agent/package.template.yaml +86 -0
- package/agent/patterns/.gitkeep +0 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +382 -0
- package/agent/progress.template.yaml +161 -0
- package/agent/progress.yaml +223 -0
- package/agent/schemas/package.schema.yaml +276 -0
- package/agent/scripts/acp.common.sh +1781 -0
- package/agent/scripts/acp.yaml-parser.sh +985 -0
- package/agent/tasks/.gitkeep +0 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
- package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
- package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
- package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
- package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
- package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
- package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
- package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
- package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
- package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
- package/agent/tasks/task-1-{title}.template.md +244 -0
- package/dist/auth/oauth.d.ts +15 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/client/reddit.d.ts +28 -0
- package/dist/client/reddit.d.ts.map +1 -0
- package/dist/factory.d.ts +2 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +30394 -0
- package/dist/factory.js.map +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31955 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +30401 -0
- package/dist/server.js.map +7 -0
- package/dist/tools/listings.d.ts +4 -0
- package/dist/tools/listings.d.ts.map +1 -0
- package/dist/tools/search.d.ts +4 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/transport/http.d.ts +7 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/types/index.d.ts +78 -0
- package/dist/types/index.d.ts.map +1 -0
- package/esbuild.build.js +21 -0
- package/jest.config.js +18 -0
- package/package.json +46 -0
- package/src/auth/oauth.ts +200 -0
- package/src/client/reddit.ts +245 -0
- package/src/factory.ts +5 -0
- package/src/index.ts +31 -0
- package/src/server.ts +36 -0
- package/src/tools/listings.ts +202 -0
- package/src/tools/search.ts +85 -0
- package/src/transport/http.ts +49 -0
- package/src/types/index.ts +83 -0
- package/tests/fixtures/reddit-responses.ts +132 -0
- package/tests/helpers/mock-client.ts +36 -0
- package/tests/unit/auth.test.ts +89 -0
- package/tests/unit/client.test.ts +218 -0
- package/tests/unit/listings.test.ts +113 -0
- package/tests/unit/search.test.ts +59 -0
- package/tests/unit/server.test.ts +14 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
# Command: init
|
|
2
|
+
|
|
3
|
+
> **🤖 Agent Directive**: If you are reading this file, the command `@acp-init` has been invoked. Follow the steps below to execute this command.
|
|
4
|
+
|
|
5
|
+
**Namespace**: acp
|
|
6
|
+
**Version**: 1.1.0
|
|
7
|
+
**Created**: 2026-02-16
|
|
8
|
+
**Last Updated**: 2026-03-09
|
|
9
|
+
**Status**: Active
|
|
10
|
+
**Scripts**: None
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
**Purpose**: Initialize agent context by loading all documentation, reviewing source code, and preparing for work
|
|
15
|
+
**Category**: Workflow
|
|
16
|
+
**Frequency**: Once Per Session
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
| Argument | Aliases | Description |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `--quick` | `-q` | Fast init: skips version checks, source file review, and documentation sync. Equivalent to `--skip checks,files,sync` |
|
|
25
|
+
| `--skip <items>` | | Comma-separated list of steps to skip. Valid items: `checks`, `sessions`, `docs`, `global`, `keys`, `files`, `sync`, `progress` |
|
|
26
|
+
|
|
27
|
+
### Skip Items Reference
|
|
28
|
+
|
|
29
|
+
| Item | Steps Skipped | Description |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `checks` | Step 1 | ACP version update check |
|
|
32
|
+
| `sessions` | Step 1.5 | Session registration and sibling display |
|
|
33
|
+
| `docs` | Step 2 | Reading agent documentation (progress, designs, milestones, tasks, patterns) |
|
|
34
|
+
| `global` | Step 2.5 | Global package discovery |
|
|
35
|
+
| `keys` | Step 2.8 | Key file index reading |
|
|
36
|
+
| `files` | Steps 3-4 | Source file identification and review |
|
|
37
|
+
| `sync` | Steps 5-6 | Documentation drift detection and stale doc updates |
|
|
38
|
+
| `progress` | Step 7 | Progress tracking updates |
|
|
39
|
+
|
|
40
|
+
### Argument Parsing
|
|
41
|
+
|
|
42
|
+
Arguments are parsed from the user's invocation using natural language matching:
|
|
43
|
+
- `@acp-init --quick` or `@acp-init -q`
|
|
44
|
+
- `@acp-init --skip checks,sync`
|
|
45
|
+
- `@acp-init --quick --skip sessions` (quick mode plus additional skips)
|
|
46
|
+
- `@acp-init --skip checks,files,sync,progress` (granular control)
|
|
47
|
+
|
|
48
|
+
When `--quick` is combined with `--skip`, the skip sets are merged (union).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What This Command Does
|
|
53
|
+
|
|
54
|
+
This command performs a comprehensive initialization of the agent's context for working on an ACP-structured project. It checks for ACP updates, reads all documentation in the `agent/` directory, reviews key source files to understand the current implementation, updates any stale documentation, and refreshes progress tracking.
|
|
55
|
+
|
|
56
|
+
Use this command at the start of each work session to ensure you have complete project context. It's the most thorough way to get up to speed on a project, understanding both what's documented and what's actually implemented in the code.
|
|
57
|
+
|
|
58
|
+
Unlike `@acp-status` which only reads progress.yaml, or `@acp-proceed` which focuses on a single task, `@acp-init` provides comprehensive context loading across all project documentation and source code. It's designed to answer: "What is this project? Where does it stand? What needs to be done?"
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Prerequisites
|
|
63
|
+
|
|
64
|
+
- [ ] ACP installed in project (AGENT.md and agent/ directory exist)
|
|
65
|
+
- [ ] Project has source code to review
|
|
66
|
+
- [ ] Git repository initialized (optional, for update checking)
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Steps
|
|
71
|
+
|
|
72
|
+
### 1. Check for ACP Updates
|
|
73
|
+
|
|
74
|
+
**Skip item**: `checks` | **Skipped by**: `--quick`
|
|
75
|
+
|
|
76
|
+
Check if newer version of ACP is available.
|
|
77
|
+
|
|
78
|
+
**Actions**:
|
|
79
|
+
- Run `./agent/scripts/acp.version-check-for-updates.sh` if it exists
|
|
80
|
+
- Report if updates are available
|
|
81
|
+
- Show what changed via CHANGELOG
|
|
82
|
+
- Ask if user wants to update (don't auto-update)
|
|
83
|
+
|
|
84
|
+
**Expected Outcome**: User informed of ACP version status
|
|
85
|
+
|
|
86
|
+
### 1.5. Register Session and Show Siblings (Optional)
|
|
87
|
+
|
|
88
|
+
**Skip item**: `sessions`
|
|
89
|
+
|
|
90
|
+
Register this agent session and display any active sibling sessions.
|
|
91
|
+
|
|
92
|
+
**Actions**:
|
|
93
|
+
- If `./agent/scripts/acp.sessions.sh` exists, run `./agent/scripts/acp.sessions.sh register --project <current-project> --pid <agent-pid>`
|
|
94
|
+
- If `./agent/scripts/acp.sessions.sh` exists, run `./agent/scripts/acp.sessions.sh list` and display active sibling sessions
|
|
95
|
+
|
|
96
|
+
**Display format** (compact, one line per sibling):
|
|
97
|
+
```
|
|
98
|
+
Active Sessions: 2 others
|
|
99
|
+
remember-core — task-12 (Implement Auth) — 20m ago
|
|
100
|
+
agentbase.me — task-5 (Fix API Routes) — 8m ago
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Expected Outcome**: Session registered, sibling sessions displayed
|
|
104
|
+
|
|
105
|
+
**Note**: If `./agent/scripts/acp.sessions.sh` does not exist, skip this step silently.
|
|
106
|
+
|
|
107
|
+
### 2. Read All Agent Documentation
|
|
108
|
+
|
|
109
|
+
**Skip item**: `docs`
|
|
110
|
+
|
|
111
|
+
Load complete context from the agent/ directory.
|
|
112
|
+
|
|
113
|
+
**Actions**:
|
|
114
|
+
- Read `agent/progress.yaml` for current status
|
|
115
|
+
- Read `agent/design/requirements.md` for project goals
|
|
116
|
+
- Read all design documents in `agent/design/`
|
|
117
|
+
- Read current milestone document
|
|
118
|
+
- Read all task documents (focus on current/upcoming)
|
|
119
|
+
- Read relevant pattern documents in `agent/patterns/`
|
|
120
|
+
- Note any missing or incomplete documentation
|
|
121
|
+
|
|
122
|
+
**Expected Outcome**: Complete documentation context loaded
|
|
123
|
+
|
|
124
|
+
### 2.5. Discover Global Packages (Optional)
|
|
125
|
+
|
|
126
|
+
**Skip item**: `global`
|
|
127
|
+
|
|
128
|
+
Check for globally installed ACP packages.
|
|
129
|
+
|
|
130
|
+
**Actions**:
|
|
131
|
+
- Check if `~/.acp/manifest.yaml` exists
|
|
132
|
+
- If exists, read global manifest
|
|
133
|
+
- List globally installed packages with versions
|
|
134
|
+
- Report available commands and patterns from global packages
|
|
135
|
+
- Note that local packages take precedence over global packages
|
|
136
|
+
|
|
137
|
+
**Expected Outcome**: Global packages discovered and reported (if any)
|
|
138
|
+
|
|
139
|
+
**Example Output**:
|
|
140
|
+
```
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
🌐 Global Packages Discovered...
|
|
144
|
+
✓ Read ~/.acp/manifest.yaml
|
|
145
|
+
|
|
146
|
+
Found 2 global packages:
|
|
147
|
+
• @prmichaelsen/acp-git (v1.0.0)
|
|
148
|
+
Location: ~/.acp/packages/@prmichaelsen/acp-git
|
|
149
|
+
2 commands: git.commit, git.init
|
|
150
|
+
|
|
151
|
+
• @prmichaelsen/acp-firebase (v1.2.0)
|
|
152
|
+
Location: ~/.acp/packages/@prmichaelsen/acp-firebase
|
|
153
|
+
3 patterns, 2 commands
|
|
154
|
+
|
|
155
|
+
ℹ️ Local packages take precedence over global packages
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Note**: This step is optional and graceful - if no global packages exist or manifest is not found, continue without error.
|
|
159
|
+
|
|
160
|
+
### 2.8. Read Key Files from Index
|
|
161
|
+
|
|
162
|
+
**Skip item**: `keys`
|
|
163
|
+
|
|
164
|
+
Load critical project files from the key file index.
|
|
165
|
+
|
|
166
|
+
**Actions**:
|
|
167
|
+
- Check if `agent/index/` directory exists
|
|
168
|
+
- If exists, scan for all `*.yaml` files (excluding `*.template.yaml`)
|
|
169
|
+
- Parse each index file's entries
|
|
170
|
+
- Merge entries across namespaces (`local.*` takes precedence over package indices)
|
|
171
|
+
- Filter entries with weight >= 0.8 (high-importance files for init)
|
|
172
|
+
- Sort by weight descending
|
|
173
|
+
- Read each qualifying file
|
|
174
|
+
- Produce visible output showing what was read/skipped
|
|
175
|
+
|
|
176
|
+
**Display format**:
|
|
177
|
+
```
|
|
178
|
+
📑 Reading Key Files...
|
|
179
|
+
✓ agent/design/acp-commands-design.md (weight: 0.9, design)
|
|
180
|
+
✓ agent/patterns/local.e2e-testing.md (weight: 0.8, pattern)
|
|
181
|
+
○ agent/patterns/local.tracked-untracked-directories.md (weight: 0.7, skipped — below threshold)
|
|
182
|
+
|
|
183
|
+
2 index files scanned, 2 key files read, 1 skipped
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Expected Outcome**: High-importance key files loaded into context
|
|
187
|
+
|
|
188
|
+
**Note**: If `agent/index/` does not exist, skip this step silently. The index is optional but recommended.
|
|
189
|
+
|
|
190
|
+
### 3. Identify Key Source Files
|
|
191
|
+
|
|
192
|
+
**Skip item**: `files` | **Skipped by**: `--quick`
|
|
193
|
+
|
|
194
|
+
Determine which source files are most important to review.
|
|
195
|
+
|
|
196
|
+
**Actions**:
|
|
197
|
+
- Check project type (package.json, requirements.txt, go.mod, etc.)
|
|
198
|
+
- Identify main entry points (src/index.ts, main.py, cmd/main.go, etc.)
|
|
199
|
+
- Note key configuration files (tsconfig.json, .env.example, etc.)
|
|
200
|
+
- Identify core business logic files
|
|
201
|
+
- List test files
|
|
202
|
+
|
|
203
|
+
**Expected Outcome**: Key source files identified for review
|
|
204
|
+
|
|
205
|
+
### 4. Review Key Source Files
|
|
206
|
+
|
|
207
|
+
**Skip item**: `files` | **Skipped by**: `--quick`
|
|
208
|
+
|
|
209
|
+
Read important source files to understand current implementation.
|
|
210
|
+
|
|
211
|
+
**Actions**:
|
|
212
|
+
- Read main entry point files
|
|
213
|
+
- Review core business logic
|
|
214
|
+
- Check configuration files
|
|
215
|
+
- Note any TODOs or FIXMEs
|
|
216
|
+
- Understand current architecture
|
|
217
|
+
- Compare implementation with design documents
|
|
218
|
+
|
|
219
|
+
**Expected Outcome**: Current implementation understood
|
|
220
|
+
|
|
221
|
+
### 5. Identify Documentation Drift
|
|
222
|
+
|
|
223
|
+
**Skip item**: `sync` | **Skipped by**: `--quick`
|
|
224
|
+
|
|
225
|
+
Compare documentation with actual implementation.
|
|
226
|
+
|
|
227
|
+
**Actions**:
|
|
228
|
+
- Check if design documents match implementation
|
|
229
|
+
- Note any undocumented features in code
|
|
230
|
+
- Identify outdated documentation
|
|
231
|
+
- Flag missing documentation
|
|
232
|
+
- List discrepancies
|
|
233
|
+
|
|
234
|
+
**Expected Outcome**: Documentation gaps identified
|
|
235
|
+
|
|
236
|
+
### 6. Update Stale Documentation
|
|
237
|
+
|
|
238
|
+
**Skip item**: `sync` | **Skipped by**: `--quick`
|
|
239
|
+
|
|
240
|
+
Refresh outdated documentation to match current state.
|
|
241
|
+
|
|
242
|
+
**Actions**:
|
|
243
|
+
- Update design documents if implementation differs
|
|
244
|
+
- Update task documents if steps have changed
|
|
245
|
+
- Add notes about discovered issues
|
|
246
|
+
- Update progress.yaml with current understanding
|
|
247
|
+
- Document any new patterns found in code
|
|
248
|
+
|
|
249
|
+
**Expected Outcome**: Documentation synchronized with code
|
|
250
|
+
|
|
251
|
+
### 7. Update Progress Tracking
|
|
252
|
+
|
|
253
|
+
**Skip item**: `progress`
|
|
254
|
+
|
|
255
|
+
Refresh progress.yaml with latest status.
|
|
256
|
+
|
|
257
|
+
**Actions**:
|
|
258
|
+
- Verify current milestone is correct
|
|
259
|
+
- Confirm current task is accurate
|
|
260
|
+
- Update progress percentages if needed
|
|
261
|
+
- Add recent work entry for initialization
|
|
262
|
+
- Update next steps based on current state
|
|
263
|
+
- Note any new blockers discovered
|
|
264
|
+
|
|
265
|
+
**Expected Outcome**: Progress tracking is current and accurate
|
|
266
|
+
|
|
267
|
+
### 8. Report Status and Next Steps
|
|
268
|
+
|
|
269
|
+
Provide comprehensive status report.
|
|
270
|
+
|
|
271
|
+
**Actions**:
|
|
272
|
+
- Summarize project status
|
|
273
|
+
- Show current milestone and progress
|
|
274
|
+
- Identify current task
|
|
275
|
+
- List recent accomplishments
|
|
276
|
+
- Highlight next steps
|
|
277
|
+
- Note any blockers or concerns
|
|
278
|
+
- Provide recommendations
|
|
279
|
+
|
|
280
|
+
**Expected Outcome**: User has complete context and knows what to do next
|
|
281
|
+
|
|
282
|
+
### 9. Display Usage Tip
|
|
283
|
+
|
|
284
|
+
Show a helpful tip about init flags when no flags were used.
|
|
285
|
+
|
|
286
|
+
**Actions**:
|
|
287
|
+
- If the user invoked `@acp-init` **without** `--quick` or `--skip`, display the following tip at the end of the output:
|
|
288
|
+
```
|
|
289
|
+
Tip: Use `@acp-init --quick` to skip version checks, source file review, and doc sync for faster startup. Use `--skip <items>` to skip individual steps (e.g. `--skip checks,files`).
|
|
290
|
+
```
|
|
291
|
+
- If the user already used `--quick` or `--skip`, do **not** display the tip (they already know about it).
|
|
292
|
+
|
|
293
|
+
**Expected Outcome**: Users discover the faster init modes naturally
|
|
294
|
+
|
|
295
|
+
### Handling Skipped Steps
|
|
296
|
+
|
|
297
|
+
When a step is skipped (via `--quick` or `--skip`), the agent should:
|
|
298
|
+
1. **Not execute** any actions for that step
|
|
299
|
+
2. **Not display** the step's section header or output block
|
|
300
|
+
3. Simply omit the step silently — no "skipped" messages needed unless the agent chooses to show a compact summary of what was skipped at the top of the output
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Verification
|
|
305
|
+
|
|
306
|
+
- [ ] ACP update check completed
|
|
307
|
+
- [ ] All agent/ files read successfully
|
|
308
|
+
- [ ] Key source files identified and reviewed
|
|
309
|
+
- [ ] Documentation drift identified (if any)
|
|
310
|
+
- [ ] Stale documentation updated
|
|
311
|
+
- [ ] progress.yaml updated with current status
|
|
312
|
+
- [ ] Comprehensive status report provided
|
|
313
|
+
- [ ] Next steps clearly identified
|
|
314
|
+
- [ ] No errors encountered during initialization
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Expected Output
|
|
319
|
+
|
|
320
|
+
### Files Modified
|
|
321
|
+
- `agent/progress.yaml` - Updated with current status, recent work entry added
|
|
322
|
+
- Design/task documents - Updated if stale (as needed)
|
|
323
|
+
|
|
324
|
+
### Console Output
|
|
325
|
+
```
|
|
326
|
+
🚀 Initializing Agent Context
|
|
327
|
+
|
|
328
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
329
|
+
|
|
330
|
+
✓ Checking for ACP updates...
|
|
331
|
+
Current version: 1.0.3
|
|
332
|
+
Status: Up to date
|
|
333
|
+
|
|
334
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
335
|
+
|
|
336
|
+
📚 Reading Agent Documentation...
|
|
337
|
+
✓ Read agent/progress.yaml
|
|
338
|
+
✓ Read agent/design/requirements.md
|
|
339
|
+
✓ Read agent/design/acp-commands-design.md
|
|
340
|
+
✓ Read agent/milestones/milestone-1-acp-commands.md
|
|
341
|
+
✓ Read agent/milestones/milestone-2-acp-commands-advanced.md
|
|
342
|
+
✓ Read agent/tasks/task-1-commands-infrastructure.md
|
|
343
|
+
✓ Read agent/tasks/task-2-workflow-commands.md
|
|
344
|
+
✓ Read agent/tasks/task-3-version-commands.md
|
|
345
|
+
✓ Read agent/tasks/task-4-update-documentation.md
|
|
346
|
+
|
|
347
|
+
Total: 9 agent files read
|
|
348
|
+
|
|
349
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
350
|
+
|
|
351
|
+
📂 Reviewing Source Files...
|
|
352
|
+
✓ Read AGENT.md (1,055 lines)
|
|
353
|
+
✓ Read README.md (200 lines)
|
|
354
|
+
✓ Read CHANGELOG.md (50 lines)
|
|
355
|
+
✓ Read scripts/acp.install.sh
|
|
356
|
+
✓ Read scripts/acp.version-update.sh
|
|
357
|
+
✓ Read agent/commands/command.template.md
|
|
358
|
+
✓ Read agent/commands/acp.status.md
|
|
359
|
+
✓ Read agent/commands/acp.proceed.md
|
|
360
|
+
|
|
361
|
+
Total: 8 source files reviewed
|
|
362
|
+
|
|
363
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
364
|
+
|
|
365
|
+
🔍 Documentation Analysis...
|
|
366
|
+
✓ Design documents match implementation
|
|
367
|
+
✓ Task documents are current
|
|
368
|
+
⚠️ Task-2 document references old nested structure (acp/init.md)
|
|
369
|
+
✓ Progress tracking is accurate
|
|
370
|
+
|
|
371
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
372
|
+
|
|
373
|
+
📝 Updating Documentation...
|
|
374
|
+
✓ Updated progress.yaml with initialization entry
|
|
375
|
+
ℹ️ No other updates needed
|
|
376
|
+
|
|
377
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
378
|
+
|
|
379
|
+
📊 Project Status
|
|
380
|
+
|
|
381
|
+
Project: agent-context-protocol (v1.0.3)
|
|
382
|
+
Status: in_progress
|
|
383
|
+
Started: 2026-02-16
|
|
384
|
+
|
|
385
|
+
Current Milestone: M1 - ACP Commands Infrastructure
|
|
386
|
+
Progress: 33% (1/4 tasks completed)
|
|
387
|
+
Status: in_progress
|
|
388
|
+
|
|
389
|
+
Current Task: task-2 - Implement Core Workflow Commands
|
|
390
|
+
Status: in_progress (2/3 commands complete)
|
|
391
|
+
File: agent/tasks/task-2-workflow-commands.md
|
|
392
|
+
|
|
393
|
+
Recent Work (2026-02-16):
|
|
394
|
+
- ✅ Created comprehensive design document
|
|
395
|
+
- ✅ Implemented @acp-status command
|
|
396
|
+
- ✅ Implemented @acp-proceed command
|
|
397
|
+
- 📋 Next: Complete workflow commands (init)
|
|
398
|
+
|
|
399
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
400
|
+
|
|
401
|
+
🎯 Next Steps:
|
|
402
|
+
1. Complete task-2: Implement acp.init.md command
|
|
403
|
+
2. Start task-3: Implement version commands
|
|
404
|
+
3. Complete milestone-1: All 6 core commands
|
|
405
|
+
|
|
406
|
+
⚠️ Current Blockers: None
|
|
407
|
+
|
|
408
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
409
|
+
|
|
410
|
+
✅ Initialization Complete!
|
|
411
|
+
Ready to proceed with task-2 completion.
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Status Update
|
|
415
|
+
- Recent work entry added to progress.yaml
|
|
416
|
+
- Context fully loaded
|
|
417
|
+
- Ready to work
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## Examples
|
|
422
|
+
|
|
423
|
+
### Example 1: Starting Fresh Session
|
|
424
|
+
|
|
425
|
+
**Context**: Beginning work on a project for the first time today
|
|
426
|
+
|
|
427
|
+
**Invocation**: `@acp-init`
|
|
428
|
+
|
|
429
|
+
**Result**: Checks for updates, reads all 15 agent files, reviews 10 source files, updates progress tracking, reports you're on milestone 2 task 5, ready to continue
|
|
430
|
+
|
|
431
|
+
### Example 2: Returning After Break
|
|
432
|
+
|
|
433
|
+
**Context**: Haven't worked on project in a week
|
|
434
|
+
|
|
435
|
+
**Invocation**: `@acp-init`
|
|
436
|
+
|
|
437
|
+
**Result**: Full context reload, discovers 3 new commits since last session, updates documentation to reflect changes, shows current status (milestone 3, 80% complete), identifies next task
|
|
438
|
+
|
|
439
|
+
### Example 3: New Agent Session
|
|
440
|
+
|
|
441
|
+
**Context**: Different AI agent picking up the project
|
|
442
|
+
|
|
443
|
+
**Invocation**: `@acp-init`
|
|
444
|
+
|
|
445
|
+
**Result**: Complete onboarding - reads all documentation, understands architecture from source code, gets current status, ready to contribute immediately
|
|
446
|
+
|
|
447
|
+
### Example 4: Quick Init
|
|
448
|
+
|
|
449
|
+
**Context**: Returning to a familiar project, just need docs and status
|
|
450
|
+
|
|
451
|
+
**Invocation**: `@acp-init --quick`
|
|
452
|
+
|
|
453
|
+
**Result**: Skips version checks, source file review, and doc sync. Reads agent documentation, key files, reports status — fast startup in ~10 seconds
|
|
454
|
+
|
|
455
|
+
### Example 5: Selective Skip
|
|
456
|
+
|
|
457
|
+
**Context**: Want everything except version checks and session registration
|
|
458
|
+
|
|
459
|
+
**Invocation**: `@acp-init --skip checks,sessions`
|
|
460
|
+
|
|
461
|
+
**Result**: Full init minus the two skipped steps. All docs read, files reviewed, sync performed, status reported
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## Related Commands
|
|
466
|
+
|
|
467
|
+
- [`@acp-proceed`](acp.proceed.md) - Use after init to start working on current task
|
|
468
|
+
- [`@acp-status`](acp.status.md) - Use for quick status check without full initialization
|
|
469
|
+
- [`@acp-sync`](acp.sync.md) - Use to sync documentation after code changes
|
|
470
|
+
- [`@acp-version-check-for-updates`](acp.version-check-for-updates.md) - Part of init process
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Troubleshooting
|
|
475
|
+
|
|
476
|
+
### Issue 1: No agent/ directory found
|
|
477
|
+
|
|
478
|
+
**Symptom**: Error message "agent/ directory not found"
|
|
479
|
+
|
|
480
|
+
**Cause**: ACP not installed in this project
|
|
481
|
+
|
|
482
|
+
**Solution**: Install ACP first using the installation script from the ACP repository
|
|
483
|
+
|
|
484
|
+
### Issue 2: Update check script not found
|
|
485
|
+
|
|
486
|
+
**Symptom**: Warning "acp.version-check-for-updates.sh not found"
|
|
487
|
+
|
|
488
|
+
**Cause**: Older ACP installation without update scripts
|
|
489
|
+
|
|
490
|
+
**Solution**: This is non-critical, continue with initialization. Consider updating ACP to latest version.
|
|
491
|
+
|
|
492
|
+
### Issue 3: No source files found
|
|
493
|
+
|
|
494
|
+
**Symptom**: Warning "No source files to review"
|
|
495
|
+
|
|
496
|
+
**Cause**: Project is new or source code is in unexpected location
|
|
497
|
+
|
|
498
|
+
**Solution**: This is fine for new projects. Specify source file locations if they're in non-standard directories.
|
|
499
|
+
|
|
500
|
+
### Issue 4: progress.yaml doesn't exist
|
|
501
|
+
|
|
502
|
+
**Symptom**: Error "Cannot read progress.yaml"
|
|
503
|
+
|
|
504
|
+
**Cause**: Progress tracking not initialized yet
|
|
505
|
+
|
|
506
|
+
**Solution**: Create progress.yaml from template: `cp agent/progress.template.yaml agent/progress.yaml`, then run `@acp-init` again
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## Security Considerations
|
|
511
|
+
|
|
512
|
+
### File Access
|
|
513
|
+
- **Reads**: All files in `agent/` directory, key source files throughout project, AGENT.md, README.md, CHANGELOG.md
|
|
514
|
+
- **Writes**: `agent/progress.yaml` (updates status), design/task documents (if stale)
|
|
515
|
+
- **Executes**: `./agent/scripts/acp.version-check-for-updates.sh` (if exists)
|
|
516
|
+
|
|
517
|
+
### Network Access
|
|
518
|
+
- **APIs**: None directly (update check script may access GitHub)
|
|
519
|
+
- **Repositories**: Update check script accesses GitHub repository
|
|
520
|
+
|
|
521
|
+
### Sensitive Data
|
|
522
|
+
- **Secrets**: Never reads .env files or credential files
|
|
523
|
+
- **Credentials**: Does not access any credentials
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Notes
|
|
528
|
+
|
|
529
|
+
- This is the most comprehensive ACP command - expect 30-60 seconds for large projects
|
|
530
|
+
- Reads many files to build complete context
|
|
531
|
+
- Updates documentation if drift is detected
|
|
532
|
+
- Safe to run multiple times (idempotent)
|
|
533
|
+
- Replaces the old "AGENT.md: Initialize" prompt
|
|
534
|
+
- Consider running at start of each session for best results
|
|
535
|
+
- Can be run mid-session if you need to refresh context
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
**Namespace**: acp
|
|
540
|
+
**Command**: init
|
|
541
|
+
**Version**: 1.1.0
|
|
542
|
+
**Created**: 2026-02-16
|
|
543
|
+
**Last Updated**: 2026-03-09
|
|
544
|
+
**Status**: Active
|
|
545
|
+
**Compatibility**: ACP 1.0.3+
|
|
546
|
+
**Author**: ACP Project
|