refactor: consolidate 3+3 agent model back to enhanced Dev + QA #108

Merged
forgejo_admin merged 1 commit from 107-refactor-consolidate-3-3-agent-model-bac into main 2026-03-15 02:39:10 +00:00
Contributor

Summary

Consolidate the 3+3 specialized agent model (dev-backend, dev-frontend, devops, dev-qa, frontend-qa, devops-qa) back to a single enhanced Dev + single enhanced QA agent. Phase 12v L2 quality comparison proved domain QA agents missed generic blockers that the old generic QA caught, and execution specialization only adds value when it adds tools, not constraints.

Changes

  • agents/dev.md -- NEW enhanced Dev agent with all capabilities: Impeccable frontend design skills, tofu/OpenTofu enforcement for infra work, ruff enforcement for Python work, dynamic PR template (includes Design Decisions for frontend, tofu plan Output for infra)
  • agents/qa.md -- NEW enhanced QA agent with generic code quality checklist (DRY, tests, input validation, hardcoded values), explicit BLOCKER criteria, dynamic domain review section, process observations, structured output template
  • agents/dev-backend.md -> agents/dev-backend.md.deprecated
  • agents/dev-frontend.md -> agents/dev-frontend.md.deprecated
  • agents/devops.md -> agents/devops.md.deprecated
  • agents/dev-qa.md -> agents/dev-qa.md.deprecated
  • agents/frontend-qa.md -> agents/frontend-qa.md.deprecated
  • agents/devops-qa.md -> agents/devops-qa.md.deprecated
  • schemas/agent-spawn-requirements.json -- removed 6 specialized types, kept dev, qa, general-purpose, Explore, claude-code-guide
  • skills/review-pr/SKILL.md -- removed domain label routing (Steps 3-4), simplified to spawn qa directly

