diff --git a/docs/wiki/Architecture.md b/docs/wiki/Architecture.md new file mode 100644 index 0000000..5b62e16 --- /dev/null +++ b/docs/wiki/Architecture.md @@ -0,0 +1,34 @@ +# Architecture + +`autopilot-demo` exists only to make the CAS autofix loop observable end to end. It is not the +operator and not the worker host — it is a bounded-blast-radius target that produces a public, +inspectable audit trail (failure event, queued issue, operator pickup, PR). + +```mermaid +flowchart LR + A["Trigger Demo CI\n(workflow_dispatch)"] --> B["demo-ci.yml runs\n(ubuntu-latest)"] + B --> C{CI result} + C -->|failure| D["autopilot-create-issue.yml\ncreates intake issue"] + D --> E["Issue: autofix + queued"] + E --> F["autopilot-core operator\npicks up issue"] + F --> G["Codex generates fix"] + G --> H["Pull Request opened\nin this repo"] +``` + + + +## Repo boundary + +- `autopilot-demo` is not the operator and not the worker host. It is the demonstration target. +- `autopilot-core` owns queue scanning, Codex invocation, and PR creation. +- `ci-autopilot` shows the worker/runtime implementation used to process queued repair tasks. + +## Trust boundaries + +- The demo's own CI (`ci.yml`) always passes — only `demo-ci.yml` is used to simulate a + controlled failure signal, keeping normal push/PR checks green. +- The intake path (`autopilot-create-issue.yml`) only creates issues; it never mutates code. +- All repair mutation happens through a PR opened by `autopilot-core`, reviewed like any other + change — no direct push to `main` from the automation path. + + diff --git a/docs/wiki/Decisions.md b/docs/wiki/Decisions.md new file mode 100644 index 0000000..fe72475 --- /dev/null +++ b/docs/wiki/Decisions.md @@ -0,0 +1,21 @@ +# Decisions + +## Phase summaries (`.planning/phases/`) + +| Phase | Topic | +|---|---| +| [01-enterprise-hardening](../../.planning/phases/01-enterprise-hardening/01-SUMMARY.md) | Enterprise hardening — CODEOWNERS, workflow permission tightening | + +## Quick fixes (`.planning/quick/`) + +| Entry | Topic | +|---|---| +| [260610-ppt-fix-pr-3-follow-up-readme-monitor-wordin](../../.planning/quick/260610-ppt-fix-pr-3-follow-up-readme-monitor-wordin/260610-ppt-SUMMARY.md) | README/monitor wording follow-up fix | + +## Architecture Decision Records (`docs/adr/`) + +[`docs/adr/`](../adr/README.md) is the formal ADR home for this repo (Context / Decision / +Consequences, sequentially numbered). No ADR files have been recorded yet as of this writing — +the directory holds only the governance README. + + diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md new file mode 100644 index 0000000..bfaff10 --- /dev/null +++ b/docs/wiki/Home.md @@ -0,0 +1,37 @@ +# autopilot-demo Wiki + +`autopilot-demo` is the **proof repo** for the Coding-Autopilot-System autonomous CI-repair +platform. It is a deliberately safe target that demonstrates the full failure-to-fix loop +without touching production control-plane infrastructure. + +## Role in the CAS portfolio + +| Repo | Role | +|---|---| +| [autopilot-core](https://github.com/Coding-Autopilot-System/autopilot-core) | Control plane: queue scanning, Codex invocation, PR creation | +| [ci-autopilot](https://github.com/Coding-Autopilot-System/ci-autopilot) | Worker/runtime reference implementation | +| **autopilot-demo** (this repo) | Demonstration target: shows the failure-to-fix loop end to end | + +## Quickstart + +```bash +# Trigger the Demo CI workflow (simulates a failure) +gh workflow run demo-ci.yml -R Coding-Autopilot-System/autopilot-demo + +# Watch for the intake issue to be created +gh issue list -R Coding-Autopilot-System/autopilot-demo --label autofix --label queued + +# Monitor autopilot-demo for the fix PR +gh pr list -R Coding-Autopilot-System/autopilot-demo +``` + +See the full [Demo runbook](../../README.md#demo-runbook) in the README for the reset and +troubleshooting procedure. + +## Where to go next + +- [Architecture](Architecture.md) — the demo trigger-to-PR flow +- [Operations](Operations.md) — verified run/test/CI commands +- [Decisions](Decisions.md) — index of recorded architectural decisions + + diff --git a/docs/wiki/Operations.md b/docs/wiki/Operations.md new file mode 100644 index 0000000..883e80c --- /dev/null +++ b/docs/wiki/Operations.md @@ -0,0 +1,55 @@ +# Operations + +## Run the demo + +```bash +gh workflow run demo-ci.yml -R Coding-Autopilot-System/autopilot-demo +gh issue list -R Coding-Autopilot-System/autopilot-demo --label autofix --label queued +gh pr list -R Coding-Autopilot-System/autopilot-demo +``` + +## Demo runbook + +1. Trigger `.github/workflows/demo-ci.yml` with `simulate_failure=true` to produce a known + failure signal. Regular pushes and default dispatches stay green. +2. Confirm `.github/workflows/autopilot-create-issue.yml` creates an `autofix + queued` issue. +3. Watch `autopilot-core` pick up the issue and open a PR back into this repo. +4. Use this repo's issue, branch, and PR history as the audit trail for the demo. + +## CI workflows + +| Workflow | Purpose | +|---|---| +| `ci.yml` | Portfolio CI — YAML validation (always passes) | +| `demo-ci.yml` | Demo trigger — simulates CI activity to test the intake flow | +| `autopilot-create-issue.yml` | Intake — creates the `autofix + queued` issue on workflow failure | +| `codeql.yml` | CodeQL static analysis | +| `pr-lint.yml` | PR metadata/title linting | +| `stale.yml` | Stale issue/PR sweep | +| `pages.yml` | Publishes docs to GitHub Pages | + +There is no coverage-percentage gate in this repo — `ci.yml` validates workflow YAML only, by +design (this repo has no application code to test). + +## Local verification + +```bash +python -m unittest discover -s tests -v +``` + +Run this before triggering the demo if CI fails at the validation step, per the README's +troubleshooting guidance. + +## Reset and troubleshooting + +1. Close the completed intake issue and merge or close its repair pull request before the next + demonstration. +2. Re-run with `simulate_failure=true`; intake reopens the matching issue when the same commit + is demonstrated again. +3. If no issue appears, inspect + `gh run list -R Coding-Autopilot-System/autopilot-demo --workflow autopilot-create-issue.yml` + and confirm the failed run was named `Demo CI`. +4. If the issue remains queued, verify the `autopilot-core` operator is running and can read + issues and create branches and pull requests in this repository. + +