# echovic/boss-skill architecture

> Architecture diagram of the GitHub repository echovic/boss-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/echovic/boss-skill
- Repository: https://github.com/echovic/boss-skill

## Overview

Boss is an auditable workflow skill for coding agents: it coordinates planning through delivery, records runtime evidence, and exposes results through a bundled CLI. The map emphasizes that user-to-result path plus quality checks and documented hooks, packs, memory, and preview capabilities. The sampled code directly supports CLI initialization/inspection, pipeline setup, event projection, and artifact-DAG handling; broader feature wiring is included only where described by the README or tree.

Main entry points: [`packages/boss-cli/src/runtime/application/pipeline.ts`](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline.ts) (Pipeline orchestration), [`packages/boss-cli/src/bin/boss.ts`](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/bin/boss.ts) (Bundled CLI), [`packages/boss-cli/src/runtime/application/state.ts`](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/state.ts) (Event and state access), [`packages/boss-cli/src/runtime/application/pipeline-dag.ts`](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline-dag.ts) (Artifact dependencies)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Agent workflow"]
  node_cli["Bundled CLI<br/>[boss.ts]"]
  node_dispatch["Command dispatch<br/>[dispatcher.ts]"]
  node_project["Project workflow<br/>[index.ts]"]
  node_pipeline["Pipeline orchestration<br/>[pipeline.ts]"]
  node_stages["Plan, review, build, ship<br/>[pipeline.ts]"]
end

subgraph group_runtime["Runtime audit"]
  node_state["Event and state access<br/>[state.ts]"]
  node_events[("Append-only event log")]
  node_projector["State projection"]
  node_execution["Execution view"]
  node_inspection["Runtime inspection<br/>[inspection.ts]"]
end

subgraph group_quality["Quality and artifacts"]
  node_dag["Artifact dependencies<br/>[pipeline-dag.ts]"]
  node_artifacts[("Workflow artifacts")]
  node_gates["Quality gates<br/>[gates.ts]"]
  node_qa["QA and verification<br/>[qa-attack.ts]"]
  node_reports["Reports and summaries<br/>[render-markdown.ts]"]
end

subgraph group_extensions["Hooks and extensions"]
  node_hooks["Agent lifecycle hooks<br/>[session-start.js]"]
  node_plugins["Plugins and packs<br/>[plugins.ts]"]
  node_memory["Persistent agent memory<br/>[memory.ts]"]
  node_preview["Design preview<br/>[server.ts]"]
end

node_agent(("Coding agent"))
node_filesystem[("Project filesystem")]

node_agent -->|"runs commands"| node_cli
node_cli -->|"dispatches"| node_dispatch
node_dispatch -->|"routes workflow"| node_project
node_project -->|"initializes pipeline"| node_pipeline
node_pipeline -->|"coordinates stages"| node_stages
node_pipeline -->|"resolves dependencies"| node_dag
node_pipeline -->|"registers plugins"| node_plugins
node_pipeline -->|"records lifecycle"| node_state
node_state -->|"appends events"| node_events
node_projector -->|"replays events"| node_events
node_projector -->|"materializes view"| node_execution
node_state -->|"reads view"| node_execution
node_dag -->|"reads pipeline config"| node_execution
node_dag -->|"loads DAG"| node_filesystem
node_stages -->|"produces artifacts"| node_artifacts
node_gates -->|"records verdicts"| node_events
node_qa -->|"runs checks"| node_gates
node_inspection -->|"reads runtime"| node_state
node_inspection -->|"summarizes state"| node_execution
node_cli -->|"invokes inspection"| node_inspection
node_reports -->|"renders evidence"| node_artifacts
node_hooks -.->|"invokes runtime"| node_cli
node_memory -->|"stores memory"| node_filesystem
node_plugins -.->|"loads extensions"| node_filesystem
node_preview -.->|"serves preview"| node_agent

