Arckit gap analysis

From tractorjuice/arckit-codex · View interactive version

Arckit gap analysis is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. Perform gap analysis — capability matrix, gap severity scoring, workstream mapping

How to use this skill

Skill file

You are helping an enterprise architect perform a Gap Analysis for TOGAF ADM Phase E (Opportunities & Solutions). This document identifies gaps between current and target architectures, scores their severity, and maps them to workstreams for prioritised delivery.

User Input

$ARGUMENTS

Prerequisites: Read Architecture Artifacts

Note: Before generating, scan projects/ for existing project directories. For each project, list all ARC-*.md artifacts, check external/ for reference documents, and check 000-global/ for cross-project policies. If no external docs exist but they would improve output, ask the user.

MANDATORY (warn if missing):

RECOMMENDED (read if available, note if missing):

OPTIONAL (read if available, skip silently if missing):

Prerequisites 1b: Read external documents and policies

Instructions

1. Identify or Create Project

Identify the target project from the hook context. If the user specifies a project that doesn't exist yet, create a new project:

  1. Use Glob to list projects/*/ directories and find the highest NNN-* number (or start at 001 if none exist)
  2. Calculate the next number (zero-padded to 3 digits, e.g., 002)
  3. Slugify the project name (lowercase, replace non-alphanumeric with hyphens, trim)
  4. Use the Write tool to create projects/{NNN}-{slug}/README.md with the project name, ID, and date — the Write tool will create all parent directories automatically
  5. Also create projects/{NNN}-{slug}/external/README.md with a note to place external reference documents here
  6. Set PROJECT_ID = the 3-digit number, PROJECT_PATH = the new directory path

2. Read Gap Analysis Template

Read the template (with user override support):

Tip: Users can customise templates with $arckit-customize gap-analysis

3. A question to the user: Gap Severity Weighting

Unless the arguments already settle it, ask the user how to weight gap severity scoring.

Gathering rules — the one-message interview in .arckit/references/interview-pattern.md:

Question 1 — header: Weighting, multiSelect: false

"How should gap severity be weighted?"

4. Gather Gap Analysis Context

Read all available documents identified in the Prerequisites section. Build a mental model of:

5. Load Mermaid Syntax References

Read .arckit/skills/mermaid-syntax/references/flowchart.md and .arckit/skills/mermaid-syntax/references/quadrantChart.md for official Mermaid syntax — node shapes, edge labels, quadrant chart syntax, and styling options.

6. Generate Gap Analysis

Create a comprehensive Gap Analysis document following the template structure.

Document Control
1. Capability Gap Matrix

Build a capability gap matrix comparing current state (from BPCM) against target state (from STRAT/ADMP):

2. Gap Heatmap

Create a Mermaid quadrant chart plotting gaps by Size (x-axis) vs Urgency (y-axis):

3. Workstream Mapping

Define workstreams that group related gaps:

4. Gap-to-Risk Mapping

Map each gap to associated risks:

5. Assumptions & Constraints
6. Traceability

7. UK Government Specifics

If the user indicates this is a UK Government project, include:

8. MOD Specifics

If this is a Ministry of Defence project, include:

9. Quality Gate

Before writing the file, read .arckit/references/quality-checklist.md and verify all Common Checks plus the GAPA per-type checks pass. Fix any failures before proceeding.

GAPA-specific quality requirements:

10. Write the Gap Analysis File

IMPORTANT: The gap analysis document will be a substantial document (typically 250-400 lines). You MUST use the Write tool to create the file, NOT output the full content in chat.

Create the file at:

projects/{P}/ARC-{P}-GAPA-v{VERSION}.md

Use the Write tool with the complete content following the template structure.

11. Show Summary to User

After writing the file, show a concise summary (NOT the full document):

## Gap Analysis Created

**Document**: `projects/{P}/ARC-{P}-GAPA-v{VERSION}.md`
**Document ID**: ARC-{P}-GAPA-v{VERSION}

### Analysis Overview
- **Severity Weighting**: [Balanced / Strategic-risk / Operational]
- **Capabilities Assessed**: [N] capabilities
- **Gaps Identified**: [N] gaps ([Critical] critical, [High] high, [Medium] medium, [Low] low)

### Gap Heatmap Summary
| Quadrant | Count | Priority |
|----------|-------|----------|
| Immediate (Large + High urgency) | [N] | 🔴 Must address |
| Plan (Large + Low urgency) | [N] | 🟡 Plan ahead |
| Monitor (Small + High urgency) | [N] | 🔵 Quick wins |
| Low Priority (Small + Low urgency) | [N] | ⚪ Backlog |

### Workstreams
| WS-ID | Name | Gaps | Duration | Resources |
|-------|------|------|----------|-----------|
| WS-001 | [Name] | [N] gaps | [X months] | [N FTE] |
| WS-002 | [Name] | [N] gaps | [X months] | [N FTE] |

### Top Critical Gaps
1. **[Gap 1]**: [Capability] — [Severity] — assigned to WS-[N]
2. **[Gap 2]**: [Capability] — [Severity] — assigned to WS-[N]
3. **[Gap 3]**: [Capability] — [Severity] — assigned to WS-[N]

### Synthesised From
- ✅ Business Capability Model: ARC-{P}-BPCM-v[N].md
- [✅/⚠️] Architecture Strategy: ARC-{P}-STRAT-v[N].md (or ARC-000-STRAT-v[N].md in 000-global)
- [✅/⚠️] Architecture Principles: ARC-000-PRIN-v[N].md
- [✅/⚠️] Application Inventory: ARC-{P}-APP-v[N].md
- [✅/⚠️] Application Rationalisation: ARC-{P}-APPR-v[N].md

### Next Steps
1. Review gap analysis with Architecture Board: `$arckit-architecture-board`
2. Create work packages to close gaps: `$arckit-transition-architecture`
3. Validate workstream sequencing with delivery team
4. Prioritise immediate-action gaps with sponsor

### Traceability
- [N] capabilities assessed against [N] target state requirements
- [N] gaps mapped to [N] workstreams
- [N] workstreams linked to [N] strategic themes
- [N] gaps cross-referenced to risk register

**File location**: `projects/{P}/ARC-{P}-GAPA-v{VERSION}.md`

Important Notes

  1. Evidence-Based, Not Speculative: This command analyses gaps between documented current state (BPCM) and documented target state (STRAT/ADMP). It should NOT invent capabilities or maturity levels without source evidence.
  1. Use Write Tool: The gap analysis document is typically 250-400 lines. ALWAYS use the Write tool to create it. Never output the full content in chat.
  1. Mandatory Prerequisites: BPCM is the only mandatory prerequisite. Without a capability baseline, gap analysis cannot be performed. STRAT and PRIN are recommended for target state and principle alignment, and APP and APPR for the current and target application portfolio behind each capability.
  1. Severity Scoring: The severity matrix (Size × Urgency) is the core analytical engine. The user's chosen weighting profile (Balanced/Strategic-risk/Operational) determines which gaps rise to the top.
  1. Workstream Design: Workstreams must be coherent — grouping gaps that share technology, skills, or dependencies. Avoid creating workstreams for single gaps unless they are genuinely standalone.
  1. Traceability is Critical: Every gap, workstream, and risk must trace back to source documents. This ensures the gap analysis is grounded in evidence, not assumptions.
  1. Integration with Other Commands:
  1. Version Management: If a gap analysis already exists (ARC-*-GAPA-v*.md), create a new version (v2.0) rather than overwriting. Gap analyses should be versioned to track re-assessment across ADM cycles.
  1. Gap Triage Framework: Use the heatmap quadrants as a decision framework:
  1. Markdown escaping: When writing less-than or greater-than comparisons, always include a space after < or > (e.g., < 3 seconds, > 99.9% uptime) to prevent markdown renderers from interpreting them as HTML tags or emoji

Suggested Next Steps

After completing this command, consider running:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.