Detail Planning Assistant
Deliverable AGT-004. Structure per cc02-standards/SYSTEM-STANDARD.md. Every component traces to a design basis (NEED/REQ) and to an acceptance criterion.
1. Purpose and Design Basis
1.1 Scope and Objective
The Detail Planning Assistant is a prescriptive decision-support agent designed to ingest client itineraries, match them against D-02 protective detail skeletons, and draft initial Detail Operations Orders (EP-010).
1.2 Design Basis
This system automates the structural preparation of operational orders. It uses pre-formatted operational templates to ensure consistent, policy-compliant layout generation while strictly keeping client identities anonymous via a structured initialization filter.
1.3 Needs
- NEED-AGT-004-01: CEO/TL (RF) needs automated drafting support to accelerate the creation of detail operations orders.
- Source: RF (CEO/TL) operational planning bottleneck.
- Context: The CEO/TL currently drafts all operational orders from scratch, creating a major delay in deployment.
- NEED-AGT-004-02: The Systems Engineer (CS) requires a deterministic mapping of input parameters (venue survey, route analysis) to prevent leakage of client identities or location databases during model inference.
- Source: CS (Systems Engineer) security tools plan.
- Context: Detail operations orders must mask principal identities with initials and use bracketed placeholders for unverified addresses.
1.4 Requirements
- REQ-AGT-004-01 (Traceability: NEED-AGT-004-01): When provided with a client itinerary file, the Detail Planning Assistant shall scaffold a Detail Operations Order (EP-010) draft within 5 minutes [VR-AGT-004-01].
- Verification Method: Analysis (A)
- REQ-AGT-004-02 (Traceability: NEED-AGT-004-01): When processing itineraries, the Detail Planning Assistant shall highlight any location not matching the verified database for manual advance verification [VR-AGT-004-02].
- Verification Method: Inspection (I)
- REQ-AGT-004-03 (Traceability: NEED-AGT-004-02): The assistant shall replace all personal identities in the output draft with authorized initials [VR-AGT-004-03].
- Verification Method: Test (T)
2. Architecture As Built
The Detail Planning Assistant is a prescriptive decision-support service (Python 3.12, utilizing the Anthropic Claude API client). It ingests client itineraries (YAML/Markdown), parses the structural parameters, filters out sensitive identities using local regular expression models, and submits the sanitized context along with structured EP-010 templates to the Claude API. The resulting draft operations order is validated for schema completeness and written to disk.
Data flow:
- The operator provides a client itinerary file and parameters via the CLI.
- The sanitization filter parses the input data, replacing full names with initials based on a local configuration mapping.
- A database lookup checks whether itinerary venues exist in the verified venue database, flagging any that do not.
- The assistant runner loads the EP-010 template and constructs a structured prompt for the Claude API.
- The client connection submits the sanitized itinerary payload and prompt to the Claude API.
- The output validator parses the returned markdown to confirm all required EP-010 headings are present.
- The finalized draft is written to the drafts directory.
+-------------------------------------------------------------------------+
| AGT-004 Detail Planning Assistant |
| |
| [Itinerary Ingest] ---> [Input Sanitization Filter] ---> [LLM Engine] |
| | |
+--------------------------------------------------------------|----------+
v
[Drafted EP-010 OPORD]
3. Components and Bill of Materials
| Component | Spec | Vendor / Link | Price | Tier | Status | Traceability |
|---|---|---|---|---|---|---|
| Assistant Runner | Python automation framework with context parser | Internal | $0.00 | - | SELECTED | REQ-AGT-004-01 |
| LLM API Client | Anthropic Claude API (Claude 3.5 Sonnet) | Anthropic | [USAGE_COST] | - | GAP | REQ-AGT-004-03 |
| Template Loader | Markdown templates library | Internal | $0.00 | - | SELECTED | REQ-AGT-004-01 |
Note: LLM API Client is a GAP row; specific pricing and token usage limits are ungrounded in the program development mind map and are marked as a GAP.
4. Build and Deployment
4.1 Environment Configuration
- Clone the project planning script module to the target host and install project dependencies in the python virtual environment:
uv sync. - Ingest the D-02 templates and store them in the templates directory; verify that target templates for EP-010 operations orders are copied into the
templates/path. - Configure the Anthropic API key via environment variables inside
/etc/default/planning-assistant.
4.2 Application Flow Setup
- Mount the inputs volume for itineraries; establish the local verified venue database or CSV file configuration path.
- Establish validation scripts to verify output format.
- Run integration tests to verify database connection stability.
- Run the assistant utility using:
uv run planning-assistant --itinerary <path> --output <path>.
5. Hardening Baseline
- Local Containment: Enforce strict local containment, ensuring no external script execution is permitted during LLM processing [REQ-AGT-004-01].
- User Separation: Run the runner daemon on a dedicated, non-privileged user account.
- Identity Redaction: Enforce regex-based identity filters on all context inputs before submitting payloads to the external API [REQ-AGT-004-03].
- Credential and Timeout Control: Restrict the configuration file
/etc/default/planning-assistant(containing the Anthropic API key) to the execution user only (chmod 0400); enforce strict local timeout limits (e.g. 60 seconds) on API connections to prevent execution hanging.
6. Integration Points
| Interface | Type | Direction | Contract |
|---|---|---|---|
| Ingest Inputs | File (Markdown / YAML) | Consumed | Input itineraries, EP-002 survey reports, and EP-003 route analysis |
| Output OPORD | File (Markdown) | Produced | Structured EP-010 operations order draft |
7. Acceptance Tests
| Criterion | Method | Expected Result | Reference |
|---|---|---|---|
| REQ-AGT-004-01 | Analysis | Confirm draft EP-010 matches all sections in 5 minutes. | VR-AGT-004-01 |
| REQ-AGT-004-02 | Inspection | Verify that unverified addresses are flagged in the warning annex of the draft. | VR-AGT-004-02 |
| REQ-AGT-004-03 | Test | Run test execution with full names and verify that output contains only initials. | VR-AGT-004-03 |
8. Run and Maintenance Handover
- Execution Command:
uv run planning-assistant --itinerary <path> --output <path>. - Update Cadence: Update D-02 templates and prompt files quarterly.
- Ownership: Systems Engineer (CS).
END OF SYSTEM
Model wiring
Generated from cell frontmatter at publish time.