click node_cli "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/bin/boss.ts"
click node_dispatch "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/cli/dispatcher.ts"
click node_project "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/commands/project/index.ts"
click node_pipeline "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline.ts"
click node_stages "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline.ts"
click node_state "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/state.ts"
click node_projector "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/projectors/materialize-state.ts"
click node_inspection "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/inspection.ts"
click node_dag "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline-dag.ts"
click node_gates "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/gates.ts"
click node_qa "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/qa-attack.ts"
click node_reports "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/report/render-markdown.ts"
click node_hooks "https://github.com/echovic/boss-skill/blob/main/skill/scripts/hooks/session-start.js"
click node_plugins "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/plugins.ts"
click node_memory "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/memory.ts"
click node_preview "https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/design/server.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_dispatch,node_project,node_pipeline,node_stages toneBlue
class node_state,node_events,node_projector,node_execution,node_inspection,node_filesystem toneAmber
class node_dag,node_artifacts,node_gates,node_qa,node_reports toneMint
class node_hooks,node_plugins,node_memory,node_preview toneRose
class node_agent toneIndigo
```

## Components

### Agent workflow

- [Bundled CLI](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/bin/boss.ts): `packages/boss-cli/src/bin/boss.ts`
- [Command dispatch](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/cli/dispatcher.ts): `packages/boss-cli/src/cli/dispatcher.ts`
- [Project workflow](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/commands/project/index.ts): `packages/boss-cli/src/commands/project/index.ts`
- [Pipeline orchestration](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline.ts): `packages/boss-cli/src/runtime/application/pipeline.ts`
- [Plan, review, build, ship](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline.ts): `packages/boss-cli/src/runtime/application/pipeline.ts`

### Runtime audit

- [Event and state access](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/state.ts): `packages/boss-cli/src/runtime/application/state.ts`
- **Append-only event log**
- [State projection](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/projectors/materialize-state.ts): `packages/boss-cli/src/runtime/projectors/materialize-state.ts`
- **Execution view**
- [Runtime inspection](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/inspection.ts): `packages/boss-cli/src/runtime/application/inspection.ts`

### Quality and artifacts

- [Artifact dependencies](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/pipeline-dag.ts): `packages/boss-cli/src/runtime/application/pipeline-dag.ts`
- **Workflow artifacts**
- [Quality gates](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/gates.ts): `packages/boss-cli/src/runtime/application/gates.ts`
- [QA and verification](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/qa-attack.ts): `packages/boss-cli/src/runtime/application/qa-attack.ts`
- [Reports and summaries](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/report/render-markdown.ts): `packages/boss-cli/src/runtime/report/render-markdown.ts`

### Hooks and extensions

- [Agent lifecycle hooks](https://github.com/echovic/boss-skill/blob/main/skill/scripts/hooks/session-start.js): `skill/scripts/hooks/session-start.js`
- [Plugins and packs](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/plugins.ts): `packages/boss-cli/src/runtime/application/plugins.ts`
- [Persistent agent memory](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/application/memory.ts): `packages/boss-cli/src/runtime/application/memory.ts`
- [Design preview](https://github.com/echovic/boss-skill/blob/main/packages/boss-cli/src/runtime/design/server.ts): `packages/boss-cli/src/runtime/design/server.ts`

### Other components

- **Coding agent**
- **Project filesystem**

## Connections

- Coding agent → Bundled CLI: runs commands
- Bundled CLI → Command dispatch: dispatches
- Command dispatch → Project workflow: routes workflow
- Project workflow → Pipeline orchestration: initializes pipeline
- Pipeline orchestration → Plan, review, build, ship: coordinates stages
- Pipeline orchestration → Artifact dependencies: resolves dependencies
- Pipeline orchestration → Plugins and packs: registers plugins
- Pipeline orchestration → Event and state access: records lifecycle
- Event and state access → Append-only event log: appends events
- State projection → Append-only event log: replays events
- State projection → Execution view: materializes view
- Event and state access → Execution view: reads view
- Artifact dependencies → Execution view: reads pipeline config
- Artifact dependencies → Project filesystem: loads DAG
- Plan, review, build, ship → Workflow artifacts: produces artifacts
- Quality gates → Append-only event log: records verdicts
- QA and verification → Quality gates: runs checks
- Runtime inspection → Event and state access: reads runtime
- Runtime inspection → Execution view: summarizes state
- Bundled CLI → Runtime inspection: invokes inspection
- Reports and summaries → Workflow artifacts: renders evidence
- Agent lifecycle hooks → Bundled CLI: invokes runtime
- Persistent agent memory → Project filesystem: stores memory
- Plugins and packs → Project filesystem: loads extensions
- Design preview → Coding agent: serves preview
