Skip to content

Improved agent readiness and added openspec skills#2023

Open
PrakharJainS3 wants to merge 1 commit into
acquia:mainfrom
PrakharJainS3:agent-readiness
Open

Improved agent readiness and added openspec skills#2023
PrakharJainS3 wants to merge 1 commit into
acquia:mainfrom
PrakharJainS3:agent-readiness

Conversation

@PrakharJainS3

Copy link
Copy Markdown
Contributor

Motivation

Fixes #NNN

Proposed changes

Alternatives considered

Testing steps

  1. Follow the contribution guide to set up your development environment or download a pre-built acli.phar for this PR.
  2. If running from source, clear the kernel cache to pick up new and changed commands: ./bin/acli ckc
  3. Check for regressions: (add specific steps for this pr)
  4. Check new functionality: (add specific steps for this pr)

Copilot AI review requested due to automatic review settings July 16, 2026 06:26
@github-actions

Copy link
Copy Markdown

Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/2023/acli.phar

curl -OL https://acquia-cli.s3.amazonaws.com/build/pr/2023/acli.phar
chmod +x acli.phar

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.49%. Comparing base (0d9c5db) to head (a2752de).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md entry 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.

Comment thread AGENTS.md

## 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).
Comment thread AGENTS.md

# Work inside the worktree
cd .worktrees/CLI-123-my-feature
composer install # worktree has its own vendor/ symlink
Comment thread AGENTS.md
git worktree remove .worktrees/CLI-123-my-feature
```

`.worktrees/` is git-ignored — no accidental commits of worktree state.
Comment thread CONTRIBUTING.md
`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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants