Skip to content

feat: Feature Testing & Regression slice, QA audit command, and verification hardening#109

Merged
FlySpot merged 58 commits into
mainfrom
feat/qa-pyramid-agent
Jun 2, 2026
Merged

feat: Feature Testing & Regression slice, QA audit command, and verification hardening#109
FlySpot merged 58 commits into
mainfrom
feat/qa-pyramid-agent

Conversation

@FlySpot

@FlySpot FlySpot commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • /awos:tasks — adds a mandatory Feature Testing & Regression final slice to every task list. The slice runs testing-expert to generate acceptance-level tests against functional-spec.md acceptance criteria after all implementation slices are complete. Also adds a Cleanup sub-task after each implementation slice to delete ephemeral artifacts (screenshots, videos, e2e scripts) produced during verification. Artifact cleanup is skipped for the Feature Testing & Regression slice — those are retained for the regression suite.
  • /awos:hire — adds a QA Complement Rule: after hiring a primary tech agent, always propose testing-expert alongside it. Frontend stacks also get playwright MCP suggested.
  • /awos:verify — adds a CONSTRAINTS section enforcing that Step 3 verification is mandatory. Defines a fallback chain: browser MCP → curl/shell → logs/database → explicit user approval via AskUserQuestion. Agents can no longer silently skip verification.
  • templates/qa-context-template.md — starter template for the test registry at context/qa/list-of-tests.md.
  • Audit dimensionsspec-driven-development.md (SDD-07) updated to recognize the Feature Testing & Regression final-slice model alongside the legacy per-slice model.
  • Installersrc/config/setup-config.js now copies plugins/awos/agents/.claude/agents/ during npx @provectusinc/awos, matching the documentation in src/CLAUDE.md.

