Skip to content

Feature/claude integration#47

Merged
danielmeppiel merged 4 commits into
mainfrom
feature/claude-integration
Dec 8, 2025
Merged

Feature/claude integration#47
danielmeppiel merged 4 commits into
mainfrom
feature/claude-integration

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

This pull request introduces major new features and documentation updates to support multi-agent output formats, specifically first-class integration for Claude Code and Claude Desktop, along with smarter target auto-detection during compilation. The documentation has been reorganized to clarify package sources, advanced configuration, and installation options, and the README has been refactored for easier onboarding and clearer explanation of APM's capabilities.

Multi-Agent Output & Target Auto-Detection

  • Added automatic detection of project structure to select output formats (vscode, claude, all, or minimal), with a persistent target field in apm.yml and a --target flag for manual override. This enables seamless generation of native context files for GitHub Copilot, Claude, Cursor, and others. [1] [2] [3]

  • Introduced first-class Claude integration, including generation of CLAUDE.md, .claude/commands/, and SKILL.md files, with auto-integration from installed packages. [1] [2]

Documentation & Onboarding

  • Refactored README.md for clarity and zero-friction onboarding, with improved quick start, install instructions, and real-world examples. Documentation now includes guides for multi-agent output, advanced configuration, and community packages.

  • Updated CLI reference and compilation documentation to explain target auto-detection, new flags, and output formats, making it easier to understand how APM adapts to different agent environments. [1] [2] [3]

Package Management

  • Expanded support for package sources, including GitHub.com, GitHub Enterprise, Azure DevOps, and virtual packages (installing individual files directly). Added documentation and examples for each source. [1] [2]

VSCode Integration

  • Clarified VSCode integration in documentation, emphasizing auto-detection and native primitives for GitHub Copilot, with improved instructions for prompt and agent integration.

New Agent Example

  • Added a new example agent file .github/agents/doc-analyser.agent.md to demonstrate agent configuration and handoff.

- Add SkillIntegrator to generate SKILL.md files for Claude Skills on install
- Add ClaudeFormatter to generate distributed CLAUDE.md files on compile
- Add --target flag to compile command (vscode, agents, claude, all)
- Generate .claude/commands/ from prompt files
- Hook skill generation into install flow
- Add 126 unit tests for Claude integration

Closes PRD-Claude requirements R1 (Skills on Install) and R2 (Target-Specific Compilation)
SKILL.md is now a concise manifest (~100-150 words) with a
'What's Included' table. Actual content is copied to typed
subdirectories (instructions/, agents/, prompts/, context/).

- Keywords extracted from filenames for discovery description
- Virtual packages (single files) skip skill generation
- All 57 skill integrator tests pass
- E2E validated on corporate-website with Claude CLI
- Add target auto-detection based on .github/ and .claude/ folders
- Add top-level 'target' field in apm.yml (applies to both compile and install)
- Detection priority: explicit --target > apm.yml target > folder auto-detect
- Target options: vscode, claude, all, minimal
- Update APMPackage model with target field
- Add target_detection module with helper functions
- Update CLI compile and install commands for auto-detection
- Add 31 unit tests for target detection
- Update documentation (README, cli-reference, compilation, integrations)
- 650 tests passing
Copilot AI review requested due to automatic review settings December 8, 2025 15:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces first-class Claude integration and intelligent target auto-detection for multi-agent output formats. The implementation enables APM to generate native context files for GitHub Copilot (AGENTS.md), Claude Code (CLAUDE.md), and other AI coding agents based on project structure detection or explicit configuration.

Key Changes:

  • Auto-detection of target based on .github/ and .claude/ folder presence
  • Claude Skills integration with SKILL.md generation and .claude/skills/ support
  • Claude commands integration transforming .prompt.md files to .claude/commands/
  • Multi-target compilation routing with --target flag and persistent apm.yml configuration

Reviewed changes

