@amsterdamdatalabs/enact-extensions 0.1.5 → 0.1.10

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 (105) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/install.d.ts.map +1 -1
  7. package/dist/install.js +15 -1
  8. package/dist/install.js.map +1 -1
  9. package/dist/internal/agents.d.ts +29 -0
  10. package/dist/internal/agents.d.ts.map +1 -0
  11. package/dist/internal/agents.js +83 -0
  12. package/dist/internal/agents.js.map +1 -0
  13. package/extensions/enact-context/hooks/hooks.json +20 -0
  14. package/extensions/enact-core/.agents/plugin.json +39 -0
  15. package/extensions/enact-core/hooks/hooks.json +14 -0
  16. package/extensions/enact-factory/.agents/plugin.json +9 -3
  17. package/extensions/enact-factory/agents/architect.toml +30 -0
  18. package/extensions/enact-factory/agents/code-reviewer.toml +29 -0
  19. package/extensions/enact-factory/agents/critic.toml +35 -0
  20. package/extensions/enact-factory/agents/executor.toml +23 -0
  21. package/extensions/enact-factory/agents/explore.toml +22 -0
  22. package/extensions/enact-factory/agents/planner.toml +23 -0
  23. package/extensions/enact-factory/agents/verifier.toml +29 -0
  24. package/extensions/enact-factory/skills/ai-slop-cleaner/SKILL.md +52 -0
  25. package/extensions/enact-factory/skills/azdo-ci-strategy/SKILL.md +262 -0
  26. package/extensions/enact-factory/skills/azdo-ci-strategy/references/build-failures.md +60 -0
  27. package/extensions/enact-factory/skills/azdo-ci-strategy/references/cli-reference.md +87 -0
  28. package/extensions/enact-factory/skills/azdo-ci-strategy/references/policies-and-pipelines.md +132 -0
  29. package/extensions/enact-factory/skills/azdo-ci-strategy/references/troubleshooting.md +53 -0
  30. package/extensions/enact-factory/skills/deep-interview/SKILL.md +72 -0
  31. package/extensions/enact-factory/skills/drive-loop/SKILL.md +259 -0
  32. package/extensions/enact-factory/skills/drive-loop/references/contract-schema.md +107 -0
  33. package/extensions/enact-factory/skills/hyperplan/SKILL.md +51 -0
  34. package/extensions/enact-factory/skills/looplan/SKILL.md +103 -0
  35. package/extensions/enact-factory/skills/plan/SKILL.md +71 -0
  36. package/extensions/enact-factory/skills/remove-deadcode/SKILL.md +41 -0
  37. package/extensions/enact-factory/skills/research/SKILL.md +73 -0
  38. package/extensions/enact-factory/skills/review/SKILL.md +48 -0
  39. package/extensions/enact-factory/skills/security-research/SKILL.md +54 -0
  40. package/extensions/enact-factory/skills/tdd/SKILL.md +56 -0
  41. package/extensions/enact-factory/skills/trace/SKILL.md +37 -0
  42. package/extensions/enact-factory/skills/ultraqa/SKILL.md +79 -0
  43. package/extensions/enact-factory/skills/work-with-workitem/SKILL.md +51 -0
  44. package/extensions/enact-factory/skills/workitem-triage/SKILL.md +15 -0
  45. package/extensions/enact-loop/.agents/plugin.json +46 -0
  46. package/extensions/enact-loop/.mcp.json +1 -0
  47. package/extensions/enact-loop/hooks/hooks.json +27 -0
  48. package/extensions/enact-loop/skills/enact-loop/SKILL.md +327 -0
  49. package/extensions/enact-operator/.agents/plugin.json +0 -1
  50. package/extensions/enact-operator/hooks/hooks.json +0 -35
  51. package/extensions/enact-wiki/skills/wiki/SKILL.md +42 -0
  52. package/extensions/plugin-dev/.agents/plugin.json +4 -6
  53. package/extensions/plugin-dev/agents/plugin-validator.md +1 -1
  54. package/extensions/plugin-dev/skills/agent-development/SKILL.md +7 -7
  55. package/extensions/plugin-dev/{commands/create-plugin.md → skills/create-plugin/SKILL.md} +44 -37
  56. package/extensions/plugin-dev/skills/plugin-dev-guide/SKILL.md +13 -14
  57. package/extensions/plugin-dev/skills/skill-development/SKILL.md +0 -2
  58. package/extensions/plugin-dev/{commands/start.md → skills/start/SKILL.md} +7 -6
  59. package/package.json +11 -6
  60. package/scripts/check-hooks.mjs +174 -0
  61. package/scripts/check-principles.mjs +101 -0
  62. package/scripts/enact-extensions.mjs +87 -3
  63. package/scripts/lib/run-validate.mjs +36 -2
  64. package/scripts/lib/ups-router.mjs +432 -0
  65. package/spec/enact.json +4 -0
  66. package/spec/enact.md +5 -2
  67. package/extensions/cmux/.agents/plugin.json +0 -37
  68. package/extensions/cmux/skills/cmux/SKILL.md +0 -82
  69. package/extensions/cmux/skills/cmux/agents/openai.yaml +0 -4
  70. package/extensions/cmux/skills/cmux/references/handles-and-identify.md +0 -35
  71. package/extensions/cmux/skills/cmux/references/panes-surfaces.md +0 -37
  72. package/extensions/cmux/skills/cmux/references/trigger-flash-and-health.md +0 -23
  73. package/extensions/cmux/skills/cmux/references/windows-workspaces.md +0 -31
  74. package/extensions/cmux/skills/cmux-vm-monitor/SKILL.md +0 -122
  75. package/extensions/cmux/skills/cmux-vm-monitor/agents/openai.yaml +0 -4
  76. package/extensions/cmux/skills/cmux-vm-monitor/references/cmux-commands.md +0 -66
  77. package/extensions/cmux/skills/cmux-vm-monitor/scripts/codex_vm_monitor.sh +0 -45
  78. package/extensions/cmux/skills/cmux-workspace/SKILL.md +0 -93
  79. package/extensions/devops/.agents/plugin.json +0 -36
  80. package/extensions/devops/skills/azure-devops-cli/SKILL.md +0 -431
  81. package/extensions/devops/skills/azure-devops-cli/agents/openai.yaml +0 -4
  82. package/extensions/devops/skills/ci-pipeline-strategy/SKILL.md +0 -217
  83. package/extensions/devops/skills/ci-pipeline-strategy/agents/openai.yaml +0 -4
  84. package/extensions/enact-factory/hooks/user-prompt-submit.mjs +0 -67
  85. package/extensions/enact-operator/commands/doctor.md +0 -39
  86. package/extensions/enact-operator/commands/setup.md +0 -51
  87. package/extensions/plugin-dev/.mcp.json +0 -3
  88. package/extensions/plugin-dev/commands/_archive/create-marketplace.md +0 -427
  89. package/extensions/plugin-dev/commands/_archive/plugin-dev-guide.md +0 -12
  90. package/extensions/plugin-dev/hooks/hooks.json +0 -3
  91. package/extensions/plugin-dev/skills/command-development/SKILL.md +0 -763
  92. package/extensions/plugin-dev/skills/command-development/examples/plugin-commands.md +0 -612
  93. package/extensions/plugin-dev/skills/command-development/examples/simple-commands.md +0 -527
  94. package/extensions/plugin-dev/skills/command-development/references/advanced-workflows.md +0 -762
  95. package/extensions/plugin-dev/skills/command-development/references/documentation-patterns.md +0 -769
  96. package/extensions/plugin-dev/skills/command-development/references/frontmatter-reference.md +0 -508
  97. package/extensions/plugin-dev/skills/command-development/references/interactive-commands.md +0 -966
  98. package/extensions/plugin-dev/skills/command-development/references/marketplace-considerations.md +0 -943
  99. package/extensions/plugin-dev/skills/command-development/references/plugin-features-reference.md +0 -637
  100. package/extensions/plugin-dev/skills/command-development/references/plugin-integration.md +0 -191
  101. package/extensions/plugin-dev/skills/command-development/references/skill-tool.md +0 -447
  102. package/extensions/plugin-dev/skills/command-development/references/testing-strategies.md +0 -723
  103. package/extensions/plugin-dev/skills/command-development/scripts/check-frontmatter.sh +0 -234
  104. package/extensions/plugin-dev/skills/command-development/scripts/validate-command.sh +0 -160
  105. /package/extensions/enact-operator/{skills/_variants.md → docs/skill-variants.md} +0 -0
