Skip to content

Commit 7b9cb5d

Browse files
committed
Add staged weekly reporting
Fan out read-only quest discovery into validated report artifacts and assemble deterministic parent and child issue previews without enabling schedules or repository writes.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 615c5f6 commit 7b9cb5d

23 files changed

Lines changed: 5044 additions & 315 deletions

.github/agentic-refresh/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Agentic refresh controls
22

33
This directory contains the governance boundary for quest refresh automation.
4-
Phase 0 established the controls. Phase 1 adds manually dispatched, read-only
5-
discovery workflows without enabling schedules or repository writes.
4+
Phase 0 established the controls. Phase 1 added manually dispatched, read-only
5+
discovery workflows. Phase 2A adds reusable staged reporting, structured
6+
artifacts, and deterministic parent/child previews without enabling schedules or
7+
repository writes.
68

79
- [`capabilities.json`](./capabilities.json) keeps Buildathon writes disabled
810
until the repository-scoped token and dispatch spikes pass. External
@@ -23,22 +25,31 @@ discovery workflows without enabling schedules or repository writes.
2325
- The five Quest Master profiles under [`../agents`](../agents) fix each quest's
2426
source and path boundary.
2527
- The five `discover-*.md` workflows under [`../workflows`](../workflows) run
26-
manual Phase 1 audits. Their shared policy permits only read operations and
27-
returns reports in the agent response. Every automatic issue path is disabled,
28-
and safe-output processing is forced into staged preview mode.
28+
manual or orchestrated audits. Their shared policy permits only read
29+
operations, and `shared/report-output.md` materializes a validated run-scoped
30+
JSON artifact. Every automatic issue path is disabled, and safe-output
31+
processing is forced into staged preview mode.
32+
- `weekly-refresh-orchestrator.yml` fans out to all five reusable compiled
33+
workflows only through manual dispatch. `weekly-refresh-digest.md` downloads
34+
available quest artifacts, converts missing scopes to blocked results, and
35+
uploads deterministic parent and child issue previews.
36+
- `scripts/weekly-refresh-report.mjs` is the machine-readable authority for ISO
37+
week context, schema validation, lifecycle/source/path boundaries, materiality,
38+
markers, finding keys, deduplication keys, and preview rendering.
2939

3040
Run the local Phase 0 checks with:
3141

3242
```bash
3343
node scripts/validate-refresh-config.mjs
44+
node scripts/weekly-refresh-report.mjs self-test
3445
node scripts/validate-content-links.mjs
3546
mkdocs build --strict
3647
gh aw compile --strict --validate
3748
```
3849

39-
No scheduled or write-capable agentic workflow is enabled. Phase 1 workflows
40-
cannot be live-trialed through `workflow_dispatch` until their compiled
41-
definitions are available on the default branch.
50+
No scheduled or write-capable agentic workflow is enabled. The discovery and
51+
reporting workflows cannot be live-trialed through `workflow_dispatch` until
52+
their compiled definitions are available on the default branch.
4253

4354
gh-aw v0.77.5 normally reserves `issues: write` for generated failure-reporting
4455
jobs even when issue handlers are disabled. Phase 1 additionally sets

.github/agentic-refresh/governance.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,23 @@ With staging enabled, the compiled Phase 1 locks contain no repository write
9696
permission. Phase 2 must deliberately remove staging and revisit permissions
9797
before enabling real issue reporting.
9898

99+
## Phase 2A staged reporting guard
100+
101+
The weekly reporting layer remains manual-only and report-only:
102+
103+
- the deterministic orchestrator has `workflow_dispatch` but no schedule;
104+
- all five Quest Master workflows accept reusable `workflow_call` inputs for an
105+
ISO week and prior ISO week;
106+
- the only agent-requested output is a custom job that validates and uploads a
107+
run-scoped JSON artifact;
108+
- the digest tolerates missing quest artifacts by recording the scope as
109+
blocked, then creates deterministic parent and child previews as artifacts;
110+
- no compiled or traditional workflow grants issue, branch, pull-request,
111+
workflow-dispatch, or content write permission.
112+
113+
The intended `0 8 * * 1` schedule and real issue safe outputs remain Phase 2B
114+
activation work and require default-branch trials plus the bounded token spike.
115+
99116
## SAML authorization
100117

101118
SAML authorization is needed only for local audits and human GitHub operations.

.github/agentic-refresh/report-contract.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
Each weekly run produces one digest covering all five quests. It creates a child
44
plan only for a material change.
55

6+
Every quest run first emits one version 1 JSON artifact with:
7+
8+
- ISO week key, prior ISO week key, and exact quest slug;
9+
- exactly one result: `material-change`, `no-material-change`, or `blocked`;
10+
- source facts separated from repository observations and proposed changes;
11+
- lifecycle, allowlisted evidence URL, evidence location, wording, and source
12+
fingerprint for every official-source delta;
13+
- learner impact, owned-path drift, asset impact, report-only CodeTour impact,
14+
validation, risks, human decisions, and prior finding keys;
15+
- deterministic parent key, child key, markers, source fingerprints, and finding
16+
keys added by `scripts/weekly-refresh-report.mjs`.
17+
18+
A completed report must include source fingerprints. A blocked report must state
19+
one concise reason and cannot propose changes. A no-change report cannot propose
20+
changes. Invalid or missing quest artifacts become blocked scopes in the digest.
21+
622
A child plan must contain:
723

824
1. Quest and ISO week key.
@@ -23,3 +39,13 @@ Reports must distinguish source facts, repository observations, inferred
2339
impact, proposed changes, and unresolved uncertainty. Search snippets are not
2440
evidence. No implementation may start from a digest or an unapproved child
2541
plan.
42+
43+
Phase 2A produces only run-scoped artifacts:
44+
45+
- one validated JSON artifact per successful quest output;
46+
- one deterministic digest JSON file;
47+
- one parent issue Markdown preview;
48+
- one child issue Markdown preview only for each material-change result.
49+
50+
No Phase 2A workflow creates or updates an issue, comment, branch, pull request,
51+
workflow dispatch, schedule, or content file.

.github/agentic-refresh/tooling.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"ghAwVersion": "v0.77.5",
44
"ghAwSetupAction": "github/gh-aw-actions/setup-cli@3ea13c02d765410340d533515cb31a7eef2baaf0",
55
"checkoutAction": "actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803",
6+
"downloadArtifactAction": "actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c",
7+
"uploadArtifactAction": "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a",
68
"pythonVersion": "3.12"
79
}

0 commit comments

Comments
 (0)