Copilot reviewed 23 out of 25 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
tests/unit/integration/test_skill_integrator.py Comprehensive tests for Claude Skills SKILL.md generation (961 lines)
tests/unit/integration/test_command_integrator.py Tests for .claude/commands/ integration and sync (364 lines)
tests/unit/core/test_target_detection.py Tests for auto-detection logic and helper functions (256 lines)
tests/unit/compilation/test_compile_target_flag.py Tests for --target flag routing and result merging (850 lines)
tests/unit/compilation/test_claude_formatter.py Tests for CLAUDE.md formatting and command generation (820 lines)
src/apm_cli/integration/skill_integrator.py SkillIntegrator implementation for Claude Skills support (660 lines)
src/apm_cli/integration/command_integrator.py CommandIntegrator for .claude/commands/ generation (460 lines)
src/apm_cli/core/target_detection.py Target auto-detection module with priority logic (140 lines)
src/apm_cli/compilation/claude_formatter.py ClaudeFormatter for CLAUDE.md generation (635 lines)
src/apm_cli/compilation/agents_compiler.py Updated with multi-target routing and _merge_results (additions)
src/apm_cli/cli.py CLI integration for target detection and new integrators
src/apm_cli/models/apm_package.py Added target field to APMPackage model
src/apm_cli/output/models.py Added target_name field to CompilationResults
src/apm_cli/output/formatters.py Updated formatters to use dynamic target_name
src/apm_cli/integration/init.py Added SkillIntegrator export
README.md Refactored with npm-style onboarding and multi-agent focus
docs/*.md Added Claude integration guides and updated compilation docs
pyproject.toml Version bump to 0.6.0
CHANGELOG.md Release notes for 0.6.0
.gitignore Added PRD*.md pattern
.github/agents/doc-analyser.agent.md New example agent file

Comment thread src/apm_cli/integration/skill_integrator.py Outdated
Comment thread src/apm_cli/compilation/agents_compiler.py Outdated
Comment thread src/apm_cli/compilation/agents_compiler.py Outdated
Comment thread src/apm_cli/integration/command_integrator.py Outdated
Comment thread src/apm_cli/integration/command_integrator.py Outdated
Comment thread tests/unit/core/test_target_detection.py Outdated
Comment thread src/apm_cli/integration/command_integrator.py
Comment thread src/apm_cli/cli.py
Comment thread src/apm_cli/integration/skill_integrator.py
Comment thread src/apm_cli/integration/skill_integrator.py
- Remove unused imports (normalize_repo_url, CompilationResults,
  ClaudeCompilationResult, Optional, shutil, pytest, hashlib, patch,
  MagicMock, Path) across 7 files
- Simplify lambda 'key=lambda p: str(p)' to 'key=str'
- Add explanatory comments to bare except clauses for clarity
@danielmeppiel danielmeppiel merged commit f81233c into main Dec 8, 2025
22 checks passed
sergio-sisternes-epam pushed a commit that referenced this pull request May 19, 2026
danielmeppiel added a commit that referenced this pull request Jun 25, 2026
…ion)

Add Job Set D to verify-shared-apm-matrix.yml: a cross-repo drift guard
that proves the `apm pack --archive` default archive format (.zip, source
of truth in src/apm_cli/bundle/packer.py) stays inside the extension set
the pinned microsoft/apm-action release detects when it scans the build
dir for a bundle.

This is the regression trap for the GH-AW Compatibility outage where the
CLI default flipped from .tar.gz to .zip while apm-action's bundler still
detected only '.tar.gz', so the job failed with 'apm pack produced no
bundle'. The guard reads apm-action's archive-detection set from
src/bundler.ts at the ref shared/apm.md pins and fails if the producer
default is not in it. Extraction is shape-tolerant: it reads the
ARCHIVE_EXTENSIONS constant (current apm-action contract) and falls back
to the older inline `entries.filter(... endsWith('.x'))` form.

Also adds src/apm_cli/bundle/packer.py to the workflow path triggers so a
future producer-default flip actually runs the trap.

NOTE: intentionally RED at the current pin (apm-action v1.7.2 detects only
.tar.gz). The consumer fix landed on apm-action main via
microsoft/apm-action#47 (#49 was closed as redundant) but is not yet in a
release tag. This trap flips green once apm-action cuts a tag containing
#47 AND the pin in shared/apm.md is bumped to it. Hold this PR until then.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants