Proposal: Claude Code Extension Compatibility for hve-core #272
WilliamBerryiii
started this conversation in
Ideas
Replies: 1 comment
-
|
CC/ @agreaves-ms, @katriendg, & @cundernehr |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This proposal describes how to make hve-core compatible with Anthropic's Claude Code extension while maintaining GitHub Copilot (GHCP) as the primary supported tool. The approach uses import-based wrapper files that reference existing GHCP content, preserving a single source of truth.
Background
hve-core currently supports GitHub Copilot through a mature artifact system:
.github/instructions/*.instructions.md.github/prompts/*.prompt.md.github/agents/*.agent.md.github/skills/<name>/SKILL.mdClaude Code (extension ID:
anthropic.claude-code) uses a different but conceptually similar system:.claude/CLAUDE.mdcopilot-instructions.md.claude/rules/*.md.github/instructions/*.instructions.md.claude/skills/<name>/SKILL.md.github/prompts/*.prompt.md.claude/agents/*.md.github/agents/*.agent.mdProposed Approach
Import-Based Wrappers
Claude Code supports
@path/to/filesyntax for importing content. Rather than duplicating files, create thin wrapper files in.claude/that import existing GHCP content.Root Instructions
Rules (Instructions)
<!-- .claude/rules/csharp.md --> @.github/instructions/csharp/csharp.instructions.mdSkills (Prompts)
Subagents (Agents)
Directory Structure
Schema Requirements
New Claude Code Schemas
Create JSON schemas for validating Claude Code frontmatter:
claude-skill-frontmatter.schema.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/microsoft/hve-core/schemas/claude-skill-frontmatter.schema.json", "title": "Claude Code Skill Frontmatter Schema", "description": "Frontmatter schema for Claude Code SKILL.md files", "type": "object", "required": ["name", "description"], "properties": { "name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "minLength": 1, "description": "Unique identifier for the skill, invoked via /skill-name" }, "description": { "type": "string", "minLength": 1, "description": "Brief description of when to use this skill" }, "context": { "type": "string", "enum": ["append", "fork"], "default": "append", "description": "How skill content is added - append to conversation or fork to subagent" }, "agent": { "type": "string", "description": "Subagent to run skill in when context is fork" }, "paths": { "type": "array", "items": { "type": "string" }, "description": "Glob patterns for automatic skill activation" }, "allowed-tools": { "type": "array", "items": { "type": "string" }, "description": "Tools the skill can use" }, "disable-model-invocation": { "type": "boolean", "default": false, "description": "Inject content without model processing" } }, "additionalProperties": false }claude-subagent-frontmatter.schema.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/microsoft/hve-core/schemas/claude-subagent-frontmatter.schema.json", "title": "Claude Code Subagent Frontmatter Schema", "description": "Frontmatter schema for Claude Code subagent .md files", "type": "object", "required": ["name", "description"], "properties": { "name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "minLength": 1, "description": "Unique identifier for the subagent" }, "description": { "type": "string", "minLength": 1, "description": "When Claude should delegate to this subagent" }, "tools": { "type": "string", "description": "Comma-separated list of Claude Code tools: Read, Edit, Write, Bash, Grep, Glob" }, "disallowedTools": { "type": "string", "description": "Tools to explicitly deny" }, "model": { "type": "string", "enum": ["sonnet", "opus", "haiku", "inherit"], "default": "inherit", "description": "Model to use for this subagent" }, "permissionMode": { "type": "string", "enum": ["default", "acceptEdits", "dontAsk", "bypassPermissions", "plan"], "description": "Permission handling mode" }, "skills": { "type": "array", "items": { "type": "string" }, "description": "Skills to preload into subagent context" }, "hooks": { "type": "object", "description": "Lifecycle hooks for PreToolUse, PostToolUse, Stop events" } }, "additionalProperties": false }Schema Mapping Updates
Update
scripts/linting/schemas/schema-mapping.json:{ "mappings": [ { "pattern": ".github/agents/*.agent.md", "schema": "agent-frontmatter.schema.json" }, { "pattern": ".github/prompts/*.prompt.md", "schema": "prompt-frontmatter.schema.json" }, { "pattern": ".github/instructions/**/*.instructions.md", "schema": "instruction-frontmatter.schema.json" }, { "pattern": ".github/skills/**/SKILL.md", "schema": "skill-frontmatter.schema.json" }, { "pattern": ".claude/skills/**/SKILL.md", "schema": "claude-skill-frontmatter.schema.json" }, { "pattern": ".claude/agents/*.md", "schema": "claude-subagent-frontmatter.schema.json" } ] }Testing Infrastructure
Validation Script Updates
Extend
Validate-MarkdownFrontmatter.ps1to support Claude Code artifacts:Import Validation
Create
Test-ClaudeImports.ps1to validate wrapper files:Pester Tests
Create
scripts/tests/linting/Test-ClaudeCompatibility.Tests.ps1:Test Fixtures
Create fixture files in
scripts/tests/Fixtures/Claude/:Maintenance Requirements
Ongoing Maintenance Tasks
Test-ClaudeImports.ps1in CI pipelineAutomation: Wrapper Generation Script
Create
scripts/dev-tools/New-ClaudeWrapper.ps1:CI Integration
Add to
.github/workflows/validate.yml:Migration Plan
Phase 1: Foundation (Week 1)
.claude/directory structure.CLAUDE.mdwith import tocopilot-instructions.md.scripts/linting/schemas/.schema-mapping.json.Phase 2: Wrappers (Week 2)
New-ClaudeWrapper.ps1script.Phase 3: Testing (Week 3)
Test-ClaudeImports.ps1.Test-ClaudeCompatibility.Tests.ps1.Phase 4: Documentation (Week 4)
docs/getting-started/.CONTRIBUTING.mdwith Claude wrapper requirements.prompt-builder.instructions.mdsection for Claude artifacts.Compatibility Considerations
Known Differences
codebase,editFilesRead,Edit,WriteapplyToglobpathsarraymodelfieldmodelfieldPreToolUse,PostToolUseLimitations
Tool Mapping: GHCP
toolsfrontmatter uses different tool identifiers. Wrappers define Claude-specific tools separately from GHCP source.Context Isolation: Claude subagents run in isolated context windows. GHCP agents share the main conversation context. Some agents may behave differently.
Import Depth: Claude Code may not support nested imports (
@filereferencing another@file). Keep wrappers single-level.MCP Tools: Claude Code MCP tool names differ from GHCP. MCP-dependent agents need wrapper-level tool definitions.
Open Questions
Import Behavior: Does Claude Code support
@pathimports for local files, or only for CLAUDE.md rules? Testing required.Frontmatter Merge: When a wrapper has frontmatter and imports a file with frontmatter, which takes precedence?
Maturity Field: Should Claude wrappers track their own maturity, or inherit from GHCP source?
Opt-in vs Default: Should Claude support be opt-in (gitignored
.claude/) or committed to the repository?Decision Requested
This proposal requests approval to:
.claude/directory structure with import-based wrappers.References
Beta Was this translation helpful? Give feedback.
All reactions