Improved agent readiness and added openspec skills#2023
Open
PrakharJainS3 wants to merge 1 commit into
Open
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:
|
Contributor
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 |
Comment on lines
+74
to
+77
| Create an `archive` directory under `planningHome.changesDir` if it doesn't exist: | ||
| ```bash | ||
| mkdir -p "<planningHome.changesDir>/archive" | ||
| ``` |
Comment on lines
+68
to
+83
| 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>" | ||
| ``` |
Comment on lines
+53
to
+55
| - 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. | ||
|
|
Comment on lines
+57
to
+59
| - 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. | ||
|
|
Comment on lines
+47
to
+49
| **Handle states:** | ||
| - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` | ||
| - If `state: "all_done"`: congratulate, suggest archive |
Comment on lines
+51
to
+53
| **Handle states:** | ||
| - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change | ||
| - If `state: "all_done"`: congratulate, suggest archive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #NNN
Proposed changes
Alternatives considered
Testing steps
./bin/acli ckc