speckit-agent-assign-validate
Validate that all agent assignments are correct and agents exist
- License 许可
- MIT
- 最近更新
- 2026-09-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- speckit-agent-assign-validate
- metadata
- { "author": "github-spec-kit", "source": "agent-assign:commands/validate.md" }
- description
- Validate that all agent assignments are correct and agents exist
- compatibility
- Requires spec-kit project structure with .specify/ directory
03 SKILL.md 正文
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Pre-Execution Checks
Check for extension hooks (before validation):
- Check if
.specify/extensions.ymlexists in the project root. - If it exists, read it and look for entries under the
hooks.before_implementkey - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
- Filter out hooks where
enabledis explicitlyfalse. Treat hooks without anenabledfield as enabled by default. - For each remaining hook, do not attempt to interpret or evaluate hook
conditionexpressions:- If the hook has no
conditionfield, or it is null/empty, treat the hook as executable - If the hook defines a non-empty
condition, skip the hook and leave condition evaluation to the HookExecutor implementation
- If the hook has no
- For each executable hook, output the following based on its
optionalflag:- Optional hook (
optional: true):## Extension Hooks **Optional Pre-Hook**: {extension} Command: `/{command}` Description: {description} Prompt: {prompt} To execute: `/{command}` - Mandatory hook (
optional: false):## Extension Hooks **Automatic Pre-Hook**: {extension} Executing: `/{command}` EXECUTE_COMMAND: {command} Wait for the result of the hook command before proceeding to the Outline.
- Optional hook (
- If no hooks are registered or
.specify/extensions.ymldoes not exist, skip silently
Goal
Verify that agent assignments in agent-assignments.yml are complete, consistent, and reference agents that actually exist. This command is READ-ONLY — it does not modify any files. If issues are found, it suggests remediation actions.
Outline
-
Setup: Run
.specify/scripts/bash/check-prerequisites.sh --json --require-tasksfrom repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot"). -
Check Assignment File Exists: Verify
agent-assignments.ymlexists in FEATURE_DIR.- If missing, STOP and report: "No agent-assignments.yml found. Run
/speckit.agent-assign.assignfirst to generate agent assignments."
- If missing, STOP and report: "No agent-assignments.yml found. Run
-
Load Inputs: Read the following files from FEATURE_DIR:
- REQUIRED:
agent-assignments.yml— the agent assignment mapping - REQUIRED:
tasks.md— the task list to validate against - Parse
agent-assignments.ymlto extract theagents_scannedlist andassignmentsmapping - Parse
tasks.mdto extract all task IDs
- REQUIRED:
-
Rescan Agent Definitions: Discover currently available agent definition files following the same hierarchy as the assign command:
Scanning priority order (highest to lowest):
- Project-level:
.claude/agents/*.mdin the repository root - User-level:
~/.claude/agents/*.mdin the user's home directory
For each agent file:
- Parse YAML frontmatter to extract name and description
- Record source level
- Deduplicate by name (highest priority wins)
Build a Current Agent Registry for comparison against
agents_scannedin the assignment file. - Project-level:
-
Run Validation Checks: Perform the following checks and record results:
Check 1 — Coverage: Every task ID in tasks.md has a corresponding entry in
assignments.- Status per task:
OK(has assignment) orUNASSIGNED(missing from assignments)
Check 2 — Agent Existence: Every agent name referenced in
assignments(exceptdefault) exists in the current agent registry.- Status per assignment:
OK(agent exists) orMISSING(agent file not found)
Check 3 — Agent Conflicts: No agent name appears at multiple hierarchy levels with different definitions.
- Status:
OK(no conflicts) orCONFLICT(same name, different levels — list which levels)
Check 4 — Agent Drift: Compare
agents_scannedfrom the assignment file against the current agent registry.- Report any agents that were available during assignment but are now missing
- Report any new agents that were not available during assignment
Check 5 — Frontmatter Validity: Each agent file referenced in assignments has valid YAML frontmatter with at minimum a
descriptionfield.- Status:
OK(valid) orINVALID(missing or malformed frontmatter)
- Status per task:
-
Generate Validation Report: Output a structured report:
## Agent Assignment Validation Report **Feature**: <feature-name> **Assignment file**: <path to agent-assignments.yml> **Validation time**: <timestamp> ### Summary | Metric | Value | |----------------------|-------| | Total tasks | 15 | | Assigned tasks | 15 | | Unassigned tasks | 0 | | Valid agents | 12 | | Missing agents | 0 | | Conflicts | 0 | | Agent drift detected | No | ### Overall Status: ✓ PASS / ✗ FAIL ### Task Assignment Details | Task ID | Assigned Agent | Status | |---------|-----------------|------------| | T001 | default | ✓ OK | | T002 | backend-dev | ✓ OK | | T003 | unknown-agent | ✗ MISSING | | T004 | frontend-dev | ✓ OK | ### Issues Found (if any) 1. **MISSING**: Task T003 assigned to agent `unknown-agent` which does not exist at any hierarchy level 2. **UNASSIGNED**: Task T010 has no entry in agent-assignments.yml 3. **CONFLICT**: Agent `helper` found at both project and user level with different descriptions 4. **DRIFT**: Agent `api-dev` was available during assignment but has since been removed ### Recommended Actions - Run `/speckit.agent-assign.assign` to reassign tasks with missing or conflicting agents - Or manually edit `agent-assignments.yml` to fix specific entries -
Final Verdict:
- PASS: All checks pass — safe to run
/speckit.agent-assign.execute - FAIL: Issues found — list actionable remediation steps
If PASS, suggest proceeding with
/speckit.agent-assign.execute. If FAIL, suggest running/speckit.agent-assign.assignto fix issues. - PASS: All checks pass — safe to run
Note: This command is strictly read-only. It does not modify agent-assignments.yml, tasks.md, or any agent files.
04 同仓库更多 Skills
offline-presentation-fixture
暂无简介
grill-with-docs
Entrevista decisões arquiteturais por work item isolado, mantém feature plan-only e oferece hotfix-fast executável com HOTFIX-GO fail-closed.
grill-partition
Particiona tasks.md em subfases file-disjuntas e emite o Execution DAG versionado da etapa partition, de forma determinística e sem julgamento de modelo.
grill-implement-parallel
Orquestra os workers não-frontier da etapa implement-parallel sobre o Execution DAG, com worktree isolado por worker e receipt submetido apenas pelo leader.
speckit-verify-review-ship-verify
Run post-convergence executable gates and diff hygiene checks
speckit-verify-review-ship-v
Run post-convergence executable gates and diff hygiene checks