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:

  1. The operator provides a client itinerary file and parameters via the CLI.
  2. The sanitization filter parses the input data, replacing full names with initials based on a local configuration mapping.
  3. A database lookup checks whether itinerary venues exist in the verified venue database, flagging any that do not.
  4. The assistant runner loads the EP-010 template and constructs a structured prompt for the Claude API.
  5. The client connection submits the sanitized itinerary payload and prompt to the Claude API.
  6. The output validator parses the returned markdown to confirm all required EP-010 headings are present.
  7. 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

ComponentSpecVendor / LinkPriceTierStatusTraceability
Assistant RunnerPython automation framework with context parserInternal$0.00-SELECTEDREQ-AGT-004-01
LLM API ClientAnthropic Claude API (Claude 3.5 Sonnet)Anthropic[USAGE_COST]-GAPREQ-AGT-004-03
Template LoaderMarkdown templates libraryInternal$0.00-SELECTEDREQ-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

  1. Clone the project planning script module to the target host and install project dependencies in the python virtual environment: uv sync.
  2. 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.
  3. Configure the Anthropic API key via environment variables inside /etc/default/planning-assistant.

4.2 Application Flow Setup

  1. Mount the inputs volume for itineraries; establish the local verified venue database or CSV file configuration path.
  2. Establish validation scripts to verify output format.
  3. Run integration tests to verify database connection stability.
  4. 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

InterfaceTypeDirectionContract
Ingest InputsFile (Markdown / YAML)ConsumedInput itineraries, EP-002 survey reports, and EP-003 route analysis
Output OPORDFile (Markdown)ProducedStructured EP-010 operations order draft

7. Acceptance Tests

CriterionMethodExpected ResultReference
REQ-AGT-004-01AnalysisConfirm draft EP-010 matches all sections in 5 minutes.VR-AGT-004-01
REQ-AGT-004-02InspectionVerify that unverified addresses are flagged in the warning annex of the draft.VR-AGT-004-02
REQ-AGT-004-03TestRun 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.