Cypilot Unified Tool
Goal
Cypilot provides artifact validation, cross-reference validation, code traceability, spec coverage measurement, ID search/navigation, kit management, TOC generation/validation, multi-agent integration, and design-to-code implementation with @cpt-* markers.
Preconditions
cpt available (preferred) or python3 as fallback
- Target paths exist and are readable
⚠️ MUST Instruction Semantics ⚠️
MUST and ALWAYS are mandatory. Skipping any MUST instruction invalidates execution, the output must be discarded, and the workflow fails.
Agent Acknowledgment
By proceeding with Cypilot work, I acknowledge and accept these requirements.
ALWAYS SET {cypilot_mode} = on FIRST when loading this skill
Execution Logging
ALWAYS provide execution visibility:
- Notify the user when entering any H2 section of a Cypilot prompt.
- Notify the user when completing any
- [ ] checklist task.
- Use
- [CONTEXT]: MESSAGE; set context to the file/section and message to the action + why.
- Logging must help the user understand loaded prompts, routing decisions, debugging state, and workflow progress.
Example:
- [execution-protocol]: Entering "Load Rules" — target is CODE, loading codebase/rules.md
- [DESIGN rules]: Completing "Validate structure" — all required sections present
- [workflows/generate.md]: Entering "Determine Target" — user requested code implementation
Variables
| Variable |
Value |
Use |
{cypilot_path} |
Directory path resolved from root AGENTS.md |
Base path for all Cypilot-relative references |
{cypilot_mode} |
on or off |
Current Cypilot mode state |
{cpt_cmd} |
cpt or python3 {cypilot_path}/.core/skills/cypilot/scripts/cypilot.py |
Resolved CLI entrypoint |
{cpt_installed} |
true or false |
Whether the cpt CLI is available |
Setting {cypilot_mode}: explicit cypilot on/off or a prompt that activates/deactivates Cypilot workflows.
Template Variable Resolution
- Resolve variables from
{cpt_cmd} --json info first; parse the returned variables dict.
- Use
{cpt_cmd} --json resolve-vars only when a fresh or filtered map is needed.
- Variable sources: system (
cypilot_path, project_root) + installed kit resources.
- ALWAYS resolve
{variable} references to absolute paths before using kit markdown files.
CLI Resolution
Run before Protocol Guard when {cypilot_mode} is on:
command -v cpt → {cpt_cmd} = cpt, {cpt_installed} = true
- Otherwise
{cpt_cmd} = python3 {cypilot_path}/.core/skills/cypilot/scripts/cypilot.py, {cpt_installed} = false
- If
cpt is missing and ~/.cypilot/cache/cpt-prompt-dismissed does not exist, offer pipx install git+https://github.com/cyberfabric/cyber-pilot.git; on dismiss create the marker file
- Re-offer installation if the user later asks about the long invocation path
ALWAYS use {cpt_cmd} for all later CLI invocations.
Protocol Guard
- ALWAYS FIRST open and remember
{cypilot_path}/.gen/AGENTS.md
- ALWAYS open and follow
{cypilot_path}/config/AGENTS.md when it exists
- ALWAYS open and follow
{cypilot_path}/.gen/SKILL.md when it exists
- ALWAYS open and follow
{cypilot_path}/config/SKILL.md when it exists
- ALWAYS FIRST run
{cpt_cmd} --json info before any Cypilot workflow action
- ALWAYS store the
variables dict from info output and use it to resolve {variable} references in AGENTS/SKILL/rules/workflows
- ALWAYS FIRST parse and load all matched WHEN-clause specs before proceeding
- ALWAYS include this block when editing code:
Cypilot Context:
- Cypilot: {path}
- Target: {artifact|codebase}
- Specs loaded: {list paths or "none required"}
- ALWAYS stop and re-run Protocol Guard when required specs should have been loaded but were not
Cypilot Mode
- ALWAYS set
{cypilot_mode} = on first when user invokes cypilot {prompt}
- ALWAYS run
info when enabling Cypilot mode
- ALWAYS show:
Cypilot Mode Enabled
Cypilot: {FOUND at path | NOT_FOUND}
Agent-Safe Invocation
- ALWAYS use
{cpt_cmd} --json <subcommand> [options]
- ALWAYS pass
--json as the first argument for agent-driven CLI calls
- ALWAYS use
= form for pattern args starting with - (example: --pattern=-req-)
Quick Commands (No Protocol)
| User invocation |
Direct action |
cypilot init |
Run {cpt_cmd} --json init --yes |
cypilot agents <name> |
Run {cpt_cmd} --json agents --agent <name> |
cypilot generate-agents <name> |
Run {cpt_cmd} --json generate-agents --agent <name> |
cypilot auto-config / cypilot configure |
Open and follow {cypilot_path}/.core/workflows/generate.md |
cypilot workspace init |
Run {cpt_cmd} --json workspace-init [--root <dir>] [--output <path>] [--inline] [--force] [--max-depth <N>] [--dry-run] |
cypilot workspace add |
Run {cpt_cmd} --json workspace-add --name <name> (--path <path> | --url <url>) [--branch <branch>] [--role <role>] [--adapter <path>] [--inline] [--force] |
cypilot workspace info |
Run {cpt_cmd} --json workspace-info |
cypilot workspace sync |
Run {cpt_cmd} --json workspace-sync [--source <name>] [--dry-run] [--force]; --force is destructive |
Workflow Routing
Cypilot has exactly three core workflows plus specialized sub-workflows. Routing priority is plan > generate/analyze.
| Intent |
Match |
Action |
| Plan |
plan, create a plan, execution plan, break down, decompose, or plan to ... |
Open and follow {cypilot_path}/.core/workflows/plan.md first |
| Generate |
create, edit, fix, update, implement, refactor, delete, add, setup, configure, build, code and user did not say plan |
Open and follow {cypilot_path}/.core/workflows/generate.md |
| Analyze |
analyze, validate, review, check, inspect, audit, compare, list, show, find and user did not say plan |
Open and follow {cypilot_path}/.core/workflows/analyze.md |
| Workspace |
workspace, multi-repo, add source, add repo, cross-reference, cross-repo |
Open and follow {cypilot_path}/.core/workflows/workspace.md |
| Unclear |
help, look at, work with, handle |
Ask plan (phased execution) / generate (modify) / analyze (read-only)? and stop if the user cancels |
configure routes through generate.md; that workflow may auto-trigger requirements/auto-config.md for brownfield projects with no project-specific rules.
Command Reference
Entrypoint: {cpt_cmd} <command> [options]
Machine output: add --json as the first argument. Exit codes: 0 = PASS, 1 = filesystem/config error, 2 = FAIL.
Legacy aliases: validate-code = validate; validate-rules = validate-kits.
| Category |
Commands |
| Validation |
validate (artifacts + code), validate-kits (kit config), validate-toc (TOC integrity), self-check (template/example sync), spec-coverage (marker coverage) |
| Search |
list-ids (enumerate IDs), list-id-kinds (kind counts), get-content (fetch by ID), where-defined (definition), where-used (references) |
| Kit management |
kit install (install kit), kit update (file-level kit update) |
| Utilities |
toc (generate TOC), info (discover config), resolve-vars (expand template vars), init (bootstrap project), update (refresh adapter), agents (show generated integrations), generate-agents (generate/update integrations) |
| Migration |
migrate (v2→v3 project), migrate-config (JSON→TOML config) |
| Workspace |
workspace-init (create workspace), workspace-add (add source), workspace-info (status), workspace-sync (update Git sources) |
See skills/cypilot/cypilot.clispec for full syntax, arguments, options, exit semantics, and examples.
Auto-Configuration
Use auto-config after cypilot init on a brownfield project, when project conventions are unknown, or after major structural changes. It scans structure/conventions, generates {cypilot_path}/config/rules/{slug}.md, adds WHEN rules to {cypilot_path}/config/AGENTS.md, and registers systems in {cypilot_path}/config/artifacts.toml. Invoke via cypilot auto-config, cypilot configure, or the automatic offer inside generate.md.
Project Configuration
Project configuration lives in {cypilot_path}/config/core.toml (systems, kits, ignore lists). Artifact registry lives in {cypilot_path}/config/artifacts.toml (artifact paths, kinds, system mappings, codebase paths, autodetect rules). All commands output JSON when invoked with --json. Exit codes: 0=PASS, 1=filesystem error, 2=FAIL.
Source: tbogdan/frontx — distributed by TomeVault.
1---2name: tbogdan-frontx-cypilot3description: Cypilot Unified Tool4---56# Cypilot Unified Tool789<!-- toc -->1011- [Cypilot Unified Tool](#cypilot-unified-tool)12 - [Goal](#goal)13 - [Preconditions](#preconditions)14 - [⚠️ MUST Instruction Semantics ⚠️](#️-must-instruction-semantics-️)15 - [Agent Acknowledgment](#agent-acknowledgment)16 - [Execution Logging](#execution-logging)17 - [Variables](#variables)18 - [Template Variable Resolution](#template-variable-resolution)19 - [CLI Resolution](#cli-resolution)20 - [Protocol Guard](#protocol-guard)21 - [Cypilot Mode](#cypilot-mode)22 - [Agent-Safe Invocation](#agent-safe-invocation)23 - [Quick Commands (No Protocol)](#quick-commands-no-protocol)24 - [Workflow Routing](#workflow-routing)25 - [Command Reference](#command-reference)26 - [Auto-Configuration](#auto-configuration)27 - [Project Configuration](#project-configuration)2829<!-- /toc -->3031## Goal3233Cypilot provides artifact validation, cross-reference validation, code traceability, spec coverage measurement, ID search/navigation, kit management, TOC generation/validation, multi-agent integration, and design-to-code implementation with `@cpt-*` markers.3435## Preconditions3637- `cpt` available (preferred) or `python3` as fallback38- Target paths exist and are readable3940---4142## ⚠️ MUST Instruction Semantics ⚠️4344**MUST** and **ALWAYS** are mandatory. Skipping any MUST instruction invalidates execution, the output must be discarded, and the workflow fails.4546## Agent Acknowledgment4748- [ ] MUST/ALWAYS are mandatory; skipping any MUST invalidates execution.49- [ ] I will read all required files before proceeding.50- [ ] I will follow workflows step-by-step without shortcuts.51- [ ] I will not create files without user confirmation in operation workflows.52- [ ] I will list Cypilot files read, why, and the triggering instruction before any approval prompt.5354By proceeding with Cypilot work, I acknowledge and accept these requirements.5556ALWAYS SET {cypilot_mode} = `on` FIRST when loading this skill5758## Execution Logging5960ALWAYS provide execution visibility:61- Notify the user when entering any H2 section of a Cypilot prompt.62- Notify the user when completing any `- [ ]` checklist task.63- Use `- [CONTEXT]: MESSAGE`; set context to the file/section and message to the action + why.64- Logging must help the user understand loaded prompts, routing decisions, debugging state, and workflow progress.6566Example:67```text68- [execution-protocol]: Entering "Load Rules" — target is CODE, loading codebase/rules.md69- [DESIGN rules]: Completing "Validate structure" — all required sections present70- [workflows/generate.md]: Entering "Determine Target" — user requested code implementation71```7273## Variables7475| Variable | Value | Use |76|---|---|---|77| `{cypilot_path}` | Directory path resolved from root `AGENTS.md` | Base path for all Cypilot-relative references |78| `{cypilot_mode}` | `on` or `off` | Current Cypilot mode state |79| `{cpt_cmd}` | `cpt` or `python3 {cypilot_path}/.core/skills/cypilot/scripts/cypilot.py` | Resolved CLI entrypoint |80| `{cpt_installed}` | `true` or `false` | Whether the `cpt` CLI is available |8182Setting `{cypilot_mode}`: explicit `cypilot on/off` or a prompt that activates/deactivates Cypilot workflows.8384### Template Variable Resolution8586- Resolve variables from `{cpt_cmd} --json info` first; parse the returned `variables` dict.87- Use `{cpt_cmd} --json resolve-vars` only when a fresh or filtered map is needed.88- Variable sources: system (`cypilot_path`, `project_root`) + installed kit resources.89- ALWAYS resolve `{variable}` references to absolute paths before using kit markdown files.9091## CLI Resolution9293Run before Protocol Guard when `{cypilot_mode}` is `on`:941. `command -v cpt` → `{cpt_cmd} = cpt`, `{cpt_installed} = true`952. Otherwise `{cpt_cmd} = python3 {cypilot_path}/.core/skills/cypilot/scripts/cypilot.py`, `{cpt_installed} = false`963. If `cpt` is missing and `~/.cypilot/cache/cpt-prompt-dismissed` does not exist, offer `pipx install git+https://github.com/cyberfabric/cyber-pilot.git`; on dismiss create the marker file974. Re-offer installation if the user later asks about the long invocation path9899ALWAYS use `{cpt_cmd}` for all later CLI invocations.100101## Protocol Guard102103- ALWAYS FIRST open and remember `{cypilot_path}/.gen/AGENTS.md`104- ALWAYS open and follow `{cypilot_path}/config/AGENTS.md` when it exists105- ALWAYS open and follow `{cypilot_path}/.gen/SKILL.md` when it exists106- ALWAYS open and follow `{cypilot_path}/config/SKILL.md` when it exists107- ALWAYS FIRST run `{cpt_cmd} --json info` before any Cypilot workflow action108- ALWAYS store the `variables` dict from `info` output and use it to resolve `{variable}` references in AGENTS/SKILL/rules/workflows109- ALWAYS FIRST parse and load all matched WHEN-clause specs before proceeding110- ALWAYS include this block when editing code:111```text112Cypilot Context:113- Cypilot: {path}114- Target: {artifact|codebase}115- Specs loaded: {list paths or "none required"}116```117- ALWAYS stop and re-run Protocol Guard when required specs should have been loaded but were not118119## Cypilot Mode120121- ALWAYS set `{cypilot_mode} = on` first when user invokes `cypilot {prompt}`122- ALWAYS run `info` when enabling Cypilot mode123- ALWAYS show:124```text125Cypilot Mode Enabled126Cypilot: {FOUND at path | NOT_FOUND}127```128129## Agent-Safe Invocation130131- ALWAYS use `{cpt_cmd} --json <subcommand> [options]`132- ALWAYS pass `--json` as the first argument for agent-driven CLI calls133- ALWAYS use `=` form for pattern args starting with `-` (example: `--pattern=-req-`)134135## Quick Commands (No Protocol)136137| User invocation | Direct action |138|---|---|139| `cypilot init` | Run `{cpt_cmd} --json init --yes` |140| `cypilot agents <name>` | Run `{cpt_cmd} --json agents --agent <name>` |141| `cypilot generate-agents <name>` | Run `{cpt_cmd} --json generate-agents --agent <name>` |142| `cypilot auto-config` / `cypilot configure` | Open and follow `{cypilot_path}/.core/workflows/generate.md` |143| `cypilot workspace init` | Run `{cpt_cmd} --json workspace-init [--root <dir>] [--output <path>] [--inline] [--force] [--max-depth <N>] [--dry-run]` |144| `cypilot workspace add` | Run `{cpt_cmd} --json workspace-add --name <name> (--path <path> \| --url <url>) [--branch <branch>] [--role <role>] [--adapter <path>] [--inline] [--force]` |145| `cypilot workspace info` | Run `{cpt_cmd} --json workspace-info` |146| `cypilot workspace sync` | Run `{cpt_cmd} --json workspace-sync [--source <name>] [--dry-run] [--force]`; `--force` is destructive |147148## Workflow Routing149150Cypilot has exactly three core workflows plus specialized sub-workflows. Routing priority is `plan` > `generate`/`analyze`.151152| Intent | Match | Action |153|---|---|---|154| Plan | `plan`, `create a plan`, `execution plan`, `break down`, `decompose`, or `plan to ...` | Open and follow `{cypilot_path}/.core/workflows/plan.md` first |155| Generate | `create`, `edit`, `fix`, `update`, `implement`, `refactor`, `delete`, `add`, `setup`, `configure`, `build`, `code` and user did not say `plan` | Open and follow `{cypilot_path}/.core/workflows/generate.md` |156| Analyze | `analyze`, `validate`, `review`, `check`, `inspect`, `audit`, `compare`, `list`, `show`, `find` and user did not say `plan` | Open and follow `{cypilot_path}/.core/workflows/analyze.md` |157| Workspace | `workspace`, `multi-repo`, `add source`, `add repo`, `cross-reference`, `cross-repo` | Open and follow `{cypilot_path}/.core/workflows/workspace.md` |158| Unclear | `help`, `look at`, `work with`, `handle` | Ask `plan (phased execution) / generate (modify) / analyze (read-only)?` and stop if the user cancels |159160`configure` routes through `generate.md`; that workflow may auto-trigger `requirements/auto-config.md` for brownfield projects with no project-specific rules.161162## Command Reference163164Entrypoint: `{cpt_cmd} <command> [options]`165Machine output: add `--json` as the first argument. Exit codes: `0 = PASS`, `1 = filesystem/config error`, `2 = FAIL`.166Legacy aliases: `validate-code` = `validate`; `validate-rules` = `validate-kits`.167168| Category | Commands |169|---|---|170| Validation | `validate` (artifacts + code), `validate-kits` (kit config), `validate-toc` (TOC integrity), `self-check` (template/example sync), `spec-coverage` (marker coverage) |171| Search | `list-ids` (enumerate IDs), `list-id-kinds` (kind counts), `get-content` (fetch by ID), `where-defined` (definition), `where-used` (references) |172| Kit management | `kit install` (install kit), `kit update` (file-level kit update) |173| Utilities | `toc` (generate TOC), `info` (discover config), `resolve-vars` (expand template vars), `init` (bootstrap project), `update` (refresh adapter), `agents` (show generated integrations), `generate-agents` (generate/update integrations) |174| Migration | `migrate` (v2→v3 project), `migrate-config` (JSON→TOML config) |175| Workspace | `workspace-init` (create workspace), `workspace-add` (add source), `workspace-info` (status), `workspace-sync` (update Git sources) |176177See `skills/cypilot/cypilot.clispec` for full syntax, arguments, options, exit semantics, and examples.178179## Auto-Configuration180181Use auto-config after `cypilot init` on a brownfield project, when project conventions are unknown, or after major structural changes. It scans structure/conventions, generates `{cypilot_path}/config/rules/{slug}.md`, adds WHEN rules to `{cypilot_path}/config/AGENTS.md`, and registers systems in `{cypilot_path}/config/artifacts.toml`. Invoke via `cypilot auto-config`, `cypilot configure`, or the automatic offer inside `generate.md`.182183## Project Configuration184185Project configuration lives in `{cypilot_path}/config/core.toml` (systems, kits, ignore lists). Artifact registry lives in `{cypilot_path}/config/artifacts.toml` (artifact paths, kinds, system mappings, codebase paths, autodetect rules). All commands output JSON when invoked with `--json`. Exit codes: 0=PASS, 1=filesystem error, 2=FAIL.186187---188> Source: [tbogdan/frontx](https://github.com/tbogdan/frontx) — distributed by [TomeVault](https://tomevault.io).189<!-- tomevault:4.0:skill_md:2026-05-23 -->