Skip to content

Commit e6de8bf

Browse files
committed
docs(ai.governance): align repo AI config to VS Code GitHub Copilot Chat only
Re-pin Addy Osmani/Graphify/Caveman to reviewed stable releases, add the .vscode/settings.json discovery boundary so Chat reads only .github/**, and reconcile prompts/skills/docs that had drifted from the current six-phase lifecycle. Implements docs/architecture/specs/plan-vscode-github-copilot-chat-alignment.md (VC-01 through VC-16).
1 parent 1e7bc8c commit e6de8bf

40 files changed

Lines changed: 1362 additions & 254 deletions

.github/agents/punch-ai-governance.agent.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@ absence from every `agents:` allowlist keep it out of `punch-builder`'s reach.
4848
```
4949
Allowed: .github/** (ALL configs — skills, prompts, agents, instructions,
5050
copilot-instructions; complete admin), docs/** (all documentation,
51-
incl. docs/ai/**), README.md
51+
incl. docs/ai/**), README.md, .vscode/settings.json (VS Code
52+
GitHub Copilot Chat discovery boundary only — narrowly this one
53+
file, not broader .vscode/**)
5254
Read-only: source / runtime, for context only — src/**, docker/**,
5355
docker-compose.yml, reports/**, graphify-out/** (read, never edit)
54-
Forbidden: .ai-upstream/** (frozen upstream provenance — never edit)
56+
Forbidden: .ai-upstream/** (frozen upstream provenance — never edit);
57+
.agents/**, .claude/**, and their workspace-root markdown
58+
counterparts (dismissed external-host config — never touched,
59+
never canon)
5560
Handle with care (admin allowed; convention, not an access block):
56-
.agents/skills/** and .github/skills/graphify/** (adopted
57-
upstream — prefer refresh from upstream over hand-edit; only
58-
`user-invocable`/`disable-model-invocation` frontmatter fields
59-
are Punch additions to `graphify`); docs/ai/history/** (frozen
60-
record — append, don't rewrite).
61+
.github/skills/caveman/** and .github/skills/graphify/**
62+
(adopted upstream — prefer refresh from upstream over
63+
hand-edit; only `user-invocable`/`disable-model-invocation`
64+
frontmatter fields are Punch additions); docs/ai/history/**
65+
(frozen record — append, don't rewrite).
6166
```
6267

6368
Complete admin over **all configs under `.github/`** and **all docs under

.github/assets/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ mirror set covers every out-of-bundle link (see the resolve gate in
3535
|--------------------|------------------------|
3636
| `docs/architecture/punch-boundaries.md` (7) | `resolve/docs/architecture/punch-boundaries.md` |
3737
| `docs/workflows/validation.md` (2) | `resolve/docs/workflows/validation.md` |
38-
| `CLAUDE.md` (2 · repo-root rule source) | `resolve/CLAUDE.md` |
39-
| `AGENTS.md` (1 · AI agent guide) | `resolve/AGENTS.md` |
4038

4139
## Hub-Spoke
4240

.github/assets/prompts/punch-init.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ description: 'AI 治理代理 · 啟引:掃 .github/ 與倉碼、安掃,certif
2222
2. **安掃(security scan · 須過方續)**:掃步 1 之入,查秘鑰、私 URL、內務脈絡(中樞戒律五)。
2323
- **PASS** = 淨,方續。
2424
- **FAIL** = 見洩 → 阻 certify,先報洩處,人除方再掃。
25-
3. **解 gate(resolve · self-resolutive check)**:驗 bundle(`.github/` + `docs/ai/`)之出域文鏈皆有 `resolve/` 鏡照覆之,使 bundle 自解、不外伸(唯 `.github/` · `docs/ai/` · `.ai-upstream/` · `resolve/`)。對 `.github/assets/README.md` 之 resolve 表(`punch-boundaries``validation``CLAUDE.md``AGENTS.md`)逐一核:鏡照在否、覆全引處否。
25+
3. **解 gate(resolve · self-resolutive check)**:驗 bundle(`.github/` + `docs/ai/`)之出域文鏈皆有 `resolve/` 鏡照覆之,使 bundle 自解、不外伸(唯 `.github/` · `docs/ai/` · `.ai-upstream/` · `resolve/`)。對 `.github/assets/README.md` 之 resolve 表(`punch-boundaries``validation`)逐一核:鏡照在否、覆全引處否。
2626
- 鏡照****某出域鏈(範圍外類除外) → 解軌 **WARN**,薦補 caveman-wenyan 鏡照 snapshot 於 `resolve/`
2727
4. **繪備度(map)**:對範本 `.github/assets/**` 每檔 + 解軌,定備度閘(下)。
2828
5. **certify**:判本倉 + Copilot 配置是否 **document_ready**(可用 `/punch-document`)。

.github/assets/resolve/AGENTS.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/assets/resolve/CLAUDE.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/copilot-instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ before bending.
1616
*WHY:* irreversible + externally visible. PR boundary = where human judgment enters.
1717
5. **No secrets, no private URLs, no internal business context** in source, docs, prompts, or test inputs. Use env vars for any external base URL.
1818

19+
## Discovery boundary (this workspace)
20+
21+
VS Code Copilot Chat discovers repository customizations from
22+
`.github/instructions`, `.github/prompts`, `.github/agents`, and
23+
`.github/skills` only — [`.vscode/settings.json`](../.vscode/settings.json) is
24+
the enforced guard. Root `AGENTS.md`, `CLAUDE.md`, `.agents/**`, and
25+
`.claude/**` are disabled for this workspace and are not Punch Chat canon;
26+
they may still serve other hosts untouched.
27+
1928
## Architecture ownership
2029

2130
Each layer owns one decision domain; Build prompts refuse cross-layer without

.github/instructions/artifacts-reporting.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
applyTo: "src/tests/support/**,src/punch/**,reports/**,docs/validation/**"
2+
applyTo: "src/tests/support/**,src/punch/**,reports/**,docs/workflows/validation.md"
33
description: Contract for artifacts, logs, summaries, and reports produced by Punch.
44
---
55
# Artifacts & Reporting — Path Instructions
66

77
Scope: producer side of every artifact Punch emit (`src/tests/support/`,
88
reporting/state code in `src/punch/`), artifact dir
99
(`reports/`), validation docs explain it
10-
(`docs/validation/`).
10+
(`docs/workflows/validation.md`).
1111

1212
## What counts as an artifact
1313

.github/prompts/punch-build.prompt.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Trigger-only — load only when the named condition is actually present, not by
3838
- [`punch-planning-and-task-breakdown`](../skills/punch-planning-and-task-breakdown/SKILL.md) — only on `/build auto` with no task list, to derive ordered tasks.
3939
- [`punch-debugging-and-error-recovery`](../skills/punch-debugging-and-error-recovery/SKILL.md) — only after a test or build actually fails.
4040
- [`punch-doubt-driven-development`](../skills/punch-doubt-driven-development/SKILL.md) — only for a high-risk or ambiguous decision.
41-
- [`graphify`](../skills/graphify/SKILL.md) — when a repo dependency map helps locate the change surface (native, explicit-only; never invoked automatically).
4241

4342
## Modes
4443

.github/prompts/punch-document.prompt.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ This prompt (via `punch-ai-governance`, holds complete admin over `.github/`
3333
and `docs/`) owns and reconciles **entire** documentation surface:
3434

3535
- **All human docs**`README.md`, `docs/**` (incl. `docs/architecture/**`,
36-
`docs/workflows/**`, `docs/validation/**`, top-level `docs/*.md`), ADRs.
36+
`docs/workflows/**` [covers `docs/workflows/validation.md`], top-level
37+
`docs/*.md`), ADRs.
3738
- **All AI-facing docs**`docs/ai/**` and
3839
`.github/` instructions / prompts / skills / agents + registries.
3940
- **AI working artifacts**`docs/architecture/specs/**` (prior specs / plans),

.github/prompts/punch-init.prompt.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
agent: punch-ai-governance
3-
description: Init — on-demand, read-only asset enablement sweep that certifies the Punch GitHub Copilot asset set (prompts, agents, skills, instructions) is present, punch-prefixed, and Copilot-compatible before the lifecycle runs, plus an informational capability check for the optional AI-Ingest vendor skills Caveman/cavecrew. Re-runnable anytime. Reports PASS / WARN / BLOCKED. Never reconciles docs, never runs a runtime.
3+
description: Init — on-demand, read-only asset enablement sweep that certifies the Punch GitHub Copilot asset set (prompts, agents, skills, instructions) is present, punch-prefixed, and Copilot-compatible before the lifecycle runs, plus an informational capability check for the optional AI-Ingest vendor skill Caveman and the workspace's VS Code discovery boundary. Re-runnable anytime. Reports PASS / WARN / BLOCKED. Never reconciles docs, never runs a runtime.
44
---
55
# Punch — Init (GitHub Copilot asset enablement sweep)
66

@@ -49,24 +49,25 @@ registries ([`prompt-registry.md`](../../docs/ai/prompt-registry.md),
4949
`/punch-document`). Missing required skill → **BLOCKED**.
5050
4. **Instructions.** Every `.github/instructions/*.instructions.md` has
5151
`applyTo:` + `description:`. Missing required instruction or bad frontmatter → **BLOCKED**.
52-
5. **AI Skills (Caveman + cavecrew — optional vendor capabilities; graphify — adopted upstream skill).**
53-
Caveman/cavecrew presence is an **informational capability check only**
54-
never a Punch prerequisite:
52+
5. **AI Skills (Caveman — optional vendor capability; graphify — adopted upstream skill).**
53+
Caveman presence is an **informational capability check only** never a
54+
Punch prerequisite:
5555
- Caveman's default-`lite` rule for VS Code GitHub Copilot Chat lives directly
5656
in [`copilot-instructions.md`](../copilot-instructions.md) — no separate
5757
Punch presentation-adapter skill. Every phase runs entirely in normal
5858
prose when Caveman is absent or inactive; not a gap.
59-
- The vendor skills `caveman` + `cavecrew` are installed via the **accepted
60-
AI-Ingest path** ([`.github/.ai-upstream/README.md`](../.ai-upstream/README.md)),
61-
scoped to `github-copilot`. `caveman` is relocated once to
62-
`.github/skills/caveman/` (the Copilot project-skill location — installer
63-
default is `.agents/skills/caveman/`, which must not remain populated);
64-
`cavecrew` stays at its installer-default `.agents/skills/cavecrew/`, with
65-
the optional `punch-cavecrew-investigator` / `punch-cavecrew-reviewer`
66-
Copilot personas in `.github/agents/`. Not installed →
67-
**WARN** (user installs manually; purely optional — Build never depends on
68-
cavecrew, and Review/Test/Security lose only the optional bounded-worker
69-
assist).
59+
- The vendor skill `caveman` is installed via the **accepted AI-Ingest path**
60+
([`.github/.ai-upstream/README.md`](../.ai-upstream/README.md)), scoped to
61+
`github-copilot`, relocated once to `.github/skills/caveman/` (the Copilot
62+
project-skill location — installer default `.agents/skills/caveman/` must
63+
not remain populated). Not installed → **WARN** (user installs manually;
64+
purely optional — Build never depends on it).
65+
- The optional `punch-cavecrew-investigator` / `punch-cavecrew-reviewer`
66+
Copilot custom agents in `.github/agents/` (see check 2) are
67+
self-contained and certified on their own frontmatter — they require no
68+
`.agents/**` vendor skill to be present. `.agents/**` is outside this
69+
workspace's VS Code Chat discovery boundary and is never a Punch
70+
capability, prerequisite, resolver target, or canon.
7071
- The native upstream skill [`graphify`](../skills/graphify/SKILL.md) exists,
7172
adopted verbatim (only `user-invocable:` / `disable-model-invocation:` host
7273
metadata added — no Punch-authored fork; native skills stay agnostic per
@@ -98,6 +99,14 @@ registries ([`prompt-registry.md`](../../docs/ai/prompt-registry.md),
9899
must not misdirect Copilot away from Punch's GitHub-Copilot-first design (e.g.
99100
telling Copilot the runtime or an external tool is the entry point for Punch
100101
asset work). Misdirection → **WARN** (fix via `/punch-document`).
102+
10. **VS Code discovery boundary.** [`.vscode/settings.json`](../../.vscode/settings.json)
103+
exists and is valid JSON; `chat.useAgentsMdFile`, `chat.useNestedAgentsMdFiles`,
104+
and `chat.useClaudeMdFile` are `false`; `chat.instructionsFilesLocations`,
105+
`chat.promptFilesLocations`, `chat.agentFilesLocations`, and
106+
`chat.agentSkillsLocations` each enable their `.github/*` root
107+
(`.github/instructions`, `.github/prompts`, `.github/agents`,
108+
`.github/skills`). Missing file, invalid JSON, or a required key set to the
109+
wrong value → **BLOCKED**.
101110

102111
## Grading
103112

@@ -136,9 +145,10 @@ one-line reason — then:
136145
broad fixer. Scripts under the repo are **not** mutable Init assets — Init does
137146
not embed or edit Python, shell, `setup.py`, or launchers.
138147
- **Copilot-first.** Checks only the assets Punch needs to operate through VS Code
139-
GitHub Copilot. Vendor tools (graphify, the Caveman/cavecrew pack) are in scope
140-
**only** via the accepted AI-Ingest path; non-Copilot agent runtimes (Claude
141-
Code, Cloud Code) are out of scope entirely.
148+
GitHub Copilot. Vendor tools (graphify, Caveman) are in scope **only** via the
149+
accepted AI-Ingest path; `.agents/**` vendor skills (e.g. `cavecrew`) and
150+
non-Copilot agent runtimes (Claude Code, Cloud Code) are out of scope
151+
entirely.
142152
- **Lifecycle preserved.** Init certifies; it does not alter the Spec → Plan →
143153
Build → Test → Review → Ship → Document lifecycle it gates.
144154

0 commit comments

Comments
 (0)