Narrative & Evidence Workflow
This is the core workflow for updating control implementations on the platform. Follow this sequence for any control update.
Workflow Steps
1. Resolve the Target
Identify the system_id, control_id, and framework_id for your update. Set the active context:
pretorin context set --system "My Application" --framework fedramp-moderate
2. Read Current State
Before making changes, understand what’s already there:
# Get full control context (requirements + current implementation)
# Via MCP: pretorin_get_control_context
# Get current narrative
pretorin narrative get ac-02 fedramp-moderate
# Search existing evidence
pretorin evidence search --control-id ac-02 --framework-id fedramp-moderate
# List existing notes
pretorin notes list ac-02 fedramp-moderate
3. Collect Observable Facts
Search your codebase and connected systems for evidence. Only document what is directly observable — never assume or fabricate implementation details.
4. Draft Updates
Prepare three types of updates:
Narrative — How the control is implemented. Include TODO placeholders for unknowns:
[[PRETORIN_TODO]]
missing_item: SSO configuration details
reason: Not observable from current workspace and connected MCP systems
required_manual_action: Export IdP SAML configuration
suggested_evidence_type: configuration
[[/PRETORIN_TODO]]
Evidence — Specific artifacts demonstrating implementation (config files, code, policies).
Gap Notes — Unresolved items requiring manual follow-up:
Gap: Missing MFA enforcement evidence
Observed: TOTP library imported in auth module
Missing: MFA policy enforcement configuration
Why missing: IdP admin console not accessible via codebase
Manual next step: Screenshot MFA policy from Azure AD admin portal
5. Push Updates
# Push narrative
pretorin narrative push ac-02 fedramp-moderate "My Application" narrative-ac02.md
# Upsert evidence (finds or creates, then links)
pretorin evidence upsert ac-02 fedramp-moderate \
--name "RBAC Configuration" \
--description "Role mapping in IdP" \
--type configuration
# Add gap notes
pretorin notes add ac-02 fedramp-moderate \
--content "Gap: Missing MFA evidence..."
Read-Only Draft Workflow
When you want AI drafts before any platform writes:
- Resolve scope (system, control, framework)
- Read current state (context, narrative, evidence, notes)
- Generate drafts via
pretorin agent run --skill narrative-generationor the MCPpretorin_generate_control_artifactstool - Review the draft — clearly separate candidate narrative, evidence gaps, and manual follow-up actions
- Only push to the platform after explicit approval
Markdown Quality Rules
All narratives and evidence must pass markdown quality validation:
Narratives
- No markdown headings (
#,##, etc.) - At least 2 rich markdown elements (code blocks, tables, lists, links)
- At least 1 structural element (code block, table, or list)
- No markdown images
Evidence
- No markdown headings
- At least 1 rich markdown element
- No markdown images
Evidence Deduplication
pretorin evidence upsert and the MCP pretorin_create_evidence tool use find-or-create logic by default (dedupe: true):
- Search for an exact match on (name + description + type + control + framework) within the active system scope
- If found, reuse the existing evidence item
- If not found, create a new one
- Ensure the evidence is linked to the specified control
The response indicates whether the evidence was created (new) or reused, along with the match_basis.