Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/wiki/Architecture.md
Original file line number Diff line number Diff line change
@@ -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"]
```

<!-- codex:generate-image prompt="A single glass test chamber on a factory floor with a red failure light, a robotic arm reaches in, tags the chamber with a queued ticket, then a second arm delivers a wrapped package labeled Pull Request; isometric, enterprise blue/graphite palette" style="isometric, enterprise, clean" replaces="mermaid-above" -->

## 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.

<!-- docs-verified: ec62179aa2c20bc731542de4ac3fec9cc94a831d 2026-07-08 -->
21 changes: 21 additions & 0 deletions docs/wiki/Decisions.md
Original file line number Diff line number Diff line change
@@ -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.

<!-- docs-verified: ec62179aa2c20bc731542de4ac3fec9cc94a831d 2026-07-08 -->
37 changes: 37 additions & 0 deletions docs/wiki/Home.md
Original file line number Diff line number Diff line change
@@ -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

<!-- docs-verified: ec62179aa2c20bc731542de4ac3fec9cc94a831d 2026-07-08 -->
55 changes: 55 additions & 0 deletions docs/wiki/Operations.md
Original file line number Diff line number Diff line change
@@ -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.

<!-- docs-verified: ec62179aa2c20bc731542de4ac3fec9cc94a831d 2026-07-08 -->
Loading