@@ -1,769 +0,0 @@
1
- # Command Documentation Patterns
2
-
3
- Strategies for creating self-documenting, maintainable commands with excellent user experience.
4
-
5
- ## Overview
6
-
7
- Well-documented commands are easier to use, maintain, and distribute. Documentation should be embedded in the command itself, making it immediately accessible to users and maintainers.
8
-
9
- ## Self-Documenting Command Structure
10
-
11
- ### Complete Command Template
12
-
13
- ```markdown
14
- ---
15
- description: Clear, actionable description under 60 chars
16
- argument-hint: [arg1] [arg2] [optional-arg]
17
- allowed-tools: Read, Bash(git:*)
18
- model: sonnet
19
- ---
20
-
21
- <!--
22
- COMMAND: command-name
23
- VERSION: 1.0.0
24
- AUTHOR: Team Name
25
- LAST UPDATED: 2025-01-15
26
-
27
- PURPOSE:
28
- Detailed explanation of what this command does and why it exists.
29
-
30
- USAGE:
31
- /command-name arg1 arg2
32
-
33
- ARGUMENTS:
34
- arg1: Description of first argument (required)
35
- arg2: Description of second argument (optional, defaults to X)
36
-
37
- EXAMPLES:
38
- /command-name feature-branch main
39
- → Compares feature-branch with main
40
-
41
- /command-name my-branch
42
- → Compares my-branch with current branch
43
-
44
- REQUIREMENTS:
45
- - Git repository
46
- - Branch must exist
47
- - Permissions to read repository
48
-
49
- RELATED COMMANDS:
50
- /other-command - Related functionality
51
- /another-command - Alternative approach
52
-
53
- TROUBLESHOOTING:
54
- - If branch not found: Check branch name spelling
55
- - If permission denied: Check repository access
56
-
57
- CHANGELOG:
58
- v1.0.0 (2025-01-15): Initial release
59
- v0.9.0 (2025-01-10): Beta version
60
- -->
61
-
62
- # Command Implementation
63
-
64
- [Command prompt content here...]
65
-
66
- [Explain what will happen...]
67
-
68
- [Guide user through steps...]
69
-
70
- [Provide clear output...]
71
- ```
72
-
73
- ### Documentation Comment Sections
74
-
75
- **PURPOSE**: Why the command exists
76
-
77
- - Problem it solves
78
- - Use cases
79
- - When to use vs when not to use
80
-
81
- **USAGE**: Basic syntax
82
-
83
- - Command invocation pattern
84
- - Required vs optional arguments
85
- - Default values
86
-
87
- **ARGUMENTS**: Detailed argument documentation
88
-
89
- - Each argument described
90
- - Type information
91
- - Valid values/ranges
92
- - Defaults
93
-
94
- **EXAMPLES**: Concrete usage examples
95
-
96
- - Common use cases
97
- - Edge cases
98
- - Expected outputs
99
-
100
- **REQUIREMENTS**: Prerequisites
101
-
102
- - Dependencies
103
- - Permissions
104
- - Environmental setup
105
-
106
- **RELATED COMMANDS**: Connections
107
-
108
- - Similar commands
109
- - Complementary commands
110
- - Alternative approaches
111
-
112
- **TROUBLESHOOTING**: Common issues
113
-
114
- - Known problems
115
- - Solutions
116
- - Workarounds
117
-
118
- **CHANGELOG**: Version history
119
-
120
- - What changed when
121
- - Breaking changes highlighted
122
- - Migration guidance
123
-
124
- ## In-Line Documentation Patterns
125
-
126
- ### Commented Sections
127
-
128
- ```markdown
129
- ---
130
- description: Complex multi-step command
131
- ---
132
-
133
- <!-- SECTION 1: VALIDATION -->
134
- <!-- This section checks prerequisites before proceeding -->
135
-
136
- Checking prerequisites...
137
-
138
- - Git repository: `git rev-parse --git-dir 2>/dev/null`
139
- - Branch exists: [validation logic]
140
-
141
- <!-- SECTION 2: ANALYSIS -->
142
- <!-- Analyzes the differences between branches -->
143
-
144
- Analyzing differences between $1 and $2...
145
- [Analysis logic...]
146
-
147
- <!-- SECTION 3: RECOMMENDATIONS -->
148
- <!-- Provides actionable recommendations -->
149
-
150
- Based on analysis, recommend:
151
- [Recommendations...]
152
-
153
- <!-- END: Next steps for user -->
154
- ```
155
-
156
- ### Inline Explanations
157
-
158
- ```markdown
159
- ---
160
- description: Deployment command with inline docs
161
- ---
162
-
163
- # Deploy to $1
164
-
165
- ## Pre-flight Checks
166
-
167
- <!-- We check branch status to prevent deploying from wrong branch -->
168
-
169
- Current branch: `git branch --show-current`
170
-
171
- <!-- Production deploys must come from main/master -->
172
-
173
- if [ "$1" = "production" ] && [ "$(git branch --show-current)" != "main" ]; then
174
- ⚠️ WARNING: Not on main branch for production deploy
175
- This is unusual. Confirm this is intentional.
176
- fi
177
-
178
- <!-- Test status ensures we don't deploy broken code -->
179
-
180
- Running tests: `npm test`
181
-
182
- ✓ All checks passed
183
-
184
- ## Deployment
185
-
186
- <!-- Actual deployment happens here -->
187
- <!-- Uses blue-green strategy for zero-downtime -->
188
-
189
- Deploying to $1 environment...
190
- [Deployment steps...]
191
-
192
- <!-- Post-deployment verification -->
193
-
194
- Verifying deployment health...
195
- [Health checks...]
196
-
197
- Deployment complete!
198
-
199
- ## Next Steps
200
-
201
- <!-- Guide user on what to do after deployment -->
202
-
203
- 1. Monitor logs: /logs $1
204
- 2. Run smoke tests: /smoke-test $1
205
- 3. Notify team: /notify-deployment $1
206
- ```
207
-
208
- ### Decision Point Documentation
209
-
210
- ```markdown
211
- ---
212
- description: Interactive deployment command
213
- ---
214
-
215
- # Interactive Deployment
216
-
217
- ## Configuration Review
218
-
219
- Target: $1
220
- Current version: `cat version.txt`
221
- New version: $2
222
-
223
- <!-- DECISION POINT: User confirms configuration -->
224
- <!-- This pause allows user to verify everything is correct -->
225
- <!-- We can't automatically proceed because deployment is risky -->
226
-
227
- Review the above configuration.
228
-
229
- **Continue with deployment?**
230
-
231
- - Reply "yes" to proceed
232
- - Reply "no" to cancel
233
- - Reply "edit" to modify configuration
234
-
235
- [Await user input before continuing...]
236
-
237
- <!-- After user confirms, we proceed with deployment -->
238
- <!-- All subsequent steps are automated -->
239
-
240
- Proceeding with deployment...
241
- ```
242
-
243
- ## Help Text Patterns
244
-
245
- ### Built-in Help Command
246
-
247
- Create a help subcommand for complex commands:
248
-
249
- ```markdown
250
- ---
251
- description: Main command with help
252
- argument-hint: [subcommand] [args]
253
- ---
254
-
255
- # Command Processor
256
-
257
- if [ "$1" = "help" ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
258
- **Command Help**
259
-
260
- USAGE:
261
- /command [subcommand] [args]
262
-
263
- SUBCOMMANDS:
264
- init [name] Initialize new configuration
265
- deploy [env] Deploy to environment
266
- status Show current status
267
- rollback Rollback last deployment
268
- help Show this help
269
-
270
- EXAMPLES:
271
- /command init my-project
272
- /command deploy staging
273
- /command status
274
- /command rollback
275
-
276
- For detailed help on a subcommand:
277
- /command [subcommand] --help
278
-
279
- Exit.
280
- fi
281
-
282
- [Regular command processing...]
283
- ```
284
-
285
- ### Contextual Help
286
-
287
- Provide help based on context:
288
-
289
- ```markdown
290
- ---
291
- description: Context-aware command
292
- argument-hint: [operation] [target]
293
- ---
294
-
295
- # Context-Aware Operation
296
-
297
- if [ -z "$1" ]; then
298
- **No operation specified**
299
-
300
- Available operations:
301
-
302
- - analyze: Analyze target for issues
303
- - fix: Apply automatic fixes
304
- - report: Generate detailed report
305
-
306
- Usage: /command [operation] [target]
307
-
308
- Examples:
309
- /command analyze src/
310
- /command fix src/app.js
311
- /command report
312
-
313
- Run /command help for more details.
314
-
315
- Exit.
316
- fi
317
-
318
- [Command continues if operation provided...]
319
- ```
320
-
321
- ## Error Message Documentation
322
-
323
- ### Helpful Error Messages
324
-
325
- ```markdown
326
- ---
327
- description: Command with good error messages
328
- ---
329
-
330
- # Validation Command
331
-
332
- if [ -z "$1" ]; then
333
- ❌ ERROR: Missing required argument
334
-
335
- The 'file-path' argument is required.
336
-
337
- USAGE:
338
- /validate [file-path]
339
-
340
- EXAMPLE:
341
- /validate src/app.js
342
-
343
- Try again with a file path.
344
-
345
- Exit.
346
- fi
347
-
348
- if [ ! -f "$1" ]; then
349
- ❌ ERROR: File not found: $1
350
-
351
- The specified file does not exist or is not accessible.
352
-
353
- COMMON CAUSES:
354
-
355
- 1. Typo in file path
356
- 2. File was deleted or moved
357
- 3. Insufficient permissions
358
-
359
- SUGGESTIONS:
360
-
361
- - Check spelling: $1
362
- - Verify file exists: ls -la $(dirname "$1")
363
- - Check permissions: ls -l "$1"
364
-
365
- Exit.
366
- fi
367
-
368
- [Command continues if validation passes...]
369
- ```
370
-
371
- ### Error Recovery Guidance
372
-
373
- ```markdown
374
- ---
375
- description: Command with recovery guidance
376
- ---
377
-
378
- # Operation Command
379
-
380
- Running operation...
381
-
382
- `risky-operation.sh`
383
-
384
- if [ $? -ne 0 ]; then
385
- ❌ OPERATION FAILED
386
-
387
- The operation encountered an error and could not complete.
388
-
389
- WHAT HAPPENED:
390
- The risky-operation.sh script returned a non-zero exit code.
391
-
392
- WHAT THIS MEANS:
393
-
394
- - Changes may be partially applied
395
- - System may be in inconsistent state
396
- - Manual intervention may be needed
397
-
398
- RECOVERY STEPS:
399
-
400
- 1. Check operation logs: cat /tmp/operation.log
401
- 2. Verify system state: /check-state
402
- 3. If needed, rollback: /rollback-operation
403
- 4. Fix underlying issue
404
- 5. Retry operation: /retry-operation
405
-
406
- NEED HELP?
407
-
408
- - Check troubleshooting guide: /help troubleshooting
409
- - Contact support with error code: ERR_OP_FAILED_001
410
-
411
- Exit.
412
- fi
413
- ```
414
-
415
- ## Usage Example Documentation
416
-
417
- ### Embedded Examples
418
-
419
- ```markdown
420
- ---
421
- description: Command with embedded examples
422
- ---
423
-
424
- # Feature Command
425
-
426
- This command performs feature analysis with multiple options.
427
-
428
- ## Basic Usage
429
-
430
- \`\`\`
431
- /feature analyze src/
432
- \`\`\`
433
-
434
- Analyzes all files in src/ directory for feature usage.
435
-
436
- ## Advanced Usage
437
-
438
- \`\`\`
439
- /feature analyze src/ --detailed
440
- \`\`\`
441
-
442
- Provides detailed analysis including:
443
-
444
- - Feature breakdown by file
445
- - Usage patterns
446
- - Optimization suggestions
447
-
448
- ## Use Cases
449
-
450
- **Use Case 1: Quick overview**
451
- \`\`\`
452
- /feature analyze .
453
- \`\`\`
454
- Get high-level feature summary of entire project.
455
-
456
- **Use Case 2: Specific directory**
457
- \`\`\`
458
- /feature analyze src/components
459
- \`\`\`
460
- Focus analysis on components directory only.
461
-
462
- **Use Case 3: Comparison**
463
- \`\`\`
464
- /feature analyze src/ --compare baseline.json
465
- \`\`\`
466
- Compare current features against baseline.
467
-
468
- ---
469
-
470
- Now processing your request...
471
-
472
- [Command implementation...]
473
- ```
474
-
475
- ### Example-Driven Documentation
476
-
477
- ```markdown
478
- ---
479
- description: Example-heavy command
480
- ---
481
-
482
- # Transformation Command
483
-
484
- ## What This Does
485
-
486
- Transforms data from one format to another.
487
-
488
- ## Examples First
489
-
490
- ### Example 1: JSON to YAML
491
-
492
- **Input:** `data.json`
493
- \`\`\`json
494
- {"name": "test", "value": 42}
495
- \`\`\`
496
-
497
- **Command:** `/transform data.json yaml`
498
-
499
- **Output:** `data.yaml`
500
- \`\`\`yaml
501
- name: test
502
- value: 42
503
- \`\`\`
504
-
505
- ### Example 2: CSV to JSON
506
-
507
- **Input:** `data.csv`
508
- \`\`\`csv
509
- name,value
510
- test,42
511
- \`\`\`
512
-
513
- **Command:** `/transform data.csv json`
514
-
515
- **Output:** `data.json`
516
- \`\`\`json
517
- [{"name": "test", "value": "42"}]
518
- \`\`\`
519
-
520
- ### Example 3: With Options
521
-
522
- **Command:** `/transform data.json yaml --pretty --sort-keys`
523
-
524
- **Result:** Formatted YAML with sorted keys
525
-
526
- ---
527
-
528
- ## Your Transformation
529
-
530
- File: $1
531
- Format: $2
532
-
533
- [Perform transformation...]
534
- ```
535
-
536
- ## Maintenance Documentation
537
-
538
- ### Version and Changelog
539
-
540
- ```markdown
541
- <!--
542
- VERSION: 2.1.0
543
- LAST UPDATED: 2025-01-15
544
- AUTHOR: DevOps Team
545
-
546
- CHANGELOG:
547
- v2.1.0 (2025-01-15):
548
- - Added support for YAML configuration
549
- - Improved error messages
550
- - Fixed bug with special characters in arguments
551
-
552
- v2.0.0 (2025-01-01):
553
- - BREAKING: Changed argument order
554
- - BREAKING: Removed deprecated --old-flag
555
- - Added new validation checks
556
- - Migration guide: /migration-v2
557
-
558
- v1.5.0 (2024-12-15):
559
- - Added --verbose flag
560
- - Improved performance by 50%
561
-
562
- v1.0.0 (2024-12-01):
563
- - Initial stable release
564
-
565
- MIGRATION NOTES:
566
- From v1.x to v2.0:
567
- Old: /command arg1 arg2 --old-flag
568
- New: /command arg2 arg1
569
-
570
- The --old-flag is removed. Use --new-flag instead.
571
-
572
- DEPRECATION WARNINGS:
573
- - The --legacy-mode flag is deprecated as of v2.1.0
574
- - Will be removed in v3.0.0 (estimated 2025-06-01)
575
- - Use --modern-mode instead
576
-
577
- KNOWN ISSUES:
578
- - #123: Slow performance with large files (workaround: use --stream flag)
579
- - #456: Special characters in Windows (fix planned for v2.2.0)
580
- -->
581
- ```
582
-
583
- ### Maintenance Notes
584
-
585
- ```markdown
586
- <!--
587
- MAINTENANCE NOTES:
588
-
589
- CODE STRUCTURE:
590
- - Lines 1-50: Argument parsing and validation
591
- - Lines 51-100: Main processing logic
592
- - Lines 101-150: Output formatting
593
- - Lines 151-200: Error handling
594
-
595
- DEPENDENCIES:
596
- - Requires git 2.x or later
597
- - Uses jq for JSON processing
598
- - Needs bash 4.0+ for associative arrays
599
-
600
- PERFORMANCE:
601
- - Fast path for small inputs (< 1MB)
602
- - Streams large files to avoid memory issues
603
- - Caches results in /tmp for 1 hour
604
-
605
- SECURITY CONSIDERATIONS:
606
- - Validates all inputs to prevent injection
607
- - Uses allowed-tools to limit Bash access
608
- - No credentials in command file
609
-
610
- TESTING:
611
- - Unit tests: tests/command-test.sh
612
- - Integration tests: tests/integration/
613
- - Manual test checklist: tests/manual-checklist.md
614
-
615
- FUTURE IMPROVEMENTS:
616
- - Add support for TOML format
617
- - Implement parallel processing
618
- - Add progress bar for large files
619
-
620
- RELATED FILES:
621
- - lib/parser.sh: Shared parsing logic
622
- - lib/formatter.sh: Output formatting
623
- - config/defaults.yml: Default configuration
624
- -->
625
- ```
626
-
627
- ## README Documentation
628
-
629
- Commands should have companion README files:
630
-
631
- ```markdown
632
- # Command Name
633
-
634
- Brief description of what the command does.
635
-
636
- ## Installation
637
-
638
- This command is part of the [plugin-name] plugin.
639
-
640
- Install with:
641
- \`\`\`
642
- /plugin install plugin-name
643
- \`\`\`
644
-
645
- ## Usage
646
-
647
- Basic usage:
648
- \`\`\`
649
- /command-name [arg1] [arg2]
650
- \`\`\`
651
-
652
- ## Arguments
653
-
654
- - `arg1`: Description (required)
655
- - `arg2`: Description (optional, defaults to X)
656
-
657
- ## Examples
658
-
659
- ### Example 1: Basic Usage
660
-
661
- \`\`\`
662
- /command-name value1 value2
663
- \`\`\`
664
-
665
- Description of what happens.
666
-
667
- ### Example 2: Advanced Usage
668
-
669
- \`\`\`
670
- /command-name value1 --option
671
- \`\`\`
672
-
673
- Description of advanced feature.
674
-
675
- ## Configuration
676
-
677
- Optional configuration file: `.claude/command-name.local.md`
678
-
679
- ## \`\`\`markdown
680
-
681
- default_arg: value
682
- enable_feature: true
683
-
684
- ---
685
-
686
- \`\`\`
687
-
688
- ## Requirements
689
-
690
- - Git 2.x or later
691
- - jq (for JSON processing)
692
- - Node.js 14+ (optional, for advanced features)
693
-
694
- ## Troubleshooting
695
-
696
- ### Issue: Command not found
697
-
698
- **Solution:** Ensure plugin is installed and enabled.
699
-
700
- ### Issue: Permission denied
701
-
702
- **Solution:** Check file permissions and allowed-tools setting.
703
-
704
- ## Contributing
705
-
706
- Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).
707
-
708
- ## License
709
-
710
- MIT License - See [LICENSE](LICENSE).
711
-
712
- ## Support
713
-
714
- - Issues: https://github.com/user/plugin/issues
715
- - Docs: https://docs.example.com
716
- - Email: support@example.com
717
- ```
718
-
719
- ## Best Practices
720
-
721
- ### Documentation Principles
722
-
723
- 1. **Write for your future self**: Assume you'll forget details
724
- 2. **Examples before explanations**: Show, then tell
725
- 3. **Progressive disclosure**: Basic info first, details available
726
- 4. **Keep it current**: Update docs when code changes
727
- 5. **Test your docs**: Verify examples actually work
728
-
729
- ### Documentation Locations
730
-
731
- 1. **In command file**: Core usage, examples, inline explanations
732
- 2. **README**: Installation, configuration, troubleshooting
733
- 3. **Separate docs**: Detailed guides, tutorials, API reference
734
- 4. **Comments**: Implementation details for maintainers
735
-
736
- ### Documentation Style
737
-
738
- 1. **Clear and concise**: No unnecessary words
739
- 2. **Active voice**: "Run the command" not "The command can be run"
740
- 3. **Consistent terminology**: Use same terms throughout
741
- 4. **Formatted well**: Use headings, lists, code blocks
742
- 5. **Accessible**: Assume reader is beginner
743
-
744
- ### Documentation Maintenance
745
-
746
- 1. **Version everything**: Track what changed when
747
- 2. **Deprecate gracefully**: Warn before removing features
748
- 3. **Migration guides**: Help users upgrade
749
- 4. **Archive old docs**: Keep old versions accessible
750
- 5. **Review regularly**: Ensure docs match reality
751
-
752
- ## Documentation Checklist
753
-
754
- Before releasing a command:
755
-
756
- - [ ] Description in frontmatter is clear
757
- - [ ] argument-hint documents all arguments
758
- - [ ] Usage examples in comments
759
- - [ ] Common use cases shown
760
- - [ ] Error messages are helpful
761
- - [ ] Requirements documented
762
- - [ ] Related commands listed
763
- - [ ] Changelog maintained
764
- - [ ] Version number updated
765
- - [ ] README created/updated
766
- - [ ] Examples actually work
767
- - [ ] Troubleshooting section complete
768
-
769
- With good documentation, commands become self-service, reducing support burden and improving user experience.