@prmichaelsen/remember-mcp 2.7.11 → 2.8.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 (76) hide show
  1. package/.env.example +6 -0
  2. package/AGENT.md +224 -21
  3. package/CHANGELOG.md +47 -937
  4. package/README.md +35 -0
  5. package/agent/commands/acp.command-create.md +373 -0
  6. package/agent/commands/acp.design-create.md +225 -0
  7. package/agent/commands/acp.init.md +40 -5
  8. package/agent/commands/acp.package-create.md +895 -0
  9. package/agent/commands/acp.package-info.md +212 -0
  10. package/agent/commands/acp.package-install.md +207 -33
  11. package/agent/commands/acp.package-list.md +280 -0
  12. package/agent/commands/acp.package-publish.md +541 -0
  13. package/agent/commands/acp.package-remove.md +293 -0
  14. package/agent/commands/acp.package-search.md +307 -0
  15. package/agent/commands/acp.package-update.md +361 -0
  16. package/agent/commands/acp.package-validate.md +540 -0
  17. package/agent/commands/acp.pattern-create.md +327 -0
  18. package/agent/commands/acp.plan.md +553 -0
  19. package/agent/commands/acp.proceed.md +112 -86
  20. package/agent/commands/acp.project-create.md +673 -0
  21. package/agent/commands/acp.project-list.md +225 -0
  22. package/agent/commands/acp.project-set.md +227 -0
  23. package/agent/commands/acp.report.md +3 -0
  24. package/agent/commands/acp.resume.md +238 -0
  25. package/agent/commands/acp.status.md +1 -0
  26. package/agent/commands/acp.sync.md +56 -15
  27. package/agent/commands/acp.task-create.md +391 -0
  28. package/agent/commands/acp.update.md +1 -0
  29. package/agent/commands/acp.validate.md +62 -10
  30. package/agent/commands/acp.version-check-for-updates.md +6 -5
  31. package/agent/commands/acp.version-check.md +7 -6
  32. package/agent/commands/acp.version-update.md +7 -6
  33. package/agent/commands/command.template.md +48 -0
  34. package/agent/commands/git.commit.md +6 -3
  35. package/agent/commands/git.init.md +1 -0
  36. package/agent/manifest.template.yaml +13 -0
  37. package/agent/package.template.yaml +53 -0
  38. package/agent/progress.template.yaml +3 -0
  39. package/agent/progress.yaml +103 -5
  40. package/agent/scripts/acp.common.sh +1536 -0
  41. package/agent/scripts/acp.install.sh +293 -0
  42. package/agent/scripts/acp.package-create.sh +925 -0
  43. package/agent/scripts/acp.package-info.sh +270 -0
  44. package/agent/scripts/acp.package-install.sh +675 -0
  45. package/agent/scripts/acp.package-list.sh +263 -0
  46. package/agent/scripts/acp.package-publish.sh +420 -0
  47. package/agent/scripts/acp.package-remove.sh +272 -0
  48. package/agent/scripts/acp.package-search.sh +156 -0
  49. package/agent/scripts/acp.package-update.sh +438 -0
  50. package/agent/scripts/acp.package-validate.sh +954 -0
  51. package/agent/scripts/acp.project-list.sh +121 -0
  52. package/agent/scripts/acp.project-set.sh +138 -0
  53. package/agent/scripts/{uninstall.sh → acp.uninstall.sh} +25 -15
  54. package/agent/scripts/{check-for-updates.sh → acp.version-check-for-updates.sh} +24 -14
  55. package/agent/scripts/{version.sh → acp.version-check.sh} +20 -8
  56. package/agent/scripts/{update.sh → acp.version-update.sh} +44 -25
  57. package/agent/scripts/acp.yaml-parser.sh +853 -0
  58. package/agent/scripts/acp.yaml-validate.sh +205 -0
  59. package/agent/tasks/task-68-fix-missing-space-properties.md +192 -0
  60. package/agent/tasks/task-69-add-comprehensive-tool-debugging.md +454 -0
  61. package/dist/config.d.ts +18 -0
  62. package/dist/server-factory.js +276 -19
  63. package/dist/server.js +276 -19
  64. package/dist/utils/debug.d.ts +52 -0
  65. package/dist/utils/debug.spec.d.ts +5 -0
  66. package/dist/weaviate/client.d.ts +1 -1
  67. package/package.json +1 -1
  68. package/src/config.ts +33 -0
  69. package/src/tools/confirm.ts +48 -7
  70. package/src/tools/publish.ts +19 -1
  71. package/src/tools/query-space.ts +36 -3
  72. package/src/tools/search-space.ts +36 -3
  73. package/src/utils/debug.spec.ts +257 -0
  74. package/src/utils/debug.ts +138 -0
  75. package/src/weaviate/client.ts +42 -3
  76. package/agent/scripts/install.sh +0 -157
