# COA Planner

**A structured staff-planning workspace.**
`coa-planner.infinity-sdg.com`. An Infinity Software Development Group product built on Kalos/ADL.

```
plan: receipt → analysis → COA development → comparison → decided → published
  tasks · facts & assumptions · criteria · courses of action → scores · risks · decision record
```

The product is for any organization that plans under time pressure: emergency management, defense staffs, utilities, and large-event operations.

## What it enforces

The rules below are enforced on the server, so no screen or API call can skip them.

- **No course-of-action development before the essential tasks are written.**
- **No comparison without criteria and at least two ready courses of action.**
- **AI-drafted courses of action need a human.** Each one must name the model that drafted it, and it counts only after a named person has reviewed it.
- **Only ready courses of action are scored.** Each scores 1–5 per weighted criterion, with a rationale.
- **A plan is decided only by an approved decision record**, which captures who decided, which course of action and why. Deciding with unvalidated assumptions is allowed but flagged.
- **Major risks need a mitigation.**
- **Superseded decisions stay on record.**
- **Every change is audited** with the old and new values, who made it and when. Plans and decisions also appear in a readable history timeline.

## Resources

`plan` · `task` · `assumption` · `criterion` · `course` · `score` · `risk` · `decision`

Views: **planBoard** (late plans highlighted), **aiDraftedCourses**, **openAssumptions**.
Roles: `planner`, `lead`, `decision_maker`, `observer`, `admin`.

## Demo data

A regional emergency-management staff with 10 planning efforts: hurricane supply distribution, flood evacuation, winter-storm warming centers, power restoration, wildfire shelters and more.
- **Stages:** four are decided (one published), three are in comparison with a draft decision, and three are still developing courses of action.
- **Courses of action:** every plan has one written by staff and one AI-drafted and reviewed by a named planner.
- **Hurricane plan:** this one is fully worked, with four weighted criteria and a scored comparison.
- **Superseded drafts:** three decided plans carry an earlier draft decision that was superseded after new information.

Regenerate the seed with `python3 seeds/gen_seed.py`.

## Run it

This repo runs on a [Kalos](https://github.com/datajango/kalos) checkout, as one of its `*.infinity-sdg.com` sub-domain sites.

```bash
export KALOS_REPO=~/kalos        # defaults to ../kalos beside this repo
scripts/kalos.sh validate        # static checks (adlref + config + seed)
scripts/kalos.sh start           # certs + fresh DB + kalosd on :9208
scripts/kalos.sh verify          # boot, seed, exercise over TLS, stop
```

Sign in as `admin` / `Admin123!`, or as `planner1`, `lead1`, `director1` or `observer1` / `Demo123!`.

## Reselling

The product is generic. To brand it for a customer, change `site.json`, the port in `config.json`, and the data in `seeds/gen_seed.py`.
