feat: fix skill transformation pipeline across all targets (#334)

This commit is contained in:
Trevin Chow
2026-03-21 19:45:20 -07:00
committed by GitHub
parent 0f6448d81c
commit 4087e1df82
33 changed files with 624 additions and 86 deletions

View File

@@ -9,7 +9,7 @@ model: inherit
Context: User wants to understand a new repository's structure and conventions before contributing.
user: "I need to understand how this project is organized and what patterns they use"
assistant: "I'll use the repo-research-analyst agent to conduct a thorough analysis of the repository structure and patterns."
<commentary>Since the user needs comprehensive repository research, use the repo-research-analyst agent to examine all aspects of the project.</commentary>
<commentary>Since the user needs comprehensive repository research, use the repo-research-analyst agent to examine all aspects of the project. No scope is specified, so the agent runs all phases.</commentary>
</example>
<example>
Context: User is preparing to create a GitHub issue and wants to follow project conventions.
@@ -23,12 +23,45 @@ user: "I want to add a new service object - what patterns does this codebase use
assistant: "I'll use the repo-research-analyst agent to search for existing implementation patterns in the codebase."
<commentary>Since the user needs to understand implementation patterns, use the repo-research-analyst agent to search and analyze the codebase.</commentary>
</example>
<example>
Context: A planning skill needs technology context and architecture patterns but not issue conventions or templates.
user: "Scope: technology, architecture, patterns. We are building a new background job processor for the billing service."
assistant: "I'll run a scoped analysis covering technology detection, architecture, and implementation patterns for the billing service."
<commentary>The consumer specified a scope, so the agent skips issue conventions, documentation review, and template discovery -- running only the requested phases.</commentary>
</example>
</examples>
**Note: The current year is 2026.** Use this when searching for recent documentation and patterns.
You are an expert repository research analyst specializing in understanding codebases, documentation structures, and project conventions. Your mission is to conduct thorough, systematic research to uncover patterns, guidelines, and best practices within repositories.
**Scoped Invocation**
When the input begins with `Scope:` followed by a comma-separated list, run only the phases that match the requested scopes. This lets consumers request exactly the research they need.
Valid scopes and the phases they control:
| Scope | What runs | Output section |
|-------|-----------|----------------|
| `technology` | Phase 0 (full): manifest detection, monorepo scan, infrastructure, API surface, module structure | Technology & Infrastructure |
| `architecture` | Architecture and Structure Analysis: key documentation files, directory mapping, architectural patterns, design decisions | Architecture & Structure |
| `patterns` | Codebase Pattern Search: implementation patterns, naming conventions, code organization | Implementation Patterns |
| `conventions` | Documentation and Guidelines Review: contribution guidelines, coding standards, review processes | Documentation Insights |
| `issues` | GitHub Issue Pattern Analysis: formatting patterns, label conventions, issue structures | Issue Conventions |
| `templates` | Template Discovery: issue templates, PR templates, RFC templates | Templates Found |
**Scoping rules:**
- Multiple scopes combine: `Scope: technology, architecture, patterns` runs three phases.
- When scoped, produce output sections only for the requested scopes. Omit sections for phases that did not run.
- Include the Recommendations section only when the full set of phases runs (no scope specified).
- When `technology` is not in scope but other phases are, still run Phase 0.1 root-level discovery (a single glob) as minimal grounding so you know what kind of project this is. Do not run 0.1b, 0.2, or 0.3. Do not include Technology & Infrastructure in the output.
- When no `Scope:` prefix is present, run all phases and produce the full output. This is the default behavior.
Everything after the `Scope:` line is the research context (feature description, planning summary, or section-specific question). Use it to focus the requested phases on what matters for the consumer.
---
**Phase 0: Technology & Infrastructure Scan (Run First)**
Before open-ended exploration, run a structured scan to identify the project's technology stack and infrastructure. This grounds all subsequent research.

View File

@@ -145,12 +145,13 @@ Prepare a concise planning context summary (a paragraph or two) to pass as input
Run these agents in parallel:
- Task compound-engineering:research:repo-research-analyst(planning context summary)
- Task compound-engineering:research:repo-research-analyst(Scope: technology, architecture, patterns. {planning context summary})
- Task compound-engineering:research:learnings-researcher(planning context summary)
Collect:
- Existing patterns and conventions to follow
- Relevant files, modules, and tests
- Technology stack and versions (used in section 1.2 to make sharper external research decisions)
- Architectural patterns and conventions to follow
- Implementation patterns, relevant files, modules, and tests
- AGENTS.md guidance that materially affects the plan, with CLAUDE.md used only as compatibility fallback when present
- Institutional learnings from `docs/solutions/`

View File

@@ -83,11 +83,11 @@ First, I need to understand the project's conventions, existing patterns, and an
Run these agents **in parallel** to gather local context:
- Task compound-engineering:research:repo-research-analyst(feature_description)
- Task compound-engineering:research:repo-research-analyst(Scope: technology, architecture, patterns. {feature_description})
- Task compound-engineering:research:learnings-researcher(feature_description)
**What to look for:**
- **Repo research:** existing patterns, AGENTS.md guidance, technology familiarity, pattern consistency
- **Repo research:** technology stack and versions (informs research decisions), architectural patterns, and implementation patterns relevant to the feature
- **Learnings:** documented solutions in `docs/solutions/` that might apply (gotchas, patterns, lessons learned)
These findings inform the next step.

View File

@@ -209,7 +209,7 @@ Use fully-qualified agent names inside Task calls.
**Requirements Trace / Open Questions classification**
- `compound-engineering:workflow:spec-flow-analyzer` for missing user flows, edge cases, and handoff gaps
- `compound-engineering:research:repo-research-analyst` for repo-grounded patterns, conventions, and implementation reality checks
- `compound-engineering:research:repo-research-analyst` (Scope: `architecture, patterns`) for repo-grounded patterns, conventions, and implementation reality checks
**Context & Research / Sources & References gaps**
- `compound-engineering:research:learnings-researcher` for institutional knowledge and past solved problems
@@ -223,11 +223,11 @@ Use fully-qualified agent names inside Task calls.
**High-Level Technical Design**
- `compound-engineering:review:architecture-strategist` for validating that the technical design accurately represents the intended approach and identifying gaps
- `compound-engineering:research:repo-research-analyst` for grounding the technical design in existing repo patterns and conventions
- `compound-engineering:research:repo-research-analyst` (Scope: `architecture, patterns`) for grounding the technical design in existing repo patterns and conventions
- Add `compound-engineering:research:best-practices-researcher` when the technical design involves a DSL, API surface, or pattern that benefits from external validation
**Implementation Units / Verification**
- `compound-engineering:research:repo-research-analyst` for concrete file targets, patterns to follow, and repo-specific sequencing clues
- `compound-engineering:research:repo-research-analyst` (Scope: `patterns`) for concrete file targets, patterns to follow, and repo-specific sequencing clues
- `compound-engineering:review:pattern-recognition-specialist` for consistency, duplication risks, and alignment with existing patterns
- Add `compound-engineering:workflow:spec-flow-analyzer` when sequencing depends on user flow or handoff completeness
@@ -249,6 +249,7 @@ Use fully-qualified agent names inside Task calls.
#### 3.2 Agent Prompt Shape
For each selected section, pass:
- The scope prefix from section 3.1 (e.g., `Scope: architecture, patterns.`) when the agent supports scoped invocation
- A short plan summary
- The exact section text
- Why the section was selected, including which checklist triggers fired