cokit-cli 1.0.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.
Files changed (86) hide show
  1. package/FAQ.md +102 -0
  2. package/LICENSE +32 -0
  3. package/QUICK-START.md +37 -0
  4. package/README.md +110 -0
  5. package/bin/cokit.js +4 -0
  6. package/docs/cokit-comprehensive-mapping-guide.md +937 -0
  7. package/docs/cokit-slides.md +205 -0
  8. package/docs/cokit-team-presentation.md +319 -0
  9. package/docs/migration-guide.md +120 -0
  10. package/docs/project-roadmap.md +257 -0
  11. package/package.json +35 -0
  12. package/plans/260106-1102-cokit-implementation/phases/phase-01-cli-tool.md +151 -0
  13. package/plans/260106-1102-cokit-implementation/phases/phase-02-repo-level-templates.md +198 -0
  14. package/plans/260106-1102-cokit-implementation/phases/phase-03-user-level-skills.md +219 -0
  15. package/plans/260106-1102-cokit-implementation/phases/phase-04-prompt-files.md +328 -0
  16. package/plans/260106-1102-cokit-implementation/phases/phase-05-documentation.md +166 -0
  17. package/plans/260106-1102-cokit-implementation/plan.md +130 -0
  18. package/plans/260106-1102-cokit-implementation/research/researcher-01-copilot-skills-spec.md +182 -0
  19. package/plans/260106-1102-cokit-implementation/research/researcher-02-copilot-instructions-prompts.md +201 -0
  20. package/plans/reports/code-reviewer-260106-1718-phase2-repo-templates.md +184 -0
  21. package/plans/reports/code-reviewer-260106-1728-phase3-review.md +486 -0
  22. package/plans/reports/code-reviewer-260106-1742-phase4-prompts.md +235 -0
  23. package/plans/reports/code-reviewer-260106-1753-phase5-docs.md +275 -0
  24. package/plans/reports/docs-manager-260106-1217-phase1-completion.md +45 -0
  25. package/plans/reports/docs-manager-260106-1734-phase3-skills.md +108 -0
  26. package/plans/reports/docs-manager-260106-1746-phase4-prompt-files.md +75 -0
  27. package/plans/reports/project-manager-260106-1734-SUMMARY.md +354 -0
  28. package/plans/reports/project-manager-260106-1734-phase3-completion.md +257 -0
  29. package/plans/reports/project-manager-260106-1734-phase3-to-phase4-transition.md +274 -0
  30. package/plans/reports/project-manager-260106-1734-phase4-kickoff.md +343 -0
  31. package/plans/reports/project-manager-260106-1734-project-status.md +355 -0
  32. package/plans/reports/project-manager-260106-1746-phase4-completion.md +249 -0
  33. package/plans/reports/project-manager-260106-1746-phase4-deliverables.md +350 -0
  34. package/plans/reports/project-manager-260106-1804-project-complete.md +297 -0
  35. package/plans/reports/tester-260106-1717-phase2-templates.md +216 -0
  36. package/plans/reports/tester-260106-1726-phase3-user-skills.md +256 -0
  37. package/plans/reports/tester-260106-1741-phase4-prompts.md +202 -0
  38. package/plans/reports/tester-260106-1751-phase5-docs.md +301 -0
  39. package/skills/code-review/SKILL.md +86 -0
  40. package/skills/code-review/references/code-review-reception.md +76 -0
  41. package/skills/code-review/references/verification-before-completion.md +86 -0
  42. package/skills/debugging/SKILL.md +70 -0
  43. package/skills/debugging/references/root-cause-tracing.md +65 -0
  44. package/skills/debugging/references/systematic-debugging.md +74 -0
  45. package/skills/debugging/references/verification.md +74 -0
  46. package/skills/docs-seeker/SKILL.md +91 -0
  47. package/skills/docs-seeker/references/search-patterns.md +93 -0
  48. package/skills/docs-seeker/references/source-evaluation.md +77 -0
  49. package/skills/planning/SKILL.md +82 -0
  50. package/skills/planning/references/plan-organization.md +88 -0
  51. package/skills/planning/references/research-phase.md +56 -0
  52. package/skills/planning/references/solution-design.md +65 -0
  53. package/skills/sequential-thinking/SKILL.md +80 -0
  54. package/skills/sequential-thinking/references/advanced-techniques.md +88 -0
  55. package/skills/sequential-thinking/references/core-patterns.md +87 -0
  56. package/src/commands/add.js +93 -0
  57. package/src/commands/doctor.js +117 -0
  58. package/src/commands/init.js +152 -0
  59. package/src/commands/list.js +91 -0
  60. package/src/commands/update.js +22 -0
  61. package/src/index.js +23 -0
  62. package/src/utils/colors.js +14 -0
  63. package/src/utils/copy.js +122 -0
  64. package/src/utils/paths.js +35 -0
  65. package/templates/repo/.github/.cokit-version +4 -0
  66. package/templates/repo/.github/AGENTS.md +55 -0
  67. package/templates/repo/.github/copilot-instructions.md +45 -0
  68. package/templates/repo/.github/instructions/backend.instructions.md +35 -0
  69. package/templates/repo/.github/instructions/development.instructions.md +25 -0
  70. package/templates/repo/.github/instructions/frontend.instructions.md +31 -0
  71. package/templates/repo/.github/instructions/testing.instructions.md +31 -0
  72. package/templates/repo/.github/prompts/code.prompt.md +28 -0
  73. package/templates/repo/.github/prompts/docs.prompt.md +23 -0
  74. package/templates/repo/.github/prompts/fix.prompt.md +24 -0
  75. package/templates/repo/.github/prompts/plan.prompt.md +24 -0
  76. package/templates/repo/.github/prompts/review.prompt.md +24 -0
  77. package/templates/repo/.github/prompts/test.prompt.md +23 -0
  78. package/templates/repo/.github/skills/code-review/SKILL.md +46 -0
  79. package/templates/repo/.github/skills/debugging/SKILL.md +34 -0
  80. package/templates/repo/.vscode/settings.json +6 -0
  81. package/templates/repo/prompts/code.prompt.md +40 -0
  82. package/templates/repo/prompts/docs.prompt.md +29 -0
  83. package/templates/repo/prompts/fix.prompt.md +35 -0
  84. package/templates/repo/prompts/plan.prompt.md +41 -0
  85. package/templates/repo/prompts/review.prompt.md +38 -0
  86. package/templates/repo/prompts/test.prompt.md +29 -0
