---
name: ssp-generate
description: Generate a markdown SSP from current Halo state. Read-only Path B — walks Site → Control Implementation (per Site × Catalog) → Implemented Requirements (per control) → Implementation Statements (per Component × control) → Set Parameters (per ODP slot), iterating the Class baselines on Site.CFBaselines (e.g. FedRAMP Rev5 Class C + FedRAMP 20x Class C), rendering one markdown SSP per baseline plus a cross-baseline gaps.md report. Renders OSCAL set-parameter values from the linked SP assets, never from IS prose. Does NOT write to Halo. Load when the user runs /ssp-generate, asks to "render the SSP", "produce the SSP markdown", "preview the current SSP state", or "generate the gap report".
---

# ssp-generate — Render markdown SSP from Halo

## References

| Reference | Type | Location | When to Use |
|---|---|---|---|
| `ssp` | Skill | `plugins/grcitsm-analyst/skills/ssp/` | SSP asset workflow primer (read-side audit disciplines, absent_fields) |
| `ssp-ingest` | Skill | `plugins/grcitsm-analyst/skills/ssp-ingest/` | Write-side counterpart that populates the data this skill reads |
| `ssp-interview` | Skill | `plugins/grcitsm-analyst/skills/ssp-interview/` | Interview-driven write-side counterpart |
| `ssp-brand-voice` | Skill | `plugins/grcitsm-analyst/skills/ssp-brand-voice/` | Voice for render-time prose (placeholders, transitions) |
| `halo-ssp-asset-model` | Skill | `plugins/grcitsm-analyst/skills/halo-ssp-asset-model/` | Field schema for what gets read |
| `grcitsm` | Skill | `plugins/grcitsm-analyst/skills/grcitsm/` | Halo MCP catalog read tools |

Read-only Path B for the SSP system. Reads current Halo state, walks the SSP asset spine, renders one markdown SSP per baseline + a cross-baseline gaps report. Safe to run anytime — never modifies Halo.

## When to load this skill

- User types `/ssp-generate` (with or without flags).
- User asks to "render the SSP", "produce the SSP markdown", "generate the SSP document", "preview the SSP", "show me the gap report", "see what's missing from the SSP".

## Flags

- `--site-id N` — required (or `--client-name "X"`).
- `--baseline "X"` — optional; restrict to a single Class baseline (default: render one SSP per Class baseline entry in `Site.CFBaselines`).
- `--output-dir DIR` — optional; default `outputs/ssp-{site-id}-{date}/`.

## Pipeline (1 phase)

```
1. RENDER         (ssp-author agent)
   Read Site state, walk Implemented Requirements (per-control) → Implementation Statements
   (per-Component-narrative) → Set Parameters (per ODP slot, rel 12 on the IR and rel 11
   on the CI) per baseline, render one markdown SSP per baseline + cross-baseline gaps.md.
```

Single phase, single agent. No review, no user-edit loop, no writer — pure read-and-render.

## SSP structure (v1)

v1 section scope: `§1 Name · §2 Categorization · §3 Owner · §9 Description+Boundary+Network+Data Flow · §13 Controls · §15 Acronyms`. Other FedRAMP SSP sections (§4-8, §10-12, §14) deferred.

See the `ssp-author` agent definition § §13 walking algorithm for the control-walk details.

## Output

```
outputs/ssp-{site-id}-{date}/
  ssp-fedramp-rev5-class-c.md      # if FedRAMP Rev5 Class C is on Site.CFBaselines
  ssp-fedramp-20x-class-c.md       # if FedRAMP 20x Class C is on Site.CFBaselines
  (... one .md per Class baseline ...)
  gaps.md                          # cross-baseline gap analysis
```

## What happens to missing data

When a control has no matching Implemented Requirement (dtype 190) OR an IR has no downstream Implementation Statement (dtype 191) OR an IS has an empty Implementation Statement field, render `_Not Documented — TBD_` placeholder inline with the control text. ALSO logged to `gaps.md` for the gap report. See the `ssp-author` agent definition § gaps.md format.

Per-control fields surface under the `absent_fields` discipline (see [[ssp]] § Read-side audit disciplines): emit absent values as `null` and list the field names in `absent_fields` rather than defaulting to a placeholder value. "Not Assessed" is a deliberate Halo state, not a fallback bucket.

## Set parameters (OSCAL set-parameter)

ODP values are rendered from the linked Set Parameter assets (dtype 193), NOT scraped from Implementation Statement narrative. During the per-control walk, follow the SP children — rel 12 on the IR (Scope=`Control`, → `implemented-requirement.set-parameters[]`) and rel 11 on the CI (Scope=`System`, → `control-implementation.set-parameters[]`) — and render each SP's Parameter Value (field 236) as the chosen value for its `[Assignment: organization-defined ...]` slot, keyed by the SP's Title/Index/Label (213/237/238). Per-control SPs render inline with the control; system-wide SPs render once at the Control Implementation level. See [[ssp]] § Read-side audit disciplines (`set_parameters`) for the per-control emit shape and `halo-ssp-asset-model` for the SP field schema.

When a FedRAMP Rev5 control carries an ODP slot in the catalog but no linked SP asset exists, render `_ODP value Not Documented — TBD_` inline and log to `gaps.md`. CMMC and FedRAMP 20x catalogs carry no ODP prose, so absent SPs on those baselines are expected and are NOT gaps.

## KSI report reconciliation (FedRAMP 20x only)

When the baseline being rendered is a FedRAMP 20x Class baseline (`FedRAMP 20x Class A/B/C` on `Site.CFBaselines`), call `mcp__grcitsm__CF_ksi_report` for the site as a corroborating second source alongside the graph-walk implementation status. The KSI report is Halo's first-class view of 20x validation; treat its status as authoritative for KSI validation outcome and reconcile divergence against the graph-walk record on each KSI control:

- Graph-walk: `implementation_status` from the IS narrative + IR scaffolding.
- KSI report: `ksi_report_status` (e.g. `Pending`, `Pass`, `Fail`).

Where the two diverge (e.g. `ksi_report_status: "Pending"` vs `implementation_status: "Implemented"`), emit both values on the per-control record and add the divergence to `gaps.md` for human reconciliation. Do NOT silently prefer one source — both are real and the gap is the finding. Skip this step for non-20x baselines (Rev5, CMMC, Drata) — `mcp__grcitsm__CF_ksi_report` is 20x-only.

## Cross-references

- `ssp-author` agent — the agent that runs this skill.
- [[ssp-ingest]] / [[ssp-interview]] — the write-side counterparts that populate the data this skill reads.
- [[ssp]] — SSP asset workflow primer.
- [[halo-ssp-asset-model]] — field schema (what gets read).
- [[ssp-brand-voice]] — voice for render-time prose (placeholders, transitions).
- [[grcitsm]] — Halo MCP catalog read tools.

## Sub-agents this skill orchestrates

- `ssp-author` — the only agent. Read-only.
