fix: remove deprecated agent type references from hooks and settings #128

Merged
forgejo_admin merged 1 commit from 126-clean-deprecated-agent-refs into main 2026-03-18 18:27:35 +00:00
Contributor

Summary

Remove dead code references to 6 deprecated agent types (dev-backend, dev-frontend, devops, dev-qa, frontend-qa, devops-qa) from hooks and settings. These types were deprecated in Phase 12 and their schema entries already removed in PR #125.

Changes

  • hooks/inject-subagent-context.sh -- removed 6 case branches for deprecated agent types (18 lines of dead code). Remaining branches: qa, dev, general-purpose|dottie, and * wildcard.
  • settings.json -- removed 6 deprecated types from the SubagentStart matcher on line 232. Remaining matcher: qa|dev|general-purpose|dottie|penny.

Test Plan

  • All current agent types (dev, qa, dottie, general-purpose) produce correct context output
  • Deprecated agent types fall through to * wildcard and exit cleanly (exit 0, no output)
  • settings.json validates as correct JSON
  • grep for deprecated type names in hooks/settings returns zero matches
  • Manual: spawn each current agent type in a live session

Review Checklist

  • Only deprecated references removed, no restructuring
  • Existing agent types unaffected
  • No unrelated changes
  • Plan: plan-pal-e-agency (traceability)
  • Forgejo issue: #126
  • Closes #126
  • PR #125: schema cleanup that surfaced this
## Summary Remove dead code references to 6 deprecated agent types (`dev-backend`, `dev-frontend`, `devops`, `dev-qa`, `frontend-qa`, `devops-qa`) from hooks and settings. These types were deprecated in Phase 12 and their schema entries already removed in PR #125. ## Changes - `hooks/inject-subagent-context.sh` -- removed 6 case branches for deprecated agent types (18 lines of dead code). Remaining branches: `qa`, `dev`, `general-purpose|dottie`, and `*` wildcard. - `settings.json` -- removed 6 deprecated types from the SubagentStart matcher on line 232. Remaining matcher: `qa|dev|general-purpose|dottie|penny`. ## Test Plan - [x] All current agent types (`dev`, `qa`, `dottie`, `general-purpose`) produce correct context output - [x] Deprecated agent types fall through to `*` wildcard and exit cleanly (exit 0, no output) - [x] `settings.json` validates as correct JSON - [x] `grep` for deprecated type names in hooks/settings returns zero matches - [ ] Manual: spawn each current agent type in a live session ## Review Checklist - [x] Only deprecated references removed, no restructuring - [x] Existing agent types unaffected - [x] No unrelated changes ## Related - Plan: `plan-pal-e-agency` (traceability) - Forgejo issue: #126 - Closes #126 - PR #125: schema cleanup that surfaced this
Remove case branches for dev-backend, dev-frontend, devops, dev-qa,
frontend-qa, and devops-qa from inject-subagent-context.sh and the
SubagentStart matcher in settings.json. These agent types were
deprecated in Phase 12 and their schema entries removed in PR #125.

Closes #126

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

Self-Review: PASS

Diff: 2 files, +1 -19 (pure deletion)

inject-subagent-context.sh: Removed 6 deprecated case branches (frontend-qa, dev-qa, devops-qa, dev-backend, dev-frontend, devops). Remaining branches (qa, dev, general-purpose|dottie, *) are correct and tested.

settings.json: Removed 6 deprecated types from SubagentStart matcher. Remaining matcher qa|dev|general-purpose|dottie|penny covers all current agent types.

Verified:

  • All current agent types produce correct context output (tested via stdin)
  • Deprecated types fall through to * wildcard cleanly
  • JSON validates
  • No deprecated type names remain in hooks or settings
  • No unrelated changes, no restructuring

Verdict: approve -- ready for human review.

## Self-Review: PASS **Diff:** 2 files, +1 -19 (pure deletion) **inject-subagent-context.sh:** Removed 6 deprecated case branches (`frontend-qa`, `dev-qa`, `devops-qa`, `dev-backend`, `dev-frontend`, `devops`). Remaining branches (`qa`, `dev`, `general-purpose|dottie`, `*`) are correct and tested. **settings.json:** Removed 6 deprecated types from SubagentStart matcher. Remaining matcher `qa|dev|general-purpose|dottie|penny` covers all current agent types. **Verified:** - All current agent types produce correct context output (tested via stdin) - Deprecated types fall through to `*` wildcard cleanly - JSON validates - No deprecated type names remain in hooks or settings - No unrelated changes, no restructuring Verdict: **approve** -- ready for human review.
Author
Contributor

PR #128 Review

DOMAIN REVIEW

Tech stack: Bash (shell hooks) + JSON (settings config). This is agent infrastructure -- hooks that inject context into Claude Code subagents.

Shell quality:

  • The remaining case branches (qa, dev, general-purpose|dottie, *) are clean and consistent.
  • The * wildcard fallback correctly exits 0 with no output, so deprecated types that somehow get spawned degrade gracefully.
  • set -euo pipefail is properly set. jq usage is correct.

JSON quality:

  • The updated matcher qa|dev|general-purpose|dottie|penny correctly reflects the 5 active agent types that have agent config files in agents/.

Observation (not introduced by this PR): penny is in the settings.json SubagentStart matcher but has no corresponding case branch in inject-subagent-context.sh. When penny spawns, the hook falls through to * and exits with no context injection. Penny's context comes from her agent frontmatter (agents/penny.md) instead, so this is not broken -- but it is an asymmetry worth tracking. This predates this PR (introduced in PR #121).

BLOCKERS

None. This is a pure dead-code removal with no new functionality.

  • No new functionality introduced, so no test coverage gap.
  • No user input handling changes.
  • No secrets or credentials.
  • No DRY violations -- the remaining branches are distinct per agent type.

NITS

  1. Stale .deprecated files: The agents/ directory still contains 6 .deprecated files (dev-backend.md.deprecated, dev-frontend.md.deprecated, devops.md.deprecated, frontend-qa.md.deprecated, dev-qa.md.deprecated, devops-qa.md.deprecated). These are outside the scope of this issue (which targets hooks/settings only), but could be tracked as follow-up cleanup.

  2. Penny/hook asymmetry: As noted above, penny is matched in settings.json but has no case branch in the hook. The hook fires but produces no output. Consider either adding a penny case branch or documenting that penny relies solely on frontmatter context. Again, pre-existing -- not introduced here.

SOP COMPLIANCE

  • Branch named after issue: 126-clean-deprecated-agent-refs references issue #126
  • PR body has Summary, Changes, Test Plan, Related sections
  • Related section references plan slug: plan-pal-e-agency
  • Related section references parent issue: #126, and predecessor PR #125
  • No secrets committed
  • No unrelated changes (scope is tight -- exactly 2 files, exactly the deprecated references)
  • Commit messages: PR title fix: remove deprecated agent type references from hooks and settings is descriptive and uses conventional commit format

PROCESS OBSERVATIONS

  • Change failure risk: LOW. This is pure subtraction -- 18 lines of dead code removed from the hook, 6 deprecated types removed from the matcher. No behavioral change for active agent types.
  • Deployment frequency: positive. Cleaning up dead code from PR #125's schema removal keeps the codebase honest. Two-PR cleanup sequence (schema first, then references) is a disciplined approach.
  • Documentation: The .deprecated files serve as a breadcrumb trail but could eventually be cleaned up in a separate issue.

VERDICT: APPROVED

## PR #128 Review ### DOMAIN REVIEW **Tech stack:** Bash (shell hooks) + JSON (settings config). This is agent infrastructure -- hooks that inject context into Claude Code subagents. **Shell quality:** - The remaining case branches (`qa`, `dev`, `general-purpose|dottie`, `*`) are clean and consistent. - The `*` wildcard fallback correctly exits 0 with no output, so deprecated types that somehow get spawned degrade gracefully. - `set -euo pipefail` is properly set. `jq` usage is correct. **JSON quality:** - The updated matcher `qa|dev|general-purpose|dottie|penny` correctly reflects the 5 active agent types that have agent config files in `agents/`. **Observation (not introduced by this PR):** `penny` is in the `settings.json` SubagentStart matcher but has no corresponding case branch in `inject-subagent-context.sh`. When penny spawns, the hook falls through to `*` and exits with no context injection. Penny's context comes from her agent frontmatter (`agents/penny.md`) instead, so this is not broken -- but it is an asymmetry worth tracking. This predates this PR (introduced in PR #121). ### BLOCKERS None. This is a pure dead-code removal with no new functionality. - No new functionality introduced, so no test coverage gap. - No user input handling changes. - No secrets or credentials. - No DRY violations -- the remaining branches are distinct per agent type. ### NITS 1. **Stale `.deprecated` files:** The `agents/` directory still contains 6 `.deprecated` files (`dev-backend.md.deprecated`, `dev-frontend.md.deprecated`, `devops.md.deprecated`, `frontend-qa.md.deprecated`, `dev-qa.md.deprecated`, `devops-qa.md.deprecated`). These are outside the scope of this issue (which targets hooks/settings only), but could be tracked as follow-up cleanup. 2. **Penny/hook asymmetry:** As noted above, `penny` is matched in `settings.json` but has no case branch in the hook. The hook fires but produces no output. Consider either adding a penny case branch or documenting that penny relies solely on frontmatter context. Again, pre-existing -- not introduced here. ### SOP COMPLIANCE - [x] Branch named after issue: `126-clean-deprecated-agent-refs` references issue #126 - [x] PR body has Summary, Changes, Test Plan, Related sections - [x] Related section references plan slug: `plan-pal-e-agency` - [x] Related section references parent issue: #126, and predecessor PR #125 - [x] No secrets committed - [x] No unrelated changes (scope is tight -- exactly 2 files, exactly the deprecated references) - [x] Commit messages: PR title `fix: remove deprecated agent type references from hooks and settings` is descriptive and uses conventional commit format ### PROCESS OBSERVATIONS - **Change failure risk: LOW.** This is pure subtraction -- 18 lines of dead code removed from the hook, 6 deprecated types removed from the matcher. No behavioral change for active agent types. - **Deployment frequency: positive.** Cleaning up dead code from PR #125's schema removal keeps the codebase honest. Two-PR cleanup sequence (schema first, then references) is a disciplined approach. - **Documentation:** The `.deprecated` files serve as a breadcrumb trail but could eventually be cleaned up in a separate issue. ### VERDICT: APPROVED
forgejo_admin deleted branch 126-clean-deprecated-agent-refs 2026-03-18 18:27:35 +00:00
Sign in to join this conversation.
No description provided.