What is NOT in this PR

  • /awos:regression command — lives in feat/regression (PR Draft: feat: add /awos:regression command #114). The regression sub-task inside the Feature Testing & Regression slice is commented out pending that merge.
  • testing-expert agent — hired via awos-recruitment registry, not bundled in the core package.
  • /awos:qa slash command — the Claude Code wrapper was removed; commands/qa.md is preserved as a future plugin reference only.

File map

commands/tasks.md       ← Feature Testing & Regression slice + Cleanup sub-task
commands/hire.md        ← QA Complement Rule
commands/verify.md      ← mandatory Step 3 + fallback chain constraints
templates/
  qa-context-template.md              ← test registry scaffold

plugins/awos/skills/ai-readiness-audit/dimensions/
  spec-driven-development.md          ← SDD-07: dual-model QA coverage
  end-to-end-delivery.md              ← updated references
  software-best-practices.md          ← updated references

src/config/setup-config.js            ← agents copy operation added
src/CLAUDE.md                         ← installer docs

Test plan

  • Run /awos:tasks on a spec — confirm the Feature Testing & Regression slice appears as the last slice with correct wording and agent assignments
  • Confirm Cleanup sub-task is present after each implementation slice's verify step
  • Run /awos:hire with a frontend tech — confirm testing-expert and playwright MCP appear in proposals
  • Run /awos:verify without browser MCP — confirm fallback chain is followed and agent cannot silently skip

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Complete QA audit workflow for end-to-end testing verification
    • Mandatory verification step with fallback validation methods
    • Automatic cleanup of verification artifacts
  • Documentation

    • New test registry template
    • Enhanced QA agent discovery and pairing guidelines
    • Updated spec-driven development QA coverage model

Review Change Stack

FlySpot and others added 2 commits April 9, 2026 15:32
Documents three open gaps discovered during end-to-end testing:
ephemeral E2E artifacts, coverage-by-inspection vs measurement,
and no regression baseline/enforcement mechanism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread commands/tasks.md Outdated
- Tech stack identified in technical-considerations.md
- Append the subagent assignment using format: `**[Agent: agent-name]**` at the end of the sub-task description
- Use `general-purpose` agent when no specialist clearly matches the task — but **track these assignments** for the Recommendations table
3b. **Generate paired test tasks for each slice (REQUIRED):**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Weird numbering mixing thought process syncing

@workshur workshur Apr 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if I don't want to generate any tests?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Weird numbering mixing thought process syncing

Fixed. Thanks.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What if I don't want to generate any tests?

Added as an option to skip test creation if the user asks about it.

FlySpot and others added 3 commits April 14, 2026 12:39
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Renumber thought process steps sequentially (3b → 5, shift 5-8 → 6-9)
- Make test generation opt-out instead of REQUIRED
- Add docs/superpowers/ to .gitignore and untrack pushed files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread commands/tasks.md Outdated
Comment thread commands/tasks.md Outdated
Comment thread commands/testing-expert.md Outdated
@FlySpot

FlySpot commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator Author

Just to sum-up what was changed in the current flow:

Added

  • Added a new optional /awos:qa command for full QA audits.
  • Added plugins/awos/agents/testing-expert.md — the QA subagent definition.
  • Added templates/qa-context-template.md.
  • Added templates/regression-suite-template.md.

Changed

/awos:tasks — each slice can now include explicit test tasks, not only implementation tasks.

Before

Slice 1
  [ ] impl sub-task
  [ ] verify: open browser

After

Slice 1
  [ ] impl sub-task
  [ ] Unit: positive case
  [ ] Unit: negative case
  [ ] Integration: positive case
  [ ] Integration: negative case
  [ ] verify: open browser

/awos:qa — delegates to testing-expert instead of writing tests inline

Before

Step 6: for each gap — write the missing test inline,
        run RED validation,
        update list-of-tests.md

After

Step 6: for each gap — invoke Task tool with subagent_type: "testing-expert",
        passing gap description, spec files, and implementation code.
        testing-expert handles RED validation and registry update.

Installer — testing-expert is now deployed to user projects

src/config/setup-config.js now copies plugins/awos/agents/testing-expert.md.claude/agents/testing-expert.md during npx @provectusinc/awos.


Workflow

The full development flow after this change is:

/awos:spec → /awos:tech → /awos:hire
                         │
                         ▼
                    /awos:tasks
          ┌──────────────────────────────────┐
          │ For each slice:                  │
          │                                  │
          │ 1. Create impl sub-tasks         │
          │                                  │
          │ 2. Invoke testing-expert         │
          │    passing: slice description,   │
          │    functional-spec.md,           │
          │    technical-considerations.md,  │
          │    NO implementation code        │
          │                                  │
          │ 3. testing-expert sees no code   │
          │    → returns test task list      │
          │      (unit/integration/e2e/      │
          │       contract, +/- cases)       │
          │                                  │
          │ 4. Test tasks inserted into      │
          │    the slice, before Verify      │
          └──────────────────────────────────┘
                         │
                         ▼
                 /awos:implement
          ┌──────────────────────────────────┐
          │ impl task  → domain agent        │
          │                                  │
          │ test task  → testing-expert      │
          │    passing: task description,    │
          │    spec files,                   │
          │    implementation code  ← key    │
          │                                  │
          │ testing-expert sees real code    │
          │ → writes tests + RED validation  │
          │ → returns completion signal or   │
          │   incomplete/blocked on gap      │
          └──────────────────────────────────┘
                         │
                         ▼
                    /awos:qa (optional)
          ┌──────────────────────────────────┐
          │ audit existing test coverage     │
          │ detect gaps by pyramid layer     │
          │ delegate gap tests to            │
          │   testing-expert via Task tool   │
          │ sync regression suite            │
          │ produce qa-report-YYYY-MM-DD.md  │
          └──────────────────────────────────┘

Clarified

testing-expert is a single agent definition with context-driven behavior, not separate invocation modes.

Context received Behavior
spec files, no implementation code returns a list of test task descriptions — no code written
spec files + real implementation code writes actual test code, runs RED validation, confirms GREEN
  • testing-expert is not a slash command — it lives in plugins/awos/agents/ and is invoked exclusively via the Task tool with subagent_type: "testing-expert".
  • testing-expert returns a completion signal (no gaps) or incomplete/blocked status (gap found) — the caller decides what to do with it, not the agent.

Test layer selection

testing-expert selects test layers per slice based on the slice description and acceptance criteria from functional-spec.md, plus technical-considerations.md.

Slice implementation sub-task description
+ acceptance criteria from functional-spec.md
       │
       ├──► pure logic, no external deps?  → Unit
       ├──► service-to-service / DB calls? → Integration
       ├──► full user flow via UI or API?  → E2E
       └──► API schema / interface check?  → Contract

Not every slice needs all four layers. Apply judgment.


Notes

  • Test layer selection is a judgment call, not a fixed algorithm.
  • If /awos:hire has installed a project-specific testing agent (e.g. react-testing, python-testing), it takes precedence over testing-expert.
  • The previous tasks.md example was misleading because it implied every slice always needs all four layers. In practice, a slice may only require unit + integration coverage.

- hire.md: restructure complementary pairs to search-first pattern with
  testing-expert as fallback; remove duplicate Python entry; replace
  playwright MCP with playwright CLI
- qa.md: update description to "QA health check"; add user confirmation
  for full-scope audit; make architecture.md required with warning;
  rewrite Step 3 to reflect list-of-tests.md is maintained by
  testing-expert, not created by /awos:qa; implement risk-based gap
  analysis in Step 5 (two-pass: project-level + per-AC); implement
  coordinator pattern in Step 6 (specialist agent writes, testing-expert
  validates and updates registry); add guard for missing functional-spec;
  remove regression suite steps (moved to PR #114); add staleness and
  delta-coverage notes to TODO

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
commands/qa.md (1)

11-35: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit Creation/Update modes and enforce single-document output contract.

This command does not define Creation Mode vs Update Mode behavior, and it currently specifies multiple mutable outputs (list-of-tests.md, regression-suite.md, plus a report) instead of a single output document contract.

As per coding guidelines, commands in commands/**/*.md must support both Creation Mode and Update Mode and generate a single output document per command.

Also applies to: 37-62, 147-203

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@commands/qa.md` around lines 11 - 35, The QA command must explicitly
implement Creation Mode vs Update Mode and enforce a single-document output
contract: update commands/qa.md to add a mode flag/parameter (e.g.,
mode=create|update or auto-detect by presence of target file) and implement
logic in the command flow (the section referencing context/qa/list-of-tests.md,
context/qa/regression-suite.md, and output file generation) so that when
mode=create it generates a new single audit report
(context/qa/audit-reports/qa-report-YYYY-MM-DD.md) and when mode=update it
merges required changes into that same single report rather than emitting
multiple top-level files; ensure any mutations to list-of-tests.md and
regression-suite.md are represented as sections/patches inside the single
audit-report file (or as apply-instructions within it) so the command emits only
one document; update the command documentation and usage text in commands/qa.md
to describe the two modes and the single-file output behavior and reference the
functions/process that perform the merge/update.
🧹 Nitpick comments (1)
commands/qa.md (1)

133-145: ⚡ Quick win

Move AskUserQuestion usage into an # INTERACTION section.

AskUserQuestion is used in PROCESS/CONSTRAINTS, but this file is missing a dedicated # INTERACTION section for that contract.

As per coding guidelines, AskUserQuestion belongs in core commands/*.md files under an # INTERACTION section.

Also applies to: 218-225

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@commands/qa.md` around lines 133 - 145, The AskUserQuestion invocation
currently appears under PROCESS/CONSTRAINTS in Step 7 (the "Run tests" flow) but
must be relocated to a dedicated # INTERACTION section; create an # INTERACTION
header in commands/qa.md and move the AskUserQuestion prompt and options (the
Ready to run N tests... and choices A/B/C, and the wait-for-confirmation step)
into that section, removing it from PROCESS/CONSTRAINTS, and apply the same
relocation for the other occurrence noted around lines 218-225 so all
AskUserQuestion uses live only under # INTERACTION.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@commands/qa.md`:
- Around line 118-124: Replace the delegation tool reference "Task" with "Agent"
in the guidance list so the prompt uses the correct framework name; specifically
update the step that currently says "invoke it via the `Task` tool" to say
"invoke it via the `Agent` tool" (keep the rest of the parameters and subsequent
mention of `testing-expert` unchanged).

---

Outside diff comments:
In `@commands/qa.md`:
- Around line 11-35: The QA command must explicitly implement Creation Mode vs
Update Mode and enforce a single-document output contract: update commands/qa.md
to add a mode flag/parameter (e.g., mode=create|update or auto-detect by
presence of target file) and implement logic in the command flow (the section
referencing context/qa/list-of-tests.md, context/qa/regression-suite.md, and
output file generation) so that when mode=create it generates a new single audit
report (context/qa/audit-reports/qa-report-YYYY-MM-DD.md) and when mode=update
it merges required changes into that same single report rather than emitting
multiple top-level files; ensure any mutations to list-of-tests.md and
regression-suite.md are represented as sections/patches inside the single
audit-report file (or as apply-instructions within it) so the command emits only
one document; update the command documentation and usage text in commands/qa.md
to describe the two modes and the single-file output behavior and reference the
functions/process that perform the merge/update.

---

Nitpick comments:
In `@commands/qa.md`:
- Around line 133-145: The AskUserQuestion invocation currently appears under
PROCESS/CONSTRAINTS in Step 7 (the "Run tests" flow) but must be relocated to a
dedicated # INTERACTION section; create an # INTERACTION header in
commands/qa.md and move the AskUserQuestion prompt and options (the Ready to run
N tests... and choices A/B/C, and the wait-for-confirmation step) into that
section, removing it from PROCESS/CONSTRAINTS, and apply the same relocation for
the other occurrence noted around lines 218-225 so all AskUserQuestion uses live
only under # INTERACTION.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 52d67e6a-4201-4bed-b76f-20e9efc84c25

📥 Commits

Reviewing files that changed from the base of the PR and between d0b1f79 and 191a9b2.

📒 Files selected for processing (2)
  • commands/hire.md
  • commands/qa.md
✅ Files skipped from review due to trivial changes (1)
  • commands/hire.md

Comment thread commands/qa.md Outdated
Comment thread commands/qa.md Outdated

# TASK

Perform a full QA audit for the target spec(s). Check existing tests for health (missing, stale, deprecated), identify gaps against spec acceptance criteria, generate missing tests, offer to run the suite, and produce an audit report in `context/qa/audit-reports/`.

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.

Check existing tests for health (missing, stale, deprecated)

For big codebase and after AWOS update it could trigger quite heavy task. Better to scope it somehow.

Comment thread commands/qa.md Outdated
# INPUTS & OUTPUTS

- **User Prompt (Optional):** <user_prompt>$ARGUMENTS</user_prompt>
- Empty = audit all specs

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.

  1. After AWOS update it could trigger quite heavy task.
  2. All specs != all code base (if AWOS wasn't used for all tasks or was added to project midterm), so it could make gaps in tests coverage anyway.

I would suggest to always scope to one spec, if not provided - ask user for the scope. Only if user explicitly asked for the whole project - run for the whole project.

Comment thread commands/qa.md Outdated
## Step 2: Discover frameworks

1. Read `context/product/architecture.md` for declared testing stack per layer.
2. Fall back to auto-detection via dependency files: `package.json`, `requirements.txt`, `go.mod`, `Gemfile`, `pyproject.toml`, `pom.xml`.

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.

I agree with concern but let me add few facts here as well:

package.json, requirements.txt, go.mod, Gemfile, pyproject.toml, pom.xml

won't provide the full architecture - they usually provide information only about the main language or repo. Also they may be placed in folders/subfolders and CC may miss them. Or it could be one "BUILD" file orchestrating big monorepo.

We can't rely on CI files as well, because repos may don't have CI at all, have it partial or have CI configured in a separate CI server.

Therefore I would rather fail if context/product/architecture.md is absent and don't try to provide unclear quality of tests for projects without required AWOS artifacts.

Comment thread commands/qa.md Outdated

- Does the `@spec` annotation reference a spec directory that still exists?
- YES → OK.
- Spec directory deleted →

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.

Let me note that

codebase and existing tests are the source of truth

is not the optimal solution because of tokens usage and quality overheads. We may mitigate this but fundamentally index of tests is more efficient. If it is up-to-date.

While we should handle absence of specs gently, because it could happen with:

  • AWOS was added to repo midterm;
  • Specs were archived/outdated (AWOS doesn't have such feature yet, but competitors do);
  • Not all tests could be added in scope of spec of with AWOS participation at all.

TL;DR: managing of tests is a separate feature which requires careful design. I would rather split it into separate PR.

Comment thread commands/qa.md Outdated

For each acceptance criterion in the functional spec(s) in scope:

1. Check which pyramid layers have coverage (unit / integration / e2e / contract).

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.

"React component test" it is unit test (when component doesn't interact with other services directly, which is a bad design). Please look at https://martinfowler.com/articles/practical-test-pyramid.html

So I would agree with the current layers.

Comment thread commands/qa.md Outdated
**Staleness check:**

- Does the test logic match the current implementation?
- Read the test file and the relevant implementation code.

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.

Weak metrics. Consider to use some code coverage metrics instead.

Comment thread commands/qa.md Outdated

## Step 7: Run tests (with user confirmation)

1. Count all tests in scope. Use `AskUserQuestion` with the following question and options:

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.

(nit) I would rather ask LLM to decide (basing on current spec/code changes) - interrupting user is much longer and usually provides the same quality of decision nowadays.

Comment thread commands/qa.md Outdated

---

# TODO

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.

LLM would read this section as context like any other section. So mentioning future work here just dilutes context. Please remove or put into supported by CC <!-- TODO: ... --> comments.

Comment thread commands/qa.md Outdated

- Never modify production code.
- Never auto-deprecate tests whose spec was deleted — always flag for human review.
- Always ask for user confirmation before running tests (use `AskUserQuestion`).

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.

Why we need to bother user for a few seconds background task?

Comment thread commands/qa.md Outdated

# CONSTRAINTS

- Never modify production code.

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.

Not agree. Tests allows to find bad design patterns and I time to time change production code after trying to cover it with tests without good results.

The command had no active Claude Code wrapper and its functionality
is covered by two dedicated commands:
- testing-expert agent (proactive test writing via /awos:tasks)
- /awos:regression (regression suite management, PR #114)

Retroactive staleness/gap auditing can be revisited as a plugin
if needed in the future.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@FlySpot

FlySpot commented May 25, 2026

Copy link
Copy Markdown
Collaborator Author

Update: commands/qa.md has been removed (commit 5245b66)

After reviewing all the feedback on this file and mapping it against the broader command set, we concluded that commands/qa.md had no clear place in the current architecture:

  • It had no active Claude Code wrapper (the /awos:qa slash command was already removed earlier in this PR)
  • Its proactive test writing functionality is fully covered by testing-expert (called from the Feature Testing & Regression slice in /awos:tasks)
  • Its regression suite management (Step 8) is covered by /awos:regression (PR Draft: feat: add /awos:regression command #114)
  • The remaining unique value (retroactive staleness/gap auditing across all specs) is a valid use case but belongs in a dedicated plugin, not in the core command set

This makes most of the open comments on commands/qa.md moot. Thank you @dustyo-O and @AlexanderMakarov for the thorough review — the feedback directly informed this decision.

FlySpot and others added 4 commits May 25, 2026 18:57
…n and testing slice

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- commands/tasks.md: adopt main's simplified prose + preserve Feature
  Testing & Regression slice, --no-tests flag, cleanup sub-tasks, and
  artifact-deletion rule
- commands/verify.md: adopt main's INTERACTION section alongside our
  CONSTRAINTS section
- src/CLAUDE.md: adopt main's preserveOnUpdate column + our agents row
- tests/lint-prompts.test.js: strip HTML comments before scanning for
  /awos:* references so TODO-gated regression reference doesn't fail
  the cross-reference lint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- hire.md line 109: playwright MCP → playwright CLI (matches line 116
  and global CLAUDE.md rule; MCP vs CLI was a contradiction)
- hire.md line 120: complete the Terraform/IaC entry — was truncated
  with no agent reference
- tasks.md example: replace "chrome MCP" with playwright-cli phrasing
  (legacy example text, inconsistent with playwright-cli convention)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread commands/hire.md Outdated

- React / Vue / Angular → + `playwright` CLI for E2E
- FastAPI / Django / Flask → + `pytest-best-practices` skill _(if not in registry, `testing-expert` covers it)_
- Other Python backends → + `pytest-best-practices` skill _(if not in registry, `testing-expert` covers it)_

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.

(nit) We may merge two lines above together. Not fixed from previous review.

Comment thread commands/hire.md Outdated
- FastAPI / Django / Flask → + `pytest-best-practices` skill _(if not in registry, `testing-expert` covers it)_
- Other Python backends → + `pytest-best-practices` skill _(if not in registry, `testing-expert` covers it)_
- TypeScript / Node backend → (no additional skill needed)
- Terraform / IaC → search for an infra-validation agent _(if not in registry, `testing-expert` covers plan/output validation)_

@AlexanderMakarov AlexanderMakarov May 26, 2026

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.

for an infra-validation agent

Why "infra-validation" here without backticks formatting as other agents above? Actually I can't find such agent in AWOS-recruitment, so probably better to explain agent in some common words without using kebab case (to match future agents), i.e. "infra-validation" -> "technology specific or dedicated infrastructure validation agent".

Comment thread commands/tasks.md Outdated

1. Analyze `<user_prompt>`. If it clearly references a spec by name or index, identify the corresponding directory in `context/spec/`.
2. If the prompt is empty or ambiguous, list the spec directories that contain both `functional-spec.md` and `technical-considerations.md` and ask the user to choose. Do not proceed until a valid spec is selected.
1. **Detect `--no-tests` flag:** Before anything else, check whether the `<user_prompt>` contains `skip tests` or `--no-tests` (case-insensitive). If found, set an internal flag `SKIP_TESTS = true`. This flag suppresses all verification sub-tasks inside slices and omits the Feature Testing & Regression slice entirely. Strip the flag from the prompt before spec identification.

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.

Detect --no-tests flag: Before anything else, check whether the <user_prompt> contains skip tests or --no-tests (case-insensitive). If found, set an internal flag SKIP_TESTS = true.

I would propose to don't shape it as a flag. Because it may fail on human's wording - i.e. with "don't generate qa stuff now" phrase would probably be not detected here as "--no-tests flag" while I may bet that user wanted exactly this.

Like:

Suggested change
1. **Detect `--no-tests` flag:** Before anything else, check whether the `<user_prompt>` contains `skip tests` or `--no-tests` (case-insensitive). If found, set an internal flag `SKIP_TESTS = true`. This flag suppresses all verification sub-tasks inside slices and omits the Feature Testing & Regression slice entirely. Strip the flag from the prompt before spec identification.
1. If `<user_prompt>` explicitly mentions that tests are not expected then skip all verification sub-tasks inside slices and omits the Feature Testing & Regression slice entirely.

Comment thread commands/tasks.md Outdated
- Check that the project has the MCPs, services, and dependencies needed for testing each slice. If something is missing, instruct the user to install it.
- If a slice cannot be tested, explain why and get user approval before proceeding.
- A slice is not complete unless it is tested or the user has explicitly approved skipping the test.
- After a slice is verified and marked complete, **delete all temporary artifacts** generated during that slice's verification — screenshots, recorded videos, generated e2e test scripts, and any other ephemeral files produced by the e2e-tester or browser MCP. Exception: do **not** delete artifacts from the **Feature Testing & Regression** slice — those are intentionally kept for the regression suite.

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.

e2e-tester

What it is?

Comment thread src/config/setup-config.js Outdated
Comment on lines +69 to +74
{
source: 'plugins/awos/agents',
destination: '.claude/agents',
patterns: ['*'],
description: 'AWOS agents',
},

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.

.claude/agents/ is the user's customization area. This copy operation has no preserveOnUpdate: true, so every npx @provectusinc/awos will silently clobber any user agent file whose name collides with an AWOS-shipped one. Same UX bug PR #121 just fixed for .claude/commands/awos/.

So please don't ship agents through the installer at all — per https://provectus.slack.com/archives/C09GCR80NC8/p1779723615299239?thread_ts=1778491156.726109&cid=C09GCR80NC8 testing-expert is to be hired from awos-recruitment, which contradicts this copy op.

Comment thread commands/hire.md Outdated
Comment on lines +108 to +110
Also: if the tech stack includes any frontend framework (React, Vue, Angular,
Svelte, etc.), always include `playwright` CLI in the proposal — it enables
browser-based E2E testing via the testing-expert agent.

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.

Hardcoding playwright CLI for every frontend stack contradicts the search-first principle stated a few lines below (line 113: "search the registry for a technology-specific testing agent"). Cypress, WebdriverIO, Vitest-browser, Storybook test-runner all exist and may be a better fit per project.

Same anti-hardcoding concern as commands/verify.md line 40. The bullet at line 116 (React / Vue / Angular → + playwright CLI for E2E) repeats the same hardcoding.

Comment thread commands/hire.md Outdated
Comment on lines +99 to +114
**QA Complement Rule:**
After searching for each primary tech agent, also search for a complementary
testing agent. Use the query: "[primary technology] testing QA acceptance".

If `testing-expert` is returned from the registry, always include it in the
proposals table with label "(Recommended for QA coverage)" alongside the
primary tech agent — unless a more specific testing agent (e.g. `react-testing`,
`rust-tester`) is also found, in which case prefer the specific one.

Also: if the tech stack includes any frontend framework (React, Vue, Angular,
Svelte, etc.), always include `playwright` CLI in the proposal — it enables
browser-based E2E testing via the testing-expert agent.

Complementary pairs reference:
For each stack, search the registry for a technology-specific testing agent.
If none found, fall back to `testing-expert`.

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.

Two paragraphs cover the same testing-expert fallback logic with conflicting defaults:

  • Lines 99-106 (QA Complement Rule): "always include testing-expert in proposals … unless a more specific testing agent is also found."
  • Lines 112-114 (Complementary pairs reference): "search the registry for a technology-specific testing agent. If none found, fall back to testing-expert."

First frames testing-expert as always-include-with-caveat, the second as search-first-with-fallback. Both rules currently apply → ambiguous behavior. Pick one framing and remove the other.

Comment thread commands/tasks.md Outdated
- `[ ] **Slice 3: Feature Testing & Regression**`
- `> Verifies the complete feature works end-to-end as described in functional-spec.md.`
- `> Run AFTER all implementation slices are complete.`
- `> **Requires \`testing-expert\` agent.\*\* If it is not present in \`.claude/agents/\`, stop and run \`/awos:hire\` before executing this slice.`

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.

Markdown escape artifacts. The \*\* and backslash-escaped backticks look unintentional — likely from copying the template at line 98 (which renders fine) into this example with extra escaping. Compare to template:

> **Requires `testing-expert` agent.** If it is not present in `.claude/agents/`

The example line will render with literal \*\* instead of bold.

BTW a good place to use XML tags.

Comment thread commands/tasks.md Outdated
**If `SKIP_TESTS = false`**, after the verification sub-task, add a cleanup sub-task as the last item of the slice:

```md
- [ ] Cleanup: Delete any screenshots, videos, or e2e scripts generated during this slice's verification. **[Agent: general-purpose]**

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.

(nit) [Agent: general-purpose] for the cleanup step — rm of known-named artifacts is a one-line shell command. SDD-07 audit dimension flags "majority of implementation tasks use general-purpose" as a warn condition; cleanup sub-tasks add to that count without adding decision value. Two options:

  • Inline the rm into the Verify step (no separate sub-task).
  • Exempt cleanup sub-tasks from the SDD-07 count, and document that exemption in plugins/awos/skills/ai-readiness-audit/dimensions/spec-driven-development.md.

Comment thread templates/qa-context-template.md Outdated
@@ -0,0 +1,11 @@
# Test Registry

> Auto-maintained by `testing-expert` agent (called from the Feature Testing & Regression slice).

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.

Future-debt note: this template ships, but the contract for keeping it in sync with the real codebase is informal (just "auto-maintained by testing-expert"). It is just not used in this repo.

The same concerns raised in the now-deleted commands/qa.md threads (registry staleness, merge-conflict hotspots) apply here.

Consider to move it into provectus/awos-recruitment#60 entirely or into future PR-s.

Comment thread commands/tasks.md Outdated
> Verifies the complete feature works end-to-end as described in functional-spec.md.
> Run AFTER all implementation slices are complete.
> **Requires `testing-expert` agent.** If it is not present in `.claude/agents/`,
> stop and run `/awos:hire` before executing this slice.

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.

This would cause interruption for /awos:implement command while we may catch absence of testing-expert just here and form request to user with 3 options:

  1. Install agent,
  2. Skip slice with tests.
  3. Add slice but without guarantees for quality (BTW not sure it is possible at all).

Aleksandr Makarov added 3 commits May 27, 2026 18:05
… search-first model

Merges main (#126, #127, #129) into the branch and replaces the hard
`testing-expert` dependency with a search-first, registry-driven QA agent
selection. Addresses the round-2 reviewer feedback on PR #109.

Code changes

- commands/tasks.md
  - Step 1.3 detects test-skip intent via natural language, not a literal
    flag substring (avoids false-positives like "don't skip tests").
  - Step 3a: new dedicated step that searches the Agent tool's
    description block for a QA-coded subagent, falls back to
    testing-expert / general-purpose, and uses AskUserQuestion to offer
    a 3-option fallback (hire, generate-with-general-purpose, skip).
    Replaces the prior "Requires testing-expert" hard gate.
  - Inlines verification-artifact cleanup into each Verify task instead
    of emitting a separate Cleanup task with [Agent: general-purpose]
    (which would inflate SDD-07's general-purpose-task count).
  - Drops references to a phantom "e2e-tester" agent and to a
    hardcoded `playwright-cli` runner in the example.
  - Persists the skip-tests decision as a top-of-file
    `<!-- skip-tests: true -->` marker for /awos:verify to detect.

- commands/hire.md
  - Rewrites the QA Complement Rule as a single search-first rule with
    an explicit "do not hardcode tool names or runners" note.
  - Drops the always-include-testing-expert and always-include-playwright
    mandates, the duplicate "Other Python backends" bullet, and the
    bare "infra-validation" agent reference.

- commands/verify.md
  - CONSTRAINTS reframed: /awos:verify is a look-and-feel + spec-
    freshness check, not a test runner. Test suites live in the
    Feature Testing & Regression slice produced by /awos:tasks.
  - Honours the `<!-- skip-tests: true -->` marker — look-and-feel
    walk-through only when the spec opted out of test generation.
  - Drops the "browser MCP → curl/shell → AskUserQuestion" hardcoded
    fallback ladder; tool choice is by fit + wall-clock time.

- src/config/setup-config.js + src/CLAUDE.md
  - Removes the `plugins/awos/agents` → `.claude/agents` copy
    operation. `.claude/agents/` is the user's customization area and
    must not be silently overwritten on update.

- templates/qa-context-template.md
  - Deleted. The template was unused inside this repo; the
    testing-expert agent that would populate it lives in
    awos-recruitment, where the template can ship alongside if
    desired.

- plugins/awos/skills/ai-readiness-audit/dimensions/spec-driven-development.md
  - SDD-07 recognizes both the new (Feature Testing & Regression final
    slice) and legacy (per-slice Verify-task) QA coverage models.
    Pass criteria broadened to accept any QA-coded agent, not just
    testing-expert.

- CLAUDE.md
  - Adds a "do not hard-wrap markdown prose at 80 columns" rule under
    Editing Prompts, capturing the long-standing local convention.

Tests

- tests/lint-prompts.test.js
  - New contract tests: Feature Testing & Regression slice marker is
    present; tasks.md uses a search-first QA selection and does not
    hard-require testing-expert; the `<!-- skip-tests: true -->`
    marker shape is locked; verify.md acknowledges skip-tests and
    drops the hardcoded tool ladder; hire.md QA Complement Rule has
    no "always include" mandates; setup-config never targets
    `.claude/agents/`; qa-context-template.md does not exist; SDD-07
    recognizes the dual-model coverage.

All three test layers + prettier are green (78 tests across 8 files).
Two cleanups to the emitted slice, from testing the branch on a real spec:

- Collapse the three blockquote note lines into one description. The
  "QA agent for this slice: `{agent}` (selected from .claude/agents/ and
  the Agent tool's description block)" line leaked the internal selection
  rationale into the generated artifact — the `**[Agent: ...]**` markers
  already say who runs the slice.
- Drop the `<!-- TODO: enable when feat/regression merges -->` block.
  Its trigger lives in a different repo (the feat/regression PR), so it
  can't be tracked from here and just sits as dead commentary in every
  user's tasks.md. The `/awos:regression` wiring belongs in PR #114,
  which owns that command.
…ots/

Reframing /awos:verify as "look-and-feel" wasn't enough — on a UI-heavy
spec the agent satisfied it with in-process component tests (NiceGUI
test-client / pytest) and never rendered the UI, so no visual evidence
was produced.

- Visual/UI acceptance criteria now MUST be verified by driving the
  actual running UI through the project's browser-automation tool
  (Playwright MCP/CLI, Cypress, chrome MCP, …). A passing component or
  test-client test confirms logic, not look-and-feel, and no longer
  counts as evidence for a visual criterion. Non-visual criteria keep
  the pick-by-fit freedom.
- Screenshots are saved to `docs/screenshots/` — the same evidence
  folder the testing-expert agent (awos-recruitment) writes E2E captures
  to — named `<spec-directory>-<state>.png` so they sort by spec. The
  browser tool creates the folder on first write; verify does NOT edit
  .gitignore (git-ignoring docs/screenshots/ is one-time project setup),
  matching testing-expert's scope guarantee. The report lists the paths.
- skip-tests still suppresses test suites but not look-and-feel.
Comment thread commands/tasks.md Outdated
Comment on lines +96 to +99
> Verifies the complete feature works end-to-end as described in functional-spec.md.
> Run AFTER all implementation slices are complete.
> **Requires `testing-expert` agent.** If it is not present in `.claude/agents/`,
> stop and run `/awos:hire` before executing this slice.

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.

These > note lines leak meta-instructions into the artifact. Testing this branch on a real spec, the rendered slice carried a > QA agent for this slice: testing-expert (selected from .claude/agents/ and the Agent tool's description block) line — the agent-selection rationale ended up in the user's file. Recommend collapsing to a single one-line description (matching how every other slice has one > description) and dropping the selection note — the **[Agent: ...]** markers already state who runs the slice. The > **Requires testing-expert** … run /awos:hire gate is likewise superseded by the search-first QA-agent selection.

Comment thread commands/tasks.md Outdated
Comment on lines +108 to +114
<!-- TODO: enable when feat/regression merges
- [ ] Run `/awos:regression [spec-directory-name]` to review candidates for the
regression suite, resolve duplicates, and optionally execute the full
regression suite. Pass the current spec directory name as the argument
(e.g., `/awos:regression 003-user-avatar`). Do not run without an argument —
auto-detection requires all tasks to be complete, which is not yet the case.
-->

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.

Better to drop this <!-- TODO: enable when feat/regression merges --> block. Its trigger lives in a different PR (#114) in this repo, so it can't be tracked from a generated tasks.md sitting in a user's project — it just ships as dead commentary in every user's file. Let PR #114, which owns /awos:regression, add the call to this slice when it lands. The duplicate block in the example below (~line 145) should go too.

Comment thread commands/verify.md Outdated
Comment on lines +40 to +41
- **Verification tool fallback order:** browser MCP → curl/shell → AskUserQuestion to skip.
If browser MCP is unavailable, try curl or shell commands. Only ask to skip as a last resort.

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.

(found this verifying a real UI-heavy spec) Even with browser-MCP listed first, /awos:verify produced no visual verification and no screenshots. On an already-implemented (Status: Completed) spec the agent took the fastest-evidence path — ran the existing pytest/component suite and read the code — and never rendered the UI. NiceGUI / React-Testing-Library (in my case) test-client tests confirm logic, not look-and-feel, so the run passed with zero rendered-pixel evidence.

Two gaps:

  1. Nothing forces real rendering for UI/visual acceptance criteria — in-process component tests are accepted as sufficient. For look-and-feel this is not enough - the actual UI must be visible to a human.
  2. No screenshots are captured or retained, so a human can't review the look-and-feel afterward.

Suggest aligning with the testing-expert agent (awos-recruitment): it already writes E2E captures to docs/screenshots/ and treats git-ignoring that folder as one-time project setup (it never edits .gitignore). /awos:verify should (a) require driving the real UI for visual ACs — component tests don't count, (b) save screenshots to that same docs/screenshots/ folder, named per-spec so they sort by spec, and (c) reference the paths in its report. Reuse testing-expert's folder + no-.gitignore-edit convention rather than inventing a new evidence location.

@AlexanderMakarov

Copy link
Copy Markdown
Contributor

@kmakarychev-dev, @workshur, @FlySpot - please note that https://github.com/provectus/awos-qa/pull/10 adds 2 new e2e tests specifically for this functionality (see "INSTRUCTIONS.md" files for the checks they do), could be executed with something like bun run e2e:run tasks-emits-feature-testing-regression-slice ; bun run e2e:run tasks-honors-skip-tests-intent.

@workshur workshur added the patch label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants