Improved agent readiness and added openspec skills - #2023
Conversation
|
Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/2023/acli.phar |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2023 +/- ##
=========================================
Coverage 92.49% 92.49%
Complexity 1991 1991
=========================================
Files 123 123
Lines 7232 7232
=========================================
Hits 6689 6689
Misses 543 543 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Introduces OpenSpec workflow support and agent-focused contributor guidance, along with minor developer-experience improvements to static analysis defaults and contributor documentation.
Changes:
- Add OpenSpec configuration plus a set of
/opsx:*workflow command docs and corresponding OpenSpec “skills”. - Add an
AGENTS.mdentry point describing agent workflow, worktree usage, and PHPStan baseline policy. - Improve developer tooling/docs: run PHPStan via GrumPHP pre-commit and increase PHPStan memory limits; document integration test execution and common local dev issues.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| openspec/config.yaml | Adds baseline OpenSpec schema configuration for spec-driven workflow. |
| grumphp.yml | Adds PHPStan task to pre-commit checks with a 1G memory limit. |
| CONTRIBUTING.md | Documents running integration tests and common local dev issues (coverage/pcov, phpcs vendor deps, Xdebug). |
| composer.json | Raises default PHPStan memory limit for the composer stan script. |
| AGENTS.md | New agent/contributor workflow guide (branching/worktrees, gate commands, PHPStan baseline policy). |
| .claude/skills/openspec-update-change/SKILL.md | Adds “update change artifacts” OpenSpec skill documentation. |
| .claude/skills/openspec-sync-specs/SKILL.md | Adds “sync delta specs into main specs” OpenSpec skill documentation. |
| .claude/skills/openspec-propose/SKILL.md | Adds “propose a change and generate artifacts” OpenSpec skill documentation. |
| .claude/skills/openspec-explore/SKILL.md | Adds “explore mode” OpenSpec skill documentation. |
| .claude/skills/openspec-archive-change/SKILL.md | Adds “archive a change” OpenSpec skill documentation. |
| .claude/skills/openspec-apply-change/SKILL.md | Adds “apply/implement a change” OpenSpec skill documentation. |
| .claude/commands/opsx/update.md | Adds /opsx:update command documentation. |
| .claude/commands/opsx/sync.md | Adds /opsx:sync command documentation. |
| .claude/commands/opsx/propose.md | Adds /opsx:propose command documentation. |
| .claude/commands/opsx/explore.md | Adds /opsx:explore command documentation. |
| .claude/commands/opsx/archive.md | Adds /opsx:archive command documentation. |
| .claude/commands/opsx/apply.md | Adds /opsx:apply command documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## Overview | ||
|
|
||
| Acquia CLI (`acli`) is a PHP 8.2+ Symfony Console application distributed as a PHAR. Commands talk to the Acquia Cloud Platform API and ACSF API. The test suite is fully local (no live API calls in unit tests — Prophecy mocks read from OpenAPI spec fixtures). |
|
|
||
| # Work inside the worktree | ||
| cd .worktrees/CLI-123-my-feature | ||
| composer install # worktree has its own vendor/ symlink |
| git worktree remove .worktrees/CLI-123-my-feature | ||
| ``` | ||
|
|
||
| `.worktrees/` is git-ignored — no accidental commits of worktree state. |
| `test_01_auth_login_with_telemetry_disabled` is the only test that does not create, modify, or delete any cloud resource. It disables telemetry and verifies credential login. Run it alone with: | ||
|
|
||
| ```bash | ||
| python3 -m unittest tests.integration.testcases.TestExecutableWithPrompt.test_01_auth_login_with_telemetry_disabled |
| Create an `archive` directory under `planningHome.changesDir` if it doesn't exist: | ||
| ```bash | ||
| mkdir -p "<planningHome.changesDir>/archive" | ||
| ``` |
| 5. **Perform the archive** | ||
|
|
||
| Create an `archive` directory under `planningHome.changesDir` if it doesn't exist: | ||
| ```bash | ||
| mkdir -p "<planningHome.changesDir>/archive" | ||
| ``` | ||
|
|
||
| Generate target name using current date: `YYYY-MM-DD-<change-name>` | ||
|
|
||
| **Check if target already exists:** | ||
| - If yes: Fail with error, suggest renaming existing archive or using different date | ||
| - If no: Move `changeRoot` to the archive directory | ||
|
|
||
| ```bash | ||
| mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>" | ||
| ``` |
| - Revise only files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them. | ||
| - If the change is already coherent, say so and make no edits. | ||
|
|
| - Revise only files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them. | ||
| - If the change is already coherent, say so and make no edits. | ||
|
|
| **Handle states:** | ||
| - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` | ||
| - If `state: "all_done"`: congratulate, suggest archive |
| **Handle states:** | ||
| - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change | ||
| - If `state: "all_done"`: congratulate, suggest archive |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the |
Motivation
Fixes #NNN
Proposed changes
Alternatives considered
Testing steps
./bin/acli ckc