# Generative Sequence — GAO Green Book Control Activities Pattern

## Overview
This generative sequence implements the Christopher Alexander method for the **GAO Green Book Control Activities** pattern.

## Steps

1. **Elicit Context**
   - Agency mission and regulatory constraints.
   - Existing control activity documentation (baseline).

2. **Extract Forces**
   - "Need for documented evidence of control implementation."
   - "Requirement for clear audit trail of policy execution."
   - [Optional additional forces from local domain].

3. **Construct Instance**
   - Populate the pattern instance template:
     - `where`: Agency office that owns the OT system.
     - `when`: Planned implementation window.
     - `evidence`: Select applicable GAO Green Book controls (e.g., AC-3, AC-5).

4. **Validate Against Evidence**
   - Verify each instance against the pattern card’s evidence artifacts.
   - Confirm each evidence item’s `verified: true`.

5. **Publish (E1/E2 gates)**
   - Run validation gates (schema, PROV-O, SHACL, JSON-LD expansion).
   - If all green, set `status: "published"` and record the publish activity in the provenance graph.

## Example Usage
```bash
# Run preflight checks (E1)
.venv/bin/python publish_gate_check.py
# Run validators (E2)
.venv/bin/python architecture/examples/validate-prov-o.py architecture/examples/gao-green-book-provenance.jsonld
.venv/bin/python architecture/examples/validate-shacl.py architecture/examples/gao-green-book-provenance.jsonld
.venv/bin/python architecture/examples/jsonld_expand_test.py architecture/examples/gao-green-book-provenance.jsonld
```

## Outcome
A published, immutable pattern record v1 that other agencies can adopt to document their control activities with audit‑ready evidence.

## Maintenance
- To create a new version, bump the pattern `version` field, copy the current record, update `updated` timestamp, and re‑run the preflight/gates.
- Any change to `sequences` or `evidence` requires a new version and fresh sign‑off.
