Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
9a86fa9
docs: define automation control-plane architecture
seonghobae Aug 9, 2026
d647acf
docs(automation): reconcile whole-conversation documentation scope
seonghobae Aug 9, 2026
b4f8253
docs(automation): index whole-conversation fitness audit
seonghobae Aug 9, 2026
81fc492
docs(standards): add requirements and product-quality baselines
seonghobae Aug 9, 2026
6c160ea
docs(standards): correct requirements draft source
seonghobae Aug 9, 2026
0f37e9a
docs(adr): prohibit soft-timeout and meta-action completion
seonghobae Aug 9, 2026
96097db
docs(erd): model remediation and continuation evidence
seonghobae Aug 9, 2026
e6870d6
test(docs): enforce conversation and standards freshness
seonghobae Aug 9, 2026
4b02edb
docs(data-model): model remediation and continuation traceability
seonghobae Aug 9, 2026
7cf7ea1
test(docs): bind new evidence entities into data model
seonghobae Aug 9, 2026
9aca5fb
docs(traceability): align maturity and live redaction lineage
seonghobae Aug 9, 2026
7f4e6d5
docs(uml): add writer rotation and documentation continuation flows
seonghobae Aug 9, 2026
5e7d703
docs(audit): close repaired documentation-family gaps
seonghobae Aug 9, 2026
3edd408
test(docs): make ownership contract semantic and bind continuation UML
seonghobae Aug 9, 2026
e7771a0
docs(automation): version central event and result contracts
seonghobae Aug 9, 2026
9b63d2a
docs(automation): index versioned event contracts
seonghobae Aug 9, 2026
3009af2
test(docs): require versioned event contract baseline
seonghobae Aug 9, 2026
c2fa86d
docs(threats): model premature termination and split authority
seonghobae Aug 9, 2026
7270fed
docs(operability): define defer wait and termination receipts
seonghobae Aug 9, 2026
940fd5f
docs(automation): index autonomy threat and continuation runbook
seonghobae Aug 9, 2026
92baf6f
test(docs): bind autonomy threat and continuation runbook
seonghobae Aug 9, 2026
23d897b
docs(threats): align maturity and redaction lineage
seonghobae Aug 9, 2026
b2f5c06
docs(adr): point redaction decision to clean successor
seonghobae Aug 9, 2026
89c361b
docs(adr): correct redaction integration lineage
seonghobae Aug 9, 2026
b822cbc
docs(doctoring): index control-plane research authority
seonghobae Aug 9, 2026
76f0d38
docs(automation): link doctoring reference authority
seonghobae Aug 9, 2026
5ee7554
docs(data-model): make run parents optional and map issuers
seonghobae Aug 9, 2026
eedfb26
test(docs): require discoverable doctoring authority
seonghobae Aug 9, 2026
d93b0cf
docs(security): register secrets and disclose mapping debt
seonghobae Aug 9, 2026
c72c8bb
docs(testing): narrow structural contract claims
seonghobae Aug 9, 2026
c3d302b
docs(traceability): use precise locators and live gap lineage
seonghobae Aug 9, 2026
6ec904f
docs(trd): register audited implementation gaps
seonghobae Aug 9, 2026
5074de4
docs(mentions): disclose snapshot and dead-letter limits
seonghobae Aug 9, 2026
ce597fd
docs(sbom): mark zero inventory as unmaterialized
seonghobae Aug 9, 2026
45b0401
docs(policy): align reviewer tool boundary
seonghobae Aug 9, 2026
0df7483
docs(rollout): add current executable corrections
seonghobae Aug 9, 2026
6b8578a
docs(audit): separate current corrections from history
seonghobae Aug 9, 2026
f8f6edf
docs(nvidia): remove stale bypass and secret alias
seonghobae Aug 9, 2026
d4e0569
docs(scorecard): pin exact approval count
seonghobae Aug 9, 2026
01a9883
docs(agents): enforce same-invocation continuation
seonghobae Aug 9, 2026
b700ff0
docs(audit): reconcile donors and executable drift
seonghobae Aug 9, 2026
b2ac52c
test(docs): enforce current automation contracts
seonghobae Aug 9, 2026
cde2a0c
test(docs): align secret debt assertions
seonghobae Aug 9, 2026
51dbf9c
ci(docs): add permanent full-quality gate
seonghobae Aug 9, 2026
f7ac194
docs(standards): state certification boundary explicitly
seonghobae Aug 9, 2026
641ef4e
test(docs): accept semantic coverage paths and wrapped prose
seonghobae Aug 9, 2026
aed69a1
test(docs): normalize wrapped SBOM prose
seonghobae Aug 9, 2026
e18e88a
docs(automation): follow redaction successor lineage
seonghobae Aug 9, 2026
c89aaf8
docs(traceability): supersede contaminated redaction history
seonghobae Aug 9, 2026
4b3f4e3
docs(adr): record redaction successor supersession
seonghobae Aug 9, 2026
034d4a0
docs(adr): index current redaction successor
seonghobae Aug 9, 2026
c25e766
test(docs): require superseded and active redaction lineage
seonghobae Aug 9, 2026
d096d6d
docs(traceability): link residual redaction work
seonghobae Aug 9, 2026
a6e2230
docs(automation): define continuation receipt sink
seonghobae Aug 9, 2026
8344fe4
test(docs): enforce continuation handoff acknowledgement
seonghobae Aug 9, 2026
439426d
test(docs): preserve historical loop supersession contracts
seonghobae Aug 9, 2026
e978f24
docs(automation): supersede fixed wall-clock exit cutoffs
seonghobae Aug 9, 2026
1b129e7
docs(security): supersede Copilot-named API credential alias
seonghobae Aug 9, 2026
6de58d9
docs(automation): reconcile superseded loop guidance
seonghobae Aug 9, 2026
4dbf099
docs(changelog): record historical loop supersession
seonghobae Aug 9, 2026
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
74 changes: 74 additions & 0 deletions .github/workflows/automation-documentation-quality-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Automation Documentation Quality CI

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/**"
- "docs/**"
- "*.md"
- "scripts/ci/**"
- "tests/**"
- "requirements-opencode-review-ci-hashes.txt"
- "pyproject.toml"
push:
branches: [main]
paths:
- ".github/workflows/**"
- "docs/**"
- "*.md"
- "scripts/ci/**"
- "tests/**"
- "requirements-opencode-review-ci-hashes.txt"
- "pyproject.toml"

concurrency:
group: automation-documentation-quality-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
PYTHONDONTWRITEBYTECODE: "1"

jobs:
docs-quality:
name: Full suite and documentation contracts
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit

- name: Checkout exact event revision
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 1
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
cache: pip
cache-dependency-path: requirements-opencode-review-ci-hashes.txt

- name: Install hash-pinned test dependencies
run: >-
python -m pip install --disable-pip-version-check
--require-hashes
-r requirements-opencode-review-ci-hashes.txt

- name: Run full repository suite with permanent coverage gate
run: |
python -m coverage erase
python -m coverage run -m pytest tests -q
python -m coverage report --fail-under=100

- name: Compile test contracts
run: python -m compileall -q tests
2 changes: 1 addition & 1 deletion .github/workflows/pr-review-merge-scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ jobs:
# published after the scheduler pass, required merge-preview checks landing
# late, a base-branch policy blocker clearing) stays approved-but-unmerged
# with no later trigger. This job re-runs the same trusted scheduler against
# every organization repository on an hourly heartbeat so each such PR is
# every organization repository on a 15-minute heartbeat so each such PR is
# merged, branch-updated, or leaves a concrete per-PR blocker reason in this
# log. It never bypasses policy: all mutations go through the same guarded
# scheduler contract as the per-repository runs.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/strix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ on:
# path filters against the PR's full base..head diff, so a PR is skipped only
# when EVERY changed file is a non-executable doc/image asset; any code,
# config, build, or workflow change still triggers the scan. Concurrency is
# PR-number based for status grouping, but Strix runs intentionally do not
# cancel in progress because a pre-job cancellation leaves no scanner log to
# review. Queue pressure should be handled by stale-run cleanup outside this
# current-head evidence path. For PRs the merge scheduler manages, same-head
# event-class/repository/PR-number scoped and cancels obsolete work within
# that class. Separate event classes keep a default-branch dispatch from
# cancelling the required pull_request_target context. For PRs the merge
# scheduler manages, same-head
# Strix evidence is still forced at merge time via repository_dispatch (which
# paths-ignore does not affect), so merged code never loses evidence.
paths-ignore:
Expand Down
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@

<!-- CWL-ENTRY -->
> **Agents: read the master context FIRST.** Before any work, read [`docs/CWL-MASTER-CONTEXT.md`](docs/CWL-MASTER-CONTEXT.md) (mission · naruon-as-platform + inter-component UML · cross-cutting disciplines · conventions · roadmap · current state), the live **GitHub Project #1** <https://github.com/orgs/ContextualWisdomLab/projects/1> (work/roadmap source of truth), the full spec **ContextualWisdomLab/naruon#974**, and operate the Project per [`docs/agent-github-project-protocol.md`](docs/agent-github-project-protocol.md). The repo/Project — not any private agent memory — is the source of truth.

For central review, security, merge, fix, sandbox, or autonomous-maintenance work,
also read the authoritative [automation documentation graph](docs/automation/README.md)
and update its traceability/ADR entries whenever an authority, trust, failure,
secret, evidence, compatibility, or operational-acceptance boundary changes.
Treat a prompt or documentation update, Draft/Ready transition, auto-merge or
review request, defer decision, merge, and status report as intermediate work:
return to live queue selection in the same invocation. Ordinary termination
requires two fresh whole-queue no-work sweeps; real budget exhaustion records a
non-clean `budget_exhausted` continuation handoff.
17 changes: 17 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Architecture index

This repository is both the ContextualWisdomLab organization profile and the
shared automation control plane.

- The ecosystem and naruon platform context live in
[docs/CWL-MASTER-CONTEXT.md](docs/CWL-MASTER-CONTEXT.md).
- The central automation architecture, product and technical requirements,
component/sequence/state/deployment UML, conceptual evidence ERD, trust
boundaries, failure domains, operations, and decisions start at
[docs/automation/README.md](docs/automation/README.md).
- Live repository-by-repository governance observations remain in
[PR_GOVERNANCE_AUDIT.md](PR_GOVERNANCE_AUDIT.md).

The durable boundary is central shared policy and trusted execution with thin,
versioned consumers. Product repositories remain independently operable and own
their domain code, data, tests, releases, deployments, and migrations.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ Semantic Versioning where the repository publishes a release.

### Added

- Added an authoritative automation documentation graph covering PRD, TRD,
architecture, conceptual ERD, UML behavior views, security and threat model,
test strategy, operability, incident response, requirement traceability, sixteen
detailed ADRs, current standards doctoring, and machine-checkable index/source
contracts.
- Added a trusted pull-request comment router for `@cwl-noema-review` and review-only `@opencode-agent` dispatches, with an organization sweep, exact-head receipts, repository allowlisting, fixed runners, immutable checkout pins, and a permanent 100% statement/branch/docstring quality gate.
- Added exact-base `uv.lock` materialization that reconstructs standalone nested projects with a checksum-pinned official `uv` exporter, isolated frozen/offline execution, strict exact-pin and SHA-256 output validation, and complete Python 3.10/3.14 quality evidence.

### Fixed

- Reconciled superseded autonomous-loop guidance so historical fixed 45-minute/minute-35 cutoffs cannot replace practical-budget plus double-sweep exit proof, and retired the historical `COPILOT_GITHUB_TOKEN` Agent Tasks API alias in favor of purpose-bound GitHub authority separated from `NVIDIA_NIM_API_KEY` model access.
- Bounded the Strix quality self-test's deterministic timeout fixtures to 3-second process and 5-second fake-sleep budgets so exact-head policy evidence completes inside the existing job limit without changing production Strix scanner timeouts, providers, credentials, or review semantics.
- Allowed commas and ASCII parentheses in the bounded Strix changed-file path policy so legal tracked Packrat fixtures can receive exact-head security analysis, while rejecting raw `..` components before normalization and keeping controls, backslashes, whitespace ambiguity, and shell punctuation fail-closed.
- Bound each review-agent invocation key to the wrapper's complete canonical payload, including the base branch and requesting actor; altered fields with a valid-format key now fail before durable-leader election or forwarding, and wrapper write permission is job-scoped.
Expand Down
17 changes: 11 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ This is the ContextualWisdomLab **organization-wide `.github` special repository
`profile/assets/`. Org-wide defaults `SECURITY.md`, `.github/CODEOWNERS`, and
`.github/dependabot.yml` also live here.
2. **Central PR governance and CI hub** — the workflows in `.github/workflows/` are the canonical
implementation of PR review, security scanning, and merge automation for **every sibling repo**.
implementation of PR review, security scanning, and merge automation for enrolled sibling repos.
An organization required-workflow ruleset (`CWL Central required workflows`, id `18156473`) runs
Strix, OpenCode Review, and the PR Review Merge Scheduler from this repo in each target
repository's context. Repository-local copies of these workflows are drift sources, not
repo-specific contracts. See `README.md` (policy summary) and `PR_GOVERNANCE_AUDIT.md`
(live audit + per-repo DX/UX transfer decisions).
(historical snapshot + per-repo DX/UX transfer decisions). Durable current contracts start at
[`docs/automation/README.md`](docs/automation/README.md); fetch GitHub live state before acting.
3. **Infrastructure as code** — `infra/cloudflare/` manages the org's DNS zones and Cloudflare Pages
hosting declaratively (`zones.json` + `reconcile.sh`, curl + jq only; dry-run by default, writes
only on explicit manual `mode = apply`).

## Governance model in one paragraph

**OpenCode judges PRs; GitHub Actions performs mechanical updates and merges.** OpenCode approval is
evidence-gated (changed files, CodeGraph evidence, Change Flow DAG, test/coverage/docstring evidence,
**OpenCode, Noema, Strix, and deterministic checks produce separate evidence; GitHub rulesets and
qualifying reviewers authorize, and GitHub Actions performs guarded mechanical updates and merges.**
OpenCode approval is evidence-gated (changed files, CodeGraph evidence, Change Flow DAG, test/coverage/docstring evidence,
an actually-executed PoC via `scripts/ci/sandboxed_verify.py` or `scripts/ci/sandboxed_web_e2e.py`,
split `Developer experience:` / `User experience:` sections). The scheduler updates a PR branch only
when the latest review is approved, no current-head check has failed, and GitHub reports the PR as
Expand All @@ -57,14 +59,17 @@ Details: `README.md` and `PR_GOVERNANCE_AUDIT.md`.
- `scripts/ci/` — Python/bash helpers the workflows execute (schedulers, review normalization and
gates, sandboxed verification, prompt template rendering). `tests/` covers them.
- `opencode.jsonc` + `ci-review-prompt.md` + `code-reviewer-prompt.md` — the OpenCode reviewer
configuration (GitHub Models provider, CodeGraph/DeepWiki/Context7/web-search MCP). All reviewer
configuration (NVIDIA NIM first, with a bounded GitHub Models fallback pool and
CodeGraph/DeepWiki/Context7/web-search MCP). All reviewer
agents have `"edit": "deny"`: they are reviewers, never implementers. Keep it that way.
- `requirements-{bandit,pip-audit,strix,opencode-review}-ci.txt` + `*-hashes.txt` — pinned CI
dependency sets (see below).
- `fuzz/` + `.clusterfuzzlite/` — Atheris fuzz targets for the review-output normalizer and the
ClusterFuzzLite discovery marker.
- `docs/` — master context, Project protocol, `org-required-workflow-rollout.md`,
`scorecard-governance.md`, SBOM inventory.
`scorecard-governance.md`, SBOM inventory, and the authoritative
[`docs/automation/`](docs/automation/README.md) PRD/TRD/architecture/UML/ERD,
security, test, operations, traceability, and ADR graph.
- `.jules/` — recorded performance (`bolt.md`) and security (`sentinel.md`) learnings from past work
on `scripts/ci/`; worth scanning before optimizing or hardening those scripts.

Expand Down
34 changes: 29 additions & 5 deletions PR_GOVERNANCE_AUDIT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
# PR Governance Audit

Live check: 2026-06-26 17:53 KST, GitHub API via `gh` as `seonghobae`.

## Canonical Policy
# PR Governance Audit — historical snapshot

> **Historical evidence, not current authority.** Observed 2026-06-26 17:53
> KST through the GitHub API. Repository state, rulesets, workflows, providers,
> review counts, merge modes, and open PRs have changed since this capture.
> Re-fetch live GitHub state before acting. Durable current contracts start at
> [`docs/automation/README.md`](docs/automation/README.md); this file preserves
> the dated fleet observation and decision history for auditability.

> **Current contract correction (2026-08-09).** Strix now uses
> PR/event-or-ref concurrency with `cancel-in-progress: true`, not a head-SHA
> non-cancelling group. Protected-main targeted scheduler, OpenCode, and Strix
> dispatch reject external heads while the contract is resolved in
> [Issue #889](https://github.com/ContextualWisdomLab/.github/issues/889).
> The central autofix worker is the shared default for `pg-erd-cloud`; the old
> repo-local recommendation is superseded. Mutation authority still includes
> an exchanged repository-scoped App-token fallback after configured tokens.
> The canonical automation documents and executable source govern.

Snapshot check: 2026-06-26 17:53 KST, GitHub API via `gh` as `seonghobae`.

- Snapshot status: historical and stale for mutation decisions
- Freshness policy: re-fetch after 24 hours or any relevant repository/ruleset event
- Regeneration input: live organization repositories, rulesets, PR heads,
checks, reviews, threads, workflow sources, and permissions
- Receipt limitation: the original raw API bundle was not retained; the dated
observations below are evidence, not a reproducible current-state digest

## Policy recorded at snapshot time

OpenCode decides; GitHub Actions mutates.

Expand Down
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,28 @@ The public GitHub organization profile lives in [profile/README.md](profile/READ

Homepage: https://contextualwisdomlab.github.io/

PR governance live audit: [PR_GOVERNANCE_AUDIT.md](PR_GOVERNANCE_AUDIT.md).
The audit includes repository-by-repository DX/UX transfer decisions: what the
central workflow borrows because it reduces friction, and what it rejects
because it adds noise or misleading review experience.
Historical PR-governance snapshot: [PR_GOVERNANCE_AUDIT.md](PR_GOVERNANCE_AUDIT.md).
It records repository-by-repository DX/UX observations as of its stated date;
live decisions must re-fetch GitHub state and use the durable contracts below.

The authoritative product, technical, architecture, UML, conceptual ERD,
security, testing, operability, traceability, and ADR graph for the organization
automation control plane starts at
[docs/automation/README.md](docs/automation/README.md). Historical audits and
rollout ledgers are evidence, while the automation documents define durable
intended contracts.

## PR review and merge policy

OpenCode judges PRs; GitHub Actions performs mechanical updates and merges.
The scheduler updates a same-repository PR branch only when the latest OpenCode
review is approved, no current-head failed check is present, and GitHub reports
the PR as behind. After that update, the new head must pass OpenCode, Strix,
required checks, and review-thread gates again before auto-merge or
`--match-head-commit` merge can proceed.
OpenCode, Noema, Strix, and deterministic checks produce separate evidence;
GitHub rulesets and qualifying reviewers authorize, and GitHub Actions performs
only guarded mechanical updates and merges. The live organization contract
requires exactly two approving reviews, dismissal after a push, last-pusher
protection, resolved threads, and current-head required checks. The scheduler
updates a same-repository PR branch only when its exact-head evidence and live
policy allow that mutation. After any update, the new head must pass all review,
security, required-check, and thread gates again before auto-merge or an
expected-head direct merge can proceed.
Branch updates and merges run through the central scheduler mutation credential:
`PR_REVIEW_MERGE_TOKEN`, `OPENCODE_APPROVE_TOKEN`, the exchanged OpenCode GitHub
App token, or finally the target workflow token. The scheduler reports the
Expand Down Expand Up @@ -78,9 +87,12 @@ push, and commits as `github-actions[bot]` only when a conservative OpenCode
autofix produces a validated diff. A repository-local autofix worker remains an
explicit compatibility override through `--autofix-repository`; it is no longer
the default contract.
Strix keeps `cancel-in-progress: false` so old evidence is not cancelled by a
force-push, but PR-scoped concurrency includes the head SHA so an obsolete scan
does not serialize newer current-head evidence.
Strix concurrency is scoped by event class, target repository, and PR number (or
ref for non-PR work), with `cancel-in-progress: true`. A newer event therefore
cancels obsolete work in its own class, while `repository_dispatch` and
`pull_request_target` remain separate so default-branch retry evidence cannot
cancel the required PR context. Only the completed current-head result is
authoritative.

OpenCode approval is evidence-gated. Before approval, the review summary must
name changed files, CodeGraph or structural MCP evidence, a Change Flow DAG,
Expand Down Expand Up @@ -120,10 +132,11 @@ that discovers runtime matrices, package manifests, test, coverage, docstring,
E2E, lint, security, Docker, and unpackaged-source gaps before the agent chooses
commands.
The configured `code-reviewer` subagent is reviewer-only: it may read, grep,
glob, and run safe local verification commands, but it must not edit files,
stage changes, commit, push, install dependencies, mutate branches, or touch
production state. Blocking findings must be source-backed, severity-labeled,
impactful, remediable, and include suggested verification.
and glob, but it cannot invoke Bash, task/subagents, or webfetch under
`opencode.jsonc`. It must not edit files, stage changes, commit, push, install
dependencies, mutate branches, or touch production state. Blocking findings
must be source-backed, severity-labeled, impactful, remediable, and include
suggested verification for an authorized execution plane.

Failed GitHub Checks are not reviewed as URL lists. OpenCode must explain the
failed check name, failing step, source-backed file and line when available,
Expand Down
Loading
Loading