Skip to content

Commit 2f4c9ca

Browse files
authored
Merge pull request #2016 from bmad-code-org/chore/augment-skill-validator-update
chore(tools): align Augment config with skill-validator
2 parents 0bf6cb3 + ebe490a commit 2f4c9ca

2 files changed

Lines changed: 45 additions & 133 deletions

File tree

.augment/code_review_guidelines.yaml

Lines changed: 11 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Augment Code Review Guidelines for BMAD-METHOD
22
# https://docs.augmentcode.com/codereview/overview
3-
# Focus: Workflow validation and quality
3+
# Focus: Skill validation and quality
4+
# Canonical rules: tools/skill-validator.md (single source of truth)
45

56
file_paths_to_ignore:
67
# --- Shared baseline: tool configs ---
@@ -48,123 +49,17 @@ file_paths_to_ignore:
4849

4950
areas:
5051
# ============================================
51-
# WORKFLOW STRUCTURE RULES
52+
# SKILL FILES
5253
# ============================================
53-
workflow_structure:
54-
description: "Workflow folder organization and required components"
54+
skill_files:
55+
description: "All skill content — SKILL.md, workflow.md, step files, data files, and templates within skill directories"
5556
globs:
57+
- "src/**/skills/**"
5658
- "src/**/workflows/**"
59+
- "src/**/tasks/**"
5760
rules:
58-
- id: "workflow_entry_point_required"
59-
description: "Every workflow folder must have workflow.md as entry point"
60-
severity: "high"
61-
62-
- id: "sharded_workflow_steps_folder"
63-
description: "Sharded workflows (using workflow.md) must have steps/ folder with numbered files (step-01-*.md, step-02-*.md)"
64-
severity: "high"
65-
66-
- id: "workflow_step_limit"
67-
description: "Workflows should have 5-10 steps maximum to prevent context loss in LLM execution"
68-
severity: "medium"
69-
70-
# ============================================
71-
# WORKFLOW ENTRY FILE RULES
72-
# ============================================
73-
workflow_definitions:
74-
description: "Workflow entry files (workflow.md)"
75-
globs:
76-
- "src/**/workflows/**/workflow.md"
77-
rules:
78-
- id: "workflow_name_required"
79-
description: "Workflow entry files must define 'name' field in frontmatter or root element"
80-
severity: "high"
81-
82-
- id: "workflow_description_required"
83-
description: "Workflow entry files must include 'description' explaining the workflow's purpose"
84-
severity: "high"
85-
86-
- id: "workflow_installed_path"
87-
description: "Workflows should define installed_path for relative file references within the workflow"
88-
severity: "medium"
89-
90-
- id: "valid_step_references"
91-
description: "Step file references in workflow entry must point to existing files"
92-
severity: "high"
93-
94-
# ============================================
95-
# SHARDED WORKFLOW STEP RULES
96-
# ============================================
97-
workflow_steps:
98-
description: "Individual step files in sharded workflows"
99-
globs:
100-
- "src/**/workflows/**/steps/step-*.md"
101-
rules:
102-
- id: "step_goal_required"
103-
description: "Each step must clearly state its goal (## STEP GOAL, ## YOUR TASK, or step n='X' goal='...')"
104-
severity: "high"
105-
106-
- id: "step_mandatory_rules"
107-
description: "Step files should include MANDATORY EXECUTION RULES section with universal agent behavior rules"
108-
severity: "medium"
109-
110-
- id: "step_context_boundaries"
111-
description: "Step files should define CONTEXT BOUNDARIES explaining available context and limits"
112-
severity: "medium"
113-
114-
- id: "step_success_metrics"
115-
description: "Step files should include SUCCESS METRICS section with ✅ checkmarks for validation criteria"
116-
severity: "medium"
117-
118-
- id: "step_failure_modes"
119-
description: "Step files should include FAILURE MODES section with ❌ marks for anti-patterns to avoid"
120-
severity: "medium"
121-
122-
- id: "step_next_step_reference"
123-
description: "Step files should reference the next step file path for sequential execution"
124-
severity: "medium"
125-
126-
- id: "step_no_forward_loading"
127-
description: "Steps must NOT load future step files until current step completes - just-in-time loading only"
128-
severity: "high"
129-
130-
- id: "valid_file_references"
131-
description: "File path references using {variable}/filename.md must point to existing files"
132-
severity: "high"
133-
134-
- id: "step_naming"
135-
description: "Step files must be named step-NN-description.md (e.g., step-01-init.md, step-02-context.md)"
136-
severity: "medium"
137-
138-
- id: "halt_before_menu"
139-
description: "Steps presenting user menus ([C] Continue, [a] Advanced, etc.) must HALT and wait for response"
140-
severity: "high"
141-
142-
# ============================================
143-
# WORKFLOW CONTENT QUALITY
144-
# ============================================
145-
workflow_content:
146-
description: "Content quality and consistency rules for all workflow files"
147-
globs:
148-
- "src/**/workflows/**/*.md"
149-
rules:
150-
- id: "communication_language_variable"
151-
description: "Workflows should use {communication_language} variable for agent output language consistency"
152-
severity: "low"
153-
154-
- id: "path_placeholders_required"
155-
description: "Use path placeholders (e.g. {project-root}, {installed_path}, {output_folder}) instead of hardcoded paths"
156-
severity: "medium"
157-
158-
- id: "no_time_estimates"
159-
description: "Workflows should NOT include time estimates - AI development speed varies significantly"
160-
severity: "low"
161-
162-
- id: "facilitator_not_generator"
163-
description: "Workflow agents should act as facilitators (guide user input) not content generators (create without input)"
164-
severity: "medium"
165-
166-
- id: "no_skip_optimization"
167-
description: "Workflows must execute steps sequentially - no skipping or 'optimizing' step order"
61+
- id: "skill_validation"
62+
description: "Apply the full rule catalog defined in tools/skill-validator.md. That file is the single source of truth for all skill validation rules covering SKILL.md metadata, workflow.md constraints, step file structure, path references, variable resolution, sequential execution, and skill invocation syntax."
16863
severity: "high"
16964

