omniconductor 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/LICENSE +219 -0
- package/NOTICE +11 -0
- package/README.md +526 -0
- package/THIRD_PARTY_NOTICES.md +31 -0
- package/TRADEMARKS.md +26 -0
- package/VISION.md +106 -0
- package/adapters/README.md +121 -0
- package/adapters/claude/README.md +102 -0
- package/adapters/claude/SUPPORTED-FEATURES.md +66 -0
- package/adapters/claude/hookify-templates/.recipe-scoped +9 -0
- package/adapters/claude/hookify-templates/README.md +93 -0
- package/adapters/claude/hookify-templates/block-completion-claim-without-push.local.md.template +56 -0
- package/adapters/claude/hookify-templates/block-direct-push-protected-branch.local.md.template +18 -0
- package/adapters/claude/hookify-templates/block-force-push-protected-branch.local.md.template +42 -0
- package/adapters/claude/hookify-templates/block-server-secret-in-client.local.md.template +36 -0
- package/adapters/claude/hookify-templates/warn-any-type-added.local.md.template +44 -0
- package/adapters/claude/hookify-templates/warn-commit-without-pre-commit-review.local.md.template +52 -0
- package/adapters/claude/hookify-templates/warn-console-direct.local.md.template +55 -0
- package/adapters/claude/hookify-templates/warn-create-table-without-access-control.local.md.template +35 -0
- package/adapters/claude/hookify-templates/warn-current-work-without-remaining-tasks.local.md.template +36 -0
- package/adapters/claude/hookify-templates/warn-gh-pr-create-without-pre-merge-review.local.md.template +38 -0
- package/adapters/claude/hookify-templates/warn-hardcoded-text-without-i18n-key.local.md.template +21 -0
- package/adapters/claude/hookify-templates/warn-on-gh-pr-merge.local.md.template +33 -0
- package/adapters/claude/hookify-templates/warn-plan-spec-without-remaining-tasks.local.md.template +44 -0
- package/adapters/claude/hookify-templates/warn-raw-hex-instead-of-token.local.md.template +21 -0
- package/adapters/claude/hookify-templates/warn-security-definer-without-search-path.local.md.template +30 -0
- package/adapters/claude/hookify-templates/warn-stop-commit-without-current-work.local.md.template +47 -0
- package/adapters/claude/hookify-templates/warn-user-manual-completion.local.md.template +40 -0
- package/adapters/claude/transform-spec.md +140 -0
- package/adapters/claude/transform.sh +1169 -0
- package/adapters/codex/README.md +87 -0
- package/adapters/codex/SUPPORTED-FEATURES.md +66 -0
- package/adapters/codex/transform-spec.md +90 -0
- package/adapters/codex/transform.sh +748 -0
- package/adapters/copilot/README.md +88 -0
- package/adapters/copilot/SUPPORTED-FEATURES.md +73 -0
- package/adapters/copilot/transform-spec.md +111 -0
- package/adapters/copilot/transform.sh +757 -0
- package/adapters/cursor/README.md +87 -0
- package/adapters/cursor/SUPPORTED-FEATURES.md +90 -0
- package/adapters/cursor/transform-spec.md +124 -0
- package/adapters/cursor/transform.sh +731 -0
- package/adapters/gemini/README.md +93 -0
- package/adapters/gemini/SUPPORTED-FEATURES.md +80 -0
- package/adapters/gemini/transform-spec.md +102 -0
- package/adapters/gemini/transform.sh +844 -0
- package/adapters/windsurf/README.md +93 -0
- package/adapters/windsurf/SUPPORTED-FEATURES.md +67 -0
- package/adapters/windsurf/transform-spec.md +99 -0
- package/adapters/windsurf/transform.sh +727 -0
- package/bin/omniconductor.js +130 -0
- package/core/README.md +64 -0
- package/core/anti-patterns/README.md +142 -0
- package/core/anti-patterns/dynamic-system-prompt.md +113 -0
- package/core/anti-patterns/frequent-rule-file-edit.md +83 -0
- package/core/anti-patterns/large-file-read-no-range.md +90 -0
- package/core/anti-patterns/no-sub-agent-dispatch.md +89 -0
- package/core/anti-patterns/single-monolithic-rule-file.md +99 -0
- package/core/anti-patterns/skill-eager-load.md +83 -0
- package/core/anti-patterns/tool-call-spam.md +93 -0
- package/core/docs-templates/CURRENT_WORK.md +64 -0
- package/core/docs-templates/INDEX.md +57 -0
- package/core/docs-templates/PLANS.md +44 -0
- package/core/docs-templates/README.md +40 -0
- package/core/docs-templates/REMAINING_TASKS.md +43 -0
- package/core/docs-templates/TASKS.md +51 -0
- package/core/docs-templates/specs/_example.md +121 -0
- package/core/hooks/README.md +62 -0
- package/core/hooks/pretool-agent-routing.sh.template +97 -0
- package/core/hooks/pretool-commit-current-work-check.sh.template +103 -0
- package/core/hooks/pretool-commit-test-coverage-check.sh.template +116 -0
- package/core/hooks/pretool-large-file-read-guard.sh.template +117 -0
- package/core/hooks/stop-cache-hit-baseline-check.sh.template +133 -0
- package/core/hooks/stop-r6-review-check.sh.template +80 -0
- package/core/hooks/stop-session-log-check.sh.template +101 -0
- package/core/hooks/stop-trajectory-log.sh.template +96 -0
- package/core/memory-pattern/EXAMPLES.md +114 -0
- package/core/memory-pattern/README.md +133 -0
- package/core/recipes/README.md +46 -0
- package/core/recipes/auto-mock-data.md +82 -0
- package/core/recipes/branch-strategy.md +100 -0
- package/core/recipes/coding-conventions.md +123 -0
- package/core/recipes/database-discipline.md +65 -0
- package/core/recipes/debugging.md +143 -0
- package/core/recipes/design-system.md +30 -0
- package/core/recipes/i18n.md +118 -0
- package/core/recipes/monorepo.md +101 -0
- package/core/recipes/self-improvement.md +61 -0
- package/core/recipes/tdd.md +128 -0
- package/core/recipes/web-mobile-parity.md +87 -0
- package/core/reflector/SCHEDULING.md +83 -0
- package/core/reflector/prune-lessons.sh +105 -0
- package/core/reflector/reflect-brief.md +11 -0
- package/core/reflector/reflect.command.md +13 -0
- package/core/reflector/run-weekly.sh +54 -0
- package/core/reflector/trajectory-log.sh +55 -0
- package/core/roles/README.md +61 -0
- package/core/roles/builder.md +75 -0
- package/core/roles/designer.md +93 -0
- package/core/roles/helper.md +70 -0
- package/core/roles/planner.md +123 -0
- package/core/roles/reflector.md +72 -0
- package/core/roles/reviewer.md +104 -0
- package/core/roles/scribe.md +89 -0
- package/core/universal-rules/README.md +71 -0
- package/core/universal-rules/meta-discipline.md +292 -0
- package/core/universal-rules/operations.md +162 -0
- package/core/universal-rules/quality-gates.md +191 -0
- package/core/universal-rules/spec-as-you-go.md +123 -0
- package/core/universal-rules/workflow.md +153 -0
- package/core/workflow/PHASES.md +134 -0
- package/core/workflow/README.md +56 -0
- package/docs/MANUAL-INSTALL.md +456 -0
- package/package.json +52 -0
- package/tools/check-framework-purity.sh +91 -0
- package/tools/measure-tokens.sh +169 -0
- package/tools/validate-adapter-output.sh +611 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Adapter — GitHub Copilot (T2)
|
|
2
|
+
|
|
3
|
+
GitHub Copilot is a T2 target because:
|
|
4
|
+
|
|
5
|
+
- It supports per-pattern rule scoping via `.github/instructions/*.instructions.md` `applyTo:` front-matter.
|
|
6
|
+
- Instructions live IN the repo, so all collaborators automatically share them.
|
|
7
|
+
- Copilot's PR review feature provides a partial Stage B code-review analog tied to GitHub.
|
|
8
|
+
|
|
9
|
+
It is **T2 (not T1)** because:
|
|
10
|
+
|
|
11
|
+
- ❌ No sub-agent dispatch.
|
|
12
|
+
- ❌ No hooks for ABSOLUTE enforcement.
|
|
13
|
+
- ❌ No per-call model routing (model picker in UI).
|
|
14
|
+
- ❌ No built-in memory directory.
|
|
15
|
+
- ⚠️ Slash commands limited.
|
|
16
|
+
|
|
17
|
+
**Tier**: T2 — Good support; rule scoping works well, enforcement is limited.
|
|
18
|
+
|
|
19
|
+
## Installation path
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Install (the copilot adapter is implemented):
|
|
23
|
+
bash /path/to/conductor/adapters/copilot/transform.sh /path/to/target [--dry-run]
|
|
24
|
+
|
|
25
|
+
# (planned / roadmap — not yet available):
|
|
26
|
+
# npx omniconductor init --target=copilot [target-dir]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What gets installed
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
<target>/
|
|
33
|
+
├── .github/
|
|
34
|
+
│ └── instructions/
|
|
35
|
+
│ ├── all.instructions.md # applyTo: '**' (always-loaded)
|
|
36
|
+
│ ├── operations.instructions.md # applyTo: '**'
|
|
37
|
+
│ ├── coding-conventions.instructions.md # applyTo: '**/*.{ts,tsx,js,jsx}'
|
|
38
|
+
│ ├── token-economy.instructions.md # applyTo: '**'
|
|
39
|
+
│ ├── spec-as-you-go.instructions.md # applyTo: 'docs/specs/**,**/*.md'
|
|
40
|
+
│ └── model-routing.instructions.md # applyTo: '**'
|
|
41
|
+
└── docs/
|
|
42
|
+
├── CURRENT_WORK.md # Universal templates
|
|
43
|
+
├── REMAINING_TASKS.md
|
|
44
|
+
├── PLANS.md
|
|
45
|
+
├── TASKS.md
|
|
46
|
+
├── INDEX.md
|
|
47
|
+
└── specs/_example.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Native features supported
|
|
51
|
+
|
|
52
|
+
- ✅ Always-loaded baseline (`applyTo: '**'`).
|
|
53
|
+
- ✅ Per-pattern rule scoping (`applyTo:` front-matter).
|
|
54
|
+
- ✅ Instructions IN the repo (collaborator-shared).
|
|
55
|
+
- ✅ All universal rule TEXT.
|
|
56
|
+
- ✅ All doc templates.
|
|
57
|
+
- ⚠️ Copilot PR review feature for Stage B (partial).
|
|
58
|
+
|
|
59
|
+
## Features NOT supported
|
|
60
|
+
|
|
61
|
+
| Feature | Workaround |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Sub-agent dispatch | Human plays orchestrator role. |
|
|
64
|
+
| Hooks | Pair with project-level pre-commit git hooks for enforcement. |
|
|
65
|
+
| Per-call model routing | Pick model in Copilot Chat UI. |
|
|
66
|
+
| Built-in memory directory | DIY at `.memory/` (gitignored). |
|
|
67
|
+
| Specialized review agents (Stage A) | Run review prompts manually in Copilot Chat. Use Copilot PR review for Stage B (best-effort). |
|
|
68
|
+
|
|
69
|
+
## After install — first steps
|
|
70
|
+
|
|
71
|
+
1. Commit `.github/instructions/` to your repo. All collaborators automatically pick up the rules.
|
|
72
|
+
2. Configure Copilot PR review for Stage B (in repo settings).
|
|
73
|
+
3. Customize the always-loaded section of `all.instructions.md` — replace `{{PROJECT_NAME}}`.
|
|
74
|
+
4. Rename `docs/specs/_example.md` → `docs/specs/<your-area>.md`.
|
|
75
|
+
5. Add `.memory/` to `.gitignore`. Create your first memory entry.
|
|
76
|
+
|
|
77
|
+
## Quirks / known issues (P3 will fill)
|
|
78
|
+
|
|
79
|
+
- TBD: Copilot's `applyTo:` glob syntax differs slightly from Cursor's `globs:`. P3 verifies the exact dialect.
|
|
80
|
+
- TBD: Copilot Chat's instruction-loading order when multiple files match.
|
|
81
|
+
|
|
82
|
+
## Status (P0 foundation)
|
|
83
|
+
|
|
84
|
+
- ✅ `README.md`
|
|
85
|
+
- ✅ `SUPPORTED-FEATURES.md`
|
|
86
|
+
- ✅ `transform-spec.md`
|
|
87
|
+
- ✅ `transform.sh` (implemented)
|
|
88
|
+
- ⏳ `notes.md` (P3)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# GitHub Copilot — supported features
|
|
2
|
+
|
|
3
|
+
Detailed matrix of which CONDUCTOR features Copilot supports natively.
|
|
4
|
+
|
|
5
|
+
## Feature support
|
|
6
|
+
|
|
7
|
+
| Feature | Copilot support | Mechanism | Notes |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| **Always-loaded baseline** | ✅ Native | `.github/instructions/*.instructions.md` with `applyTo: '**'` | Loaded for every Copilot Chat session in the repo. |
|
|
10
|
+
| **Per-pattern rule scoping** | ✅ Native | `applyTo:` front-matter (CSV glob list) | Closest analog to Claude `paths:` and Cursor `globs:`. |
|
|
11
|
+
| **Instructions IN the repo** | ✅ Native | `.github/instructions/` is committed to the repo | All collaborators automatically share rules. Strong feature. |
|
|
12
|
+
| **Inline completion + chat** | ✅ Native | Copilot's primary feature | |
|
|
13
|
+
| **PR review automation** | ✅ Native | Copilot's PR review feature (configurable per repo) | Useful Stage B analog. |
|
|
14
|
+
| **MCP servers** | ⚠️ Partial | Copilot has limited MCP support depending on version | CONDUCTOR doesn't depend; project may add own. |
|
|
15
|
+
| **Sub-agent dispatch** | ✅ Native (2026) | Custom named agents in `.github/agents/*.agent.md` | See `docs/COMPATIBILITY-MATRIX.md` / ADR-031. |
|
|
16
|
+
| **Hooks (agentStop)** | ✅ Native (2026) | `.github/hooks/*.json` | ADR-031. CONDUCTOR currently emits only the Reflector hook (ADR-032); broader hook-set emission is Phase 2. |
|
|
17
|
+
| **Per-task model routing** | ✅ Native (2026) | Per-agent `model` in agent front-matter | ADR-031. |
|
|
18
|
+
| **Custom slash commands** | ✅ Native (2026) | Prompt files at `.github/prompts/*.prompt.md` | Was unavailable as of late 2025; supported now (ADR-031). |
|
|
19
|
+
| **Built-in memory directory** | ❌ | — | DIY at `.memory/` (gitignored). |
|
|
20
|
+
| **In-repo doc templates** | ✅ Universal | Plain markdown; Copilot Chat reads on demand | |
|
|
21
|
+
| **Spec-as-you-go ABSOLUTE enforcement** | ❌ rule reminder only | Rule in `.instructions.md` with `applyTo: 'docs/specs/**,**/*.md'` reminds when relevant files are touched | Self-policed. |
|
|
22
|
+
| **Two-stage code review enforcement** | ⚠️ Partial | Stage A: rule reminder; Stage B: configure Copilot PR review feature | |
|
|
23
|
+
|
|
24
|
+
## Universal-rule → Copilot `.instructions.md` translation
|
|
25
|
+
|
|
26
|
+
For each `core/universal-rules/<rule>.md`:
|
|
27
|
+
|
|
28
|
+
| `core/` front-matter | Copilot `.instructions.md` front-matter |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `applies_to: ["**/*.ts", "**/*.tsx"]` | `applyTo: '**/*.ts,**/*.tsx'` (CSV) |
|
|
31
|
+
| `always_loaded: true` | `applyTo: '**'` (matches everything) |
|
|
32
|
+
|
|
33
|
+
Copilot accepts:
|
|
34
|
+
```
|
|
35
|
+
---
|
|
36
|
+
applyTo: '<csv-glob-list>'
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# Rule body in plain markdown
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## What Copilot DOES NOT support
|
|
43
|
+
|
|
44
|
+
> **2026 reconciliation (first-party verified):** most limitations previously listed here are stale. Copilot now natively supports hooks (`.github/hooks/*.json`), sub-agent dispatch with custom named agents (`.github/agents/*.agent.md`), per-task model routing (per-agent `model`), and project-level commands via prompt files (`.github/prompts/*.prompt.md`) — see `docs/COMPATIBILITY-MATRIX.md` / ADR-031.
|
|
45
|
+
|
|
46
|
+
Still true:
|
|
47
|
+
|
|
48
|
+
- No built-in memory directory — DIY at `.memory/` (gitignored).
|
|
49
|
+
- CONDUCTOR does not yet emit a Claude-parity hook set for Copilot. It currently emits only the self-improvement Reflector hook (ADR-032, opt-in — see below); broader hook-set emission (commit-blocking, spec enforcement) is Phase 2. Until then, pair with project pre-commit git hooks.
|
|
50
|
+
|
|
51
|
+
## Strengths to lean into
|
|
52
|
+
|
|
53
|
+
- **`.github/instructions/` shared with the team automatically** — no per-developer setup. This is Copilot's strongest feature for CONDUCTOR.
|
|
54
|
+
- **PR review feature** — partial Stage B replacement. Configure to auto-review on PR open.
|
|
55
|
+
|
|
56
|
+
## Self-improvement (Reflector) — opt-in
|
|
57
|
+
|
|
58
|
+
With `--recipes=self-improvement`, the Copilot adapter emits the Reflector loop (ADR-032):
|
|
59
|
+
|
|
60
|
+
- **Hook**: `.github/hooks/conductor-reflect.json` — registers `.conductor/reflect/trajectory-log.sh` on the `agentStop` event. Written only if absent; if a hook config already exists, the adapter emits a manual-merge log entry instead of overwriting.
|
|
61
|
+
- **Command**: `.github/prompts/reflect.prompt.md` — the `/reflect` prompt that distills the trajectory log into lesson candidates.
|
|
62
|
+
- **Agent**: `.github/agents/reflector.agent.md` — named reflector agent for the distillation pass.
|
|
63
|
+
- **Scripts**: `.conductor/reflect/trajectory-log.sh` (session trajectory capture) and `.conductor/reflect/prune-lessons.sh` (lesson-file size pruning).
|
|
64
|
+
|
|
65
|
+
The loop is propose-only — lessons are proposed for human review, never auto-applied to rules. The hook no-ops unless `.conductor/reflect/` exists, so installs without the recipe are unaffected (opt-in gate).
|
|
66
|
+
|
|
67
|
+
## Verification (deferred to P3)
|
|
68
|
+
|
|
69
|
+
| Feature claim | Verified-by-real-install | Verification command / observation |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `.instructions.md` files load in Copilot Chat | ⏳ P3 | Open project; check Copilot Chat shows file references. |
|
|
72
|
+
| `applyTo:` per-pattern scoping works | ⏳ P3 | Open file matching `applyTo:`; verify rule loads. |
|
|
73
|
+
| PR review uses CONDUCTOR rules | ⏳ P3 | Open PR; check review references `coding-conventions`. |
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# GitHub Copilot adapter — transform.sh specification
|
|
2
|
+
|
|
3
|
+
What `adapters/copilot/transform.sh` MUST do when implemented in P3.
|
|
4
|
+
|
|
5
|
+
## Invocation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
./transform.sh <target-dir> [--dry-run]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
core/universal-rules/meta-discipline.md
|
|
15
|
+
core/universal-rules/operations.md
|
|
16
|
+
core/universal-rules/quality-gates.md
|
|
17
|
+
core/universal-rules/spec-as-you-go.md
|
|
18
|
+
core/universal-rules/workflow.md
|
|
19
|
+
core/docs-templates/*.md
|
|
20
|
+
core/docs-templates/specs/_example.md
|
|
21
|
+
core/memory-pattern/README.md
|
|
22
|
+
adapters/copilot/_native/all.instructions.tpl # Always-loaded baseline template
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Outputs
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
<target-dir>/
|
|
29
|
+
├── .github/
|
|
30
|
+
│ ├── copilot-instructions.md # DEFAULT: 5 universal rules concatenated (repo-wide)
|
|
31
|
+
│ └── instructions/ # --per-rule mode and/or selected recipes
|
|
32
|
+
│ ├── meta-discipline.instructions.md # applyTo: '**' (only in --per-rule mode)
|
|
33
|
+
│ ├── operations.instructions.md # applyTo: '**' (only in --per-rule mode)
|
|
34
|
+
│ ├── quality-gates.instructions.md # applyTo: '**' (only in --per-rule mode)
|
|
35
|
+
│ ├── spec-as-you-go.instructions.md # applyTo: '**' (only in --per-rule mode)
|
|
36
|
+
│ └── workflow.instructions.md # applyTo: '**' (only in --per-rule mode)
|
|
37
|
+
└── docs/
|
|
38
|
+
├── CURRENT_WORK.md # Verbatim
|
|
39
|
+
├── REMAINING_TASKS.md
|
|
40
|
+
├── PLANS.md
|
|
41
|
+
├── TASKS.md
|
|
42
|
+
├── INDEX.md
|
|
43
|
+
└── specs/_example.md
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Universal-rules → Copilot `.instructions.md` translation
|
|
47
|
+
|
|
48
|
+
For each `core/universal-rules/<rule>.md`:
|
|
49
|
+
|
|
50
|
+
1. Parse YAML front-matter. Extract `applies_to:`, `always_loaded:`.
|
|
51
|
+
2. Translate `applies_to:` array → CSV string for `applyTo:` (Copilot uses CSV glob syntax).
|
|
52
|
+
3. If `always_loaded: true` → emit with `applyTo: '**'`.
|
|
53
|
+
4. Else → emit with `applyTo: '<csv>'`.
|
|
54
|
+
5. Body content preserved verbatim, except:
|
|
55
|
+
- `> **Copilot-only mechanism**` callouts: keep as-is.
|
|
56
|
+
- `> **Claude-only mechanism**` callouts: REPLACE with degraded callout: `> **Note (Copilot)**: enforced by hook on Claude Code; on Copilot, follow self-policed.`
|
|
57
|
+
- Other tool-specific callouts: STRIP.
|
|
58
|
+
|
|
59
|
+
## Repo-wide baseline (`.github/copilot-instructions.md`)
|
|
60
|
+
|
|
61
|
+
In the default mode, the 5 universal rules are concatenated (body only) into `.github/copilot-instructions.md`. Body composition (in order):
|
|
62
|
+
|
|
63
|
+
1. Header: orchestrator manual intro adapted for Copilot Chat (single-session, no sub-agents).
|
|
64
|
+
2. ABSOLUTE rules (R1-R8 minus sub-agent-specific R1, plus a Copilot-specific note about PR review for Stage B).
|
|
65
|
+
3. All universal-rule content where `always_loaded: true`.
|
|
66
|
+
4. Pointer to `docs/CURRENT_WORK.md` as session-start read.
|
|
67
|
+
|
|
68
|
+
Maximum size guidance: keep ≤ 1500 lines (Copilot has context limits; check Copilot's current docs for exact limit at P3 implementation time).
|
|
69
|
+
|
|
70
|
+
## Copilot-specific extensions
|
|
71
|
+
|
|
72
|
+
- Configure suggested PR review settings as a `notes.md` post-install instruction (not auto-configured — requires repo admin action).
|
|
73
|
+
|
|
74
|
+
## Edge cases
|
|
75
|
+
|
|
76
|
+
| Case | Adapter behavior |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `.github/` doesn't exist | Create it. |
|
|
79
|
+
| Existing `.github/copilot-instructions.md` | Skip; report "SKIP (exists)". |
|
|
80
|
+
| Existing `.github/instructions/<rule>.instructions.md` | Skip individually. |
|
|
81
|
+
| Glob patterns contain commas (Copilot uses CSV) | Properly escape; warn if any pattern itself contains comma. |
|
|
82
|
+
|
|
83
|
+
## Idempotency check
|
|
84
|
+
|
|
85
|
+
Re-run reports "SKIP (exists)" for everything.
|
|
86
|
+
|
|
87
|
+
## Verification commands (P3 will fill)
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
test -f "<target>/.github/copilot-instructions.md" || echo "MISSING copilot-instructions.md"
|
|
91
|
+
# --per-rule mode:
|
|
92
|
+
# test -f "<target>/.github/instructions/spec-as-you-go.instructions.md" || echo "MISSING spec-as-you-go"
|
|
93
|
+
|
|
94
|
+
# Open Copilot Chat in project; ask "what rules apply?"; verify list.
|
|
95
|
+
# Touch a docs/specs/*.md file; ask Copilot for guidance; verify spec-as-you-go content surfaces.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## P3 Copilot version compatibility check
|
|
99
|
+
|
|
100
|
+
Verify against the user's Copilot version:
|
|
101
|
+
- `.github/instructions/*.instructions.md` is the canonical location.
|
|
102
|
+
- `applyTo:` uses CSV glob syntax (verify exact syntax — comma-separated vs YAML list).
|
|
103
|
+
- Multiple matching files compose (additive) rather than override.
|
|
104
|
+
|
|
105
|
+
If Copilot has changed format by P3, document in `notes.md`.
|
|
106
|
+
|
|
107
|
+
## Out of scope
|
|
108
|
+
|
|
109
|
+
- Auto-configuring Copilot PR review (requires repo admin permissions).
|
|
110
|
+
- Per-stack auto-detection.
|
|
111
|
+
- VS Code / JetBrains editor settings.
|