AGENT SKILL

x-lib-verify-group

Build gate verification between parallelism groups. Compiles code, classifies errors, decides retry vs escalate, extracts outputs for next group. Used between each implementation group in Phase 2.

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
1

01 前言 Front Matter

name
x-lib-verify-group
description
Build gate verification between parallelism groups. Compiles code, classifies errors, decides retry vs escalate, extracts outputs for next group. Used between each implementation group in Phase 2.
allowed-tools
Bash, Read, Grep, Glob
user-invocable
false
requires-capabilities
[]

02 资源文件 1

03 SKILL.md 正文

Global Output Policy

  • Language: English ONLY.
  • Tone: Technical, Direct, and Concise.
  • Efficiency: Remove all conversational fillers and greetings to save tokens.

Skill: Group Verifier (Library)

Purpose

Runs between each parallelism group (G1-G7) during Phase 2 of the feature lifecycle. Compiles the code, classifies any errors, decides whether to retry or escalate, and extracts created file contents for the next group's dependency inputs.

When Called

Caller Skill Phase Context
x-implement-story Phase 2 After each group completes, BEFORE starting the next group
x-implement-task Implementation Inline build gate between layer groups

Inputs

Input Type Description
Group ID G1|G2|G3|G4|G5|G6|G7 The parallelism group to verify
Task outputs File list Files created/modified by tasks in the completed group

Procedure

Step 1 — Compile

{{COMPILE_COMMAND}}

Capture: exit code + stderr output.

For G7 (Tests group), use the full build command instead:

{{BUILD_COMMAND}}

Step 2 — Analyze

  • If exit code = 0 -> Go to STEP 5 (success)
  • If exit code != 0 -> Parse error output, go to STEP 3

Step 3 — Classify Errors

Classify errors based on the {{LANGUAGE}} compiler/interpreter output. The patterns below are common across languages — adapt to the specific error messages produced by your toolchain:

Error Category Classification Meaning
Missing type/symbol from a PREVIOUS group MISSING_DEPENDENCY Previous group regression
Missing type/symbol from the CURRENT group TASK_ERROR Current task produced bad code
Type mismatch / incompatible types TASK_ERROR Wrong types in current task
Missing package/module from previous group MISSING_DEPENDENCY Previous group incomplete
Missing external dependency BUILD_ERROR Missing dependency in build file
Interface/contract mismatch TASK_ERROR Implementation doesn't match port
Unhandled error/exception TASK_ERROR Missing error handling
Any other error UNKNOWN Needs investigation

Step 4 — Decide

Classification Attempt Action
TASK_ERROR 1st RETRY same tier, add error message to prompt
TASK_ERROR 2nd RETRY same tier, add both errors to prompt
TASK_ERROR 3rd ESCALATE to next tier (Junior->Mid, Mid->Senior)
MISSING_DEPENDENCY any HALT pipeline, flag previous group regression
BUILD_ERROR any HALT pipeline, report missing dependency
UNKNOWN 1st ESCALATE immediately to next tier
UNKNOWN 2nd HALT pipeline, flag for manual intervention

Escalation path: Junior -> Mid -> Senior -> Manual intervention

When retrying a task:

  1. Re-read the output from the failed attempt
  2. Add to the retry prompt: ## COMPILATION ERROR\n{error message}\n## FIX INSTRUCTIONS\nThe previous attempt produced this error. Fix it.
  3. Re-launch with the same tier (or escalated tier)

Step 5 — Extract Outputs

For each task in the completed group:

  1. Read all files listed in task.files_created
  2. Read all files listed in task.files_modified
  3. Store content for use as dependency inputs in subsequent groups

Step 6 — Commit

After successful compilation:

git add {all files from this group}
git commit -m "{group commit message}"

Group commit messages follow Conventional Commits format (see rules/06-git-conventions.md for scopes):

feat({scope}): add {group description} for STORY-ID

Derive the {scope} from the architecture layer being committed. The scopes table in rules/06-git-conventions.md defines the valid scopes for your project. Example pattern:

  • G1: feat(domain): add foundation models and migration for STORY-ID
  • G2: feat(domain): add ports, DTOs, and engine for STORY-ID
  • G3-G5: Use the scope matching the adapter layer (e.g., persistence, api, config)
  • G6: feat(observability): add tracing and metrics for STORY-ID
  • G7: test: add tests for STORY-ID

Step 7 — Report

Group G{N} verified: {PASS|FAIL}
  Tasks: {N} completed, {N} retried, {N} escalated
  Files: {N} created, {N} modified
  Warnings: {N}
  {If escalation: "ESCALATION: T{X} from {tier} -> {next_tier} (reason: {error})"}

G7 Extended Verification

G7 uses {{BUILD_COMMAND}} instead of {{COMPILE_COMMAND}}:

Additional checks:

  1. Parse test results from build reports
  2. Count: tests, failures, errors, skipped
  3. Parse coverage report
  4. Verify: line coverage >= 95%, branch coverage >= 90%

If tests fail:

  • Classify failing tests by the task that created them
  • Retry the test task with the failure message
  • If test depends on production code from another task, check production code first

Error Handling

Scenario Action
Compilation fails with TASK_ERROR (1st attempt) Retry same tier with error message in prompt
Compilation fails with TASK_ERROR (2nd attempt) Retry same tier with both errors in prompt
Compilation fails with TASK_ERROR (3rd attempt) Escalate to next tier (Junior -> Mid -> Senior)
MISSING_DEPENDENCY detected Halt pipeline, flag previous group regression
BUILD_ERROR (missing external dependency) Halt pipeline, report missing dependency in build file
UNKNOWN error (1st attempt) Escalate immediately to next tier
UNKNOWN error (2nd attempt) Halt pipeline, flag for manual intervention
Senior-tier escalation exhausted Halt pipeline, flag for manual intervention

Integration Notes

Skill Relationship Context
x-implement-story called-by Invoked during Phase 2 after each group
x-implement-task called-by Build gate between layer groups during implementation
  • Uses {{COMPILE_COMMAND}} for G1-G6, {{BUILD_COMMAND}} for G7
  • Produces atomic commits per group (rollback points)

04 同仓库更多 Skills

review-bench
review-bench/edercnj_ia-dev-environment

x-parallel-eval

Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan / x-story-plan, applies the parallelism-heuristics knowledge pack (hard / regen / soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

parallelism-heuristics

Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard / regen / soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-watch-pr-ci

Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-validate-docs

Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared/auto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-system-architecture

Incrementally updates docs/architecture/system.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component/integration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-architecture

Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.

★ 0