Skip to content

feat(D26): Copilot parser (.agent.md → IR)#22

Merged
ogkranthi merged 2 commits into
mainfrom
agent/dev/D26
Apr 3, 2026
Merged

feat(D26): Copilot parser (.agent.md → IR)#22
ogkranthi merged 2 commits into
mainfrom
agent/dev/D26

Conversation

@ogkranthi
Copy link
Copy Markdown
Owner

Summary

  • Implements reverse-direction parser for GitHub Copilot .agent.md files → AgentShift IR
  • Maps 18 standard Copilot tool IDs to IR tools with fallback for unknown IDs
  • Extracts MCP tools from HTML comments, governance from ## Guardrails and ## Governance Constraints (Elevated) sections
  • Reverses elevation templates back to L2/L3 governance (ToolPermission, PlatformAnnotation)
  • Registers --from copilot in CLI

Test plan

  • Verify round-trip: OpenClaw → Copilot emitter → Copilot parser → IR matches original
  • Test with pregnancy-companion fixture
  • Test edge cases: missing frontmatter, empty tools, unknown tool IDs
  • Verify existing 887 tests still pass

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentshift with  Cloudflare Pages  Cloudflare Pages

Latest commit: f554311
Status: ✅  Deploy successful!
Preview URL: https://ac64c377.agentshift.pages.dev
Branch Preview URL: https://agent-dev-d26.agentshift.pages.dev

View logs

Adds reverse-direction parser for GitHub Copilot .agent.md files:
- YAML frontmatter extraction (name, description, model, tools)
- Standard tool ID → IR tool mapping (18 known IDs + fallback)
- MCP tool extraction from HTML comments + README enrichment
- Governance extraction (## Guardrails + ## Governance Constraints)
- Elevation template reversal (L2/L3 → ToolPermission/PlatformAnnotation)
- System prompt heuristic guardrail scanning
- Language detection, section extraction
- Registered as --from copilot in CLI

Spec: specs/copilot-parser-spec.md (A15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ogkranthi ogkranthi merged commit 77a0ac1 into main Apr 3, 2026
@ogkranthi ogkranthi deleted the agent/dev/D26 branch April 3, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant