wordpress-agent-kit 0.4.0 → 0.6.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/.agents/skills/wp-bootstrap/SKILL.md +314 -0
- package/.agents/skills/wp-bootstrap/references/composer-setup.md +275 -0
- package/.agents/skills/wp-bootstrap/references/monorepo-patterns.md +184 -0
- package/.agents/skills/wp-bootstrap/scripts/bootstrap.sh +151 -0
- package/.agents/skills/wp-bootstrap/scripts/detect-structure.mjs +466 -0
- package/.agents/skills/wp-bootstrap/scripts/package-wp.sh +173 -0
- package/.agents/skills/wp-bootstrap/scripts/playground-start.sh +148 -0
- package/.agents/skills/wp-bootstrap/scripts/playground-verify.sh +165 -0
- package/.agents/skills/wp-bootstrap/scripts/setup-github.sh +417 -0
- package/{.github → .agents}/skills/wp-wpcli-and-ops/SKILL.md +11 -9
- package/.agents/skills/wp-wpengine/SKILL.md +462 -0
- package/.agents/skills/wp-wpengine/references/ci-gate.md +469 -0
- package/.agents/skills/wp-wpengine/references/github-actions-deploy.md +743 -0
- package/.agents/skills/wp-wpengine/scripts/ci-gate.sh +118 -0
- package/.agents/skills/wp-wpengine/scripts/wpe-check.sh +89 -0
- package/.agents/skills/wp-wpengine/scripts/wpe-preflight.sh +104 -0
- package/.github/agents/wp-architect.agent.md +1 -2
- package/.github/copilot-instructions.md +1 -1
- package/.github/instructions/wordpress-workflow.instructions.md +3 -3
- package/AGENTS.md +22 -10
- package/AGENTS.template.md +20 -10
- package/README.md +89 -85
- package/dist/cli.js +7 -1
- package/dist/commands/bootstrap.js +105 -0
- package/dist/commands/clean-skills.js +64 -0
- package/dist/commands/setup.js +6 -2
- package/dist/commands/sync-skills.js +3 -0
- package/dist/lib/api.js +165 -5
- package/dist/lib/bootstrap.js +352 -0
- package/dist/lib/installer.js +166 -2
- package/extensions/wp-agent-kit/index.ts +325 -10
- package/package.json +10 -14
- package/skills-custom/wp-bootstrap/SKILL.md +314 -0
- package/skills-custom/wp-bootstrap/references/composer-setup.md +275 -0
- package/skills-custom/wp-bootstrap/references/monorepo-patterns.md +184 -0
- package/skills-custom/wp-bootstrap/scripts/bootstrap.sh +151 -0
- package/skills-custom/wp-bootstrap/scripts/detect-structure.mjs +466 -0
- package/skills-custom/wp-bootstrap/scripts/package-wp.sh +173 -0
- package/skills-custom/wp-bootstrap/scripts/playground-start.sh +148 -0
- package/skills-custom/wp-bootstrap/scripts/playground-verify.sh +165 -0
- package/skills-custom/wp-bootstrap/scripts/setup-github.sh +417 -0
- package/skills-custom/wp-wpengine/SKILL.md +362 -27
- package/skills-custom/wp-wpengine/references/ci-gate.md +469 -0
- package/skills-custom/wp-wpengine/references/github-actions-deploy.md +743 -0
- package/skills-custom/wp-wpengine/scripts/ci-gate.sh +118 -0
- package/skills-custom/wp-wpengine/scripts/wpe-check.sh +89 -0
- package/skills-custom/wp-wpengine/scripts/wpe-preflight.sh +104 -0
- package/.github/skills/wp-wpengine/SKILL.md +0 -127
- package/.github/workflows/ci.yml +0 -44
- package/.husky/pre-commit +0 -7
- package/CLI_REVIEW.md +0 -250
- package/biome.json +0 -39
- /package/{.github → .agents}/skills/blueprint/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wordpress-router/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wordpress-router/references/decision-tree.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/delegate-helper-pattern.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/domain-vs-projection.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/error-code-vocabulary.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/grouping-heuristic.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/input-schema-gotchas.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/php-registration.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/plugin-family-patterns.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/rest-api.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-api/references/shared-core-service.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-audit/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-audit/references/audit-schema.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-audit/references/capability-gate-tracing.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-audit/references/controller-enumeration.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/annotation-correctness.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/audit-schema-validation.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/permission-roundtrip.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/runtime-harness.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/schema-lints.md +0 -0
- /package/{.github → .agents}/skills/wp-abilities-verify/references/static-enumeration.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/attributes-and-serialization.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/block-json.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/creating-new-blocks.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/deprecations.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/dynamic-rendering.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/inner-blocks.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/registration.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/supports-and-wrappers.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/references/tooling-and-testing.md +0 -0
- /package/{.github → .agents}/skills/wp-block-development/scripts/list_blocks.mjs +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/creating-new-block-theme.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/patterns.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/style-variations.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/templates-and-parts.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/references/theme-json.md +0 -0
- /package/{.github → .agents}/skills/wp-block-themes/scripts/detect_block_themes.mjs +0 -0
- /package/{.github → .agents}/skills/wp-interactivity-api/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-interactivity-api/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-interactivity-api/references/directives-quickref.md +0 -0
- /package/{.github → .agents}/skills/wp-interactivity-api/references/server-side-rendering.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/autoload-options.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/cron.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/database.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/http-api.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/measurement.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/object-cache.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/query-monitor-headless.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/server-timing.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/wp-cli-doctor.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/references/wp-cli-profile.md +0 -0
- /package/{.github → .agents}/skills/wp-performance/scripts/perf_inspect.mjs +0 -0
- /package/{.github → .agents}/skills/wp-phpstan/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-phpstan/references/configuration.md +0 -0
- /package/{.github → .agents}/skills/wp-phpstan/references/third-party-classes.md +0 -0
- /package/{.github → .agents}/skills/wp-phpstan/references/wordpress-annotations.md +0 -0
- /package/{.github → .agents}/skills/wp-phpstan/scripts/phpstan_inspect.mjs +0 -0
- /package/{.github → .agents}/skills/wp-playground/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-playground/references/blueprints.md +0 -0
- /package/{.github → .agents}/skills/wp-playground/references/cli-commands.md +0 -0
- /package/{.github → .agents}/skills/wp-playground/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-playground/references/e2e-playwright.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/data-and-cron.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/lifecycle.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/security.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/settings-api.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/references/structure.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-development/scripts/detect_plugins.mjs +0 -0
- /package/{.github → .agents}/skills/wp-plugin-directory-guidelines/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-directory-guidelines/references/gpl-compliance.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-directory-guidelines/references/guideline-review-checklist.md +0 -0
- /package/{.github → .agents}/skills/wp-plugin-directory-guidelines/references/naming-rules.md +0 -0
- /package/{.github → .agents}/skills/wp-project-triage/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-project-triage/references/triage.schema.json +0 -0
- /package/{.github → .agents}/skills/wp-project-triage/scripts/detect_wp_project.mjs +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/SKILL.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/authentication.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/custom-content-types.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/discovery-and-params.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/responses-and-fields.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/routes-and-endpoints.md +0 -0
- /package/{.github → .agents}/skills/wp-rest-api/references/schema.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/automation.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/cron-and-cache.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/debugging.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/multisite.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/packages-and-updates.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/safety.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/references/search-replace.md +0 -0
- /package/{.github → .agents}/skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs +0 -0
- /package/{.github → .agents}/skills/wpds/SKILL.md +0 -0
package/CLI_REVIEW.md
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
# WordPress Agent Kit CLI - Accessibility & Agent-Friendly Review
|
|
2
|
-
|
|
3
|
-
**Date**: 2026-06-08
|
|
4
|
-
**Version**: 0.2.1
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Executive Summary
|
|
9
|
-
|
|
10
|
-
The current CLI is functional for **human developers** using interactive prompts (`@clack/prompts`), but lacks features for **programmatic/agent usage**:
|
|
11
|
-
|
|
12
|
-
- ❌ No JSON output mode
|
|
13
|
-
- ❌ No machine-readable result objects
|
|
14
|
-
- ❌ No programmatic API (only CLI entrypoint)
|
|
15
|
-
- ❌ No non-interactive "headless" mode for all commands
|
|
16
|
-
- ❌ No structured logging/event streaming
|
|
17
|
-
- ❌ Exit codes not consistently semantic
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Current Architecture
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
src/
|
|
25
|
-
├── cli.ts # Entry point, Commander setup
|
|
26
|
-
├── commands/
|
|
27
|
-
│ ├── install.ts # Non-interactive (args + flags only) ✓
|
|
28
|
-
│ ├── setup.ts # Interactive (prompts only) ✗
|
|
29
|
-
│ ├── sync-skills.ts # Non-interactive (args + flags only) ✓
|
|
30
|
-
│ └── run-playground.ts # Non-interactive ✓
|
|
31
|
-
├── lib/
|
|
32
|
-
│ ├── installer.ts # Core logic (pure functions) ✓
|
|
33
|
-
│ └── triage-mapper.ts # Pure mappers ✓
|
|
34
|
-
└── utils/
|
|
35
|
-
├── paths.ts # Path resolution
|
|
36
|
-
└── run.ts # Command runner
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Good**: Core logic (`installKit`, mappers) is pure and testable.
|
|
40
|
-
**Gap**: `setup.ts` couples interactive prompts with business logic.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Recommendations
|
|
45
|
-
|
|
46
|
-
### 1. Add JSON Output Mode (--json)
|
|
47
|
-
|
|
48
|
-
**Goal**: Every command outputs structured JSON to stdout when requested.
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Success
|
|
52
|
-
wp-agent-kit install /path/to/project --platform github --json
|
|
53
|
-
# {"success":true,"targetDir":"/path/to/project","platform":"github","filesCopied":["AGENTS.md",".github/..."],"durationMs":142}
|
|
54
|
-
|
|
55
|
-
# Failure
|
|
56
|
-
wp-agent-kit install /nonexistent --json
|
|
57
|
-
# {"success":false,"error":"E_NOT_FOUND","message":"Target directory does not exist","code":"ENOENT"}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**Implementation**:
|
|
61
|
-
- Add `--json` / `--output json` global flag in `cli.ts`
|
|
62
|
-
- Create `OutputFormatter` utility: `json`, `human`, `quiet`
|
|
63
|
-
- Return structured result objects from all command actions
|
|
64
|
-
- Separate stdout (JSON) from stderr (human diagnostics)
|
|
65
|
-
|
|
66
|
-
### 2. Add Machine-Readable Exit Codes
|
|
67
|
-
|
|
68
|
-
| Code | Meaning |
|
|
69
|
-
|------|---------|
|
|
70
|
-
| 0 | Success |
|
|
71
|
-
| 1 | General error |
|
|
72
|
-
| 2 | Invalid arguments / usage |
|
|
73
|
-
| 3 | Target not found / ENOENT |
|
|
74
|
-
| 4 | Permission denied / EACCES |
|
|
75
|
-
| 5 | Already exists (without --force) |
|
|
76
|
-
| 6 | Git/submodule error |
|
|
77
|
-
| 7 | Network/fetch error |
|
|
78
|
-
| 8 | Validation failed |
|
|
79
|
-
| 130 | Cancelled (SIGINT) |
|
|
80
|
-
|
|
81
|
-
### 3. Extract Programmatic API
|
|
82
|
-
|
|
83
|
-
Expose core functions for direct import by agents/scripts:
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
// src/api.ts (new)
|
|
87
|
-
export interface InstallOptions {
|
|
88
|
-
targetDir: string;
|
|
89
|
-
platform: Platform;
|
|
90
|
-
force?: boolean;
|
|
91
|
-
dryRun?: boolean;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface InstallResult {
|
|
95
|
-
success: boolean;
|
|
96
|
-
targetDir: string;
|
|
97
|
-
platform: Platform;
|
|
98
|
-
filesCreated: string[];
|
|
99
|
-
filesSkipped: string[];
|
|
100
|
-
errors: string[];
|
|
101
|
-
durationMs: number;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export async function installKit(options: InstallOptions): Promise<InstallResult>;
|
|
105
|
-
export async function syncSkills(options: SyncOptions): Promise<SyncResult>;
|
|
106
|
-
export async function runTriage(targetDir: string): Promise<TriageResult>;
|
|
107
|
-
export async function configureAgentsMd(options: ConfigureOptions): Promise<ConfigureResult>;
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Benefits**:
|
|
111
|
-
- Agents can import and call directly: `import { installKit } from 'wordpress-agent-kit'`
|
|
112
|
-
- No subprocess overhead
|
|
113
|
-
- Full TypeScript types
|
|
114
|
-
- Testable in isolation
|
|
115
|
-
|
|
116
|
-
### 4. Make `setup` Command Headless-Capable
|
|
117
|
-
|
|
118
|
-
Current `setup.ts` is prompt-driven. Add non-interactive mode:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
# Full non-interactive (requires all flags)
|
|
122
|
-
wp-agent-kit setup /path/to/project \
|
|
123
|
-
--project-type plugin \
|
|
124
|
-
--tech-stack gutenberg,rest-api,composer \
|
|
125
|
-
--platform github \
|
|
126
|
-
--yes \
|
|
127
|
-
--json
|
|
128
|
-
|
|
129
|
-
# Hybrid: run triage, apply detected values, no prompts
|
|
130
|
-
wp-agent-kit setup /path/to/project --auto --json
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Flag Matrix for `setup`**:
|
|
134
|
-
| Flag | Description |
|
|
135
|
-
|------|-------------|
|
|
136
|
-
| `--project-type <type>` | plugin \| theme \| block-theme \| site \| blocks \| other |
|
|
137
|
-
| `--tech-stack <list>` | Comma-separated: gutenberg,interactivity,rest-api,wpcli,composer,phpstan,npm,playground |
|
|
138
|
-
| `--platform <platform>` | github \| cursor \| claude \| agent \| pi |
|
|
139
|
-
| `--package-manager <pm>` | npm \| pnpm \| yarn |
|
|
140
|
-
| `--auto` | Run triage, apply detected values, skip prompts |
|
|
141
|
-
| `--yes` / `-y` | Accept all confirmations (requires other flags) |
|
|
142
|
-
| `--reset` | Overwrite existing |
|
|
143
|
-
| `--dry-run` | Show what would be done |
|
|
144
|
-
|
|
145
|
-
### 5. Add Structured Logging / Event Stream
|
|
146
|
-
|
|
147
|
-
For long-running operations (sync-skills, playground), emit NDJSON events:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
wp-agent-kit sync-skills --json-stream
|
|
151
|
-
# {"event":"start","phase":"clone","timestamp":"..."}
|
|
152
|
-
# {"event":"progress","phase":"fetch","message":"Fetching tags...","timestamp":"..."}
|
|
153
|
-
# {"event":"complete","phase":"install","result":{"skillsSynced":42,"timestamp":"..."}}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Events**: `start`, `progress`, `phase-change`, `warning`, `complete`, `error`
|
|
157
|
-
|
|
158
|
-
### 6. Add Dry-Run / Preview Mode
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
wp-agent-kit install /path --dry-run --json
|
|
162
|
-
# {"wouldCopy":[{"src":"AGENTS.template.md","dest":"/path/AGENTS.md"},{"src":".github/...","dest":"/path/.github/..."}],"wouldCreateDirs":[]}
|
|
163
|
-
|
|
164
|
-
wp-agent-kit setup /path --dry-run --auto --json
|
|
165
|
-
# {"wouldInstall":true,"detectedType":"plugin","detectedTech":["gutenberg","npm"],"wouldModify":["AGENTS.md"]}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### 7. Add Shell Completion (Modern CLI Standard)
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# Generate completion scripts
|
|
172
|
-
wp-agent-kit completion bash > /etc/bash_completion.d/wp-agent-kit
|
|
173
|
-
wp-agent-kit completion zsh > ~/.zsh/completions/_wp-agent-kit
|
|
174
|
-
wp-agent-kit completion fish > ~/.config/fish/completions/wp-agent-kit.fish
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Commander.js supports this natively: `program.enablePositionalOptions().addHelpCommand().configureOutput({ writeOut: ... })`
|
|
178
|
-
|
|
179
|
-
### 8. Add `--version` JSON Output
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
wp-agent-kit --version --json
|
|
183
|
-
# {"name":"wp-agent-kit","version":"0.2.1","node":"20.18.0","platform":"linux"}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
## Priority Matrix
|
|
189
|
-
|
|
190
|
-
| Priority | Feature | Effort | Impact |
|
|
191
|
-
|----------|---------|--------|--------|
|
|
192
|
-
| **P0** | JSON output (`--json`) | Low | High |
|
|
193
|
-
| **P0** | Semantic exit codes | Low | High |
|
|
194
|
-
| **P0** | Programmatic API export | Medium | High |
|
|
195
|
-
| **P1** | Headless `setup` mode | Medium | High |
|
|
196
|
-
| **P1** | Dry-run/preview | Low | Medium |
|
|
197
|
-
| **P2** | NDJSON event streaming | Medium | Medium |
|
|
198
|
-
| **P2** | Shell completions | Low | Medium |
|
|
199
|
-
| **P3** | Man page generation | Low | Low |
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## Example: Agent-Friendly Workflow
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
# 1. Agent detects WordPress project
|
|
207
|
-
wp-agent-kit setup /workspace/my-plugin --auto --json
|
|
208
|
-
# {"success":true,"applied":{"projectType":"plugin","techStack":["gutenberg","npm"]},"filesModified":["AGENTS.md"]}
|
|
209
|
-
|
|
210
|
-
# 2. Agent syncs latest skills
|
|
211
|
-
wp-agent-kit sync-skills --json
|
|
212
|
-
# {"success":true,"skillsSynced":47,"source":"WordPress/agent-skills@trunk"}
|
|
213
|
-
|
|
214
|
-
# 3. Agent installs for specific platform (e.g., Cursor)
|
|
215
|
-
wp-agent-kit install /workspace/my-plugin --platform cursor --json
|
|
216
|
-
# {"success":true,"platform":"cursor","targetDir":"/workspace/my-plugin","filesCreated":[".cursor/...","AGENTS.md"]}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Implementation Notes
|
|
222
|
-
|
|
223
|
-
### Minimal Changes for P0
|
|
224
|
-
|
|
225
|
-
1. **cli.ts**: Add global `--json` flag, result formatter
|
|
226
|
-
2. **commands/*.ts**: Return structured results instead of `process.exit()`
|
|
227
|
-
3. **lib/installer.ts**: Return `InstallResult` object (already close)
|
|
228
|
-
4. **package.json**: Add `"exports": { ".": "./dist/cli.js", "./api": "./dist/api.js" }`
|
|
229
|
-
|
|
230
|
-
### Testing Strategy
|
|
231
|
-
|
|
232
|
-
```typescript
|
|
233
|
-
// tests/api/install.api.test.ts
|
|
234
|
-
import { installKit } from '../../src/api.js';
|
|
235
|
-
|
|
236
|
-
it('returns structured result on success', async () => {
|
|
237
|
-
const result = await installKit({ targetDir: '/tmp/test', platform: 'github' });
|
|
238
|
-
expect(result.success).toBe(true);
|
|
239
|
-
expect(result.filesCreated).toContain('AGENTS.md');
|
|
240
|
-
});
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## References
|
|
246
|
-
|
|
247
|
-
- [Commander.js JSON output patterns](https://github.com/tj/commander.js/blob/master/Examples/options-json.ts)
|
|
248
|
-
- [CLI Guidelines - Output](https://clig.dev/#output)
|
|
249
|
-
- [12-factor CLI apps](https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46)
|
|
250
|
-
- [GitHub CLI `gh` JSON patterns](https://cli.github.com/manual/gh_help_formatting)
|
package/biome.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
|
3
|
-
"vcs": {
|
|
4
|
-
"enabled": true,
|
|
5
|
-
"clientKind": "git",
|
|
6
|
-
"useIgnoreFile": true
|
|
7
|
-
},
|
|
8
|
-
"files": {
|
|
9
|
-
"include": ["src/**/*.ts", "tests/**/*.ts", "scripts/**/*.ts", "extensions/**/*.ts"],
|
|
10
|
-
"ignoreUnknown": true
|
|
11
|
-
},
|
|
12
|
-
"organizeImports": {
|
|
13
|
-
"enabled": true
|
|
14
|
-
},
|
|
15
|
-
"linter": {
|
|
16
|
-
"enabled": true,
|
|
17
|
-
"rules": {
|
|
18
|
-
"recommended": true,
|
|
19
|
-
"suspicious": {
|
|
20
|
-
"noExplicitAny": "warn"
|
|
21
|
-
},
|
|
22
|
-
"correctness": {
|
|
23
|
-
"noUnusedVariables": "error"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"formatter": {
|
|
28
|
-
"enabled": true,
|
|
29
|
-
"indentStyle": "tab",
|
|
30
|
-
"lineWidth": 100
|
|
31
|
-
},
|
|
32
|
-
"javascript": {
|
|
33
|
-
"formatter": {
|
|
34
|
-
"quoteStyle": "single",
|
|
35
|
-
"trailingCommas": "es5",
|
|
36
|
-
"semicolons": "always"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-abilities-audit/references/capability-gate-tracing.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-abilities-verify/references/annotation-correctness.md
RENAMED
|
File without changes
|
/package/{.github → .agents}/skills/wp-abilities-verify/references/audit-schema-validation.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-block-development/references/attributes-and-serialization.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-block-development/references/supports-and-wrappers.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-interactivity-api/references/server-side-rendering.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-plugin-directory-guidelines/references/gpl-compliance.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/{.github → .agents}/skills/wp-plugin-directory-guidelines/references/naming-rules.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|