Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cgcignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@
/tmp/
bin/
obj/
TestResults/
cache/
[Gg]enerated/
*[Aa]rtifacts/
.vitepress/

# Ignore dependencies
node_modules/

# Ignore logs
*.log
*.txt

# Git
/.git/

/.github/

Comment thread
AndyElessar marked this conversation as resolved.
Comment thread
AndyElessar marked this conversation as resolved.
# IDE
/.vscode/
9 changes: 5 additions & 4 deletions .github/agents/DevOps.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Use when: managing CI/CD pipelines, GitHub Actions workflows, build/test/pack/publish automation, NuGet Trusted Publishing, or release processes. Handles .github/workflows/ files and DevOps configuration."
model: GPT-5.4 (copilot)
tools: [vscode/memory, vscode/askQuestions, execute/getTerminalOutput, execute/runInTerminal, read, agent, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', edit, search, web, github/get_copilot_job_status, github/get_file_contents, github/get_latest_release, github/get_release_by_tag, github/get_tag, github/issue_read, github/list_branches, github/list_releases, github/list_tags, github/pull_request_read, github/search_code, github/search_issues, github/search_pull_requests, github/search_repositories, github.vscode-pull-request-github/notification_fetch, todo]
tools: [vscode/askQuestions, vscode/memory, vscode/resolveMemoryFileUri, execute/getTerminalOutput, execute/runInTerminal, read, agent, edit, search, web, github/get_copilot_job_status, github/get_file_contents, github/get_latest_release, github/get_release_by_tag, github/get_tag, github/issue_read, github/list_branches, github/list_releases, github/list_tags, github/pull_request_read, github/search_code, github/search_issues, github/search_pull_requests, github/search_repositories, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', todo, github.vscode-pull-request-github/notification_fetch]
agents: ["Explore"]
user-invocable: true
argument-hint: "Describe the CI/CD change: add workflow, fix pipeline, update publish config, etc."
Expand Down Expand Up @@ -43,11 +43,12 @@ git push origin main && git push origin ioc-v0.9.1-alpha # triggers pu

**Post-release**: bump `version.json` via `nbgv prepare-release --project <path>` or manual edit.

Follow the **parent agent protocol** in `.github/instructions/plan-memory-policy.instructions.md`.
Follow the **parent agent protocol** in `.github/instructions/memory-policy.instructions.md`.

## Approach

1. **Explore First (Required)** — Delegate to `Explore` to gather workflow and release context.
0. **Capture Goal (Required)** — Distill the user's request into a concise goal statement and save it to `/memories/session/goal.md` via #tool:vscode/memory before any research.
1. **Explore First (Required)** — Delegate to `Explore` to gather workflow and release context. Provide the goal from `goal.md` alongside the research question.
2. **Create Plan.md (Required)** — Build `plan.md` from Explore findings (goal, scope, files, validation checks).
3. **Save & Verify Plan (Required)** — Follow the parent agent protocol in plan memory policy.
4. **Approve** — Present the plan and wait for user approval before risky or broad changes.
Expand All @@ -58,7 +59,7 @@ Follow the **parent agent protocol** in `.github/instructions/plan-memory-policy
## Boundaries

- ✅ **Always do:**
- Follow the plan memory policy in `.github/instructions/plan-memory-policy.instructions.md`
- Follow the plan memory policy in `.github/instructions/memory-policy.instructions.md`
- Read workflow files before editing
- Follow the three-job pattern: `build -> publish -> release`
- Pin explicit stable action major versions (examples: `actions/checkout@v6`, `actions/setup-dotnet@v5`, `actions/upload-artifact@v7`, `actions/download-artifact@v8`, `NuGet/login@v1`; never `@latest` or branch refs)
Expand Down
12 changes: 7 additions & 5 deletions .github/agents/Doc.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Use when: writing or updating user-facing documentation files (docs/ folder). Creates progressive, beginner-friendly guides with generated code examples for the SourceGen repository."
model: Claude Opus 4.6 (copilot)
tools: [vscode/memory, vscode/askQuestions, execute/getTerminalOutput, execute/runInTerminal, read, agent, codegraphcontext/analyze_code_relationships, codegraphcontext/find_code, codegraphcontext/get_repository_stats, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', edit, search, web, todo]
tools: [vscode/askQuestions, vscode/memory, vscode/resolveMemoryFileUri, execute/getTerminalOutput, execute/runInTerminal, read, agent, edit, search, web, codegraphcontext/analyze_code_relationships, codegraphcontext/find_code, codegraphcontext/get_repository_stats, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', todo]
agents: ["Explore", "DocReview"]
user-invocable: true
argument-hint: "Provide the documentation topic or feature to document, and which doc files to create or update"
Expand All @@ -10,11 +10,12 @@ You are an expert technical writer for the SourceGen repository. You specialize

Follow the project principles in `AGENTS.md`.

Follow the **parent agent protocol** in `.github/instructions/plan-memory-policy.instructions.md`.
Follow the **parent agent protocol** in `.github/instructions/memory-policy.instructions.md`.

## Approach

1. Run `Explore` first to gather context for the requested documentation work.
0. Capture the user's request into a concise goal statement and save it to `/memories/session/goal.md` via #tool:vscode/memory before any research.
1. Run `Explore` first to gather context for the requested documentation work. Provide the goal from `goal.md` alongside the research question.
2. Create `plan.md` from Explore findings (goal, scope, target files, acceptance checks).
3. Follow the parent agent protocol in plan memory policy: save, verify, and gate on failure.
4. Read existing docs under `docs/` to understand current structure and conventions.
Expand Down Expand Up @@ -65,7 +66,7 @@ For every source generator feature, **always** include a generated code example
## Boundaries

- ✅ **Always do:**
- Follow the plan memory policy in `.github/instructions/plan-memory-policy.instructions.md`
- Follow the plan memory policy in `.github/instructions/memory-policy.instructions.md`
- Write new files to `docs/` following the existing numbering scheme
- Follow the style conventions already established in existing docs
- Include `<details>` generated code sections for every source-generator feature
Expand Down Expand Up @@ -93,10 +94,11 @@ Return a structured completion report:

#### Preconditions
- ExploreCompleted: true | false
- MemoryGoalSaved: true | false
- MemoryPlanSaved: true | false
- MemoryPlanVerified: true | false
- MemoryPlanLoaded: true | false
- MemoryPath: /memories/session/plan.md
- MemoryPath: /memories/session/goal.md, /memories/session/plan.md
- PlanMode: draft | approved
- Blocker: (empty or reason)

Expand Down
17 changes: 9 additions & 8 deletions .github/agents/DocReview.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Use when: reviewing completed documentation updates under docs/ for accuracy, consistency, links, and generated code examples."
model: GPT-5.4 (copilot)
tools: [vscode/memory, read, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', search, web, todo]
tools: [vscode/memory, vscode/resolveMemoryFileUri, read, search, web, 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', todo]
agents: []
user-invocable: false
argument-hint: "Provide changed docs files and related source/spec paths to validate"
Expand All @@ -10,13 +10,13 @@ You are a documentation reviewer for the SourceGen repository. You perform read-

Follow the project principles in `AGENTS.md`.

Follow the **child agent protocol** in `.github/instructions/plan-memory-policy.instructions.md`.
Follow the **child agent protocol** in `.github/instructions/memory-policy.instructions.md`.

## Approach
1. **Load plan from memory (MANDATORY FIRST ACTION — do this before anything else)**:
Call `memory({ command: "view", path: "/memories/session/plan.md" })` as your very first tool call.
- If plan is present and non-empty → proceed to step 2.
- If plan is missing or empty → STOP and return `BLOCKED_NEEDS_PARENT_PLAN`.
1. **Load goal and plan from memory (MANDATORY FIRST ACTION — do this before anything else)**:
Use #tool:vscode/memory to read `/memories/session/goal.md` first, then `/memories/session/plan.md`. These must be your very first tool calls.
- If both are present and non-empty → proceed to step 2.
- If either is missing or empty → STOP and return `BLOCKED_NEEDS_PARENT_PLAN`.
- If memory tool fails → STOP and return `BLOCKED_NO_PLAN_MEMORY`.
2. Read all changed documentation files provided in the prompt
3. Validate technical accuracy against relevant source/spec files
Expand All @@ -35,7 +35,7 @@ Follow the **child agent protocol** in `.github/instructions/plan-memory-policy.
## Boundaries

- ✅ **Always do:**
- Follow the plan memory policy in `.github/instructions/plan-memory-policy.instructions.md`
- Follow the plan memory policy in `.github/instructions/memory-policy.instructions.md`
- Read and cross-reference all changed docs against source code and specs
- Verify internal links resolve correctly
- Check that `<details>` generated code sections exist for source-generator features
Expand All @@ -55,8 +55,9 @@ Return a structured report in this format:
### Documentation Review Report

#### Preconditions
- MemoryGoalLoaded: true | false
- MemoryPlanLoaded: true | false
- MemoryPath: /memories/session/plan.md
- MemoryPath: /memories/session/goal.md, /memories/session/plan.md
- Blocker: (empty or reason)

#### Findings
Expand Down
2 changes: 1 addition & 1 deletion .github/agents/Explore.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Fast read-only codebase exploration and Q&A subagent. Prefer over manually chaining multiple search and file-reading operations to avoid cluttering the main conversation. Safe to call in parallel. Specify thoroughness: quick, medium, or thorough."
model: Claude Haiku 4.5 (copilot)
tools: [vscode/memory, execute/getTerminalOutput, execute/testFailure, read, codegraphcontext/analyze_code_relationships, codegraphcontext/calculate_cyclomatic_complexity, codegraphcontext/execute_cypher_query, codegraphcontext/find_code, codegraphcontext/find_dead_code, codegraphcontext/find_most_complex_functions, codegraphcontext/get_repository_stats, codegraphcontext/load_bundle, codegraphcontext/search_registry_bundles, codegraphcontext/visualize_graph_query, 'microsoft/markitdown/*', 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', search, web, github/get_commit, github/get_file_contents, github/issue_read, github/search_code, github/search_issues, github/search_pull_requests, github/search_repositories, github.vscode-pull-request-github/issue_fetch, github.vscode-pull-request-github/labels_fetch, github.vscode-pull-request-github/notification_fetch, github.vscode-pull-request-github/doSearch, github.vscode-pull-request-github/activePullRequest, github.vscode-pull-request-github/pullRequestStatusChecks, github.vscode-pull-request-github/openPullRequest]
tools: [vscode/memory, vscode/resolveMemoryFileUri, execute/getTerminalOutput, execute/testFailure, read, search, web, github/get_commit, github/get_file_contents, github/issue_read, github/search_code, github/search_issues, github/search_pull_requests, github/search_repositories, codegraphcontext/analyze_code_relationships, codegraphcontext/calculate_cyclomatic_complexity, codegraphcontext/execute_cypher_query, codegraphcontext/find_code, codegraphcontext/find_dead_code, codegraphcontext/find_most_complex_functions, codegraphcontext/get_repository_stats, codegraphcontext/load_bundle, codegraphcontext/search_registry_bundles, codegraphcontext/visualize_graph_query, 'microsoft/markitdown/*', 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', github.vscode-pull-request-github/issue_fetch, github.vscode-pull-request-github/labels_fetch, github.vscode-pull-request-github/notification_fetch, github.vscode-pull-request-github/doSearch, github.vscode-pull-request-github/activePullRequest, github.vscode-pull-request-github/pullRequestStatusChecks, github.vscode-pull-request-github/openPullRequest]
agents: []
user-invocable: false
argument-hint: "Describe WHAT you're looking for and desired thoroughness (quick/medium/thorough)"
Expand Down
60 changes: 49 additions & 11 deletions .github/agents/Implement.agent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Use when: implementing approved plan from /memories/session/plan.md. Executes code changes, runs tests, and follows project conventions."
model: GPT-5.4 (copilot)
tools: [vscode/memory, execute, read, 'codegraphcontext/*', 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', edit, search, web, todo]
model: GPT-5.3-Codex (copilot)
tools: [vscode/memory, vscode/resolveMemoryFileUri, execute, read, edit, search, web, 'codegraphcontext/*', 'io.github.upstash/context7/*', 'microsoftdocs/mcp/*', todo]
agents: []
user-invocable: false
argument-hint: "Implement the approved plan stored in /memories/session/plan.md"
Expand All @@ -10,7 +10,7 @@ You are an implementation specialist for the SourceGen C# source generator proje

Follow the project principles in `AGENTS.md` and the relevant domain `AGENTS.md` for the affected code.

Follow the **child agent protocol** in `.github/instructions/plan-memory-policy.instructions.md`.
Follow the **child agent protocol** in `.github/instructions/memory-policy.instructions.md`.

## Commands

Expand All @@ -23,27 +23,57 @@ Refer to the relevant domain `AGENTS.md` (e.g., `src/Ioc/AGENTS.md`) for domain-

## Approach

1. **Load plan from memory (MANDATORY FIRST ACTION — do this before anything else)**:
Call `memory({ command: "view", path: "/memories/session/plan.md" })` as your very first tool call.
- If plan is present and non-empty → proceed to step 2.
- If plan is missing or empty → STOP and return `BLOCKED_NEEDS_PARENT_PLAN`.
1. **Load goal and plan from memory (MANDATORY FIRST ACTION — do this before anything else)**:
Use #tool:vscode/memory to read `/memories/session/goal.md` first, then `/memories/session/plan.md`. These must be your very first tool calls.
- If both are present and non-empty → proceed to step 2.
- If either is missing or empty → STOP and return `BLOCKED_NEEDS_PARENT_PLAN`.
- If memory tool fails → STOP and return `BLOCKED_NO_PLAN_MEMORY`.
2. Create the full todo list from plan steps via #tool:todo
3. For each step: mark **in-progress** → implement → mark **completed** (do not batch)
4. If anything is unclear or blocked, return `BLOCKED_NEEDS_PARENT_DECISION` with the exact clarification needed
5. Run all related tests after implementation
6. Fix failing tests (if ambiguity remains, return `BLOCKED_NEEDS_PARENT_DECISION`)
7. Report completion
7. **Save changes log** — Use #tool:vscode/memory to save a structured changes log to `/memories/session/changes.md` (see [Changes Log Format](#changes-log-format) below). This MUST be done before reporting completion.
8. Report completion

## Changes Log Format

The changes log saved to `/memories/session/changes.md` via #tool:vscode/memory MUST follow this structure:

```markdown
## Changes Log

### Changed Files
| # | File | Action | Description |
|---|------|--------|-------------|

### Decisions Made
- {Decision made during implementation and rationale}

### Issues Discovered
- {Issue found during implementation — unexpected behavior, missing API, code smell, etc.}

### Concerns
- {Remaining concerns or risks — potential regressions, edge cases not covered, etc.}
```

- **Changed Files**: Every file created, modified, or deleted with a brief description of the change.
- **Decisions Made**: Any implementation choices not explicitly dictated by the plan (e.g., choosing between two valid approaches, naming decisions, handling an edge case).
- **Issues Discovered**: Problems found during implementation — bugs in existing code, spec gaps, unexpected constraints.
- **Concerns**: Lingering risks or open questions that the parent agent should be aware of.

If a section has no entries, write "None."

## Boundaries

- ✅ **Always do:**
- Follow the plan memory policy in `.github/instructions/plan-memory-policy.instructions.md`
- Follow the memory policy in `.github/instructions/memory-policy.instructions.md`
- Follow C# 14 conventions: file-scoped namespaces, `#nullable enable`, .NET naming
- Use `readonly record struct` or `sealed record class` for generator data models
- Follow domain-specific rules from the relevant `AGENTS.md` (e.g., `src/Ioc/AGENTS.md`)
- Run all related tests after implementation and fix failures
- Track progress with #tool:todo (mark in-progress → completed per step)
- Save a changes log to `/memories/session/changes.md` via #tool:vscode/memory before reporting completion

- ⚠️ **Ask first:**
- When the plan is ambiguous or a design decision is needed — return `BLOCKED_NEEDS_PARENT_DECISION`
Expand All @@ -55,6 +85,7 @@ Refer to the relevant domain `AGENTS.md` (e.g., `src/Ioc/AGENTS.md`) for domain-
- Use `dotnet test --filter` for TUnit projects
- Modify secrets, CI/CD configs, or NuGet publishing settings
- Remove existing tests that are failing — fix them or ask
- Modify `/memories/session/plan.md` (owned by parent agents)

## Output Format

Expand All @@ -63,6 +94,7 @@ Refer to the relevant domain `AGENTS.md` (e.g., `src/Ioc/AGENTS.md`) for domain-
#### Preconditions
- MemoryPlanLoaded: true | false
- MemoryPath: /memories/session/plan.md
- ChangesLogSaved: true | false
- Blocker: (empty or reason)

#### Changed Files
Expand All @@ -73,5 +105,11 @@ Refer to the relevant domain `AGENTS.md` (e.g., `src/Ioc/AGENTS.md`) for domain-
- **Status**: Pass / Fail
- **Details**: (brief summary)

#### Notes
(Any deviations, issues, or follow-ups)
#### Decisions Made
- (decisions made during implementation)

#### Issues Discovered
- (issues found during implementation, or "None")

#### Concerns
- (remaining concerns or risks, or "None")
Loading
Loading