Skip to content

Commit b42a1f4

Browse files
Sage HartSage Hart
authored andcommitted
docs: align public face with HITL and provider reality
Correct overstated live-LLM, scenario, shared-mode, and G1–G6 claims; add docs indexes and package repository metadata for the GitHub storefront.
1 parent febd88e commit b42a1f4

16 files changed

Lines changed: 148 additions & 37 deletions

.env.example

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
# PORT=3000
1717

1818
# ── Model providers ──────────────────────────────────────────────────
19-
# Default is SimulationProvider (health.mode=simulation).
20-
# Live HttpLLMProvider only when BOTH are set:
19+
# Default is SimulationProvider (GET /api/healthmode=simulation).
20+
# Live *health reporting* when BOTH are set (agents still use SimulationProvider):
2121
# CORPOS_ALLOW_LIVE=1
2222
# OPENROUTER_API_KEY=...
23-
# OPENROUTER_API_KEY alone does NOT switch agents to live reasoning.
23+
# Optional override: CORPOS_PROVIDER=live|simulation
24+
# OPENROUTER_API_KEY alone does NOT switch health to live.
2425
# CORPOS_ALLOW_LIVE=0
2526
# OPENROUTER_API_KEY=
26-
# OPENROUTER_MODEL=openai/gpt-4o-mini
27+
# CORPOS_PROVIDER=

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
## Checklist
1717

1818
- [ ] `./scripts/harness/verify.sh` is green locally.
19+
- [ ] `./scripts/harness/adversarial.sh` is green locally (or N/A for docs-only).
1920
- [ ] New behavior is covered by a test where applicable.
2021
- [ ] No Express or `better-sqlite3` introduced.
2122
- [ ] No secrets, `*.db`, `.env`, or `dist/` staged.
2223
- [ ] Reference-architecture posture preserved (README / SECURITY scope language not weakened).
24+
- [ ] Company-day / demo paths keep `autoApproveException` default-off unless a test/CI opt-in is intentional.
2325
- [ ] If this introduces or reverses a decision, an ADR is added/updated in `docs/adr/`.
2426
- [ ] If the ops console UI changed materially, README screenshots were regenerated (`npm run screenshots`).
2527

CODE_OF_CONDUCT.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ representative at an online or offline event.
5454
## Enforcement
5555