Test Plan

  • jq . schemas/agent-spawn-requirements.json validates
  • ls agents/*.md shows only: betty-sue.md, dev.md, dottie.md, qa.md
  • ls agents/*.deprecated shows 8 files (old dev, old qa, plus 6 specialized)
  • grep -l "frontend-design" agents/dev.md confirms Impeccable skills present
  • grep -l "tofu fmt" agents/dev.md confirms tofu enforcement present
  • grep -l "BLOCKER" agents/qa.md confirms severity calibration present
  • jq '.types | keys' schemas/agent-spawn-requirements.json shows dev, qa, general-purpose, Explore, claude-code-guide

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Closes #107
  • plan-pal-e-agency -- Phase 12v L2 finding
## Summary Consolidate the 3+3 specialized agent model (dev-backend, dev-frontend, devops, dev-qa, frontend-qa, devops-qa) back to a single enhanced Dev + single enhanced QA agent. Phase 12v L2 quality comparison proved domain QA agents missed generic blockers that the old generic QA caught, and execution specialization only adds value when it adds tools, not constraints. ## Changes - `agents/dev.md` -- NEW enhanced Dev agent with all capabilities: Impeccable frontend design skills, tofu/OpenTofu enforcement for infra work, ruff enforcement for Python work, dynamic PR template (includes Design Decisions for frontend, tofu plan Output for infra) - `agents/qa.md` -- NEW enhanced QA agent with generic code quality checklist (DRY, tests, input validation, hardcoded values), explicit BLOCKER criteria, dynamic domain review section, process observations, structured output template - `agents/dev-backend.md` -> `agents/dev-backend.md.deprecated` - `agents/dev-frontend.md` -> `agents/dev-frontend.md.deprecated` - `agents/devops.md` -> `agents/devops.md.deprecated` - `agents/dev-qa.md` -> `agents/dev-qa.md.deprecated` - `agents/frontend-qa.md` -> `agents/frontend-qa.md.deprecated` - `agents/devops-qa.md` -> `agents/devops-qa.md.deprecated` - `schemas/agent-spawn-requirements.json` -- removed 6 specialized types, kept dev, qa, general-purpose, Explore, claude-code-guide - `skills/review-pr/SKILL.md` -- removed domain label routing (Steps 3-4), simplified to spawn `qa` directly ## Test Plan - [x] `jq . schemas/agent-spawn-requirements.json` validates - [x] `ls agents/*.md` shows only: betty-sue.md, dev.md, dottie.md, qa.md - [x] `ls agents/*.deprecated` shows 8 files (old dev, old qa, plus 6 specialized) - [x] `grep -l "frontend-design" agents/dev.md` confirms Impeccable skills present - [x] `grep -l "tofu fmt" agents/dev.md` confirms tofu enforcement present - [x] `grep -l "BLOCKER" agents/qa.md` confirms severity calibration present - [x] `jq '.types | keys' schemas/agent-spawn-requirements.json` shows dev, qa, general-purpose, Explore, claude-code-guide ## Review Checklist - [x] Passed automated review-fix loop - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive ## Related - Closes #107 - `plan-pal-e-agency` -- Phase 12v L2 finding
Phase 12v L2 quality comparison proved domain QA agents missed generic
blockers (missing tests, DRY violations) that the old generic QA caught.
Consolidate back to one Dev agent with all capabilities (Impeccable
skills, tofu enforcement, ruff enforcement) and one QA agent with
generic code quality checks plus dynamic domain expertise.

- Create enhanced agents/dev.md with frontend design skills, infra
  enforcement, Python enforcement, and dynamic PR template
- Create enhanced agents/qa.md with BLOCKER criteria, domain review
  section, process observations, and generic code quality checklist
- Deprecate 6 specialized configs (dev-backend, dev-frontend, devops,
  dev-qa, frontend-qa, devops-qa)
- Simplify agent-spawn-requirements.json to dev + qa only
- Simplify review-pr SKILL.md to spawn qa directly (no domain routing)

Closes #107

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Contributor

PR #108 Review

DOMAIN REVIEW

This is a config/documentation refactor -- agent definition markdown files, a JSON schema, and a skill routing file. No executable code changes. Reviewed for completeness, correctness, and consistency.

1. agents/dev.md -- Enhanced Dev Agent

All required capabilities present:

  • Impeccable frontend skills: Section "Frontend Design Quality" lists all 7 slash commands (/frontend-design, /audit, /polish, /bolder, /colorize, /optimize, /critique) with viewport breakpoints (375/768/1280). Matches the old dev-frontend.md quality.
  • tofu enforcement: Section "Infrastructure Enforcement" has all 4 rules -- tofu not terraform, tofu fmt + tofu validate, tofu plan in PR body, secrets pipeline awareness.
  • ruff enforcement: Section "Python Enforcement" covers ruff format, ruff check, and running the test suite.
  • Dynamic PR template: Template includes conditional ## Design Decisions (frontend) and ## tofu plan Output (infra) sections with clear instructions to omit when not relevant.
  • Frontmatter: Clean -- name: dev, mcpServers: [forgejo], model: inherit, isolation: worktree. No unnecessary restrictions.
  • Constraints: Correct -- no pal-e-docs, no merge, no push to main, always run tests, always present PR link.
  • Label hooks documented: PostToolUse hook behavior for create_issue_and_branch and submit_pr correctly described.

2. agents/qa.md -- Enhanced QA Agent

All required capabilities present:

  • Generic code quality checklist: 7 items (DRY, test coverage, input validation, hardcoded values, error handling, naming, scope creep). Applied to every review.
  • Explicit BLOCKER criteria: 4 items clearly enumerated (zero test coverage, unvalidated user input, secrets in code, DRY in auth paths). Clear "NOT APPROVED" consequence.
  • Domain Review section: All three domain checklists present:
    • Python/FastAPI/SQLAlchemy: PEP, OWASP, SQLAlchemy patterns, FastAPI specifics, ruff.
    • SvelteKit/TypeScript/CSS: a11y, performance, responsive, UX, component arch, CSS quality.
    • Terraform/k8s/Salt/Helm: TF state safety, TF style, k8s security, ArgoCD, Salt, CNPG, secrets.
    • Multi-domain instruction: "If the code spans multiple domains, apply all relevant checklists."
  • SOP Compliance Checklist: 7 items covering branch naming, PR body, plan reference, tests, secrets, scope creep, commit messages.
  • PROCESS OBSERVATIONS: Present in the output template with DORA framing.
  • Frontmatter: Properly locked down -- disallowedTools: Write, Edit, Bash plus a PreToolUse hook on Write|Edit|Bash as belt-and-suspenders.
  • Label hooks documented: Verdict-based auto-labeling (status:approved / status:needs-fix) correctly described.

3. schemas/agent-spawn-requirements.json

  • Valid JSON (confirmed with jq).
  • Exactly 5 types: dev, qa, general-purpose, Explore, claude-code-guide. Matches spec.
  • All 6 specialized types (dev-frontend, dev-backend, devops, frontend-qa, dev-qa, devops-qa) removed.
  • Required patterns unchanged for remaining types.

4. skills/review-pr/SKILL.md

  • Old Steps 3-4 (domain label lookup + agent type mapping) removed.
  • New Step 4 spawns qa directly with the ~100 token pattern.
  • Spawn gate correctly updated: requires issue ref + PR ref (not plan ref -- plan is optional, which is correct for QA).
  • No reference to domain: labels remains.
  • Description updated from "Domain-Aware PR Review Router" to "PR Review Router".

5. Deprecated files

  • All 6 specialized configs renamed with .deprecated suffix.
  • R100 (100% similarity) -- pure renames, zero content modifications.

6. No regressions

  • agents/betty-sue.md: zero diff vs main. Untouched.
  • agents/dottie.md: zero diff vs main. Untouched.
  • No other files outside the 10 changed files are affected.

BLOCKERS

None.

NITS

  1. The old generic agents/dev.md and agents/qa.md that existed before the 3+3 split are not mentioned in the deprecation set. If they existed, they should also be .deprecated. Confirmed they did NOT exist on main -- so no issue here, just noting for clarity.

  2. Minor: the agents/*.md.deprecated files will clutter ls agents/ output. Consider whether a deprecated/ subdirectory would be cleaner for archival. Non-blocking -- current approach is fine and preserves git history.

SOP COMPLIANCE

  • Branch named after issue (107-refactor-consolidate-3-3-agent-model-bac)
  • PR body has: Summary, Changes, Test Plan, Related
  • Related references plan slug (plan-pal-e-agency)
  • Closes #107 present
  • No secrets committed
  • No unnecessary file changes -- all 10 changes are directly relevant
  • Commit messages are descriptive (per PR title)
  • Test plan includes concrete verification commands

PROCESS OBSERVATIONS

  • This consolidation reduces the agent type surface area from 9 spawn types to 5, which directly reduces Change Failure Rate risk -- fewer agent configs means fewer places for drift or misconfiguration.
  • The "trust the model to apply the right expertise" philosophy is well-reasoned based on the L2 finding that domain QA agents missed generic blockers. The generic-first, domain-dynamic approach is stronger.
  • The .deprecated suffix approach preserves rollback capability if the consolidation needs reverting.

VERDICT: APPROVED

## PR #108 Review ### DOMAIN REVIEW This is a config/documentation refactor -- agent definition markdown files, a JSON schema, and a skill routing file. No executable code changes. Reviewed for completeness, correctness, and consistency. **1. `agents/dev.md` -- Enhanced Dev Agent** All required capabilities present: - **Impeccable frontend skills**: Section "Frontend Design Quality" lists all 7 slash commands (`/frontend-design`, `/audit`, `/polish`, `/bolder`, `/colorize`, `/optimize`, `/critique`) with viewport breakpoints (375/768/1280). Matches the old `dev-frontend.md` quality. - **tofu enforcement**: Section "Infrastructure Enforcement" has all 4 rules -- `tofu` not `terraform`, `tofu fmt` + `tofu validate`, `tofu plan` in PR body, secrets pipeline awareness. - **ruff enforcement**: Section "Python Enforcement" covers `ruff format`, `ruff check`, and running the test suite. - **Dynamic PR template**: Template includes conditional `## Design Decisions` (frontend) and `## tofu plan Output` (infra) sections with clear instructions to omit when not relevant. - **Frontmatter**: Clean -- `name: dev`, `mcpServers: [forgejo]`, `model: inherit`, `isolation: worktree`. No unnecessary restrictions. - **Constraints**: Correct -- no pal-e-docs, no merge, no push to main, always run tests, always present PR link. - **Label hooks documented**: PostToolUse hook behavior for `create_issue_and_branch` and `submit_pr` correctly described. **2. `agents/qa.md` -- Enhanced QA Agent** All required capabilities present: - **Generic code quality checklist**: 7 items (DRY, test coverage, input validation, hardcoded values, error handling, naming, scope creep). Applied to every review. - **Explicit BLOCKER criteria**: 4 items clearly enumerated (zero test coverage, unvalidated user input, secrets in code, DRY in auth paths). Clear "NOT APPROVED" consequence. - **Domain Review section**: All three domain checklists present: - Python/FastAPI/SQLAlchemy: PEP, OWASP, SQLAlchemy patterns, FastAPI specifics, ruff. - SvelteKit/TypeScript/CSS: a11y, performance, responsive, UX, component arch, CSS quality. - Terraform/k8s/Salt/Helm: TF state safety, TF style, k8s security, ArgoCD, Salt, CNPG, secrets. - Multi-domain instruction: "If the code spans multiple domains, apply all relevant checklists." - **SOP Compliance Checklist**: 7 items covering branch naming, PR body, plan reference, tests, secrets, scope creep, commit messages. - **PROCESS OBSERVATIONS**: Present in the output template with DORA framing. - **Frontmatter**: Properly locked down -- `disallowedTools: Write, Edit, Bash` plus a PreToolUse hook on `Write|Edit|Bash` as belt-and-suspenders. - **Label hooks documented**: Verdict-based auto-labeling (`status:approved` / `status:needs-fix`) correctly described. **3. `schemas/agent-spawn-requirements.json`** - Valid JSON (confirmed with `jq`). - Exactly 5 types: `dev`, `qa`, `general-purpose`, `Explore`, `claude-code-guide`. Matches spec. - All 6 specialized types (`dev-frontend`, `dev-backend`, `devops`, `frontend-qa`, `dev-qa`, `devops-qa`) removed. - Required patterns unchanged for remaining types. **4. `skills/review-pr/SKILL.md`** - Old Steps 3-4 (domain label lookup + agent type mapping) removed. - New Step 4 spawns `qa` directly with the ~100 token pattern. - Spawn gate correctly updated: requires issue ref + PR ref (not plan ref -- plan is optional, which is correct for QA). - No reference to `domain:` labels remains. - Description updated from "Domain-Aware PR Review Router" to "PR Review Router". **5. Deprecated files** - All 6 specialized configs renamed with `.deprecated` suffix. - `R100` (100% similarity) -- pure renames, zero content modifications. **6. No regressions** - `agents/betty-sue.md`: zero diff vs main. Untouched. - `agents/dottie.md`: zero diff vs main. Untouched. - No other files outside the 10 changed files are affected. ### BLOCKERS None. ### NITS 1. The old generic `agents/dev.md` and `agents/qa.md` that existed before the 3+3 split are not mentioned in the deprecation set. If they existed, they should also be `.deprecated`. Confirmed they did NOT exist on `main` -- so no issue here, just noting for clarity. 2. Minor: the `agents/*.md.deprecated` files will clutter `ls agents/` output. Consider whether a `deprecated/` subdirectory would be cleaner for archival. Non-blocking -- current approach is fine and preserves git history. ### SOP COMPLIANCE - [x] Branch named after issue (`107-refactor-consolidate-3-3-agent-model-bac`) - [x] PR body has: Summary, Changes, Test Plan, Related - [x] Related references plan slug (`plan-pal-e-agency`) - [x] `Closes #107` present - [x] No secrets committed - [x] No unnecessary file changes -- all 10 changes are directly relevant - [x] Commit messages are descriptive (per PR title) - [x] Test plan includes concrete verification commands ### PROCESS OBSERVATIONS - This consolidation reduces the agent type surface area from 9 spawn types to 5, which directly reduces Change Failure Rate risk -- fewer agent configs means fewer places for drift or misconfiguration. - The "trust the model to apply the right expertise" philosophy is well-reasoned based on the L2 finding that domain QA agents missed generic blockers. The generic-first, domain-dynamic approach is stronger. - The `.deprecated` suffix approach preserves rollback capability if the consolidation needs reverting. ### VERDICT: APPROVED
forgejo_admin deleted branch 107-refactor-consolidate-3-3-agent-model-bac 2026-03-15 02:39:10 +00:00
Sign in to join this conversation.
No description provided.