gap-analysis-workflow
npx machina-cli add skill synaptiai/agent-capability-standard/capability-gap-analysis --openclawIntent
Run the composed workflow gap-analysis-workflow using atomic capability skills to systematically identify what capabilities are missing and prioritize their development.
Success criteria:
- Current capability coverage mapped with evidence
- Gaps identified with clear justification
- Relationships between existing and missing capabilities documented
- Prioritized roadmap for new skill development
- Audit trail of analysis process
Compatible schemas:
reference/capability_ontology.yamlreference/workflow_catalog.yaml
Inputs
| Parameter | Required | Type | Description |
|---|---|---|---|
goal | Yes | string | The analysis objective (e.g., "identify gaps for autonomous deployment") |
scope | Yes | string|array | Domain, layer, or capability set to analyze |
constraints | No | object | Limits (e.g., max new skills, priority criteria, timeline) |
reference_ontology | No | string | Path to reference ontology for comparison |
existing_capabilities | No | array | List of already-implemented capabilities |
Procedure
-
Create checkpoint marker if mutation might occur:
- Create
.claude/checkpoint.okafter confirming rollback strategy
- Create
-
Invoke
/inspectand store output asinspect_out- Examine current capability landscape and documentation
-
Invoke
/map-relationshipsand store output asmap-relationships_out- Map dependencies and connections between existing capabilities
-
Invoke
/discover-relationshipand store output asdiscover-relationship_out- Identify implicit relationships and missing links
-
Invoke
/compare-plansand store output ascompare-plans_out- Compare current state against ideal or reference ontology
-
Invoke
/prioritizeand store output asprioritize_out- Rank gaps by impact, effort, and strategic value
-
Invoke
/generate-planand store output asgenerate-plan_out- Create development roadmap for new capabilities
-
Invoke
/auditand store output asaudit_out- Record analysis process and evidence
Output Contract
Return a structured object:
workflow_id: string # Unique analysis execution ID
goal: string # Analysis objective
status: completed | partial | failed
current_state:
capabilities_analyzed: integer
coverage_percentage: number # 0.0-1.0
layers_covered: array[string]
evidence_anchors: array[string]
gaps_identified:
total: integer
by_layer:
perception: array[string]
modeling: array[string]
reasoning: array[string]
action: array[string]
safety: array[string]
meta: array[string]
by_priority:
critical: array[string]
high: array[string]
medium: array[string]
low: array[string]
evidence_anchors: array[string]
relationships:
existing_dependencies: array[object]
missing_connections: array[object]
orphan_capabilities: array[string]
evidence_anchors: array[string]
comparison:
reference_ontology: string
alignment_score: number # 0.0-1.0
divergences: array[string]
evidence_anchors: array[string]
roadmap:
phases: array[object]
total_new_skills: integer
estimated_effort: string
dependencies: array[object]
evidence_anchors: array[string]
audit:
log_path: string
methodology: string
evidence_anchors: array[string]
confidence: number # 0.0-1.0
evidence_anchors: array[string]
assumptions: array[string]
Field Definitions
| Field | Type | Description |
|---|---|---|
workflow_id | string | Unique identifier for this analysis |
current_state | object | Summary of existing capability coverage |
gaps_identified | object | Missing capabilities organized by layer and priority |
relationships | object | Dependency mapping including missing connections |
comparison | object | Alignment with reference ontology |
roadmap | object | Phased development plan for new skills |
audit | object | Analysis methodology and evidence trail |
confidence | number | 0.0-1.0 based on evidence completeness |
evidence_anchors | array | All evidence references collected |
assumptions | array | Explicit assumptions made during analysis |
Examples
Example 1: Gap Analysis for Autonomous Code Review
Input:
goal: "Identify gaps for fully autonomous code review capability"
scope:
- "reasoning"
- "safety"
- "action"
constraints:
max_new_skills: 10
priority_criteria:
- "security_impact"
- "automation_potential"
reference_ontology: "schemas/capability_ontology.yaml"
Output:
workflow_id: "gap_20240115_120000_codereview"
goal: "Identify gaps for fully autonomous code review capability"
status: completed
current_state:
capabilities_analyzed: 45
coverage_percentage: 0.72
layers_covered:
- "reasoning"
- "safety"
- "action"
evidence_anchors:
- "file:schemas/capability_ontology.yaml"
- "file:skills/critique/SKILL.md"
gaps_identified:
total: 8
by_layer:
perception: []
modeling:
- "detect-code-smell"
- "identify-security-pattern"
reasoning:
- "compare-implementations"
- "evaluate-test-coverage"
action:
- "generate-review-comment"
- "apply-suggested-fix"
safety:
- "verify-no-regression"
- "constrain-auto-merge"
meta: []
by_priority:
critical:
- "verify-no-regression"
- "identify-security-pattern"
high:
- "detect-code-smell"
- "constrain-auto-merge"
medium:
- "compare-implementations"
- "generate-review-comment"
low:
- "evaluate-test-coverage"
- "apply-suggested-fix"
evidence_anchors:
- "file:schemas/capability_ontology.yaml:nodes"
- "tool:compare-plans:coverage_analysis"
relationships:
existing_dependencies:
- from: "critique"
to: "evaluate"
type: "requires"
- from: "plan"
to: "critique"
type: "soft_requires"
missing_connections:
- from: "detect-code-smell"
to: "critique"
type: "should_precede"
reason: "Code smells inform critique priorities"
- from: "verify-no-regression"
to: "act-plan"
type: "must_follow"
reason: "Regression check required after any code change"
orphan_capabilities: []
evidence_anchors:
- "tool:map-relationships:dependency_graph"
- "tool:discover-relationship:implicit_links"
comparison:
reference_ontology: "schemas/capability_ontology.yaml"
alignment_score: 0.72
divergences:
- "Missing specialized detection capabilities for code patterns"
- "No automated fix application in action layer"
- "Regression verification not formalized"
evidence_anchors:
- "tool:compare-plans:ontology_diff"
roadmap:
phases:
- phase: 1
name: "Security Foundation"
skills:
- "identify-security-pattern"
- "verify-no-regression"
rationale: "Critical for safe autonomous operation"
- phase: 2
name: "Detection Enhancement"
skills:
- "detect-code-smell"
- "constrain-auto-merge"
rationale: "Improves review quality and safety"
- phase: 3
name: "Automation Expansion"
skills:
- "compare-implementations"
- "generate-review-comment"
- "evaluate-test-coverage"
- "apply-suggested-fix"
rationale: "Full autonomous review capability"
total_new_skills: 8
estimated_effort: "2-3 sprints"
dependencies:
- skill: "apply-suggested-fix"
requires: ["verify-no-regression", "constrain-auto-merge"]
evidence_anchors:
- "tool:prioritize:impact_matrix"
- "tool:generate-plan:roadmap"
audit:
log_path: ".claude/audit/gap_20240115_120000_codereview.log"
methodology: "Systematic comparison against reference ontology with layer-by-layer analysis"
evidence_anchors:
- "file:.claude/audit/gap_20240115_120000_codereview.log"
confidence: 0.85
evidence_anchors:
- "file:schemas/capability_ontology.yaml"
- "tool:map-relationships:dependency_graph"
- "tool:compare-plans:ontology_diff"
- "tool:prioritize:impact_matrix"
assumptions:
- "Reference ontology is current and complete"
- "Existing skills are correctly implemented"
- "Priority criteria reflect actual business needs"
Evidence pattern: Ontology comparison, dependency graph analysis, impact-based prioritization.
Verification
- Coverage Analyzed: All capabilities in scope examined
- Gaps Documented: Each gap has layer classification and priority
- Relationships Mapped: Dependencies and missing connections identified
- Comparison Complete: Alignment score computed against reference
- Roadmap Generated: Phased plan with dependencies
- Audit Trail: Analysis methodology documented
Verification tools: Read (for ontology files), Grep (for capability search), Bash (for validation)
Safety Constraints
mutation: falserequires_checkpoint: falserequires_approval: falserisk: low
Capability-specific rules:
- Do not create new skills during analysis (discovery only)
- Validate all capability references against ontology
- Document assumptions about missing capabilities
- Flag potential security implications of gaps
- Preserve existing ontology structure
Composition Patterns
Commonly follows:
inspect- After initial codebase explorationretrieve- After fetching reference documentation
Commonly precedes:
generate-plan- To create detailed skill specificationsprioritize- To refine gap prioritizationsummarize- To create executive summary
Anti-patterns:
- Never skip relationship mapping before prioritization
- Never propose skills without checking ontology for existing alternatives
- Never prioritize without defined criteria
- Never generate roadmap without dependency analysis
Workflow references:
- See
reference/workflow_catalog.yaml#gap-analysis-workflowfor step definitions - See
reference/capability_ontology.yamlfor reference structure
Source
git clone https://github.com/synaptiai/agent-capability-standard/blob/main/skills/capability-gap-analysis/SKILL.mdView on GitHub Overview
gap-analysis-workflow orchestrates a sequence of atomic capability skills to identify missing capabilities and prioritize development. It maps current capability coverage, identifies gaps with justification, documents relationships to existing capabilities, and generates a prioritized development roadmap with an auditable trail of the analysis.
How This Skill Works
The workflow runs as a multi-step process: inspect the current capability landscape, map relationships between capabilities, discover implicit links, compare the current state to a reference ontology, prioritize gaps, generate a development plan, and audit the entire process. Each step stores its output to form an evidence-backed, traceable gap-analysis report.
When to Use It
- When analyzing missing capabilities and how they affect overall coverage.
- When planning skill development and a structured onboarding or upgrade roadmap.
- During ontology expansion to align with reference schemas and standards.
- When assessing coverage against a reference ontology or workflow catalog.
- When creating an auditable governance trail for capability analysis and decision making.
Quick Start
- Step 1: Define goal, scope, and constraints for the analysis.
- Step 2: Run the workflow: inspect -> map-relationships -> discover-relationship -> compare-plans -> prioritize -> generate-plan -> audit.
- Step 3: Review gaps, validate against reference ontology, and publish the prioritized roadmap with evidence anchors.
Best Practices
- Define goal, scope, and constraints up front to guide the analysis.
- Ground analysis with reference_ontology and existing_capabilities for baseline context.
- Capture outputs from each step (inspect, map-relationships, etc.) as evidence anchors.
- Provide clear justification for each gap and map it to dependencies.
- Maintain an audit trail with checkpoint markers and versioned outputs.
Example Use Cases
- A robotics platform uses gap-analysis-workflow to identify missing perception and planning capabilities and prioritizes safety-related skills.
- An autonomous vehicle team expands its ontology to include new decision-making capabilities based on detected gaps.
- A SaaS product analyzes integration capabilities and generates a prioritized roadmap for API and middleware skills.
- A research group aligns capabilities to a reference ontology to standardize evaluation criteria.
- An enterprise AI assistant documents gaps against a workflow catalog and creates a governance-friendly audit trail.