17065
# ============================================
@@ -183,27 +78,10 @@ areas:
18378
description: "Agent files must define persona with role, identity, communication_style, and principles"
18479
severity: "high"
18580

186-
- id: "agent_menu_valid_workflows"
187-
description: "Menu triggers must reference valid workflow paths that exist"
81+
- id: "agent_menu_valid_skills"
82+
description: "Menu triggers must reference valid skill names that exist"
18883
severity: "high"
18984

190-
# ============================================
191-
# TEMPLATES
192-
# ============================================
193-
templates:
194-
description: "Template files for workflow outputs"
195-
globs:
196-
- "src/**/template*.md"
197-
- "src/**/templates/**/*.md"
198-
rules:
199-
- id: "placeholder_syntax"
200-
description: "Use {variable_name} or {{variable_name}} syntax consistently for placeholders"
201-
severity: "medium"
202-
203-
- id: "template_sections_marked"
204-
description: "Template sections that need generation should be clearly marked (e.g., <!-- GENERATE: section_name -->)"
205-
severity: "low"
206-
20785
# ============================================
20886
# DOCUMENTATION
20987
# ============================================

tools/skill-validator.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,37 @@ When reporting findings, use this format:
320320
```
321321

322322
If zero findings: report "All {N} rules passed. No findings." and list all passed rule IDs.
323+
324+
---
325+
326+
## Skill Spec Cheatsheet
327+
328+
Quick-reference for the Agent Skills open standard.
329+
For the full standard, see: [Agent Skills specification](https://agentskills.io/specification)
330+
331+
### Structure
332+
- Every skill is a directory with `SKILL.md` as the required entrypoint
333+
- YAML frontmatter between `---` markers provides metadata; markdown body provides instructions
334+
- Supporting files (scripts, templates, references) live alongside SKILL.md
335+
336+
### Path resolution
337+
- Relative file references resolve from the directory of the file that contains the reference, not from the skill root
338+
- Example: from `branch-a/deep/next.md`, `./deeper/final.md` resolves to `branch-a/deep/deeper/final.md`
339+
- Example: from `branch-a/deep/next.md`, `./branch-b/alt/leaf.md` incorrectly resolves to `branch-a/deep/branch-b/alt/leaf.md`
340+
341+
### Frontmatter fields (standard)
342+
- `name`: lowercase letters, numbers, hyphens only; max 64 chars; no "anthropic" or "claude"
343+
- `description`: required, max 1024 chars; should state what the skill does AND when to use it
344+
345+
### Progressive disclosure — three loading levels
346+
- **L1 Metadata** (~100 tokens): `name` + `description` loaded at startup into system prompt
347+
- **L2 Instructions** (<5k tokens): SKILL.md body loaded only when skill is triggered
348+
- **L3 Resources** (unlimited): additional files + scripts loaded/executed on demand; script output enters context, script code does not
349+
350+
### Key design principle
351+
- Skills are filesystem-based directories, not API payloads — Claude reads them via bash/file tools
352+
- Keep SKILL.md focused; offload detailed reference to separate files
353+
354+
### Practical tips
355+
- Keep SKILL.md under 500 lines
356+
- `description` drives auto-discovery — use keywords users would naturally say

0 commit comments

Comments
 (0)