@@ -0,0 +1,130 @@
1
+ ---
2
+ title: "CoKit: Claude Code to GitHub Copilot Port"
3
+ description: "Full port of Claude Code workflow patterns to GitHub Copilot with easy CLI"
4
+ status: completed
5
+ priority: P1
6
+ effort: 12h
7
+ branch: main
8
+ tags: [cokit, copilot, port, cli, npm]
9
+ created: 2026-01-06
10
+ completed_phases: [1, 2, 3, 4, 5]
11
+ phase3_completed: 2026-01-06
12
+ phase4_completed: 2026-01-06
13
+ phase5_completed: 2026-01-06
14
+ ---
15
+
16
+ # CoKit Implementation Plan
17
+
18
+ ## Overview
19
+
20
+ Port Claude Code patterns to GitHub Copilot with **dead-simple CLI**:
21
+ ```bash
22
+ npx cokit init # Setup in current project
23
+ npx cokit init --global # Setup personal skills
24
+ ```
25
+
26
+ ## User Experience Priority
27
+
28
+ Target: **Non-technical users** who want AI workflow without complexity.
29
+ - One command to install
30
+ - Simple README with screenshots
31
+ - No config files to edit manually
32
+
33
+ ## Architecture
34
+
35
+ ```
36
+ cokit/
37
+ ├── package.json # npm package config
38
+ ├── bin/
39
+ │ └── cokit.js # CLI entry point
40
+ ├── src/
41
+ │ ├── cli.js # Command parser
42
+ │ ├── commands/
43
+ │ │ ├── init.js # npx cokit init
44
+ │ │ ├── add.js # npx cokit add <skill>
45
+ │ │ ├── list.js # npx cokit list
46
+ │ │ └── update.js # npx cokit update
47
+ │ └── utils/
48
+ │ ├── copy.js # File operations
49
+ │ └── prompt.js # User prompts
50
+ ├── templates/
51
+ │ └── repo/ # Repo-level templates
52
+ │ ├── .github/
53
+ │ │ ├── copilot-instructions.md
54
+ │ │ ├── AGENTS.md
55
+ │ │ ├── instructions/
56
+ │ │ ├── prompts/
57
+ │ │ └── skills/
58
+ │ └── .vscode/
59
+ │ └── settings.json # VS Code Copilot config
60
+ ├── skills/ # User-level skills
61
+ │ ├── debugging/
62
+ │ ├── code-review/
63
+ │ ├── planning/
64
+ │ ├── docs-seeker/
65
+ │ └── sequential-thinking/
66
+ ├── README.md # Simple getting started
67
+ └── LICENSE
68
+ ```
69
+
70
+ ## Key Mappings
71
+
72
+ | Claude Code | Copilot | Location |
73
+ |-------------|---------|----------|
74
+ | CLAUDE.md | copilot-instructions.md | `.github/` |
75
+ | skills/ | skills/ | `.github/skills/` or `~/.copilot/skills/` |
76
+ | agents/*.md | AGENTS.md | `.github/` (merged sections) |
77
+ | commands/*.md | prompts/*.prompt.md | `.github/prompts/` |
78
+ | workflows/*.md | instructions/*.instructions.md | `.github/instructions/` |
79
+ | hooks | N/A | Skip - no equivalent |
80
+
81
+ ## Limitations (From Research)
82
+
83
+ - **No hooks:** Static config only, no runtime injection
84
+ - **No multi-agent:** Single agent, manual prompt chaining
85
+ - **No $ARGUMENTS:** User provides context in chat
86
+ - **No session state:** Stateless between interactions
87
+
88
+ ## Phases
89
+
90
+ | Phase | Description | Effort | Link |
91
+ |-------|-------------|--------|------|
92
+ | 1 | CLI tool (npm package) | 4h | [phase-01](./phases/phase-01-cli-tool.md) |
93
+ | 2 | Repo templates | 3h | [phase-02](./phases/phase-02-repo-level-templates.md) |
94
+ | 3 | User skills (5 core) | 4h | [phase-03](./phases/phase-03-user-level-skills.md) |
95
+ | 4 | Prompt files (6 core) | 2h | [phase-04](./phases/phase-04-prompt-files.md) |
96
+ | 5 | Simple docs + README | 3h | [phase-05](./phases/phase-05-documentation.md) |
97
+
98
+ ## CLI Commands
99
+
100
+ ```bash
101
+ npx cokit init # Init repo templates (.github/)
102
+ npx cokit init --global # Init user skills (~/.copilot/skills/)
103
+ npx cokit init --all # Both repo + user
104
+ npx cokit add <skill> # Add specific skill
105
+ npx cokit list # Show installed skills/prompts
106
+ npx cokit update # Update to latest version
107
+ npx cokit doctor # Check setup + troubleshoot
108
+ ```
109
+
110
+ ## Success Criteria
111
+
112
+ - [ ] `npx cokit init` works without prior install
113
+ - [ ] Interactive prompts guide non-technical users
114
+ - [ ] README has screenshots and GIFs
115
+ - [ ] All 5 core skills ported
116
+ - [ ] All 6 core prompts ported
117
+ - [ ] VS Code settings template included
118
+ - [ ] `cokit doctor` diagnoses common issues
119
+
120
+ ## Dependencies
121
+
122
+ - GitHub Copilot Agent Mode (Feb 2025+)
123
+ - VS Code with Copilot extension
124
+ - Agent Skills support (Dec 2025+)
125
+
126
+ ## Unresolved Questions
127
+
128
+ 1. Does `~/.copilot/skills/` discovery work in JetBrains IDEs?
129
+ 2. Can skills reference scripts with relative paths across platforms?
130
+ 3. How does Copilot handle conflicting skills at repo vs user level?
@@ -0,0 +1,182 @@
1
+ # Research Report: GitHub Copilot Agent Skills Specification
2
+
3
+ **Date:** January 6, 2026 | **Version:** 1.0
4
+
5
+ ## Executive Summary
6
+
7
+ GitHub Copilot Agent Skills is a modular, extensible system for enhancing Claude Code (Anthropic's agentic coding tool) with specialized capabilities. Skills are self-contained packages containing a required `SKILL.md` file with YAML frontmatter + Markdown instructions, plus optional bundled resources (scripts, references, assets). Skills enable progressive disclosure of context, auto-discovery via semantic matching, and fine-grained tool access control via `allowed-tools`. The specification launched October 2025 (v1.0) and currently supports basic resource bundling with emerging support for metadata-driven customization.
8
+
9
+ ## Key Findings
10
+
11
+ ### 1. SKILL.md File Format
12
+
13
+ **Required structure:** YAML frontmatter + Markdown body
14
+
15
+ **Frontmatter (required fields):**
16
+ - `name` - Hyphen-case, lowercase alphanumeric + hyphens, must match directory name
17
+ - `description` - Explains purpose and activation triggers for Claude
18
+
19
+ **Frontmatter (optional fields):**
20
+ - `license` - License identifier (e.g., "MIT") or file reference (e.g., "LICENSE.txt")
21
+ - `version` - Semantic version string (e.g., "1.0.0")
22
+ - `allowed-tools` - Array of pre-approved tool names (Bash, Read, Write, Edit, etc.) for execution control
23
+ - `metadata` - String key-value map for client-specific custom properties
24
+
25
+ **Markdown body:** Unrestricted content, typically structured as:
26
+ - Feature descriptions and use cases
27
+ - Step-by-step workflows
28
+ - Quick reference guides
29
+ - References to bundled resources
30
+ - Best practices and common patterns
31
+
32
+ **Size constraint:** <100 lines recommended (leverage progressive disclosure by splitting into multiple reference files)
33
+
34
+ ### 2. Skill Discovery Mechanism
35
+
36
+ **Auto-activation trigger:**
37
+ - Claude Code analyzes user query intent semantically
38
+ - Matches intent against skill descriptions and bundled resource metadata
39
+ - Activates multiple skills if needed to fulfill user request
40
+ - Skills load progressively (only referenced resources pulled into context)
41
+
42
+ **Directory structure for discovery:**
43
+ - User-level: `$HOME/.claude/skills/{skill-name}/SKILL.md` (automatic discovery)
44
+ - Repo-level: Not natively supported (must use hooks/configuration workarounds)
45
+
46
+ **Activation criteria:**
47
+ - Description must contain concrete use cases/keywords matching user query
48
+ - Descriptions should be concise but rich in actionable trigger phrases
49
+ - Example: "When building mobile apps, implementing mobile UX patterns, optimizing for mobile constraints..."
50
+
51
+ ### 3. Resource Bundling & Progressive Disclosure
52
+
53
+ **Optional subdirectories inside skill folder:**
54
+
55
+ | Directory | Purpose | Example |
56
+ |-----------|---------|---------|
57
+ | `scripts/` | Executable code (Node.js/Python preferred over Bash) | analyze.js, fetch-docs.js, utils/ |
58
+ | `references/` | Documentation loaded contextually as needed | patterns.md, errors.md, workflows.md |
59
+ | `assets/` | Static files used in output | templates, icons, fonts |
60
+
61
+ **Progressive disclosure principle:**
62
+ - SKILL.md acts as index/entry point only (<100 lines)
63
+ - Referenced files loaded only when Claude selects them based on user need
64
+ - Reduces token consumption compared to monolithic documentation
65
+ - Enables deep expertise without bloating initial context
66
+
67
+ **Environment variable precedence for scripts:**
68
+ 1. Process environment variables
69
+ 2. `$HOME/.claude/skills/{skill-name}/.env`
70
+ 3. `$HOME/.claude/skills/.env`
71
+ 4. `$HOME/.claude/.env`
72
+
73
+ ### 4. Tool Access Control (allowed-tools)
74
+
75
+ **Purpose:** Pre-approve specific tools for skill execution to prevent tool-related errors
76
+
77
+ **Supported values (examples):** Bash, Read, Write, Edit, Grep, WebSearch, WebFetch
78
+
79
+ **Behavior:**
80
+ - If `allowed-tools` specified, only listed tools execute within skill context
81
+ - Unapproved tools are skipped/blocked with runtime warnings
82
+ - Improves reliability and security posture
83
+
84
+ **Real-world example (ai-multimodal skill):**
85
+ ```yaml
86
+ allowed-tools:
87
+ - Bash
88
+ - Read
89
+ - Write
90
+ - Edit
91
+ ```
92
+
93
+ ### 5. User-Level vs. Repo-Level Locations
94
+
95
+ **User-level skills:**
96
+ - Located: `$HOME/.claude/skills/` (e.g., `/Users/admin/.claude/skills/`)
97
+ - Scope: Available to all projects
98
+ - Discovery: Automatic by Claude Code
99
+ - Use case: General-purpose domain expertise, common patterns
100
+
101
+ **Repo-level skills:**
102
+ - Not natively supported by Agent Skills Spec
103
+ - Workaround: Use hooks (SessionStart, PreToolUse) to inject skill content or symlink from ~/.claude/skills/
104
+ - Planned feature: future specification updates may add native repo-level skill paths
105
+
106
+ ### 6. Limitations & Known Issues
107
+
108
+ **Current constraints:**
109
+ - Skill discovery is semantic (no keyword-based exact matching)
110
+ - Repo-level skills require manual configuration via hooks
111
+ - No built-in skill versioning or dependency management
112
+ - YAML frontmatter strict typing (no nested objects, only strings + arrays)
113
+ - No native skill marketplace/registry integration (requires custom distribution)
114
+ - Scripts must handle their own dependency management (no global package registry)
115
+ - Tool access control (`allowed-tools`) relatively new, edge cases possible
116
+
117
+ **Token consumption:**
118
+ - While progressive disclosure reduces overhead, deeply nested references still require careful planning
119
+ - Large scripts still consume tokens if loaded into context
120
+
121
+ **Platform considerations:**
122
+ - Bash scripts discouraged for cross-platform (Windows) compatibility
123
+ - Python/Node.js scripts preferred with `requirements.txt` or `package.json`
124
+
125
+ ## Best Practices
126
+
127
+ 1. **Description depth:** Include concrete use cases so semantic matching activates correctly
128
+ 2. **File organization:** Keep SKILL.md <100 lines; split references into focused .md files <100 lines each
129
+ 3. **Scripts:** Use Node.js or Python; include `.env.example`; write unit tests
130
+ 4. **Resource references:** Use links/paths in SKILL.md to guide Claude to relevant bundled files
131
+ 5. **License clarity:** Always specify; recommend MIT for open skills
132
+ 6. **Versioning:** Use semantic versioning in optional `version` field for tracking updates
133
+
134
+ ## Specification Details
135
+
136
+ **Version:** 1.0 (Public Launch October 16, 2025)
137
+
138
+ **Minimal skill example:**
139
+ ```
140
+ my-skill/
141
+ ├── SKILL.md
142
+ ```
143
+
144
+ **Complex skill example (docs-seeker):**
145
+ ```
146
+ docs-seeker/
147
+ ├── SKILL.md
148
+ ├── package.json
149
+ ├── scripts/
150
+ │ ├── analyze-llms-txt.js
151
+ │ ├── detect-topic.js
152
+ │ ├── fetch-docs.js
153
+ │ ├── tests/
154
+ │ └── utils/
155
+ ├── references/
156
+ │ ├── advanced.md
157
+ │ ├── context7-patterns.md
158
+ │ └── errors.md
159
+ └── workflows/
160
+ ├── library-search.md
161
+ ├── repo-analysis.md
162
+ └── topic-search.md
163
+ ```
164
+
165
+ ## Sources
166
+
167
+ - **Agent Skills Spec** (Official): `/Users/admin/.claude/skills/agent_skills_spec.md` (v1.0, Oct 2025)
168
+ - **Real-world implementations:**
169
+ - Research skill: `/Users/admin/.claude/skills/research/SKILL.md`
170
+ - Backend Development: `/Users/admin/.claude/skills/backend-development/SKILL.md`
171
+ - AI Multimodal: `/Users/admin/.claude/skills/ai-multimodal/SKILL.md`
172
+ - Skill Creator: `/Users/admin/.claude/skills/skill-creator/SKILL.md`
173
+ - Docs Seeker: `/Users/admin/.claude/skills/docs-seeker/` (complex structure)
174
+ - Claude Code: `/Users/admin/.claude/skills/claude-code/SKILL.md` (references other skills)
175
+
176
+ ## Unresolved Questions
177
+
178
+ 1. What is the exact semantic matching algorithm Claude uses for skill activation?
179
+ 2. Is there a planned timeline for native repo-level skill support?
180
+ 3. How are skill conflicts handled when multiple skills describe identical functionality?
181
+ 4. What is the max recommended size for bundled scripts before performance degradation?
182
+ 5. Can skills be nested (skill referencing another skill)?
@@ -0,0 +1,201 @@
1
+ # Research Report: GitHub Copilot Custom Instructions & Prompt Files
2
+
3
+ **Conducted:** 2026-01-06 | **Sources:** 10+ GitHub Official Docs & Blog Articles
4
+
5
+ ## Executive Summary
6
+
7
+ GitHub Copilot supports 4 primary customization file types: `copilot-instructions.md` (repo-wide), `*.instructions.md` (scoped), `*.prompt.md` (reusable tasks), and `AGENTS.md` (nested precedence). All use Markdown + YAML frontmatter. Key innovation: path-scoped instructions w/ `applyTo` glob patterns. AGENTS.md now officially standardized under Linux Foundation (Aug 2025). File precedence: nested > root > explicit user input overrides all.
8
+
9
+ ## 1. copilot-instructions.md
10
+
11
+ **Location:** `.github/copilot-instructions.md` (workspace root)
12
+ **Scope:** Repository-wide, applies to all Copilot agents & code review
13
+ **Format:** Plain Markdown (no frontmatter required)
14
+ **Use Case:** General coding standards, team guidelines, deprecated libraries, architectural patterns
15
+
16
+ **Best Practice:**
17
+ - Reserve for team-wide conventions
18
+ - Keep concise & focused
19
+ - Include preferred frameworks, testing requirements, security considerations
20
+
21
+ ## 2. *.instructions.md Files
22
+
23
+ **Location:** `.github/instructions/` folder
24
+ **Scope:** Path-specific via `applyTo` glob patterns
25
+ **Format:**
26
+ ```yaml
27
+ ---
28
+ applyTo: "src/api/**/*.ts"
29
+ excludeAgent: "code-review" # Optional: "coding-agent" or "code-review"
30
+ description: "API layer guidelines"
31
+ ---
32
+ # Your instructions
33
+ ```
34
+
35
+ **applyTo Patterns:**
36
+ - Glob syntax supported (e.g., `**/*.py`, `app/models/**/*.rb`)
37
+ - Multiple patterns: comma-separated
38
+ - Files without `applyTo` are ignored
39
+ - Takes precedence over `copilot-instructions.md` when matched
40
+
41
+ **excludeAgent Property:**
42
+ - `excludeAgent: "code-review"` → Hidden from code review
43
+ - `excludeAgent: "coding-agent"` → Hidden from coding agent
44
+ - Omit property = both agents can use it
45
+
46
+ **Best Practices:**
47
+ - Scope guidance to individual areas (frontend, security, backend)
48
+ - Use separate files per language/concern
49
+ - Apply only coding agent to deployment/infrastructure code
50
+ - Apply only code-review to PR-specific checks
51
+
52
+ ## 3. *.prompt.md Files
53
+
54
+ **Location:** `.github/prompts/` folder
55
+ **Scope:** Reusable task-specific templates, invoked via `/<filename>` slash command
56
+ **Format:**
57
+ ```yaml
58
+ ---
59
+ mode: 'agent'
60
+ description: 'Generate a new React form component'
61
+ model: 'GPT-4o' # Optional
62
+ tools: ['githubRepo', 'search/codebase'] # Optional
63
+ ---
64
+ # Your prompt instructions
65
+ ```
66
+
67
+ **Variables:**
68
+ - `${input:varName:Placeholder text}` - User input fields
69
+ - `{selectedText}` - Currently selected code in editor
70
+ - Supports dynamic context injection
71
+
72
+ **Key Features:**
73
+ - Executable as slash commands (`/react-form-component`)
74
+ - Available in VS Code, Visual Studio, JetBrains
75
+ - Model specification allows GPT-4o override
76
+ - Tool specification enables search, repo access
77
+
78
+ **Best Practices:**
79
+ - Create task-specific templates (code gen, testing, docs)
80
+ - Use clear description for discoverability
81
+ - Leverage `{selectedText}` for context-aware prompts
82
+ - Reference via `#prompt:` in chat
83
+
84
+ ## 4. AGENTS.md
85
+
86
+ **Location:** Any directory level (root recommended, nested supported)
87
+ **Scope:** Directory tree downward; nested files override parent
88
+ **Format:** Plain Markdown (any heading structure), no frontmatter required
89
+
90
+ **Precedence Rules (Highest to Lowest):**
91
+ 1. Explicit user chat prompt
92
+ 2. Closest/most-deeply-nested AGENTS.md
93
+ 3. Root AGENTS.md
94
+ 4. `.github/copilot-instructions.md`
95
+
96
+ **Nesting Behavior:**
97
+ - Agents read nearest AGENTS.md in directory tree
98
+ - Monorepos: Place nested AGENTS.md in package folders
99
+ - Real example: OpenAI repo has 88 AGENTS.md files
100
+ - Scope = entire directory tree rooted at file location
101
+
102
+ **Implementation Notes:**
103
+ - Plain text, no structured format required
104
+ - Works alongside copilot-instructions.md & .instructions.md
105
+ - Compatible with CLAUDE.md & GEMINI.md
106
+ - **Note:** Known VS Code bug (Issue #271489) - only root-level currently respected in some versions; nested support inconsistent
107
+
108
+ **Standardization:**
109
+ - Now stewarded by Agentic AI Foundation (Linux Foundation)
110
+ - Formalized August 2025
111
+ - Spreading rapidly across OSS projects
112
+
113
+ ## 5. File Structure Hierarchy
114
+
115
+ ```
116
+ .github/
117
+ ├── copilot-instructions.md # Repo-wide base instructions
118
+ ├── instructions/
119
+ │ ├── api.instructions.md # applyTo: "src/api/**/*.ts"
120
+ │ ├── tests.instructions.md # applyTo: "**/*.test.ts"
121
+ │ └── security.instructions.md # excludeAgent: "code-review"
122
+ └── prompts/
123
+ ├── generate-component.prompt.md
124
+ ├── write-tests.prompt.md
125
+ └── document-api.prompt.md
126
+
127
+ AGENTS.md # Root-level, applies to all
128
+ packages/
129
+ ├── web/
130
+ │ └── AGENTS.md # Nested, overrides root for /web
131
+ ├── api/
132
+ └── AGENTS.md # Nested, overrides root for /api
133
+ ```
134
+
135
+ ## 6. Key Innovations (2025)
136
+
137
+ **Path-Scoped Instructions (Sep 2025):**
138
+ - `applyTo` glob patterns enable granular control
139
+ - Reduces need for monolithic instruction files
140
+ - Automatic application based on file context
141
+
142
+ **Agent-Specific Instructions (Nov 2025):**
143
+ - `excludeAgent` property allows per-agent configuration
144
+ - Different rules for coding-agent vs code-review
145
+
146
+ **Coding Agent AGENTS.md Support (Aug 2025):**
147
+ - Previously chat-only, now applies to all agents
148
+ - Formal standardization under Linux Foundation
149
+
150
+ ## 7. Organization-Level Configuration
151
+
152
+ **GitHub Admin Settings:**
153
+ - Enable/disable Copilot org-wide
154
+ - Public code matching policies
155
+ - Seat management & license assignment
156
+
157
+ **VS Code Workspace Settings (.vscode/settings.json):**
158
+ ```json
159
+ {
160
+ "github.copilot.enable": {
161
+ "*": true,
162
+ "markdown": false
163
+ },
164
+ "github.copilot.chat.codeGeneration.useInstructionFiles": true,
165
+ "chat.promptFilesLocations": [
166
+ ".github/prompts",
167
+ ".prompts"
168
+ ]
169
+ }
170
+ ```
171
+
172
+ ## 8. Current Limitations & Compatibility
173
+
174
+ **IDE Support:**
175
+ - Prompt files: VS Code, Visual Studio, JetBrains only
176
+ - Instructions: All IDEs via GitHub.com
177
+ - Code review: GitHub.com only
178
+
179
+ **Known Issues:**
180
+ - Nested AGENTS.md parsing inconsistent (VS Code issue #271489)
181
+ - Organization-level instruction rollout incomplete
182
+ - Custom agent precedence edge cases documented
183
+
184
+ ## 9. Unresolved Questions
185
+
186
+ 1. Does `applyTo` support negative patterns (exclude) or only positive matching?
187
+ 2. Performance impact of 80+ nested AGENTS.md files in large monorepos?
188
+ 3. Interaction order when multiple `*.instructions.md` match same file?
189
+ 4. Can `excludeAgent` be used in `copilot-instructions.md` or only `*.instructions.md`?
190
+ 5. How does `tools` field in prompt frontmatter interact with available MCP servers?
191
+
192
+ ## Sources
193
+
194
+ - [GitHub Copilot agent-specific instructions](https://github.blog/changelog/2025-11-12-copilot-code-review-and-coding-agent-now-support-agent-specific-instructions/)
195
+ - [Path-scoped custom instruction support](https://github.blog/changelog/2025-09-03-copilot-code-review-path-scoped-custom-instruction-file-support/)
196
+ - [Unlocking power of Copilot code review instructions](https://github.blog/ai-and-ml/unlocking-the-full-power-of-copilot-code-review-master-your-instructions-files/)
197
+ - [VS Code custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
198
+ - [GitHub Copilot coding agent AGENTS.md support](https://github.blog/changelog/2025-08-28-copilot-coding-agent-now-supports-agents-md-custom-instructions/)
199
+ - [How to write great agents.md](https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/)
200
+ - [GitHub official prompt files tutorial](https://docs.github.com/en/copilot/tutorials/customization-library/prompt-files/your-first-prompt-file)
201
+ - [Custom agents configuration](https://docs.github.com/en/copilot/reference/custom-agents-configuration)
@@ -0,0 +1,184 @@
1
+ # Code Review Report: CoKit Phase 2 - Repo Templates
2
+
3
+ **Date:** 2026-01-06
4
+ **Reviewer:** code-reviewer (a67ad50)
5
+ **Scope:** Repo template files in `/templates/repo/.github/`
6
+
7
+ ---
8
+
9
+ ## Code Review Summary
10
+
11
+ ### Scope
12
+ Files reviewed:
13
+ - `templates/repo/.github/copilot-instructions.md` (46 lines)
14
+ - `templates/repo/.github/AGENTS.md` (56 lines)
15
+ - `templates/repo/.github/.cokit-version` (5 lines)
16
+ - `templates/repo/.github/instructions/development.instructions.md` (26 lines)
17
+ - `templates/repo/.github/instructions/backend.instructions.md` (36 lines)
18
+ - `templates/repo/.github/instructions/frontend.instructions.md` (32 lines)
19
+ - `templates/repo/.github/instructions/testing.instructions.md` (32 lines)
20
+ - `templates/repo/.github/skills/debugging/SKILL.md` (35 lines)
21
+ - `templates/repo/.github/skills/code-review/SKILL.md` (47 lines)
22
+
23
+ Total: ~315 lines across 9 files
24
+
25
+ Review focus: Static template content for user repos
26
+
27
+ ### Overall Assessment
28
+
29
+ **Status: ✅ APPROVED - No Critical Issues**
30
+
31
+ Templates are well-designed, security-conscious, and follow best practices. Content is clear, actionable, and appropriate for static repo templates. No Claude-specific references, no dynamic variables, no sensitive data.
32
+
33
+ ---
34
+
35
+ ## Critical Issues
36
+
37
+ **None identified.**
38
+
39
+ ---
40
+
41
+ ## High Priority Findings
42
+
43
+ **None identified.**
44
+
45
+ ---
46
+
47
+ ## Medium Priority Improvements
48
+
49
+ ### 1. Missing YAML Validation Context in `.instructions.md` Files
50
+
51
+ **Location:** All 4 instruction files have frontmatter but lack explanation
52
+
53
+ **Issue:** Files use YAML frontmatter with `applyTo` patterns, but no comment explains this is for GitHub Copilot's instruction file format.
54
+
55
+ **Suggestion:** Add brief comment after frontmatter:
56
+ ```markdown
57
+ ---
58
+ applyTo: "**/*"
59
+ ---
60
+ <!-- applyTo defines file patterns where these instructions apply -->
61
+ ```
62
+
63
+ **Impact:** Low - Works correctly, just lacks clarity for manual editors
64
+
65
+ ### 2. `.cokit-version` Could Include Installation Date
66
+
67
+ **Location:** `templates/repo/.github/.cokit-version`
68
+
69
+ **Current:**
70
+ ```
71
+ 1.0.0
72
+ # CoKit installation marker - do not delete
73
+ ```
74
+
75
+ **Suggestion:** Consider adding `# Installed: YYYY-MM-DD` during template expansion for troubleshooting.
76
+
77
+ **Impact:** Low - Nice-to-have for support scenarios
78
+
79
+ ### 3. Inconsistent "Forbidden" vs "Anti-Patterns" Terminology
80
+
81
+ **Location:**
82
+ - `testing.instructions.md` uses "## Forbidden"
83
+ - `debugging/SKILL.md` uses "## Anti-Patterns to Avoid"
84
+
85
+ **Suggestion:** Standardize terminology across files. "Anti-Patterns" is softer and more educational.
86
+
87
+ **Impact:** Low - Stylistic consistency
88
+
89
+ ---
90
+
91
+ ## Low Priority Suggestions
92
+
93
+ ### 1. `applyTo` Pattern Validation
94
+
95
+ **Current patterns:**
96
+ - `development.instructions.md`: `"**/*"` ✅
97
+ - `backend.instructions.md`: `"**/*.ts,**/*.py,**/*.go,**/api/**"` ✅
98
+ - `frontend.instructions.md`: `"**/*.tsx,**/*.jsx,**/*.vue,**/*.svelte"` ✅
99
+ - `testing.instructions.md`: `"**/*.test.ts,**/*.spec.ts,**/*.test.js,**/*.spec.js"` ✅
100
+
101
+ All patterns are appropriate for their stated purpose.
102
+
103
+ ### 2. Skill Activation Clarity
104
+
105
+ Skills correctly define "When to Activate" sections with clear triggers. No changes needed.
106
+
107
+ ---
108
+
109
+ ## Positive Observations
110
+
111
+ ### Security
112
+ - ✅ No hardcoded secrets or credentials
113
+ - ✅ No sensitive data patterns
114
+ - ✅ Security checklist in code-review skill is comprehensive
115
+ - ✅ Backend guidelines emphasize input validation
116
+
117
+ ### Quality
118
+ - ✅ Content is concise, actionable, well-structured
119
+ - ✅ Consistent formatting across files
120
+ - ✅ Clear separation of concerns (instructions vs skills)
121
+ - ✅ YAGNI/KISS/DRY principles emphasized throughout
122
+
123
+ ### Static Template Compliance
124
+ - ✅ No `$HOME` or `$ARGUMENTS` references
125
+ - ✅ No `$CK_*` environment variables
126
+ - ✅ No Claude/Anthropic-specific references
127
+ - ✅ Generic enough for GitHub Copilot or other AI tools
128
+
129
+ ### Architecture
130
+ - ✅ Proper separation: instructions (Copilot) vs skills (Copilot Workspace)
131
+ - ✅ `applyTo` patterns correctly target relevant file types
132
+ - ✅ Skills use proper frontmatter format
133
+
134
+ ### Documentation
135
+ - ✅ Each file has clear purpose and structure
136
+ - ✅ Debugging process is systematic (6-step)
137
+ - ✅ Code review checklist is thorough (security, quality, performance, testing)
138
+
139
+ ---
140
+
141
+ ## Recommended Actions
142
+
143
+ **Priority: Optional refinements only**
144
+
145
+ 1. ✅ **Security audit:** PASSED - No issues
146
+ 2. ✅ **Quality check:** PASSED - Content is clear and actionable
147
+ 3. ✅ **YAGNI/KISS/DRY:** PASSED - No over-engineering detected
148
+ 4. ✅ **Dynamic variables:** PASSED - No `$HOME`/`$ARGUMENTS`/`$CK_*` found
149
+ 5. ✅ **applyTo patterns:** PASSED - All patterns appropriate
150
+
151
+ Optional improvements (if time permits):
152
+ - Add frontmatter explanation comments to `.instructions.md` files
153
+ - Standardize "Anti-Patterns" terminology
154
+ - Consider adding installation date to `.cokit-version` during expansion
155
+
156
+ ---
157
+
158
+ ## Metrics
159
+
160
+ - **Security Issues:** 0 critical, 0 high, 0 medium
161
+ - **Quality Issues:** 0 high, 3 medium (cosmetic), 2 low (optional)
162
+ - **YAGNI Violations:** 0
163
+ - **Line Count:** ~315 lines total (all under 60 lines per file ✅)
164
+ - **Dynamic Variables:** 0 (static templates ✅)
165
+ - **Claude References:** 0 (AI-agnostic ✅)
166
+
167
+ ---
168
+
169
+ ## Conclusion
170
+
171
+ Phase 2 repo templates are **production-ready**. No blocking issues. All critical requirements met:
172
+ - Security: No sensitive data
173
+ - Quality: Clear, actionable content
174
+ - Compliance: YAGNI/KISS/DRY followed
175
+ - Static: No dynamic variables
176
+ - Generic: Works with any AI coding assistant
177
+
178
+ Medium/low priority suggestions are cosmetic improvements that can be addressed in future iterations if desired.
179
+
180
+ ---
181
+
182
+ ## Unresolved Questions
183
+
184
+ None.