Merge step (j): update tests + legacy-cleanup registries for deleted agents
Fork deleted 9 ce-* reviewer agents in step (c.1) and dropped the ce-dhh- rails-style skill in step (c.2). Tests and legacy-cleanup registries needed corresponding updates. Tests: - tests/review-skill-contract.test.ts: drop ce-dhh-rails-reviewer, ce-kieran-rails-reviewer, and ce-data-migration-expert from persona list tests. Remove the data-migration-expert unstructured-format test. - tests/legacy-cleanup.test.ts: switch the .agent.md copilot-format test to use agents that still have ce-* versions (correctness-reviewer, maintainability-reviewer) since security-sentinel and performance-oracle are gone. Drop the `lint` case from legacy-only cleanup since the fork re-introduced ce-lint (Python linter) as a current agent. Legacy cleanup registries: - src/utils/legacy-cleanup.ts: add the 9 deleted ce-* agent names to STALE_AGENT_NAMES and ce-dhh-rails-style to STALE_SKILL_DIRS so upgrades from pre-merge installs sweep the old files. - src/data/plugin-legacy-artifacts.ts: mirror the additions in the compound-engineering plugin's historical artifact lists. Frontmatter: - Drop embedded <example>/<commentary> blocks from ce-python-package- readme-writer.agent.md and ce-tiangolo-fastapi-reviewer.agent.md descriptions. Cowork's plugin validator rejects bare angle-bracket tokens; tests/frontmatter.test.ts was failing on these two local agents. Test state: 944 pass / 9 fail. Remaining 9 failures are pre-existing detect-project-type.sh monorepo probe tests in ce-polish-beta that were failing on baseline HEAD before this merge work began. Not introduced by this merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: ce-python-package-readme-writer
|
name: ce-python-package-readme-writer
|
||||||
description: "Use this agent when you need to create or update README files following concise documentation style for Python packages. This includes writing documentation with imperative voice, keeping sentences under 15 words, organizing sections in standard order (Installation, Quick Start, Usage, etc.), and ensuring proper formatting with single-purpose code fences and minimal prose.\n\n<example>\nContext: User is creating documentation for a new Python package.\nuser: \"I need to write a README for my new async HTTP client called 'quickhttp'\"\nassistant: \"I'll use the python-package-readme-writer agent to create a properly formatted README following Python package conventions\"\n<commentary>\nSince the user needs a README for a Python package and wants to follow best practices, use the python-package-readme-writer agent to ensure it follows the template structure.\n</commentary>\n</example>\n\n<example>\nContext: User has an existing README that needs to be reformatted.\nuser: \"Can you update my package's README to be more scannable?\"\nassistant: \"Let me use the python-package-readme-writer agent to reformat your README for better readability\"\n<commentary>\nThe user wants cleaner documentation, so use the specialized agent for this formatting standard.\n</commentary>\n</example>"
|
description: "Use this agent when you need to create or update README files following concise documentation style for Python packages. Writes documentation with imperative voice, keeps sentences under 15 words, organizes sections in standard order (Installation, Quick Start, Usage, etc.), and uses single-purpose code fences with minimal prose. Use when creating a README for a new Python package, reformatting an existing README for scannability, or enforcing a concise documentation standard across a repo."
|
||||||
model: inherit
|
model: inherit
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: ce-tiangolo-fastapi-reviewer
|
name: ce-tiangolo-fastapi-reviewer
|
||||||
description: "Use this agent when you need a brutally honest FastAPI code review from the perspective of Sebastián Ramírez (tiangolo). This agent excels at identifying anti-patterns, Flask/Django patterns contaminating FastAPI codebases, and violations of FastAPI conventions. Perfect for reviewing FastAPI code, architectural decisions, or implementation plans where you want uncompromising feedback on FastAPI best practices.\n\n<example>\nContext: The user wants to review a recently implemented FastAPI endpoint for adherence to FastAPI conventions.\nuser: \"I just implemented user authentication using Flask-Login patterns and storing user state in a global request context\"\nassistant: \"I'll use the tiangolo FastAPI reviewer agent to evaluate this implementation\"\n<commentary>\nSince the user has implemented authentication with Flask patterns (global request context, Flask-Login), the tiangolo-fastapi-reviewer agent should analyze this critically.\n</commentary>\n</example>\n\n<example>\nContext: The user is planning a new FastAPI feature and wants feedback on the approach.\nuser: \"I'm thinking of using dict parsing and manual type checking instead of Pydantic models for request validation\"\nassistant: \"Let me invoke the tiangolo FastAPI reviewer to analyze this approach\"\n<commentary>\nManual dict parsing instead of Pydantic is exactly the kind of thing the tiangolo-fastapi-reviewer agent should scrutinize.\n</commentary>\n</example>\n\n<example>\nContext: The user has written a FastAPI service and wants it reviewed.\nuser: \"I've created a sync database call inside an async endpoint and I'm using global variables for configuration\"\nassistant: \"I'll use the tiangolo FastAPI reviewer agent to review this implementation\"\n<commentary>\nSync calls in async endpoints and global state are anti-patterns in FastAPI, making this perfect for tiangolo-fastapi-reviewer analysis.\n</commentary>\n</example>"
|
description: "Brutally honest FastAPI code review from the perspective of Sebastián Ramírez (tiangolo). Identifies anti-patterns, Flask/Django patterns contaminating FastAPI codebases, and violations of FastAPI conventions. Use for FastAPI code, architectural decisions, or implementation plans where you want uncompromising feedback on FastAPI best practices — especially when the diff touches Pydantic models, async/await, dependency injection, or OpenAPI contracts."
|
||||||
model: inherit
|
model: inherit
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ const EXTRA_LEGACY_ARTIFACTS_BY_PLUGIN: Record<string, LegacyPluginArtifacts> =
|
|||||||
"ce-andrew-kane-gem-writer",
|
"ce-andrew-kane-gem-writer",
|
||||||
"ce-changelog",
|
"ce-changelog",
|
||||||
"ce-deploy-docs",
|
"ce-deploy-docs",
|
||||||
|
"ce-dhh-rails-style",
|
||||||
"ce-dspy-ruby",
|
"ce-dspy-ruby",
|
||||||
"ce-every-style-editor",
|
"ce-every-style-editor",
|
||||||
"ce-onboarding",
|
"ce-onboarding",
|
||||||
@@ -129,8 +130,16 @@ const EXTRA_LEGACY_ARTIFACTS_BY_PLUGIN: Record<string, LegacyPluginArtifacts> =
|
|||||||
"architecture-strategist",
|
"architecture-strategist",
|
||||||
"best-practices-researcher",
|
"best-practices-researcher",
|
||||||
"bug-reproduction-validator",
|
"bug-reproduction-validator",
|
||||||
|
"ce-ankane-readme-writer",
|
||||||
"ce-bug-reproduction-validator",
|
"ce-bug-reproduction-validator",
|
||||||
"ce-lint",
|
"ce-data-migration-expert",
|
||||||
|
"ce-design-implementation-reviewer",
|
||||||
|
"ce-design-iterator",
|
||||||
|
"ce-dhh-rails-reviewer",
|
||||||
|
"ce-figma-design-sync",
|
||||||
|
"ce-kieran-rails-reviewer",
|
||||||
|
"ce-performance-oracle",
|
||||||
|
"ce-security-sentinel",
|
||||||
"cli-agent-readiness-reviewer",
|
"cli-agent-readiness-reviewer",
|
||||||
"cli-readiness-reviewer",
|
"cli-readiness-reviewer",
|
||||||
"code-simplicity-reviewer",
|
"code-simplicity-reviewer",
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ export const STALE_SKILL_DIRS = [
|
|||||||
"ce-andrew-kane-gem-writer",
|
"ce-andrew-kane-gem-writer",
|
||||||
"ce-changelog",
|
"ce-changelog",
|
||||||
"ce-deploy-docs",
|
"ce-deploy-docs",
|
||||||
|
"ce-dhh-rails-style",
|
||||||
"ce-dspy-ruby",
|
"ce-dspy-ruby",
|
||||||
"ce-every-style-editor",
|
"ce-every-style-editor",
|
||||||
"ce-onboarding",
|
"ce-onboarding",
|
||||||
@@ -97,6 +98,18 @@ export const STALE_SKILL_DIRS = [
|
|||||||
|
|
||||||
/** Old agent names (used as generated skill dirs or flat .md files). */
|
/** Old agent names (used as generated skill dirs or flat .md files). */
|
||||||
const STALE_AGENT_NAMES = [
|
const STALE_AGENT_NAMES = [
|
||||||
|
// Fork-specific: ce-* agents that were removed from this fork during the
|
||||||
|
// v3.0.3 upstream merge. These existed upstream but the fork dropped them.
|
||||||
|
"ce-ankane-readme-writer",
|
||||||
|
"ce-data-migration-expert",
|
||||||
|
"ce-design-implementation-reviewer",
|
||||||
|
"ce-design-iterator",
|
||||||
|
"ce-dhh-rails-reviewer",
|
||||||
|
"ce-figma-design-sync",
|
||||||
|
"ce-kieran-rails-reviewer",
|
||||||
|
"ce-performance-oracle",
|
||||||
|
"ce-security-sentinel",
|
||||||
|
|
||||||
// Legacy agent names that were renamed from <name> to ce-<name>
|
// Legacy agent names that were renamed from <name> to ce-<name>
|
||||||
"adversarial-document-reviewer",
|
"adversarial-document-reviewer",
|
||||||
"adversarial-reviewer",
|
"adversarial-reviewer",
|
||||||
|
|||||||
@@ -319,25 +319,30 @@ describe("cleanupStaleAgents", () => {
|
|||||||
|
|
||||||
test("removes .agent.md files (Copilot format)", async () => {
|
test("removes .agent.md files (Copilot format)", async () => {
|
||||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-copilot-"))
|
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-copilot-"))
|
||||||
|
// Fork-specific: security-sentinel and performance-oracle were deleted in the
|
||||||
|
// v3.0.3 merge, so their ce-* fingerprints no longer exist and the legacy
|
||||||
|
// cleanup cannot match them. Use correctness-reviewer and maintainability-
|
||||||
|
// reviewer instead — both still have ce-* versions in the fork.
|
||||||
await createFile(
|
await createFile(
|
||||||
path.join(root, "security-sentinel.agent.md"),
|
path.join(root, "correctness-reviewer.agent.md"),
|
||||||
agentContent(
|
agentContent(
|
||||||
"security-sentinel",
|
"correctness-reviewer",
|
||||||
await pluginDescription("plugins/compound-engineering/agents/ce-security-sentinel.agent.md"),
|
await pluginDescription("plugins/compound-engineering/agents/ce-correctness-reviewer.agent.md"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await createFile(
|
await createFile(
|
||||||
path.join(root, "performance-oracle.agent.md"),
|
path.join(root, "maintainability-reviewer.agent.md"),
|
||||||
agentContent(
|
agentContent(
|
||||||
"performance-oracle",
|
"maintainability-reviewer",
|
||||||
await pluginDescription("plugins/compound-engineering/agents/ce-performance-oracle.agent.md"),
|
await pluginDescription("plugins/compound-engineering/agents/ce-maintainability-reviewer.agent.md"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
const removed = await cleanupStaleAgents(root, ".agent.md")
|
const removed = await cleanupStaleAgents(root, ".agent.md")
|
||||||
|
|
||||||
expect(removed).toBe(2)
|
expect(removed).toBe(2)
|
||||||
expect(await exists(path.join(root, "security-sentinel.agent.md"))).toBe(false)
|
expect(await exists(path.join(root, "correctness-reviewer.agent.md"))).toBe(false)
|
||||||
|
expect(await exists(path.join(root, "maintainability-reviewer.agent.md"))).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
test("removes matching Kiro agent configs but preserves same-named user configs", async () => {
|
test("removes matching Kiro agent configs but preserves same-named user configs", async () => {
|
||||||
@@ -422,17 +427,11 @@ describe("cleanupStaleAgents", () => {
|
|||||||
|
|
||||||
test("removes legacy-only agents that no longer ship a ce-* replacement", async () => {
|
test("removes legacy-only agents that no longer ship a ce-* replacement", async () => {
|
||||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-legacy-only-"))
|
const root = await fs.mkdtemp(path.join(os.tmpdir(), "cleanup-agents-legacy-only-"))
|
||||||
// `lint` and `bug-reproduction-validator` were removed in an older plugin
|
// Fork-specific: this fork re-introduced `ce-lint` (a Python linter agent), so
|
||||||
// release with no ce-* successor. Their fingerprints live in
|
// `lint` no longer qualifies as legacy-only here — the cleanup logic now takes
|
||||||
// LEGACY_ONLY_AGENT_DESCRIPTIONS so upgrades from pre-removal installs
|
// its fingerprint from the current `ce-lint.agent.md`. Only
|
||||||
// still clean them up.
|
// `bug-reproduction-validator` remains as a genuinely legacy-only agent with
|
||||||
await createFile(
|
// a LEGACY_ONLY_AGENT_DESCRIPTIONS fingerprint.
|
||||||
path.join(root, "lint.md"),
|
|
||||||
agentContent(
|
|
||||||
"lint",
|
|
||||||
"Use this agent when you need to run linting and code quality checks on Ruby and ERB files. Run before pushing to origin.",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
await createFile(
|
await createFile(
|
||||||
path.join(root, "bug-reproduction-validator.md"),
|
path.join(root, "bug-reproduction-validator.md"),
|
||||||
agentContent(
|
agentContent(
|
||||||
@@ -443,8 +442,7 @@ describe("cleanupStaleAgents", () => {
|
|||||||
|
|
||||||
const removed = await cleanupStaleAgents(root, ".md")
|
const removed = await cleanupStaleAgents(root, ".md")
|
||||||
|
|
||||||
expect(removed).toBe(2)
|
expect(removed).toBe(1)
|
||||||
expect(await exists(path.join(root, "lint.md"))).toBe(false)
|
|
||||||
expect(await exists(path.join(root, "bug-reproduction-validator.md"))).toBe(false)
|
expect(await exists(path.join(root, "bug-reproduction-validator.md"))).toBe(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -384,8 +384,6 @@ describe("ce-code-review contract", () => {
|
|||||||
"ce-adversarial-reviewer",
|
"ce-adversarial-reviewer",
|
||||||
"ce-cli-readiness-reviewer",
|
"ce-cli-readiness-reviewer",
|
||||||
"ce-previous-comments-reviewer",
|
"ce-previous-comments-reviewer",
|
||||||
"ce-dhh-rails-reviewer",
|
|
||||||
"ce-kieran-rails-reviewer",
|
|
||||||
"ce-kieran-python-reviewer",
|
"ce-kieran-python-reviewer",
|
||||||
"ce-kieran-typescript-reviewer",
|
"ce-kieran-typescript-reviewer",
|
||||||
"ce-julik-frontend-races-reviewer",
|
"ce-julik-frontend-races-reviewer",
|
||||||
@@ -414,8 +412,6 @@ describe("ce-code-review contract", () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
for (const agent of [
|
for (const agent of [
|
||||||
"ce-dhh-rails-reviewer",
|
|
||||||
"ce-kieran-rails-reviewer",
|
|
||||||
"ce-kieran-python-reviewer",
|
"ce-kieran-python-reviewer",
|
||||||
"ce-kieran-typescript-reviewer",
|
"ce-kieran-typescript-reviewer",
|
||||||
"ce-julik-frontend-races-reviewer",
|
"ce-julik-frontend-races-reviewer",
|
||||||
@@ -423,21 +419,10 @@ describe("ce-code-review contract", () => {
|
|||||||
expect(content).toContain(agent)
|
expect(content).toContain(agent)
|
||||||
expect(catalog).toContain(agent)
|
expect(catalog).toContain(agent)
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(content).toContain("## Language-Aware Conditionals")
|
|
||||||
expect(content).not.toContain("## Language-Agnostic")
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test("stack-specific reviewer agents follow the structured findings contract", async () => {
|
test("stack-specific reviewer agents follow the structured findings contract", async () => {
|
||||||
const reviewers = [
|
const reviewers = [
|
||||||
{
|
|
||||||
path: "plugins/compound-engineering/agents/ce-dhh-rails-reviewer.agent.md",
|
|
||||||
reviewer: "dhh-rails",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "plugins/compound-engineering/agents/ce-kieran-rails-reviewer.agent.md",
|
|
||||||
reviewer: "kieran-rails",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "plugins/compound-engineering/agents/ce-kieran-python-reviewer.agent.md",
|
path: "plugins/compound-engineering/agents/ce-kieran-python-reviewer.agent.md",
|
||||||
reviewer: "kieran-python",
|
reviewer: "kieran-python",
|
||||||
@@ -469,15 +454,11 @@ describe("ce-code-review contract", () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
test("leaves data-migration-expert as the unstructured review format", async () => {
|
// Fork-specific: data-migration-expert, dhh-rails-reviewer, kieran-rails-reviewer,
|
||||||
const content = await readRepoFile(
|
// design-implementation-reviewer, design-iterator, figma-design-sync,
|
||||||
"plugins/compound-engineering/agents/ce-data-migration-expert.agent.md",
|
// performance-oracle, security-sentinel, and ankane-readme-writer were removed
|
||||||
)
|
// from the fork (see commit 25543e6). Upstream's generated versions are deleted
|
||||||
|
// in this merge's step (c.1). Tests for their existence were removed.
|
||||||
expect(content).toContain("## Reviewer Checklist")
|
|
||||||
expect(content).toContain("Refuse approval until there is a written verification + rollback plan.")
|
|
||||||
expect(content).not.toContain("Return your findings as JSON matching the findings schema.")
|
|
||||||
})
|
|
||||||
|
|
||||||
test("fails closed when merge-base is unresolved instead of falling back to git diff HEAD", async () => {
|
test("fails closed when merge-base is unresolved instead of falling back to git diff HEAD", async () => {
|
||||||
const content = await readRepoFile("plugins/compound-engineering/skills/ce-code-review/SKILL.md")
|
const content = await readRepoFile("plugins/compound-engineering/skills/ce-code-review/SKILL.md")
|
||||||
|
|||||||
Reference in New Issue
Block a user