@@ -0,0 +1,925 @@
1
+ #!/bin/bash
2
+
3
+ # ACP Package Creator v2.1.0
4
+ # Creates a new ACP package with full ACP installation
5
+
6
+ set -e
7
+
8
+ # Source common utilities
9
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
+ . "${SCRIPT_DIR}/acp.common.sh"
11
+
12
+ # Initialize colors
13
+ init_colors
14
+
15
+ # Parse command-line arguments
16
+ PACKAGE_NAME=""
17
+ DESCRIPTION=""
18
+ AUTHOR=""
19
+ LICENSE="MIT"
20
+ HOMEPAGE=""
21
+ REPO_URL=""
22
+ TAGS_INPUT=""
23
+ RELEASE_BRANCH="main"
24
+ TARGET_DIR=""
25
+
26
+ # Show usage
27
+ show_usage() {
28
+ echo "Usage: $0 [OPTIONS]"
29
+ echo ""
30
+ echo "Create a new ACP package with full ACP installation."
31
+ echo ""
32
+ echo "Options:"
33
+ echo " --name NAME Package name (required, lowercase, hyphens allowed)"
34
+ echo " --description DESC Package description (required)"
35
+ echo " --author AUTHOR Author name (required)"
36
+ echo " --license LICENSE License (default: MIT)"
37
+ echo " --homepage URL Homepage URL (optional)"
38
+ echo " --repository URL Git repository URL (required)"
39
+ echo " --tags TAGS Comma-separated tags (optional)"
40
+ echo " --branch BRANCH Release branch (default: main)"
41
+ echo " --target-dir DIR Target directory (default: ~/.acp/projects/acp-NAME)"
42
+ echo " -h, --help Show this help message"
43
+ echo ""
44
+ echo "Modes:"
45
+ echo " Interactive: Run without arguments, prompts for all information"
46
+ echo " Non-interactive: Provide all required arguments (--name, --description, --author, --repository)"
47
+ echo ""
48
+ echo "Examples:"
49
+ echo " # Interactive mode (prompts for all information)"
50
+ echo " $0"
51
+ echo ""
52
+ echo " # Non-interactive mode (all required parameters provided)"
53
+ echo " $0 --name test-package \\"
54
+ echo " --description \"Test package for ACP\" \\"
55
+ echo " --author \"Your Name\" \\"
56
+ echo " --repository \"https://github.com/user/acp-test-package.git\" \\"
57
+ echo " --tags \"test,example\""
58
+ echo ""
59
+ }
60
+
61
+ # Parse arguments
62
+ while [[ $# -gt 0 ]]; do
63
+ case $1 in
64
+ --name)
65
+ PACKAGE_NAME="$2"
66
+ shift 2
67
+ ;;
68
+ --description)
69
+ DESCRIPTION="$2"
70
+ shift 2
71
+ ;;
72
+ --author)
73
+ AUTHOR="$2"
74
+ shift 2
75
+ ;;
76
+ --license)
77
+ LICENSE="$2"
78
+ shift 2
79
+ ;;
80
+ --homepage)
81
+ HOMEPAGE="$2"
82
+ shift 2
83
+ ;;
84
+ --repository)
85
+ REPO_URL="$2"
86
+ shift 2
87
+ ;;
88
+ --tags)
89
+ TAGS_INPUT="$2"
90
+ shift 2
91
+ ;;
92
+ --branch)
93
+ RELEASE_BRANCH="$2"
94
+ shift 2
95
+ ;;
96
+ --target-dir)
97
+ TARGET_DIR="$2"
98
+ shift 2
99
+ ;;
100
+ -h|--help)
101
+ show_usage
102
+ exit 0
103
+ ;;
104
+ *)
105
+ echo "${RED}Error: Unknown option: $1${NC}"
106
+ echo ""
107
+ show_usage
108
+ exit 1
109
+ ;;
110
+ esac
111
+ done
112
+
113
+ # Detect if running in non-interactive mode (all required args provided)
114
+ NON_INTERACTIVE=false
115
+ if [ -n "$PACKAGE_NAME" ] && [ -n "$DESCRIPTION" ] && [ -n "$AUTHOR" ] && [ -n "$REPO_URL" ]; then
116
+ NON_INTERACTIVE=true
117
+ fi
118
+
119
+ echo "${BLUE}📦 ACP Package Creator${NC}"
120
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
121
+ echo ""
122
+
123
+ if [ "$NON_INTERACTIVE" = false ]; then
124
+ echo "Let's create a new ACP package!"
125
+ echo ""
126
+
127
+ # Step 1: Gather package information
128
+ echo "${BOLD}Package Information${NC}"
129
+ echo ""
130
+ fi
131
+
132
+ # Package name
133
+ if [ -z "$PACKAGE_NAME" ]; then
134
+ read -p "Package name (lowercase, no spaces): " PACKAGE_NAME
135
+ fi
136
+ if [ -z "$PACKAGE_NAME" ]; then
137
+ echo "${RED}Error: Package name is required${NC}"
138
+ exit 1
139
+ fi
140
+
141
+ # Validate package name (lowercase, alphanumeric, hyphens only)
142
+ if ! echo "$PACKAGE_NAME" | grep -qE '^[a-z0-9-]+$'; then
143
+ echo "${RED}Error: Package name must be lowercase letters, numbers, and hyphens only${NC}"
144
+ exit 1
145
+ fi
146
+
147
+ # Check for reserved names
148
+ if [ "$PACKAGE_NAME" = "acp" ] || [ "$PACKAGE_NAME" = "local" ] || [ "$PACKAGE_NAME" = "core" ] || [ "$PACKAGE_NAME" = "system" ] || [ "$PACKAGE_NAME" = "global" ]; then
149
+ echo "${RED}Error: Package name '${PACKAGE_NAME}' is reserved${NC}"
150
+ echo "Reserved names: acp, local, core, system, global"
151
+ exit 1
152
+ fi
153
+
154
+ # Description
155
+ if [ -z "$DESCRIPTION" ]; then
156
+ read -p "Description: " DESCRIPTION
157
+ fi
158
+ if [ -z "$DESCRIPTION" ]; then
159
+ echo "${RED}Error: Description is required${NC}"
160
+ exit 1
161
+ fi
162
+
163
+ # Author
164
+ if [ -z "$AUTHOR" ]; then
165
+ read -p "Author name: " AUTHOR
166
+ fi
167
+ if [ -z "$AUTHOR" ]; then
168
+ echo "${RED}Error: Author name is required${NC}"
169
+ exit 1
170
+ fi
171
+
172
+ # License
173
+ if [ -z "$LICENSE" ]; then
174
+ LICENSE="MIT"
175
+ fi
176
+ if [ "$NON_INTERACTIVE" = false ]; then
177
+ read -p "License [MIT]: " LICENSE_INPUT
178
+ LICENSE=${LICENSE_INPUT:-MIT}
179
+ fi
180
+
181
+ # Homepage
182
+ if [ "$NON_INTERACTIVE" = false ] && [ -z "$HOMEPAGE" ]; then
183
+ read -p "Homepage URL (optional): " HOMEPAGE
184
+ fi
185
+
186
+ # Repository URL
187
+ if [ -z "$REPO_URL" ]; then
188
+ read -p "Repository URL (e.g., https://github.com/username/acp-${PACKAGE_NAME}.git): " REPO_URL
189
+ fi
190
+ if [ -z "$REPO_URL" ]; then
191
+ echo "${RED}Error: Repository URL is required${NC}"
192
+ exit 1
193
+ fi
194
+
195
+ # Ensure repository URL ends with .git
196
+ if [[ ! "$REPO_URL" =~ \.git$ ]]; then
197
+ REPO_URL="${REPO_URL}.git"
198
+ echo "${YELLOW}Note: Added .git suffix to repository URL: ${REPO_URL}${NC}"
199
+ fi
200
+
201
+ # Tags
202
+ if [ "$NON_INTERACTIVE" = false ] && [ -z "$TAGS_INPUT" ]; then
203
+ read -p "Tags (comma-separated): " TAGS_INPUT
204
+ fi
205
+
206
+ # Convert tags to array
207
+ IFS=',' read -ra TAGS_ARRAY <<< "$TAGS_INPUT"
208
+
209
+ # Release branch
210
+ if [ "$NON_INTERACTIVE" = false ]; then
211
+ read -p "Release branch [main]: " RELEASE_BRANCH_INPUT
212
+ RELEASE_BRANCH=${RELEASE_BRANCH_INPUT:-main}
213
+ fi
214
+
215
+ # Target directory (optional)
216
+ # Default: ~/.acp/projects/acp-{package-name}
217
+ # Note: ~/.acp/projects/ is for development, ~/.acp/packages/ is for installed packages
218
+ DEFAULT_TARGET_DIR="$HOME/.acp/projects/acp-${PACKAGE_NAME}"
219
+ if [ "$NON_INTERACTIVE" = false ] && [ -z "$TARGET_DIR" ]; then
220
+ read -p "Target directory [${DEFAULT_TARGET_DIR}]: " TARGET_DIR
221
+ fi
222
+
223
+ # Expand path (handle ~, $HOME, and relative paths)
224
+ if [ -z "$TARGET_DIR" ]; then
225
+ TARGET_DIR="$DEFAULT_TARGET_DIR"
226
+ else
227
+ # Expand ~ to home directory
228
+ TARGET_DIR="${TARGET_DIR/#\~/$HOME}"
229
+ # Expand $HOME
230
+ TARGET_DIR=$(eval echo "$TARGET_DIR")
231
+ fi
232
+
233
+ echo ""
234
+ echo "${GREEN}✓${NC} Package information collected"
235
+ echo ""
236
+
237
+ # Initialize global infrastructure if creating in ~/.acp/projects/
238
+ if [[ "$TARGET_DIR" == "$HOME/.acp/projects/"* ]] || [[ "$TARGET_DIR" == ~/.acp/projects/* ]]; then
239
+ init_global_acp || {
240
+ echo "${RED}Error: Failed to initialize global infrastructure${NC}" >&2
241
+ exit 1
242
+ }
243
+ fi
244
+
245
+ # Display summary
246
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
247
+ echo ""
248
+ echo "${BOLD}Creating new ACP package: ${PACKAGE_NAME}${NC}"
249
+ echo ""
250
+ echo "Package name: ${PACKAGE_NAME}"
251
+ echo "Description: ${DESCRIPTION}"
252
+ echo "Author: ${AUTHOR}"
253
+ echo "License: ${LICENSE}"
254
+ echo "Homepage: ${HOMEPAGE}"
255
+ echo "Repository: ${REPO_URL}"
256
+ echo "Tags: ${TAGS_INPUT}"
257
+ echo "Release branch: ${RELEASE_BRANCH}"
258
+ echo "Target: ${TARGET_DIR}"
259
+ echo ""
260
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
261
+ echo ""
262
+
263
+ # Step 2: Create directory structure
264
+ PACKAGE_DIR="${TARGET_DIR}"
265
+
266
+ # Expand to absolute path if relative
267
+ if [[ "$PACKAGE_DIR" != /* ]]; then
268
+ PACKAGE_DIR="$(pwd)/$PACKAGE_DIR"
269
+ fi
270
+
271
+ # Check if directory already exists
272
+ if [ -d "$PACKAGE_DIR" ]; then
273
+ echo "${RED}Error: Directory $PACKAGE_DIR already exists${NC}"
274
+ exit 1
275
+ fi
276
+
277
+ echo "${BOLD}Creating Directory Structure${NC}"
278
+ echo ""
279
+
280
+ mkdir -p "$PACKAGE_DIR"
281
+
282
+ echo "${GREEN}✓${NC} Created directory: $PACKAGE_DIR/"
283
+ echo ""
284
+
285
+ # Step 3: Install full ACP
286
+ echo "${BOLD}Installing ACP${NC}"
287
+ echo ""
288
+
289
+ # Change to package directory
290
+ cd "$PACKAGE_DIR"
291
+
292
+ # Run ACP installation script
293
+ if [ -f "${SCRIPT_DIR}/acp.install.sh" ]; then
294
+ # Run install script (it will create agent/ structure and install all files)
295
+ bash "${SCRIPT_DIR}/acp.install.sh"
296
+ echo ""
297
+ else
298
+ echo "${RED}Error: acp.install.sh not found${NC}"
299
+ exit 1
300
+ fi
301
+
302
+ echo "${GREEN}✓${NC} ACP installed successfully"
303
+ echo "${GREEN}✓${NC} All templates and commands available"
304
+ echo ""
305
+
306
+ # Step 3.5: Create local-only directories with .gitkeep files
307
+ echo "${BOLD}Creating Local Directories${NC}"
308
+ echo ""
309
+
310
+ # Create clarifications directory with .gitkeep
311
+ mkdir -p agent/clarifications
312
+ touch agent/clarifications/.gitkeep
313
+
314
+ # Create feedback directory with .gitkeep
315
+ mkdir -p agent/feedback
316
+ touch agent/feedback/.gitkeep
317
+
318
+ # Copy clarification template from ACP installation
319
+ if [ -f "${SCRIPT_DIR}/../clarifications/clarification-{N}-{title}.template.md" ]; then
320
+ cp "${SCRIPT_DIR}/../clarifications/clarification-{N}-{title}.template.md" agent/clarifications/
321
+ echo "${GREEN}✓${NC} Created agent/clarifications/ with .gitkeep and template"
322
+ else
323
+ echo "${YELLOW}⚠${NC} Created agent/clarifications/ with .gitkeep (template not found)"
324
+ fi
325
+
326
+ echo "${GREEN}✓${NC} Created agent/feedback/ with .gitkeep"
327
+ echo ""
328
+
329
+ # Step 4: Create package.yaml
330
+ echo "${BOLD}Creating package.yaml${NC}"
331
+ echo ""
332
+
333
+ # Convert tags array to YAML list
334
+ TAGS_YAML=""
335
+ for tag in "${TAGS_ARRAY[@]}"; do
336
+ # Trim whitespace
337
+ tag=$(echo "$tag" | xargs)
338
+ TAGS_YAML="${TAGS_YAML} - ${tag}\n"
339
+ done
340
+
341
+ # Create package.yaml with release branch configuration
342
+ cat > "package.yaml" << EOF
343
+ # package.yaml
344
+ name: ${PACKAGE_NAME}
345
+ version: 1.0.0
346
+ description: ${DESCRIPTION}
347
+ author: ${AUTHOR}
348
+ license: ${LICENSE}
349
+ homepage: ${HOMEPAGE}
350
+ repository: ${REPO_URL}
351
+
352
+ # Release configuration
353
+ release:
354
+ branch: ${RELEASE_BRANCH}
355
+
356
+ # Package contents
357
+ # Add files here as you create them
358
+ # Use @acp.pattern-create, @acp.command-create, @acp.design-create
359
+ # These commands automatically update this section
360
+ contents:
361
+ patterns: []
362
+
363
+ commands: []
364
+
365
+ designs: []
366
+
367
+ # Compatibility
368
+ requires:
369
+ acp: >=2.8.0
370
+
371
+ # Tags for discovery
372
+ tags:
373
+ $(echo -e "$TAGS_YAML")
374
+ EOF
375
+
376
+ echo "${GREEN}✓${NC} Created package.yaml"
377
+ echo "${GREEN}✓${NC} Configured release branch: ${RELEASE_BRANCH}"
378
+ echo ""
379
+
380
+ # Step 4.5: Create progress.yaml for package development
381
+ echo "${BOLD}Creating Progress Tracking${NC}"
382
+ echo ""
383
+
384
+ CURRENT_DATE=$(date +%Y-%m-%d)
385
+
386
+ cat > "agent/progress.yaml" << EOF
387
+ # Package Development Progress Tracking
388
+ # ACP Package: ${PACKAGE_NAME}
389
+
390
+ project:
391
+ name: ${PACKAGE_NAME}
392
+ version: 1.0.0
393
+ type: package
394
+ started: ${CURRENT_DATE}
395
+ status: in_progress
396
+ current_milestone: null
397
+ description: |
398
+ ACP Package: ${DESCRIPTION}
399
+
400
+ milestones: []
401
+
402
+ tasks: {}
403
+
404
+ documentation:
405
+ design_documents: 0
406
+ milestone_documents: 0
407
+ pattern_documents: 0
408
+ task_documents: 0
409
+ command_documents: 0
410
+ last_updated: ${CURRENT_DATE}
411
+
412
+ progress:
413
+ planning: 0
414
+ implementation: 0
415
+ testing: 0
416
+ documentation: 0
417
+ overall: 0
418
+
419
+ recent_work:
420
+ - date: ${CURRENT_DATE}
421
+ description: |
422
+ 📦 Package Created: ${PACKAGE_NAME}
423
+ Initial package structure created. Ready for content development.
424
+ items:
425
+ - ✅ Created package.yaml with metadata
426
+ - ✅ Installed full ACP (templates, commands, scripts)
427
+ - ✅ Created README.md, LICENSE, CHANGELOG.md
428
+ - ✅ Initialized git repository
429
+ - ✅ Installed pre-commit hook
430
+ - ✅ Created progress.yaml for development tracking
431
+ - 📋 Ready to add content with entity creation commands
432
+
433
+ next_steps:
434
+ - Add patterns using @acp.pattern-create
435
+ - Add commands using @acp.command-create
436
+ - Add designs using @acp.design-create
437
+ - Create milestones and tasks as needed
438
+ - Validate package with @acp.package-validate
439
+ - Publish with @acp.package-publish
440
+
441
+ notes:
442
+ - This is an ACP package repository
443
+ - Use entity creation commands to add content
444
+ - Create milestones and tasks as you plan development
445
+ - progress.yaml is for development only (not installed to user projects)
446
+
447
+ current_blockers: []
448
+
449
+ team:
450
+ - role: Package Author
451
+ name: ${AUTHOR}
452
+ focus: |
453
+ Developing ${PACKAGE_NAME} package
454
+ EOF
455
+
456
+ echo "${GREEN}✓${NC} Created progress.yaml for package development tracking"
457
+ echo ""
458
+
459
+ # Step 5: Create README.md
460
+ echo "${BOLD}Creating Documentation${NC}"
461
+ echo ""
462
+
463
+ cat > "README.md" << EOF
464
+ # ACP Package: ${PACKAGE_NAME}
465
+
466
+ ${DESCRIPTION}
467
+
468
+ > **This package is designed for use with the [Agent Context Protocol](https://github.com/prmichaelsen/agent-context-protocol). Read more about ACP [here](https://github.com/prmichaelsen/agent-context-protocol).**
469
+
470
+ ## Installation
471
+
472
+ ### Quick Start (Bootstrap New Project)
473
+
474
+ Install ACP and this package in one command:
475
+
476
+ \`\`\`bash
477
+ curl -fsSL ${REPO_URL%.git}/raw/${RELEASE_BRANCH}/agent/scripts/bootstrap.sh | bash
478
+ \`\`\`
479
+
480
+ This will:
481
+ 1. Install ACP if not already installed
482
+ 2. Install this package
483
+ 3. Initialize your project with ACP
484
+
485
+ ### Install Package Only (ACP Already Installed)
486
+
487
+ If you already have ACP installed in your project:
488
+
489
+ \`\`\`bash
490
+ @acp.package-install ${REPO_URL}
491
+ \`\`\`
492
+
493
+ Or using the installation script:
494
+
495
+ \`\`\`bash
496
+ ./agent/scripts/acp.package-install.sh ${REPO_URL}
497
+ \`\`\`
498
+
499
+ ## What's Included
500
+
501
+ <!-- ACP_AUTO_UPDATE_START:CONTENTS -->
502
+ ### Commands
503
+
504
+ (No commands yet - use @acp.command-create to add commands)
505
+
506
+ ### Patterns
507
+
508
+ (No patterns yet - use @acp.pattern-create to add patterns)
509
+
510
+ ### Designs
511
+
512
+ (No designs yet - use @acp.design-create to add designs)
513
+ <!-- ACP_AUTO_UPDATE_END:CONTENTS -->
514
+
515
+ ## Why Use This Package
516
+
517
+ (Add benefits and use cases here)
518
+
519
+ ## Usage
520
+
521
+ (Add usage examples here)
522
+
523
+ ## Development
524
+
525
+ ### Setup
526
+
527
+ 1. Clone this repository
528
+ 2. Make changes
529
+ 3. Run \`@acp.package-validate\` to validate
530
+ 4. Run \`@acp.package-publish\` to publish
531
+
532
+ ### Adding New Content
533
+
534
+ - Use \`@acp.pattern-create\` to create patterns
535
+ - Use \`@acp.command-create\` to create commands
536
+ - Use \`@acp.design-create\` to create designs
537
+
538
+ These commands automatically:
539
+ - Add namespace prefix to filenames
540
+ - Update package.yaml contents section
541
+ - Update this README.md
542
+
543
+ ### Testing
544
+
545
+ Run \`@acp.package-validate\` to validate your package locally.
546
+
547
+ ### Publishing
548
+
549
+ Run \`@acp.package-publish\` to publish updates. This will:
550
+ - Validate the package
551
+ - Detect version bump from commits
552
+ - Update CHANGELOG.md
553
+ - Create git tag
554
+ - Push to remote
555
+ - Test installation
556
+
557
+ ## Namespace Convention
558
+
559
+ All files in this package use the \`${PACKAGE_NAME}\` namespace:
560
+ - Commands: \`${PACKAGE_NAME}.command-name.md\`
561
+ - Patterns: \`${PACKAGE_NAME}.pattern-name.md\`
562
+ - Designs: \`${PACKAGE_NAME}.design-name.md\`
563
+
564
+ ## Dependencies
565
+
566
+ (List any required packages or project dependencies here)
567
+
568
+ ## Local Development Directories
569
+
570
+ This package includes local-only directories for development workflow:
571
+
572
+ ### Clarifications (\`agent/clarifications/\`)
573
+
574
+ Use this directory to document questions and clarifications during development:
575
+ - Create clarification documents using the template: \`clarification-{N}-{title}.template.md\`
576
+ - Document requirements gaps, design questions, and implementation decisions
577
+ - **Local by default**: Content files are gitignored, only \`.gitkeep\` is tracked
578
+ - **Optional tracking**: Remove patterns from \`.gitignore\` to track specific clarifications
579
+
580
+ ### Feedback (\`agent/feedback/\`)
581
+
582
+ Use this directory to capture feedback during development:
583
+ - Document user feedback, bug reports, and feature requests
584
+ - Keep notes about what works and what needs improvement
585
+ - **Local by default**: Content files are gitignored, only \`.gitkeep\` is tracked
586
+ - **Optional tracking**: Remove patterns from \`.gitignore\` to track specific feedback
587
+
588
+ ### Reports (\`agent/reports/\`)
589
+
590
+ Session reports and development logs:
591
+ - Automatically generated by \`@acp.report\` command
592
+ - **Local by default**: Content files are gitignored, only \`.gitkeep\` is tracked
593
+ - **Optional tracking**: Remove patterns from \`.gitignore\` to track specific reports
594
+
595
+ **Note**: These directories follow the same pattern - they exist in the repository structure (via \`.gitkeep\`), but their content is local-only by default. You can choose to track specific files by removing them from \`.gitignore\`.
596
+
597
+ ## Contributing
598
+
599
+ Contributions are welcome! Please:
600
+
601
+ 1. Follow the existing pattern structure
602
+ 2. Use entity creation commands (@acp.pattern-create, etc.)
603
+ 3. Run @acp.package-validate before committing
604
+ 4. Document your changes in CHANGELOG.md
605
+ 5. Test installation before submitting
606
+
607
+ ## License
608
+
609
+ ${LICENSE}
610
+
611
+ ## Author
612
+
613
+ ${AUTHOR}
614
+ EOF
615
+
616
+ echo "${GREEN}✓${NC} Created README.md"
617
+
618
+ # Step 6: Create LICENSE
619
+ cat > "LICENSE" << 'EOF'
620
+ MIT License
621
+
622
+ Copyright (c) 2026
623
+
624
+ Permission is hereby granted, free of charge, to any person obtaining a copy
625
+ of this software and associated documentation files (the "Software"), to deal
626
+ in the Software without restriction, including without limitation the rights
627
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
628
+ copies of the Software, and to permit persons to whom the Software is
629
+ furnished to do so, subject to the following conditions:
630
+
631
+ The above copyright notice and this permission notice shall be included in all
632
+ copies or substantial portions of the Software.
633
+
634
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
635
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
636
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
637
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
638
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
639
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
640
+ SOFTWARE.
641
+ EOF
642
+
643
+ echo "${GREEN}✓${NC} Created LICENSE (MIT)"
644
+
645
+ # Step 7: Create CHANGELOG.md
646
+ CURRENT_DATE=$(date +%Y-%m-%d)
647
+
648
+ cat > "CHANGELOG.md" << EOF
649
+ # Changelog
650
+
651
+ All notable changes to this package will be documented in this file.
652
+
653
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
654
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
655
+
656
+ ## [1.0.0] - ${CURRENT_DATE}
657
+
658
+ ### Added
659
+ - Initial release
660
+ - Package structure created with full ACP installation
661
+ EOF
662
+
663
+ echo "${GREEN}✓${NC} Created CHANGELOG.md"
664
+
665
+ # Step 8: Create .gitignore (package-specific)
666
+ cat > ".gitignore" << 'EOF'
667
+ # OS files
668
+ .DS_Store
669
+ Thumbs.db
670
+
671
+ # Editor files
672
+ .vscode/
673
+ .idea/
674
+ *.swp
675
+ *.swo
676
+
677
+ # Temporary files
678
+ *.tmp
679
+ *.log
680
+
681
+ # Node modules (if applicable)
682
+ node_modules/
683
+
684
+ # Python (if applicable)
685
+ __pycache__/
686
+ *.pyc
687
+ .venv/
688
+ venv/
689
+
690
+ # Build artifacts
691
+ dist/
692
+ build/
693
+
694
+ # ACP local files (local by default, tracking optional)
695
+ # These directories exist with .gitkeep files, but content is gitignored
696
+ agent/clarifications/*.md
697
+ !agent/clarifications/*.template.md
698
+ agent/feedback/*.md
699
+ agent/reports/*.md
700
+ EOF
701
+
702
+ echo "${GREEN}✓${NC} Created .gitignore"
703
+ echo ""
704
+
705
+ # Step 8.5: Create bootstrap.sh script
706
+ mkdir -p agent/scripts
707
+
708
+ cat > "agent/scripts/bootstrap.sh" << 'BOOTSTRAP_EOF'
709
+ #!/bin/bash
710
+ # Bootstrap script for installing ACP and this package in one command
711
+ # Usage: curl -fsSL https://github.com/{owner}/{repo}/raw/{branch}/agent/scripts/bootstrap.sh | bash
712
+
713
+ set -e
714
+
715
+ # Colors
716
+ RED='\033[0;31m'
717
+ GREEN='\033[0;32m'
718
+ YELLOW='\033[1;33m'
719
+ BLUE='\033[0;34m'
720
+ BOLD='\033[1m'
721
+ NC='\033[0m'
722
+
723
+ echo ""
724
+ echo "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
725
+ echo "${BOLD} ACP Package Bootstrap${NC}"
726
+ echo "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
727
+ echo ""
728
+
729
+ # Check if ACP is already installed
730
+ if [ ! -f "AGENT.md" ] || [ ! -d "agent" ]; then
731
+ echo "${BLUE}Installing ACP...${NC}"
732
+ echo ""
733
+
734
+ # Install ACP
735
+ curl -fsSL https://raw.githubusercontent.com/prmichaelsen/agent-context-protocol/mainline/agent/scripts/acp.install.sh | bash
736
+
737
+ if [ $? -eq 0 ]; then
738
+ echo ""
739
+ echo "${GREEN}✓${NC} ACP installed successfully"
740
+ echo ""
741
+ else
742
+ echo ""
743
+ echo "${RED}✗${NC} ACP installation failed"
744
+ exit 1
745
+ fi
746
+ else
747
+ echo "${GREEN}✓${NC} ACP already installed"
748
+ echo ""
749
+ fi
750
+
751
+ # Install this package
752
+ BOOTSTRAP_EOF
753
+
754
+ # Add package-specific installation command
755
+ cat >> "agent/scripts/bootstrap.sh" << EOF
756
+ echo "\${BLUE}Installing ${PACKAGE_NAME} package...\${NC}"
757
+ echo ""
758
+
759
+ # Install package using acp.package-install.sh
760
+ if [ -f "./agent/scripts/acp.package-install.sh" ]; then
761
+ ./agent/scripts/acp.package-install.sh ${REPO_URL}
762
+
763
+ if [ \$? -eq 0 ]; then
764
+ echo ""
765
+ echo "\${GREEN}✓\${NC} ${PACKAGE_NAME} package installed successfully"
766
+ echo ""
767
+ else
768
+ echo ""
769
+ echo "\${RED}✗\${NC} Package installation failed"
770
+ exit 1
771
+ fi
772
+ else
773
+ echo "\${RED}✗\${NC} ACP installation script not found"
774
+ echo "Please ensure ACP is properly installed"
775
+ exit 1
776
+ fi
777
+
778
+ echo ""
779
+ echo "\${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
780
+ echo "\${GREEN}✓\${NC} \${BOLD}Bootstrap Complete!\${NC}"
781
+ echo "\${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\${NC}"
782
+ echo ""
783
+ echo "Your project is now set up with:"
784
+ echo " • ACP (Agent Context Protocol)"
785
+ echo " • ${PACKAGE_NAME} package"
786
+ echo ""
787
+ echo "Next steps:"
788
+ echo " 1. Run: @acp.init"
789
+ echo " 2. Start working with your AI agent"
790
+ echo ""
791
+ EOF
792
+
793
+ chmod +x agent/scripts/bootstrap.sh
794
+
795
+ echo "${GREEN}✓${NC} Created agent/scripts/bootstrap.sh"
796
+ echo ""
797
+
798
+ # Step 9: Install pre-commit hook
799
+ echo "${BOLD}Installing Pre-Commit Hook${NC}"
800
+ echo ""
801
+
802
+ # Initialize git first (required for hook installation)
803
+ git init -q
804
+
805
+ # Install hook using common.sh function
806
+ if install_precommit_hook; then
807
+ echo "${GREEN}✓${NC} Validates package.yaml before commits"
808
+ else
809
+ echo "${YELLOW}⚠ Pre-commit hook installation failed (non-critical)${NC}"
810
+ fi
811
+
812
+ echo ""
813
+
814
+ # Step 10: Create initial commit
815
+ echo "${BOLD}Initializing Git Repository${NC}"
816
+ echo ""
817
+
818
+ git add .
819
+ git commit -q -m "chore: initialize ACP package with full installation"
820
+
821
+ echo "${GREEN}✓${NC} Initialized git repository"
822
+ echo "${GREEN}✓${NC} Created initial commit"
823
+ echo ""
824
+
825
+ # Step 11: Display success message and next steps
826
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
827
+ echo ""
828
+ echo "${GREEN}🎉 Package Created Successfully!${NC}"
829
+ echo ""
830
+ echo "Your ACP package is ready at: ${BOLD}${PACKAGE_DIR}${NC}"
831
+ echo ""
832
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
833
+ echo ""
834
+ echo "${BOLD}📋 Next Steps:${NC}"
835
+ echo ""
836
+ echo "1. ${BOLD}Add your content:${NC}"
837
+ echo " ${YELLOW}cd acp-${PACKAGE_NAME}${NC}"
838
+ echo " ${YELLOW}@acp.pattern-create${NC} # Create patterns"
839
+ echo " ${YELLOW}@acp.command-create${NC} # Create commands"
840
+ echo " ${YELLOW}@acp.design-create${NC} # Create designs"
841
+ echo ""
842
+ echo " These commands automatically:"
843
+ echo " - Add namespace prefix to filenames"
844
+ echo " - Update package.yaml contents section"
845
+ echo " - Update README.md \"What's Included\" section"
846
+ echo ""
847
+ echo "2. ${BOLD}Validate your package:${NC}"
848
+ echo " ${YELLOW}@acp.package-validate${NC}"
849
+ echo ""
850
+ echo " This checks:"
851
+ echo " - package.yaml structure"
852
+ echo " - File existence and namespace consistency"
853
+ echo " - Git repository setup"
854
+ echo " - README.md structure"
855
+ echo ""
856
+ echo "3. ${BOLD}Create GitHub repository:${NC}"
857
+ echo " - Go to https://github.com/new"
858
+ echo " - Name: ${YELLOW}acp-${PACKAGE_NAME}${NC}"
859
+ echo " - Description: ${DESCRIPTION}"
860
+ echo " - Create repository (public recommended)"
861
+ echo ""
862
+ echo "4. ${BOLD}Push to GitHub:${NC}"
863
+ echo " ${YELLOW}cd acp-${PACKAGE_NAME}"
864
+ echo " git remote add origin ${REPO_URL}"
865
+ echo " git branch -M ${RELEASE_BRANCH}"
866
+ echo " git push -u origin ${RELEASE_BRANCH}${NC}"
867
+ echo ""
868
+ echo "5. ${BOLD}Add GitHub topic for discoverability:${NC}"
869
+ echo " - Go to repository settings"
870
+ echo " - Add topic: ${YELLOW}acp-package${NC} (REQUIRED)"
871
+ echo " - Add other topics: ${TAGS_INPUT}"
872
+ echo ""
873
+ echo "6. ${BOLD}Publish your first version:${NC}"
874
+ echo " ${YELLOW}cd acp-${PACKAGE_NAME}"
875
+ echo " @acp.package-publish${NC}"
876
+ echo ""
877
+ echo " This will:"
878
+ echo " - Validate package"
879
+ echo " - Detect version bump from commits"
880
+ echo " - Update CHANGELOG.md"
881
+ echo " - Create git tag"
882
+ echo " - Push to remote"
883
+ echo " - Test installation"
884
+ echo ""
885
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
886
+ echo ""
887
+ echo "${BOLD}📚 Resources:${NC}"
888
+ echo ""
889
+ echo "- Package structure guide: See AGENT.md"
890
+ echo "- package.yaml reference: agent/design/acp-package-management-system.md"
891
+ echo "- Entity creation: @acp.pattern-create, @acp.command-create, @acp.design-create"
892
+ echo "- Validation: @acp.package-validate"
893
+ echo "- Publishing: @acp.package-publish"
894
+ echo ""
895
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
896
+ echo ""
897
+ echo "${GREEN}✅ Package creation complete!${NC}"
898
+ echo ""
899
+ echo "Your package has:"
900
+ echo " ${GREEN}✓${NC} Full ACP installation (all templates and commands)"
901
+ echo " ${GREEN}✓${NC} Pre-commit hook (validates package.yaml before commits)"
902
+ echo " ${GREEN}✓${NC} Release branch configured (${RELEASE_BRANCH})"
903
+ echo " ${GREEN}✓${NC} Git repository initialized"
904
+ echo " ${GREEN}✓${NC} Bootstrap script (agent/scripts/bootstrap.sh)"
905
+ echo " ${GREEN}✓${NC} Progress tracking (agent/progress.yaml)"
906
+ echo ""
907
+ echo "${BOLD}💡 Bootstrap Installation:${NC}"
908
+ echo ""
909
+ echo "Once published, users can install ACP + your package in one command:"
910
+ echo ""
911
+ echo " ${YELLOW}curl -fsSL ${REPO_URL%.git}/raw/${RELEASE_BRANCH}/agent/scripts/bootstrap.sh | bash${NC}"
912
+ echo ""
913
+ echo "This is perfect for bootstrapping new projects!"
914
+ echo ""
915
+ echo "${BOLD}💡 Progress Tracking:${NC}"
916
+ echo ""
917
+ echo "Use standard ACP commands to track package development:"
918
+ echo " ${YELLOW}@acp.init${NC} - Initialize context"
919
+ echo " ${YELLOW}@acp.status${NC} - Check development status"
920
+ echo " ${YELLOW}@acp.proceed${NC} - Work on tasks"
921
+ echo ""
922
+ echo "Create milestones and tasks as you plan development."
923
+ echo ""
924
+ echo "Ready to add content with @acp.pattern-create, @acp.command-create, @acp.design-create"
925
+ echo ""