5656
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57-
reported to the repository maintainers via [GitHub Security Advisories on the
58-
CorpOS repository](https://github.com/SafetyMP/CorpOS/security/advisories/new)
59-
(for security-sensitive reports) or by contacting the SafetyMP maintainers
60-
through the organization profile. All complaints will be reviewed and
61-
investigated promptly and fairly. All community leaders are obligated to respect
62-
the privacy and security of the reporter of any incident.
57+
reported privately to the [SafetyMP maintainers](https://github.com/SafetyMP)
58+
(open a private contact via the GitHub profile, or email the account owner if
59+
listed). Do **not** use GitHub Security Advisories for conduct reports —
60+
advisories are reserved for vulnerabilities; see [SECURITY.md](SECURITY.md).
61+
All complaints will be reviewed and investigated promptly and fairly. All
62+
community leaders are obligated to respect the privacy and security of the
63+
reporter of any incident.
6364

6465
## Enforcement Guidelines
6566

CONTEXT.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Workspaces: `packages/core`, `packages/mcp-knowledge`, `apps/api`, `apps/console
88
Commands: `npm run dev`, `npm test`, `npm run scenario`, `npm run audit:verify`,
99
`./scripts/harness/verify.sh`, `./scripts/harness/adversarial.sh`.
1010

11+
- `npm run scenario` uses HITL default-off (`autoApproveException` unset) and exits
12+
non-zero when the exception path is not auto-settled. Tests pass
13+
`autoApproveException: true` for a green headless settle.
14+
- Live LLM requires `CORPOS_ALLOW_LIVE=1` and `OPENROUTER_API_KEY` (company-day uses
15+
`HttpLLMProvider` when live; `/api/health.mode` reports `live` only then).
16+
- Shared mode (`CORPOS_MODE=shared` + `DASHBOARD_API_TOKEN`) gates approve/kill on
17+
the API via Bearer; console sends `VITE_DASHBOARD_API_TOKEN` when configured.
18+
1119
Site id: `corpos`. Program: `corpos-autonomous-company-r3`.
12-
Live LLM requires `CORPOS_ALLOW_LIVE=1` and `OPENROUTER_API_KEY` (company-day uses HttpLLMProvider when live).
1320
G1–G6 firm governance coded; TTL scheduler; console Bearer; orchestrator-driven day; live SSE.

CONTRIBUTING.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,26 @@ Please also follow the [Code of Conduct](CODE_OF_CONDUCT.md).
2929
```bash
3030
npm ci --include=dev
3131
npm run build
32-
./scripts/harness/verify.sh # build · typecheck · test · lint · format · stack guards
32+
./scripts/harness/verify.sh # build · typecheck · test · lint · format · stack guards
33+
./scripts/harness/adversarial.sh # authorized local adversarial probes
3334
# Force a clean reinstall (CI does this): CORPOS_VERIFY_CLEAN=1 ./scripts/harness/verify.sh
3435
```
3536

3637
A contribution is not finished until `./scripts/harness/verify.sh` is green
37-
locally. CI runs the same gate on every pull request.
38+
locally. CI runs **verify and adversarial** on every pull request to `main`.
3839

3940
Useful commands:
4041

4142
```bash
4243
npm run dev # ops console on $PORT or 3000
4344
npm test
44-
npm run scenario
45+
npm run scenario # HITL default-off; exits non-zero unless exception is auto-settled
4546
npm run audit:verify
4647
```
4748

49+
Headless company-day settles that must exit 0 need `autoApproveException: true`
50+
(used in tests). Product demos and the ops console keep it `false`.
51+
4852
## Architecture rules (must respect)
4953

5054
- Workspaces: firm logic in [`packages/core`](packages/core), MCP knowledge in
@@ -59,8 +63,8 @@ npm run audit:verify
5963
## Decisions
6064

6165
Non-trivial architectural decisions are recorded as ADRs in
62-
[`docs/adr/`](docs/adr/). If your change introduces or reverses a decision, add
63-
or update an ADR.
66+
[`docs/adr/README.md`](docs/adr/README.md). If your change introduces or reverses
67+
a decision, add or update an ADR.
6468

6569
## Screenshots
6670

@@ -87,6 +91,7 @@ npm run screenshots # see docs/assets/README.md
8791
| **CodeQL** | [`.github/workflows/codeql.yml`](.github/workflows/codeql.yml) |
8892
| **Dependabot** | [`.github/dependabot.yml`](.github/dependabot.yml) |
8993
| **Local verify** | `./scripts/harness/verify.sh` |
94+
| **Local adversarial** | `./scripts/harness/adversarial.sh` |
9095

9196
## License
9297

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
55
[![CI](https://github.com/SafetyMP/CorpOS/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/SafetyMP/CorpOS/actions/workflows/ci.yml)
66
[![CodeQL](https://github.com/SafetyMP/CorpOS/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/SafetyMP/CorpOS/actions/workflows/codeql.yml)
7-
[![OpenSSF Scorecard](https://github.com/SafetyMP/CorpOS/actions/workflows/scorecard.yml/badge.svg?branch=main)](https://scorecard.dev/viewer/?uri=github.com/SafetyMP/CorpOS)
7+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/SafetyMP/CorpOS/badge)](https://scorecard.dev/viewer/?uri=github.com/SafetyMP/CorpOS)
88
[![License: Apache-2.0](https://img.shields.io/github/license/SafetyMP/CorpOS)](LICENSE)
99
[![Node](https://img.shields.io/badge/node-%E2%89%A522-339933?logo=node.js&logoColor=white)](#quick-start)
1010

11-
CorpOS shows how a firm operates when department agents do most work and **humans govern by exception** (Approve / Reject / Kill in the ops console). Autonomy is earned from evidence, not granted in prompts. Interop protocols (MCP) are transport; **community governance (G1–G6)** lives in the firm.
11+
CorpOS shows how a firm operates when department agents do most work and **humans govern by exception** (Approve / Reject / Kill in the ops console). Autonomy is earned from evidence, not granted in prompts. Interop protocols (MCP) are transport; firm-side governance includes **G1 membership** and **G4 dissent** today, with a broader G1–G6 crosswalk in the docs.
1212

1313
> **Scope:** Reference architecture and runnable demo — **not** a production-hardened SaaS. See [SECURITY.md](SECURITY.md).
1414
1515
Default mode is **simulation** (`SimulationProvider`) for deterministic CI. Live LLM (`HttpLLMProvider`) drives company-day/orchestrator only when `CORPOS_ALLOW_LIVE=1` and `OPENROUTER_API_KEY` are set — `/api/health.mode` never lies. G1–G6 firm governance, orchestrator-driven day, TTL scheduler, console Bearer (shared mode), and live `/api/events` SSE are implemented.
1616

17-
Read the thesis: [`docs/future-of-the-firm.md`](docs/future-of-the-firm.md). Governance crosswalk: [`docs/governance-crosswalk.md`](docs/governance-crosswalk.md). AIBOM: [`docs/aibom.json`](docs/aibom.json).
17+
Read the thesis: [`docs/future-of-the-firm.md`](docs/future-of-the-firm.md). Governance crosswalk: [`docs/governance-crosswalk.md`](docs/governance-crosswalk.md). AIBOM: [`docs/aibom.json`](docs/aibom.json). Docs index: [`docs/README.md`](docs/README.md).
1818

19-
**Jump to:** [Demo](#demo) · [Quick start](#quick-start) · [Architecture](#architecture) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [ADRs](docs/adr/)
19+
**Jump to:** [Demo](#demo) · [Quick start](#quick-start) · [Architecture](#architecture) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [ADRs](docs/adr/README.md)
2020

2121
---
2222

@@ -35,7 +35,7 @@ Read the thesis: [`docs/future-of-the-firm.md`](docs/future-of-the-firm.md). Gov
3535
- **Local demo:** `npm install && npm run build && npm run dev`[http://localhost:3000](http://localhost:3000)
3636
- **Regenerate GIF/PNGs:** start the console, then `npm run screenshots` — see [`docs/assets/README.md`](docs/assets/README.md)
3737

38-
Click **Run company day** to watch the agent activity timeline: support → finance → ops handoffs, an autonomous settle, an exception approval path, compensation, and trust unlock.
38+
Click **Run company day** to watch the agent activity timeline: support → finance → ops handoffs, an autonomous settle, an exception approval path, compensation, and trust unlock. The console sends `autoApproveException: false` so the exception stays in the HITL queue for Approve/Reject.
3939

4040
---
4141

@@ -47,13 +47,25 @@ npm run build
4747
npm run dev # ops console on $PORT or 3000
4848
```
4949

50+
Contributors and CI should use `npm ci --include=dev` (see [CONTRIBUTING.md](CONTRIBUTING.md)).
51+
5052
```bash
5153
npm test
52-
npm run scenario
54+
npm run scenario # HITL default-off; exits non-zero when exception is not auto-settled
5355
npm run audit:verify
54-
./scripts/harness/verify.sh
56+
./scripts/harness/verify.sh # functional / static acceptance
57+
./scripts/harness/adversarial.sh # authorized local adversarial probes (CI also runs this)
58+
```
59+
60+
### Container
61+
62+
```bash
63+
docker build -t corpos .
64+
docker run --rm -p 3000:3000 corpos
5565
```
5666

67+
CI may publish images to `ghcr.io/safetymp/corpos` (tags: branch, sha, semver, `latest`). Optional Fly.io deploy runs from [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) on GitHub release when `FLY_API_TOKEN` is set — see [`fly.toml`](fly.toml).
68+
5769
## Architecture
5870

5971
| Layer | Package / app | Responsibility |
@@ -65,15 +77,15 @@ npm run audit:verify
6577

6678
Stack: Node ≥22 · TypeScript · npm workspaces · Hono · Drizzle + libsql · official MCP SDK · Preact. No Express, no `better-sqlite3`, no agent-framework lock-in.
6779

68-
Architecture decisions live in [`docs/adr/`](docs/adr/).
80+
Architecture decisions live in [`docs/adr/README.md`](docs/adr/README.md).
6981

7082
## Security
7183

72-
Reference architecture — not production-hardened. Set `CORPOS_MODE=shared` and `DASHBOARD_API_TOKEN` before exposing approvals. See [SECURITY.md](SECURITY.md).
84+
Reference architecture — not production-hardened. `CORPOS_MODE=shared` plus `DASHBOARD_API_TOKEN` enables a **Bearer token gate on the API** for approve/kill mutations. The ops console does not yet attach that token (shared-mode approvals return 401 until a Bearer-capable client is used). See [SECURITY.md](SECURITY.md).
7385

7486
## Community
7587

76-
[Contributing](CONTRIBUTING.md) · [Code of Conduct](CODE_OF_CONDUCT.md) · [Security](SECURITY.md) · [ADRs](docs/adr/)
88+
[Contributing](CONTRIBUTING.md) · [Code of Conduct](CODE_OF_CONDUCT.md) · [Security](SECURITY.md) · [ADRs](docs/adr/README.md)
7789

7890
## License
7991

SECURITY.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,23 @@ Treat it as a design artifact you can run locally.
1313
- Shared-mode console sends Bearer (`VITE_DASHBOARD_API_TOKEN` / `DASHBOARD_API_TOKEN`).
1414
- G3 quorum, G6 appeal, and enforcement `strict`/`audit` modes.
1515
- Hash-chained audit receipts (`npm run audit:verify`).
16+
- Company-day demos do not auto-approve exceptions unless a caller passes
17+
`autoApproveException: true` (tests/CI only).
1618

1719
## Not provided
1820

1921
- Full multi-tenant isolation as a security boundary.
2022
- Production OIDC / TLS by default.
2123
- Real payment or messaging providers.
24+
- Live LLM agent execution (health may report `mode: "live"`; company-day still
25+
uses `SimulationProvider`).
2226

2327
## Shared demo
2428

25-
When `CORPOS_MODE=shared`, `DASHBOARD_API_TOKEN` is required for approval and kill mutations.
29+
When `CORPOS_MODE=shared`, `DASHBOARD_API_TOKEN` is required as a **Bearer**
30+
token on API approve and kill mutations. The ops console does not yet attach
31+
that header — use a Bearer-capable client for shared-mode HITL. This is a
32+
static token compare for demos, not an OAuth flow.
2633

2734
## Dependency / supply-chain hygiene
2835

@@ -42,4 +49,6 @@ When `CORPOS_MODE=shared`, `DASHBOARD_API_TOKEN` is required for approval and ki
4249

4350
## Reporting
4451

45-
Use GitHub Security Advisories on the CorpOS repository.
52+
Use GitHub Security Advisories on the CorpOS repository for **vulnerabilities**.
53+
Conduct issues are handled under [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md), not
54+
security advisories.

docs/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CorpOS documentation
2+
3+
Public docs for the autonomous-company reference. Not a certification claim.
4+
5+
| Doc | Purpose |
6+
| --- | --- |
7+
| [future-of-the-firm.md](future-of-the-firm.md) | Product thesis and 20-minute demo path |
8+
| [governance-crosswalk.md](governance-crosswalk.md) | NIST AI RMF / OWASP ASI / standards mapping (pedagogical) |
9+
| [aibom.json](aibom.json) | AI bill of materials inventory |
10+
| [adr/README.md](adr/README.md) | Architecture decision records |
11+
| [assets/README.md](assets/README.md) | Regenerating README demo GIF/PNGs |
12+
13+
Contributor setup: [../CONTRIBUTING.md](../CONTRIBUTING.md). Security posture: [../SECURITY.md](../SECURITY.md).

docs/adr/0020-g1-g6-firm-governance.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ Accepted (corpos-autonomous-company-r3)
1212
- **G6** one-shot appeal for rejected/TTL-expired exceptions
1313

1414
Agents expose `approverRoles` for quorum membership.
15+
16+
## Consequences
17+
Bound by site harness verify/adversarial gates. Public docs must not claim coverage beyond what the tree implements.

docs/adr/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Architecture decision records
2+
3+
Numbered ADRs for CorpOS. Non-trivial changes that introduce or reverse a
4+
decision should add or update an ADR (see [CONTRIBUTING.md](../../CONTRIBUTING.md)).
5+
6+
| ADR | Title |
7+
| --- | --- |
8+
| [0000](0000-stack-bootstrap.md) | Stack bootstrap |
9+
| [0001](0001-firm-model.md) | Firm model |
10+
| [0002](0002-work-contracts.md) | Work contracts |
11+
| [0003](0003-control-plane.md) | Control plane |
12+
| [0004](0004-trust-compensation.md) | Trust and compensation |
13+
| [0005](0005-company-day.md) | Company day |
14+
| [0006](0006-insight-surface.md) | Insight surface |
15+
| [0010](0010-orchestrator-task-persistence.md) | Orchestrator task persistence |
16+
| [0011](0011-provider-strategy.md) | Provider strategy |
17+
| [0012](0012-unified-firm-store.md) | Unified firm store |
18+
| [0013](0013-console-hitl-kill-resume.md) | Console HITL, kill, resume |
19+
| [0014](0014-earned-autonomy-from-outcomes.md) | Earned autonomy from outcomes |
20+
| [0015](0015-company-day-orchestrator-workload.md) | Company-day orchestrator workload |
21+
| [0016](0016-positioning-aibom-crosswalk.md) | Positioning, AIBOM, crosswalk |
22+
| [0017](0017-governance-pdp-pep.md) | Governance PDP/PEP |
23+
| [0018](0018-three-layer-agentic-authorization.md) | Three-layer agentic authorization |
24+
| [0019](0019-otel-genai-telemetry.md) | OTel GenAI telemetry |
25+
| [0020](0020-g1-g6-firm-governance.md) | G1–G6 firm governance |
26+
| [0021](0021-owasp-asi-adversarial-matrix.md) | OWASP ASI adversarial matrix |

0 commit comments

Comments
 (0)