Skip to content

feat(mcp): make browser/crawler MCP servers conditional on project.yaml#504

Merged
JustAGhosT merged 6 commits intodevfrom
feat/conditional-mcp-servers
Mar 31, 2026
Merged

feat(mcp): make browser/crawler MCP servers conditional on project.yaml#504
JustAGhosT merged 6 commits intodevfrom
feat/conditional-mcp-servers

Conversation

@JustAGhosT
Copy link
Copy Markdown
Collaborator

@JustAGhosT JustAGhosT commented Mar 30, 2026

Summary

  • Adds buildBrowserTestingVars() to var-builders.mjs — derives usesPlaywright and usesBrowser from testing.e2e in project.yaml
  • Wires new vars into synchronize.mjs alongside existing heuristics
  • Updates templates/mcp/servers.json: puppeteer/playwright/storybook-crawler are now conditional ({{#if usesPlaywright}}, {{#if usesBrowser}}, {{#if hasStorybook}}) — omitted when unused

Test plan

  • Verify a project with testing.e2e: [playwright] generates a servers.json with the playwright MCP entry
  • Verify a project with testing.e2e: [cypress] generates puppeteer entry (not playwright)
  • Verify a project with no e2e testing generates neither
  • Verify hasStorybook: true still generates storybook-crawler entry

Closes #503

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Detects browser testing frameworks (Playwright, Cypress, Puppeteer, WebDriverIO) from project config and exposes flags.
    • MCP server entries for Playwright, Puppeteer and Storybook crawler are now included only when needed.
  • Documentation

    • Regeneration metadata and tooling references updated to use Retort across docs and templates.
    • Skill metadata timestamps updated.

@blocksorg
Copy link
Copy Markdown

blocksorg bot commented Mar 30, 2026

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?

Run @blocks /help for more information.

Workspace settings | Disable this message

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions
Copy link
Copy Markdown

Retort Source Change Detected

This PR modifies files in the Retort source directories:

  • .agentkit/templates/ — output templates
  • .agentkit/spec/ — YAML specifications
  • .agentkit/engines/ — sync engine code
  • .agentkit/overlays/ — per-repo customizations
  • .agentkit/bin/ — CLI scripts

These are the upstream source-of-truth for all generated AI tool configs.

Review checklist

  • Changes are intentional and not accidental AI agent modifications
  • Spec schema validation passes (pnpm --dir .agentkit agentkit:spec-validate)
  • Sync produces expected output (pnpm --dir .agentkit agentkit:sync)
  • No secrets or credentials in template variables
  • Breaking changes documented in an ADR

AI agents: Do not modify these files directly. Propose changes in a dedicated PR.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

Adds a browser-testing var builder and wires its flags into the sync flow so MCP server template rendering can conditionally include Playwright, Puppeteer, or Storybook crawler entries based on project testing and Storybook settings.

Changes

Cohort / File(s) Summary
Browser testing var builder
.agentkit/engines/node/src/var-builders.mjs
New exported buildBrowserTestingVars(projectSpec) that normalizes projectSpec.testing.e2e and returns { usesPlaywright, usesBrowser }.
Sync integration
synchronize.mjs
.agentkit/engines/node/src/synchronize.mjs
Imports and calls buildBrowserTestingVars(projectSpec) during sync; sets vars.usesPlaywright and vars.usesBrowser on template variables.
MCP servers template
.agentkit/templates/mcp/servers.json
Converted to conditional Handlebars fragments: include mcpServers.playwright only when usesPlaywright, mcpServers.puppeteer when usesBrowser, and mcpServers.storybook-crawler when hasStorybook; removed unconditional puppeteer entry.
Repo metadata & docs
multiple *.md, .editorconfig, .prettierrc, .github/*, .vscode/settings.json, AGENT_BACKLOG.md, etc.
Non-functional updates: generator/regeneration header changes (AgentKit Forge → Retort), minor formatting/metadata edits, and a large backlog rewrite; no runtime code changes.

Sequence Diagram(s)

sequenceDiagram
    participant ProjectSpec as ProjectSpec
    participant VarBuilder as buildBrowserTestingVars
    participant Sync as Synchronize
    participant Template as MCP Template
    participant Output as Generated servers.json

    ProjectSpec->>VarBuilder: provide testing.e2e, storybook, frontend flags
    VarBuilder->>VarBuilder: normalize e2e entries\ndetect playwright vs other browsers
    VarBuilder-->>Sync: return { usesPlaywright, usesBrowser }
    Sync->>Sync: assign vars.usesPlaywright\nvars.usesBrowser (plus hasStorybook)
    Sync->>Template: render servers.json with vars
    Template->>Template: conditionally include\nplaywright / puppeteer / storybook-crawler
    Template->>Output: produce final servers.json
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I hopped through vars to sniff the test,
Playwright or Puppeteer — I know which quest,
Storybook hums where components rest,
Templates now pick what suits them best,
A little rabbit cheers this conditional fest.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes significant out-of-scope changes: numerous documentation files updated with Retort/agentkit-forge branding changes, skill metadata updates, .editorconfig modifications, and AGENT_BACKLOG.md restructuring unrelated to the MCP server conditional logic. Separate the MCP server conditional changes into a focused PR, and move documentation/branding/metadata updates to a separate commit or PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: making browser/crawler MCP servers conditional based on project.yaml configuration.
Linked Issues check ✅ Passed The PR implements all core requirements from issue #503: adds buildBrowserTestingVars() to derive usesPlaywright/usesBrowser flags from testing.e2e, wires them into synchronize.mjs, and converts servers.json to a Handlebars template with conditional MCP server entries.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/conditional-mcp-servers

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.16.5)
.vscode/settings.json

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m

.agentkit/templates/mcp/servers.json

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agentkit/engines/node/src/synchronize.mjs:
- Around line 57-58: You modified generated sync engine exports (the identifiers
buildBrowserTestingVars and buildCollaboratorsSection) inside the engine file;
revert those edits and do not change files under the .agentkit/engines/ path.
Instead, implement the intended change in the upstream generator/template that
produces this file (or in an overlay) — update the template or overlay that
defines/export these symbols (buildBrowserTestingVars,
buildCollaboratorsSection) so the generated synchronize.mjs includes the change,
then re-run the generation to produce the correct engine artifact.

In @.agentkit/templates/mcp/servers.json:
- Line 8: The "storybook-crawler" entry in the generated template is incorrect
and must not be edited in .agentkit/templates/mcp/servers.json; instead update
the generator spec under .agentkit/spec that defines the "storybook-crawler"
server entry so the template can be regenerated. In that spec, replace the
non-existent package "@chromatic-com/storybook-mcp-server" with a valid npm
package (or add a note clarifying the actual Storybook MCP implementation
required), then run the template generation step to produce an updated
servers.json; ensure the spec references the exact symbol "storybook-crawler"
and the corrected package name so the generated template is consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d00f24a8-fa63-40a6-a7ef-c62a19f0f8fc

📥 Commits

Reviewing files that changed from the base of the PR and between cadad02 and 3922ea5.

📒 Files selected for processing (3)
  • .agentkit/engines/node/src/synchronize.mjs
  • .agentkit/engines/node/src/var-builders.mjs
  • .agentkit/templates/mcp/servers.json

Comment on lines +57 to 58
buildBrowserTestingVars,
buildCollaboratorsSection,
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.

⚠️ Potential issue | 🟠 Major

Do not modify sync engine files directly in this repo path.

This PR edits .agentkit/engines/** directly (Line 57), which violates the repository’s generation workflow guardrails and can cause drift policy failures.

As per coding guidelines, "AI agents must never directly modify files in .agentkit/templates/, .agentkit/engines/, .agentkit/overlays/, or .agentkit/bin/ directories as they contain upstream sync engine, templates, and CLI scripts".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agentkit/engines/node/src/synchronize.mjs around lines 57 - 58, You
modified generated sync engine exports (the identifiers buildBrowserTestingVars
and buildCollaboratorsSection) inside the engine file; revert those edits and do
not change files under the .agentkit/engines/ path. Instead, implement the
intended change in the upstream generator/template that produces this file (or
in an overlay) — update the template or overlay that defines/export these
symbols (buildBrowserTestingVars, buildCollaboratorsSection) so the generated
synchronize.mjs includes the change, then re-run the generation to produce the
correct engine artifact.

"fetch": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch"] }{{#if usesPlaywright~}},
"playwright": { "command": "npx", "args": ["-y", "@playwright/mcp"] }{{~/if}}{{#if usesBrowser~}},
"puppeteer": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-puppeteer"] }{{~/if}}{{#if hasStorybook~}},
"storybook-crawler": { "command": "npx", "args": ["-y", "@chromatic-com/storybook-mcp-server"] }{{~/if}}
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify package availability on npm registry.
curl -s https://registry.npmjs.org/@chromatic-com%2Fstorybook-mcp-server | jq -r '."dist-tags".latest // "NOT_FOUND"'
curl -s https://registry.npmjs.org/@playwright%2Fmcp | jq -r '."dist-tags".latest // "NOT_FOUND"'
curl -s https://registry.npmjs.org/@modelcontextprotocol%2Fserver-puppeteer | jq -r '."dist-tags".latest // "NOT_FOUND"'

Repository: phoenixvc/retort

Length of output: 86


🏁 Script executed:

# Check if the file is marked as generated
head -20 .agentkit/templates/mcp/servers.json

# Look for spec files that might define MCP servers
find .agentkit/spec -name "*servers*" -o -name "*mcp*" 2>/dev/null | head -20

# Search for any documentation about Storybook requirement
rg -i "storybook" .agentkit/spec --type json --type yaml --type md -A 2 -B 2

# Check git history for context on this change (recent commits)
git log --oneline -20 -- .agentkit/templates/mcp/servers.json

Repository: phoenixvc/retort

Length of output: 2708


Do not edit this template file directly; update the spec instead.

File .agentkit/templates/mcp/servers.json is in a protected directory. Per coding guidelines, template files must not be modified directly. Changes must be made in .agentkit/spec/ and regenerated.

Additionally, the package @chromatic-com/storybook-mcp-server does not exist on the npm registry. If Storybook MCP support is required, the spec and template must reference an available package or clarify the actual requirement.

🧰 Tools
🪛 Biome (2.4.9)

[error] 8-8: expected , but instead found {

(parse)


[error] 8-8: Expected a property but instead found '{'.

(parse)


[error] 8-8: unexpected character ~

(parse)


[error] 8-8: unexpected character /

(parse)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agentkit/templates/mcp/servers.json at line 8, The "storybook-crawler"
entry in the generated template is incorrect and must not be edited in
.agentkit/templates/mcp/servers.json; instead update the generator spec under
.agentkit/spec that defines the "storybook-crawler" server entry so the template
can be regenerated. In that spec, replace the non-existent package
"@chromatic-com/storybook-mcp-server" with a valid npm package (or add a note
clarifying the actual Storybook MCP implementation required), then run the
template generation step to produce an updated servers.json; ensure the spec
references the exact symbol "storybook-crawler" and the corrected package name
so the generated template is consistent.

@github-actions
Copy link
Copy Markdown

Merge Conflict Detected

This branch (feat/conditional-mcp-servers) has merge conflicts with dev.

Auto-resolvable files

These will be handled automatically by scripts/resolve-merge.sh:

(none)

Manual resolution required

(none — all conflicts are auto-resolvable!)

How to resolve

Option 1 — Use the resolution script:

git checkout feat/conditional-mcp-servers
scripts/resolve-merge.sh dev

Option 2 — Manual merge:

git checkout feat/conditional-mcp-servers
git merge origin/dev
# resolve conflicts, then:
git add -A && git commit

Posted by Merge Conflict Detection workflow

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.agentkit/templates/mcp/servers.json (1)

5-8: ⚠️ Potential issue | 🟠 Major

Move this change into .agentkit/spec/ and regenerate outputs instead of editing this template directly.

This file is in a protected generated/template path. Please apply the MCP conditional logic in the corresponding .agentkit/spec/ source and regenerate with pnpm --dir .agentkit agentkit:sync before merging.

As per coding guidelines, "AI agents must never directly modify files in .agentkit/templates/, .agentkit/engines/, .agentkit/overlays/, or .agentkit/bin/ directories as they contain upstream sync engine, templates, and CLI scripts".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agentkit/templates/mcp/servers.json around lines 5 - 8, The change to add
MCP server entries should not be edited directly in the generated template
`.agentkit/templates/mcp/servers.json`; instead, update the source spec in
`.agentkit/spec/` to include the conditional MCP entries (the fetch entry and
the conditional blocks for usesPlaywright, usesBrowser/puppeteer, and
hasStorybook/storybook-crawler), then regenerate the templated outputs by
running the agentkit sync command (pnpm --dir .agentkit agentkit:sync) so the
updated `servers.json` is produced correctly from the spec.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.agentkit/templates/mcp/servers.json:
- Around line 5-8: The change to add MCP server entries should not be edited
directly in the generated template `.agentkit/templates/mcp/servers.json`;
instead, update the source spec in `.agentkit/spec/` to include the conditional
MCP entries (the fetch entry and the conditional blocks for usesPlaywright,
usesBrowser/puppeteer, and hasStorybook/storybook-crawler), then regenerate the
templated outputs by running the agentkit sync command (pnpm --dir .agentkit
agentkit:sync) so the updated `servers.json` is produced correctly from the
spec.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 000ab04c-352f-43e7-a58b-deff1302ec07

📥 Commits

Reviewing files that changed from the base of the PR and between 3922ea5 and 1d1f614.

📒 Files selected for processing (1)
  • .agentkit/templates/mcp/servers.json

JustAGhosT added a commit that referenced this pull request Mar 30, 2026
Handlebars {{#if}} blocks in .agentkit/templates/**/*.json are invalid
JSON and cause prettier's parser to error. Extend the existing template
ignore pattern (added in #419) to cover *.json files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JustAGhosT and others added 5 commits March 31, 2026 09:43
Adds buildBrowserTestingVars() to var-builders.mjs which derives
usesPlaywright and usesBrowser boolean flags from testing.e2e in
project.yaml. Wires them into synchronize.mjs alongside existing
heuristic vars. Updates templates/mcp/servers.json to conditionally
include the playwright MCP server (when usesPlaywright), puppeteer
(when usesBrowser with non-playwright tools), and storybook-crawler
(when hasStorybook) — omitting all three when unused.

Closes #503

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JustAGhosT JustAGhosT force-pushed the feat/conditional-mcp-servers branch from f7c1a89 to f9de220 Compare March 31, 2026 07:46
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/agents/agent-team-matrix.md (1)

1-340: ⚠️ Potential issue | 🟠 Major

This file change appears unrelated to the PR objectives.

The PR objectives focus on making MCP browser/crawler servers conditional based on project.yaml testing configuration. However, this file documents agent/team relationship matrices and has been regenerated with:

  • Rebranding from "AgentKit Forge" to "Retort" (line 3)
  • Reordered agent membership tables
  • Updated dependency and notification matrices
  • Recalculated analytics

These changes have no apparent connection to MCP server configuration logic. Including unrelated regenerated documentation increases review complexity and merge risk.

Recommendation: If the rebranding and matrix regeneration are intentional, please move them to a separate PR with appropriate objectives. If they were included accidentally (e.g., from running agentkit:sync during development), please remove this file from the PR and commit only the MCP-related changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/agents/agent-team-matrix.md` around lines 1 - 340, This change
regenerates the "Agent/Team Relationship Matrix" documentation (rebranding to
"Retort" and wide matrix/table diffs) which is unrelated to the MCP
browser/crawler conditionalization work; remove the doc from this PR or split it
into its own PR: either revert the modifications to the Agent/Team Relationship
Matrix (the regenerated content under the "Agent/Team Relationship Matrix"
heading and all table/matrix changes) so only MCP-related changes remain, or
create a separate branch/PR for the rebranding/matrix regeneration (if
intentional) and exclude any run artifacts from tools like agentkit:sync that
produced these diffs before merging the MCP changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/instructions/languages/template-protection.md:
- Line 9: The document contains contradictory guidance: one directive mandates
that changes to templates/specs/engines/overlays must go through a PR to the
retort repository, while another permits local edits to `.agentkit/spec/` with a
sync—clarify by making a single rule that the retort repository is the canonical
source and any change intended to be shared or shipped must be submitted via PR,
while allowing a clearly marked exception that developers may edit
`.agentkit/spec/` locally for experimentation or testing only (explicitly
disallowed from being synced/pushed as authoritative without a PR); update the
wording where the "Rules preventing AI agents..." sentence and the "users may
edit `.agentkit/spec/` locally" sentence appear so they consistently state the
PR requirement for authoritative changes and the local-edit exception for
temporary/test use.
- Line 27: Update the stale header text in the tp-no-generated-edit rule:
replace the quoted marker "GENERATED by AgentKit Forge — DO NOT EDIT" with the
actual header used in the repo (the Retort-generated header string used on line
1) so guidance matches current files; specifically edit the rule text that
begins "**[tp-no-generated-edit]**" to reference the Retort header string
exactly and keep the instruction that AI agents must not edit files with that
header, suggesting spec changes in .agentkit/spec/ instead.

In `@AGENT_BACKLOG.md`:
- Around line 1-3: The top-of-file generated notice ("<!-- GENERATED by Retort
v3.1.0 — DO NOT EDIT -->") conflicts with the footer text that invites direct
edits; update AGENT_BACKLOG.md so the messages are consistent: either remove or
soften the "DO NOT EDIT" phrase in the header (or replace it with "Generated by
Retort v3.1.0 — edits to generated sections may be overwritten") or change the
footer wording to remove the invitation to "edit this file directly", and, if
you want mixed editability, explicitly annotate sections as editable vs
auto-generated (e.g., add clear markers for generated blocks and a short note
describing which sections are safe to modify). Ensure you reference and change
the exact header comment string and the footer lines that mention direct editing
to avoid future confusion.
- Around line 1-157: The AGENT_BACKLOG.md change appears to be an incidental
Retort-generated documentation regen unrelated to the PR goal ("make
browser/crawler MCP servers conditional on project.yaml"); either remove
AGENT_BACKLOG.md from this PR (unstage/revert the changes to that file) or
explicitly document the regeneration in the PR description and split the
backlog/doc refresh into a separate documentation-update PR; mention "Retort"
regeneration and the shifted commands (/orchestrate vs /sync-backlog, agentkit
import-issues) so reviewers understand it is intentional if you keep it.
- Around line 103-105: Update the task lifecycle line in AGENT_BACKLOG.md to
list the full set of implemented states from
.agentkit/templates/claude/commands/orchestrate.md: submitted → accepted →
working → completed/failed/rejected/canceled (and include the special blocked
state BLOCKED_ON_CANCELED used when all blockers are canceled or failed); also
explicitly classify initial (submitted), transient (accepted, working), and
terminal (completed, failed, rejected, canceled, BLOCKED_ON_CANCELED) states so
the documentation matches the actual state machine.

In `@docs/engineering/04_git_workflow.md`:
- Around line 13-17: The branch strategy table is inconsistent: the second row
incorrectly lists `main` as the integration/staging branch; update that row to
the correct integration branch (e.g., change the branch name from `main` to
`dev`) so the table reads `main` = Production-ready code → Production and `dev`
= Integration branch → Staging, leaving `feature/*` as-is.
- Around line 1-3: The generated file header indicates this doc was edited
in-place; revert any direct edits to docs/engineering/04_git_workflow.md and
instead update the source spec under .agentkit/spec (or relevant overlay), then
regenerate the output by running the sync command (pnpm --dir .agentkit
agentkit:sync or pnpm --dir .agentkit retort:sync as appropriate) and commit the
regenerated docs; ensure the file header remains the autogenerated comment
("GENERATED by ... — DO NOT EDIT") to prevent future direct edits.
- Around line 80-84: Update the status check list entries under the branch
protection section to match the exact branch-protection names: replace `Test`
with `Retort CI / Test (ubuntu-latest)`, replace `Validate` with `Retort CI /
Validate`, add the missing `YAML Lint` entry, and keep `Branch Protection /
branch-rules` as-is so the documented checks exactly match the configured branch
protection rules.

---

Outside diff comments:
In `@docs/agents/agent-team-matrix.md`:
- Around line 1-340: This change regenerates the "Agent/Team Relationship
Matrix" documentation (rebranding to "Retort" and wide matrix/table diffs) which
is unrelated to the MCP browser/crawler conditionalization work; remove the doc
from this PR or split it into its own PR: either revert the modifications to the
Agent/Team Relationship Matrix (the regenerated content under the "Agent/Team
Relationship Matrix" heading and all table/matrix changes) so only MCP-related
changes remain, or create a separate branch/PR for the rebranding/matrix
regeneration (if intentional) and exclude any run artifacts from tools like
agentkit:sync that produced these diffs before merging the MCP changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1b48a68-4b85-442d-83b0-1437d81839b9

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1f614 and d7bbe4a.

📒 Files selected for processing (84)
  • .agentkit/engines/node/src/synchronize.mjs
  • .agentkit/engines/node/src/var-builders.mjs
  • .agentkit/templates/mcp/servers.json
  • .agents/skills/test/SKILL.md
  • .claude/skills/test/SKILL.md
  • .editorconfig
  • .github/CODEOWNERS
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/instructions/README.md
  • .github/instructions/code-verify.md
  • .github/instructions/docs.md
  • .github/instructions/languages/README.md
  • .github/instructions/languages/agent-conduct.md
  • .github/instructions/languages/ci-cd.md
  • .github/instructions/languages/dependency-management.md
  • .github/instructions/languages/documentation.md
  • .github/instructions/languages/git-workflow.md
  • .github/instructions/languages/security.md
  • .github/instructions/languages/template-protection.md
  • .github/instructions/languages/testing.md
  • .github/instructions/languages/typescript.md
  • .github/instructions/marketing.md
  • .github/instructions/performance.md
  • .github/instructions/quality.md
  • .github/instructions/testing.md
  • .prettierrc
  • .vscode/settings.json
  • AGENT_BACKLOG.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • MIGRATIONS.md
  • SECURITY.md
  • docs/agents/agent-team-matrix.md
  • docs/api/01_overview.md
  • docs/api/02_endpoints.md
  • docs/api/03_authentication.md
  • docs/api/04_examples.md
  • docs/api/05_errors.md
  • docs/api/06_versioning.md
  • docs/architecture/01_overview.md
  • docs/architecture/decisions/01-adopt-agentkit-forge.md
  • docs/architecture/decisions/02-fallback-policy-tokens-problem.md
  • docs/architecture/decisions/03-tooling-strategy.md
  • docs/architecture/decisions/04-static-security-analysis-depth-tooling.md
  • docs/architecture/decisions/05-dependency-supply-chain-detection-tooling.md
  • docs/architecture/decisions/06-code-quality-maintainability-signal-tooling.md
  • docs/architecture/diagrams/.gitkeep
  • docs/architecture/specs/01_functional_spec.md
  • docs/architecture/specs/02_technical_spec.md
  • docs/architecture/specs/03_api_spec.md
  • docs/architecture/specs/04_data_models.md
  • docs/engineering/01_setup.md
  • docs/engineering/02_coding_standards.md
  • docs/engineering/03_testing.md
  • docs/engineering/04_git_workflow.md
  • docs/engineering/05_security.md
  • docs/engineering/06_pr_documentation.md
  • docs/engineering/07_changelog.md
  • docs/history/bug-fixes/TEMPLATE-bugfix.md
  • docs/history/features/TEMPLATE-feature.md
  • docs/history/implementations/TEMPLATE-implementation.md
  • docs/history/issues/TEMPLATE-issue.md
  • docs/history/lessons-learned/TEMPLATE-lesson.md
  • docs/history/migrations/TEMPLATE-migration.md
  • docs/integrations/01_external_apis.md
  • docs/integrations/02_webhooks.md
  • docs/integrations/03_sdk.md
  • docs/operations/01_deployment.md
  • docs/operations/02_monitoring.md
  • docs/operations/03_incident_response.md
  • docs/operations/04_troubleshooting.md
  • docs/operations/05_slos_slis.md
  • docs/planning/TEMPLATE-plan.md
  • docs/product/01_prd.md
  • docs/product/02_user_stories.md
  • docs/product/03_roadmap.md
  • docs/product/04_personas.md
  • docs/reference/01_glossary.md
  • docs/reference/02_faq.md
  • docs/reference/03_changelog.md
  • docs/reference/04_contributing.md
✅ Files skipped from review due to trivial changes (75)
  • docs/engineering/03_testing.md
  • SECURITY.md
  • docs/history/features/TEMPLATE-feature.md
  • docs/engineering/05_security.md
  • docs/api/01_overview.md
  • docs/engineering/07_changelog.md
  • docs/architecture/specs/02_technical_spec.md
  • docs/integrations/01_external_apis.md
  • docs/engineering/01_setup.md
  • docs/history/lessons-learned/TEMPLATE-lesson.md
  • docs/architecture/specs/04_data_models.md
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • docs/api/05_errors.md
  • docs/api/03_authentication.md
  • docs/engineering/06_pr_documentation.md
  • docs/product/03_roadmap.md
  • docs/history/implementations/TEMPLATE-implementation.md
  • .github/ISSUE_TEMPLATE/config.yml
  • docs/product/02_user_stories.md
  • docs/engineering/02_coding_standards.md
  • docs/architecture/decisions/04-static-security-analysis-depth-tooling.md
  • docs/operations/01_deployment.md
  • .github/instructions/docs.md
  • docs/operations/03_incident_response.md
  • docs/product/04_personas.md
  • docs/reference/03_changelog.md
  • docs/operations/05_slos_slis.md
  • .github/instructions/marketing.md
  • docs/reference/02_faq.md
  • docs/history/bug-fixes/TEMPLATE-bugfix.md
  • docs/history/migrations/TEMPLATE-migration.md
  • docs/product/01_prd.md
  • docs/api/06_versioning.md
  • docs/api/04_examples.md
  • CHANGELOG.md
  • docs/reference/01_glossary.md
  • docs/planning/TEMPLATE-plan.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • docs/reference/04_contributing.md
  • .agents/skills/test/SKILL.md
  • docs/architecture/specs/03_api_spec.md
  • docs/architecture/decisions/05-dependency-supply-chain-detection-tooling.md
  • docs/integrations/03_sdk.md
  • docs/operations/04_troubleshooting.md
  • .vscode/settings.json
  • .github/CODEOWNERS
  • docs/architecture/diagrams/.gitkeep
  • .github/instructions/languages/dependency-management.md
  • docs/architecture/decisions/06-code-quality-maintainability-signal-tooling.md
  • docs/api/02_endpoints.md
  • docs/architecture/decisions/03-tooling-strategy.md
  • docs/integrations/02_webhooks.md
  • .github/instructions/README.md
  • docs/history/issues/TEMPLATE-issue.md
  • .github/instructions/testing.md
  • docs/architecture/01_overview.md
  • docs/architecture/decisions/02-fallback-policy-tokens-problem.md
  • .github/instructions/performance.md
  • docs/architecture/specs/01_functional_spec.md
  • .github/instructions/languages/documentation.md
  • .github/instructions/code-verify.md
  • .editorconfig
  • .prettierrc
  • .agentkit/engines/node/src/synchronize.mjs
  • MIGRATIONS.md
  • .github/instructions/languages/typescript.md
  • docs/operations/02_monitoring.md
  • .github/instructions/languages/README.md
  • .github/instructions/languages/agent-conduct.md
  • .github/instructions/quality.md
  • CONTRIBUTING.md
  • docs/architecture/decisions/01-adopt-agentkit-forge.md
  • .claude/skills/test/SKILL.md
  • .github/instructions/languages/testing.md

# Instructions — template-protection

Rules preventing AI agents from directly modifying AgentKit Forge source-of-truth files. Changes to templates, specs, engines, and overlays must go through a PR to the agentkit-forge repository.
Rules preventing AI agents from directly modifying Retort source-of-truth files. Changes to templates, specs, engines, and overlays must go through a PR to the retort repository.
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.

⚠️ Potential issue | 🟠 Major

Clarify spec-edit policy to avoid contradictory instructions.

Line 9 says spec changes must go through a PR to the retort repository, but Line 25 says users may edit .agentkit/spec/ locally and run sync. These two directives conflict and can block expected workflows.

Proposed wording adjustment
-Rules preventing AI agents from directly modifying Retort source-of-truth files. Changes to templates, specs, engines, and overlays must go through a PR to the retort repository.
+Rules preventing AI agents from directly modifying Retort source-of-truth files. Changes to templates, engines, and overlays must go through a PR to the retort repository. Project users may update `.agentkit/spec/` locally and regenerate outputs.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Rules preventing AI agents from directly modifying Retort source-of-truth files. Changes to templates, specs, engines, and overlays must go through a PR to the retort repository.
Rules preventing AI agents from directly modifying Retort source-of-truth files. Changes to templates, engines, and overlays must go through a PR to the retort repository. Project users may update `.agentkit/spec/` locally and regenerate outputs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/instructions/languages/template-protection.md at line 9, The
document contains contradictory guidance: one directive mandates that changes to
templates/specs/engines/overlays must go through a PR to the retort repository,
while another permits local edits to `.agentkit/spec/` with a sync—clarify by
making a single rule that the retort repository is the canonical source and any
change intended to be shared or shipped must be submitted via PR, while allowing
a clearly marked exception that developers may edit `.agentkit/spec/` locally
for experimentation or testing only (explicitly disallowed from being
synced/pushed as authoritative without a PR); update the wording where the
"Rules preventing AI agents..." sentence and the "users may edit
`.agentkit/spec/` locally" sentence appear so they consistently state the PR
requirement for authoritative changes and the local-edit exception for
temporary/test use.

- **[tp-no-direct-edit]** AI agents must never directly modify files in .agentkit/templates/, .agentkit/engines/, .agentkit/overlays/, or .agentkit/bin/. These directories contain the upstream sync engine, templates, and CLI scripts. A PreToolUse hook enforces this at runtime. Note: .agentkit/spec/ is the intended edit point for project configuration — users (not AI agents) may modify spec YAML files and run agentkit sync to regenerate output.
_(enforcement)_
_(enforcement)_
- **[tp-no-generated-edit]** AI agents must never directly edit files marked with the header "GENERATED by AgentKit Forge — DO NOT EDIT". Instead, suggest the relevant YAML spec change in .agentkit/spec/ to a human reviewer; only users (not AI agents) may modify spec YAML files and run agentkit sync to regenerate output.
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.

⚠️ Potential issue | 🟡 Minor

Update stale generated-header marker text.

Line 27 still references "GENERATED by AgentKit Forge — DO NOT EDIT" while Line 1 now uses Retort. This should be aligned so guidance matches actual headers.

Proposed wording fix
-- **[tp-no-generated-edit]** AI agents must never directly edit files marked with the header "GENERATED by AgentKit Forge — DO NOT EDIT". Instead, suggest the relevant YAML spec change in .agentkit/spec/ to a human reviewer; only users (not AI agents) may modify spec YAML files and run agentkit sync to regenerate output.
+- **[tp-no-generated-edit]** AI agents must never directly edit files marked with the header "GENERATED by Retort v3.1.0 — DO NOT EDIT". Instead, suggest the relevant YAML spec change in .agentkit/spec/ to a human reviewer; only users (not AI agents) may modify spec YAML files and run agentkit sync to regenerate output.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/instructions/languages/template-protection.md at line 27, Update the
stale header text in the tp-no-generated-edit rule: replace the quoted marker
"GENERATED by AgentKit Forge — DO NOT EDIT" with the actual header used in the
repo (the Retort-generated header string used on line 1) so guidance matches
current files; specifically edit the rule text that begins
"**[tp-no-generated-edit]**" to reference the Retort header string exactly and
keep the instruction that AI agents must not edit files with that header,
suggesting spec changes in .agentkit/spec/ instead.

Comment on lines +1 to +3
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm --dir .agentkit retort:sync -->
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.

⚠️ Potential issue | 🟠 Major

"DO NOT EDIT" header conflicts with manual editing guidance in footer.

Lines 1-3 state "GENERATED by Retort v3.1.0 — DO NOT EDIT", but lines 156-157 explicitly encourage "edit this file directly for manual adjustments." This creates confusion about whether manual edits are permitted or will be overwritten on next sync.

Consider either:

  • Removing the "DO NOT EDIT" warning if manual edits are intended to be preserved
  • Changing the footer to only mention /orchestrate without suggesting direct edits
  • Clarifying which sections are editable vs. auto-generated
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENT_BACKLOG.md` around lines 1 - 3, The top-of-file generated notice ("<!--
GENERATED by Retort v3.1.0 — DO NOT EDIT -->") conflicts with the footer text
that invites direct edits; update AGENT_BACKLOG.md so the messages are
consistent: either remove or soften the "DO NOT EDIT" phrase in the header (or
replace it with "Generated by Retort v3.1.0 — edits to generated sections may be
overwritten") or change the footer wording to remove the invitation to "edit
this file directly", and, if you want mixed editability, explicitly annotate
sections as editable vs auto-generated (e.g., add clear markers for generated
blocks and a short note describing which sections are safe to modify). Ensure
you reference and change the exact header comment string and the footer lines
that mention direct editing to avoid future confusion.

Comment on lines +1 to +157
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm --dir .agentkit retort:sync -->

> Auto-synced on 2026-03-15. Manual edits to items with external IDs will be overwritten on next sync.
# Agent Backlog — retort

## Next Session — Start Here
> Standard backlog for tracking work items across all agent teams. This file
> is the single source of truth for task status during orchestrated workflows.

**Pending PRs (merge in order):**
---

## Table of Contents

1. PR #498 — `fix(tests): rmSync maxRetries for ENOTEMPTY race` — flaky test fix
2. PR #499 — `refactor(sync): Step 11 platform-syncer swap` — 1,287-line removal (syncJunie on this branch too)
3. PR #500 — `feat(start): TasksPanel` — 156/156 tests pass ✓
4. PR #501 — `feat(sync): syncJunie` — `.junie/guidelines.md` for JetBrains AI
1. [Active Sprint](#active-sprint)
2. [Backlog](#backlog)
3. [Completed](#completed)
4. [Backlog Management Rules](#backlog-management-rules)
5. [Priority Definitions](#priority-definitions)
6. [Status Definitions](#status-definitions)

**Remaining secondary:**
---

1. Fix `claude-code-review` workflow — rotate `CLAUDE_CODE_OAUTH_TOKEN` in `phoenixvc/retort` → Settings → Secrets (no yml change needed)
2. Run full engine test suite (`pnpm -C .agentkit test`) — confirm pass in CI on PR #499
## Active Sprint

| Priority | Team | Task | Phase | Status | Notes |
| -------- | ----------------- | --------------------------------------------- | -------------- | ----------- | ------------------------------------------------------------------------------------- |
| P0 | T4-Infrastructure | Configure CI pipeline for main branch | Implementation | In Progress | GitHub Actions workflow; scope: branch-protection, drift check, quality gates on main |
| P0 | T10-Quality | Set up test framework and coverage thresholds | Implementation | In Progress | Vitest + Istanbul; scope: .agentkit test suite, 80% coverage target, run in CI |
| P1 | T1-Backend | Define core API route structure | Planning | In Progress | REST endpoints for v1 |
| P1 | T3-Data | Design initial database schema | Planning | Todo | Depends on T1 API design |
| P1 | T8-DevEx | Configure linting and formatting rules | Implementation | Done | ESLint + Prettier |
| P2 | T7-Documentation | Write initial ADR for tech stack decisions | Discovery | In Progress | ADR-001 through ADR-003 |
| P2 | T2-Frontend | Scaffold component library structure | Planning | Todo | Waiting on design system |
| P2 | T5-Auth | Evaluate authentication providers | Discovery | Todo | OAuth2 + JWT candidates |
| P3 | T6-Integration | Inventory third-party service requirements | Discovery | Todo | Not yet scoped |
| P3 | T9-Platform | Identify shared utility functions | Discovery | Todo | Cross-cutting concerns |

---

**Context / realtime agent visibility:**
For agents to "see" each other in realtime, a persistent shared MCP server is needed. Redis is overkill — a **SQLite-backed MCP** (e.g., `better-sqlite3` + `mcp-server-sqlite`) is the simplest self-hosted option with zero infrastructure. A **flat-file polling MCP** (write presence to `.claude/state/presence/*.json`, poll every 5s) is even simpler but less real-time. The current `memory` MCP is ephemeral per-session and not shared. If you want org-wide presence, the right next step is a `phoenix-flow` MCP server backed by SQLite or the existing `.claude/state/` file tree.
## Backlog

**Context / Junie (resolved — PR #501):**
`syncJunie` implemented on both `dev` (PR #501) and `refactor/sync-step11-platform-syncer-swap` (PR #499). Generates `.junie/guidelines.md` from the same template vars as GEMINI.md. Junie will comply once the adopter repo runs `retort sync` with `junie` in their `renderTargets`.
Items not yet scheduled for the active sprint.

| Priority | Team | Task | Phase | Status | Notes |
| -------- | ----------------- | ----------------------------------- | -------------- | ------ | ----------------------- |
| P1 | T1-Backend | Implement health check endpoint | Implementation | Todo | `/api/health` |
| P1 | T3-Data | Create migration tooling setup | Planning | Todo | Prisma or Drizzle |
| P1 | T4-Infrastructure | Set up staging environment | Planning | Todo | Docker Compose |
| P2 | T2-Frontend | Implement error boundary components | Planning | Todo | React Error Boundary |
| P2 | T5-Auth | Implement JWT token refresh flow | Planning | Todo | Access + refresh tokens |
| P2 | T10-Quality | Write E2E test scaffolding | Planning | Todo | Playwright config |
| P3 | T7-Documentation | Create API documentation template | Planning | Todo | OpenAPI/Swagger |
| P3 | T8-DevEx | Set up git hooks with Husky | Implementation | Todo | Pre-commit + pre-push |
| P3 | T9-Platform | Create shared logging module | Planning | Todo | Structured JSON logs |
| P3 | T6-Integration | Define webhook payload schemas | Discovery | Todo | Event-driven patterns |

---

## Summary
## Completed

Items finished in previous sprints.

- **Total items:** 114 (114 open, 0 completed)
- **P0 (blocking):** 4
- **P1 (high):** 6
- **P2 (medium):** 101
- **P3 (low):** 3
- **Sources:** github actions workflow; scope: branch-protection, drift check, quality gates on main (1), monorepo structure (1), agentkit forge sync (1), p1 (1), github (100), rest endpoints for v1 (1), eslint + prettier (1), `/api/health` (1), docker compose (1), waiting on design system (1), access + refresh tokens (1), p3 (1), not yet scoped (1), openapi/swagger (1), structured json logs (1)
| Priority | Team | Task | Phase | Completed | Notes |
| -------- | ----------------- | ------------------------------------- | ----- | --------- | -------------------- |
| P0 | T8-DevEx | Initialize project repository | Ship | Sprint 0 | Monorepo structure |
| P0 | T4-Infrastructure | Create initial Dockerfile | Ship | Sprint 0 | Multi-stage build |
| P0 | T7-Documentation | Generate root documentation templates | Ship | Sprint 0 | Retort sync |
| P1 | T10-Quality | Define quality gate criteria | Ship | Sprint 0 | See QUALITY_GATES.md |

---

## P0 — Blocking

| Priority | Team | Task | Phase | Status | Source | Notes |
| -------- | -------------- | ----------------------------------------------------- | -------------- | ----------- | ------------------------------------------------------------------------------------- | ----- |
| P0 | infrastructure | Configure CI pipeline for main branch | Implementation | In progress | github actions workflow; scope: branch-protection, drift check, quality gates on main | |
| P0 | devex | Initialize project repository | Ship | Sprint 0 | monorepo structure | |
| P0 | documentation | Generate root documentation templates | Ship | Sprint 0 | agentkit forge sync | |
| P0 | critical | Blocks all other work or affects production stability | Same day | Open | p1 | High |

## P1 — High Priority

| Priority | Team | Task | Phase | Status | Source | Notes |
| -------- | -------------- | ---------------------------------------------------------------------------------------- | -------------- | ----------- | --------------------- | -------------------------------------------------------------------------------- |
| P1 | product | fix(state): add state cleanup, validation, and session-start directory creation [GH#371] | Planning | Open | github | Fix agent state management: ensure directories exist, clean stale tasks, validat |
| P1 | product | fix(budget-guard): verify and address budget-guard workflow logic [GH#328] | Planning | Open | github | The `budget-guard` workflow step has logic issues identified during test executi |
| P1 | backend | Define core API route structure | Planning | In progress | rest endpoints for v1 | |
| P1 | devex | Configure linting and formatting rules | Implementation | Done | eslint + prettier | |
| P1 | backend | Implement health check endpoint | Implementation | Todo | `/api/health` | |
| P1 | infrastructure | Set up staging environment | Planning | Todo | docker compose | |

## P2 — Medium Priority

| Priority | Team | Task | Phase | Status | Source | Notes |
| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | ----------- | ------ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| P2 | product | feat(observability): agent usage metrics — per-agent invocation counts, task outcomes, and session-closure sync [GH#467] | Planning | Open | github | Local observability layer: METRICS events in events.log, aggregate-metrics.mjs writes agent-metrics.json + agent-health.json. Session-closure `stop` hook syncs cumulative counters. /handoff includes utilisation table; /doctor surfaces idle/at-risk agents. Distinct from adopter telemetry (#374). |
| P2 | product | ci: standardize workflow/job names without forcing exact workflow YAML [GH#424] | Planning | Open | github | Goal: Standardize CI/CD naming (workflow names, job ids, check names) to make or |
| P2 | product | sync: support adopt-if-missing + managed-merge policies for template packs [GH#423] | Planning | Open | github | Need: We want to standardize certain conventions (CI workflow names, check names |
| P2 | product | sync(P0): do not scaffold test suites into adopter repos by default [GH#422] | Planning | Open | github | Problem: AgentKit Forge sync/scaffolding should not introduce or overwrite proje |
| P2 | product | sync: scaffold-once outputs make template fixes hard to propagate [GH#421] | Planning | Open | github | Some outputs appear to be "scaffold-once" (not overwritten on sync if the file a |
| P2 | product | windows: LF/CRLF churn on generated files needs first-class mitigation [GH#420] | Planning | Open | github | On Windows, after running `agentkit:sync`, Git repeatedly warns that many files |
| P2 | product | templates: workflow YAML templates break Prettier/YAML parsers [GH#419] | Planning | Open | github | Several templates under `.agentkit/templates/github/workflows/*.yml` contain Han |
| P2 | product | sync: unresolved placeholder warning should report file paths [GH#418] | Planning | Open | github | When running `pnpm --dir .agentkit agentkit:sync`, the CLI prints: |
| P2 | product | sync: avoid daily churn from last_updated date headers [GH#417] | Planning | Open | github | Problem: agentkit:sync writes per-run dates into generated file headers (e.g., " |
| P2 | product | chore(issues): require Sync Diagnostics section in bug/feature templates [GH#416] | Planning | Open | github | Update .github/ISSUE_TEMPLATE/\* to require a "Sync Diagnostics" section includin |
| P2 | product | feat(sync): emit sync-report.json by default with placeholder locations [GH#415] | Planning | Open | github | Add a default sync-report.json artifact emitted on every sync run (even non-verb |
| P2 | product | feat(overlays): redesign repo customization to support partial, co-located spec overrides [GH#414] | Planning | Open | github | AgentForge’s current customization model splits repo-specific configuration acro |
| P2 | product | feat: Add source code conventions to agent instructions [GH#413] | Planning | Open | github | Add explicit source code conventions to all agent instructions to ensure consist |
| P2 | product | feat: standardize tag-based production deployments in CI/CD [GH#411] | Planning | Open | github | To enhance deployment safety and auditability, production deployment workflows ( |
| P2 | product | feat: make auto-sync functionality opt-in and optional [GH#410] | Planning | Open | github | The current mandatory auto-sync functionality (e.g., on pre-push or as a hard CI |
| P2 | product | feat(engine): add AgentManager class — inter-agent handoff, routing, and lifecycle [GH#409] | Planning | Open | github | Add a central `AgentManager` class that handles all inter-agent interactions: ha |
| P2 | product | feat(engine): add ContextRegistry facade — unified DI container for the engine [GH#408] | Planning | Open | github | Add a `ContextRegistry` facade that composes `SpecAccessor`, `RuntimeStateManage |
| P2 | product | feat(engine): add RuntimeStateManager class — orchestrator state and task lifecycle [GH#407] | Planning | Open | github | Add a `RuntimeStateManager` class that centralizes all orchestrator state and ta |
| P2 | product | feat(engine): add SpecAccessor class — typed spec parsing with validation and caching [GH#406] | Planning | Open | github | Add a central `SpecAccessor` class that parses, validates, and caches all YAML s |
| P2 | product | feat(docs): add ESCALATION_POLICY.md — autonomous vs user-escalated decision boundaries [GH#405] | Planning | Open | github | Define clear boundaries for when agents should act autonomously vs. escalate to |
| P2 | product | feat(docs): add INTEGRATION_MAP.md — agent dependency and notification wiring diagram [GH#404] | Planning | Open | github | Add a generated INTEGRATION_MAP.md that visualizes the wiring between agents, te |
| P2 | product | feat(docs): add STATE_SCHEMA.md — document orchestrator state, task files, and event log formats [GH#403] | Planning | Open | github | Agents currently need to reverse-engineer the engine source to understand what s |
| P2 | product | feat(docs): add GLOSSARY.md — canonical terms and concepts for agent orchestration [GH#402] | Planning | Open | github | Add a generated GLOSSARY.md that defines canonical terms used across agent orche |
| P2 | product | feat(quality-gates): improve QUALITY_GATES.md — per-adopter generation, refinement, and executable enforcement [GH#401] | Planning | Open | github | QUALITY_GATES.md exists as a generated reference document, but it needs three im |
| P2 | product | fix(sync): prevent file loss during sync and verify plugin/extension safety for adopters [GH#397] | Planning | Open | github | Adopters are experiencing file loss when sync runs — either via kit-generated fi |
| P2 | product | fix(templates): branch protection script hardcodes non-existent check contexts [GH#396] | Planning | Open | github | Transferred from phoenixvc/pvc-costops-analytics#12. Generated branch protection |
| P2 | product | fix(templates): API spec hardcodes RFC 7807 error format instead of using project config [GH#395] | Planning | Open | github | Transferred from phoenixvc/pvc-costops-analytics#10. The generated API spec (doc |
| P2 | product | fix(templates): git workflow doc references develop branch and non-existent CodeQL check [GH#394] | Planning | Open | github | Transferred from phoenixvc/pvc-costops-analytics#11. The generated git workflow |
| P2 | product | chore(templates): audit generated file headers — editable vs read-only distinction [GH#393] | Planning | Open | github | Several files generated by AgentKit Forge have `<!-- GENERATED by AgentKit Forge |
| P2 | product | chore(hooks): comprehensive hooks review — templating, logic, and new functionality [GH#392] | Planning | Open | github | Umbrella ticket for a comprehensive review of all AgentKit Forge hook templates. |
| P2 | product | chore(infra): re-register self-hosted runner for all repos (user/org level) [GH#384] | Planning | Open | github | The self-hosted runner `azure-vnet-ghost` is currently registered at \*\*repo-leve |
| P2 | product | feat: add GITHUB_STEP_SUMMARY to generated workflow templates [GH#383] | Planning | Open | github | Generated GitHub Actions workflows (e.g., `documentation-quality.yml`, `document |
| P2 | product | feat(agents): add repo-historian agent for ticket, file, and decision history lookups [GH#381] | Planning | Open | github | Add a `repo-historian` shared utility agent that other agents can call when they |
| P2 | product | feat(agents): add decision-analyst agent with weighted matrix, SWOT, and comparison scripts [GH#380] | Planning | Open | github | Add a `decision-analyst` agent to the Strategic Ops team (T12) with reusable scr |
| P2 | product | chore(research): evaluate infrastructure MCP servers — weighted matrix and ADR [GH#379] | Planning | Open | github | Evaluate available MCP servers for infrastructure assistance (Terraform, cloud A |
| P2 | product | chore(research): evaluate agent waits, memory, coordination, and best practices [GH#378] | Planning | Open | github | Research and document current best practices across the agent ecosystem for patt |
| P2 | devops | ci(workflows): standardize GitHub Action workflow names to category:action format [GH#376] | Planning | Open | github | Standardize all GitHub Action workflow names to a consistent `{Category}: {Actio |
| P2 | product | chore(ecosystem): map codeflow-engine and cognitive-mesh integration touchpoints [GH#375] | Planning | Open | github | Basic mapping of integration touchpoints between agentkit-forge, justaghost/code |
| P2 | product | feat(analytics): phased telemetry — log files first, endpoint later [GH#374] | Planning | Open | github | Enable adopter repos to send back telemetry (initially identified by repo name, |
| P2 | product | feat(dx): make background agent work visible in IDE via status indicators [GH#373] | Planning | Open | github | When agents run in background (via Claude Code's background agent feature), user |
| P2 | product | feat(agents): add ci-analyst agent to DevOps team for CI log analysis [GH#372] | Planning | Open | github | Add a ci-analyst agent persona to the DevOps team (T5) that proactively monitors |
| P2 | product | feat(dx): add agent exploration helper scripts to reduce token waste [GH#370] | Planning | Open | github | Create helper scripts that pre-load common agent exploration data (task state, b |
| P2 | product | feat(ecosystem): evaluate codeflow-engine and cognitive-mesh integration touchpoints [GH#369] | Planning | Open | github | Basic integration analysis of justaghost/codeflow-engine and phoenixvc/cognitive |
| P2 | product | feat(agents): add ticket-creating agent with draft-and-confirm workflow [GH#368] | Planning | Open | github | Evaluate and implement a ticket-creating agent that can draft GitHub issues with |
| P2 | product | chore(research): evaluate foundry agents — SWOT, decision matrix, ADR + VS Code AI toolkit value [GH#367] | Planning | Open | github | Full evaluation of foundry agents including SWOT analysis, key metrics, weighted |
| P2 | product | feat(orchestration): evaluate parallel coding dispatch and cross-cutting implementation team [GH#366] | Planning | Open | github | Evaluate whether an explicit "coding team" should be created that can spin off p |
| P2 | product | feat(cost-ops): evaluate infrastructure providers, pricing models, and integrate into cost agent [GH#363] | Planning | Open | github | The Cost Ops team (T14) needs a comprehensive evaluation of AI infrastructure pr |
| P2 | product | chore(dx): address package shortcuts — setup scripts, cross-env, .env patterns [GH#362] | Planning | Open | github | Improve developer experience by addressing common package setup patterns: setup |
| P2 | product | chore(research): evaluate Webflow dev platform and alternatives [GH#361] | Planning | Open | github | Evaluate Webflow's developer platform and alternatives for building marketing si |
| P2 | product | chore(research): evaluate developer portals and mystira.devhub [GH#360] | Planning | Open | github | Evaluate developer portal platforms for hosting agentkit-forge documentation, AP |
| P2 | product | chore(research): evaluate open-source tool alternatives [GH#359] | Planning | Open | github | Evaluate open-source alternatives to commercial tools used in the agentkit-forge |
| P2 | product | chore(research): evaluate AI coding agents/IDEs for agentkit-forge support [GH#358] | Planning | Open | github | Evaluate which AI coding agents and IDEs agentkit-forge should support (currentl |
| P2 | product | Add Renovate automerge + Codex assignment to bootstrap template [GH#357] | Planning | Open | github | Update the agentkit-forge bootstrap template so that repos bootstrapped with `ag |
| P2 | product | feat: support project-defined conventional commit scopes in spec [GH#355] | Planning | Open | github | The `gw-conventional-commits` rule in `rules.yaml` defines commit **types** but |
| P2 | product | fix: documentation-quality workflow should trigger on pull_request, not just push [GH#354] | Planning | Open | github | The `documentation-quality.yml` GitHub Actions workflow template only triggers o |
| P2 | product | feat(plans): prefix Claude plan filenames with repo abbreviation [GH#353] | Planning | Open | github | Claude Code (and other AI editors) create plan files in `~/.claude/plans/` with |
| P2 | product | feat(docs): add MCP and A2A integration guidance for consumers [GH#352] | Planning | Open | github | AgentKit Forge generates AI agent team configurations and orchestration workflow |
| P2 | product | docs(templates): document lint rule exceptions for test files [GH#351] | Planning | Open | github | Testing composables that use lifecycle hooks (e.g., `onMounted`) requires defini |
| P2 | product | docs(templates): add ESM-safe vi.mock patterns to testing rules [GH#350] | Planning | Open | github | The testing rules templates don't document ESM-safe mock patterns for vitest. Ag |
| P2 | product | docs(templates): document v8 vs istanbul coverage differences for SFC frameworks [GH#349] | Planning | Open | github | The v8 and istanbul coverage providers produce \*\*significantly different numbers |
| P2 | product | feat(scaffold): generate stack-aware coverage exclude block in vitest/jest config [GH#348] | Planning | Open | github | Every frontend framework has bootstrap/entry-point files with no testable logic |
| P2 | product | feat(spec): support per-metric coverage thresholds in project.yaml [GH#347] | Planning | Open | github | The `testing.coverage` field in `project.yaml` is currently a single scalar (`co |
| P2 | product | Adopt stack.json as project metadata descriptor for template generation [GH#346] | Planning | Open | github | `agentkit-forge` currently requires manual specification of project characterist |
| P2 | product | feat(agents): multi-disciplinary suggestion-crafting agent [GH#345] | Planning | Open | github | Create a multi-disciplinary agent that takes findings from project-review, healt |
| P2 | product | feat(orchestration): evaluate workflow engines for parallel task execution [GH#344] | Planning | Open | github | Evaluate workflow engines for dependency-aware parallel task orchestration acros |
| P2 | product | Support --with-docs-refactor flag in agentkit sync for template-driven document refactoring [GH#343] | Planning | Open | github | Add a `--with-docs-refactor` flag to `agentkit sync` that triggers document temp |
| P2 | product | [FEATURE] Add MCP server support — development config + template output target [GH#342] | Planning | Open | github | AgentKit Forge generates configs for 15+ AI tools from YAML specs via `agentkit |
| P2 | product | [Ecosystem] Add .devcontainer generation as output target [GH#341] | Planning | Open | github | phoenixvc/cognitive-mesh#287 |
| P2 | product | [Ecosystem] Add .agent.md output target for VS Code + GitHub.com integration [GH#340] | Planning | Open | github | phoenixvc/cognitive-mesh#270 |
| P2 | product | [Ecosystem] Config sync protocol + drift detection [GH#339] | Planning | Open | github | phoenixvc/cognitive-mesh#157 |
| P2 | product | [FEATURE] Maintain list of consuming repositories (Notion, labels, Linear, etc.) [GH#337] | Planning | Open | github | Maintain an up-to-date list of repositories that **consume** agentkit-forge (dep |
| P2 | product | [FEATURE] Evaluate scripts from other repos (e.g. actions runner) for inclusion [GH#336] | Planning | Open | github | Evaluate scripts from other repositories (especially the **actions runner** repo |
| P2 | product | docs(staging): add optional guidance for docs-staging / draft-docs workflow [GH#335] | Planning | Open | github | Add optional guidance for a **docs-staging (or draft-docs) workflow** so that do |
| P2 | product | docs(backlog): include documentation backlog guidance for all repos [GH#334] | Planning | Open | github | Add guidance (and optionally a template or checklist) so that adopter repos can |
| P2 | product | chore(governance): audit governance pipeline adoption in downstream repos [GH#333] | Planning | Open | github | Audit repos using AgentKit Forge to verify which governance guardrails are actua |
| P2 | devops | chore(drift): test drift detection in adopter repos [GH#332] | Planning | Open | github | Run drift detection in repos that have adopted AgentKit Forge to identify false |
| P2 | devops | chore(branch-protection): audit branch protection patterns in adopter repos [GH#331] | Planning | Open | github | Audit repos using AgentKit Forge to understand what branch protection patterns a |
| P2 | product | chore(hooks): audit hook generation in adopter repos [GH#330] | Planning | Open | github | Audit repos that have adopted AgentKit Forge to verify hook generation works cor |
| P2 | product | chore(templates): analyze implemented repos for CI/CD template generation opportunities [GH#329] | Planning | Open | github | Audit repositories that have adopted AgentKit Forge CI/CD workflows to identify |
| P2 | product | ci(workflows): workflow templating strategy, concurrency, and runner management [GH#327] | Planning | Open | github | > **Area:** devops \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(cli): emit telemetry event on forge update [GH#326] | Planning | Open | github | > **Area:** cli \| **Priority:** P4 — Trivial \| **Phase:** active |
| P2 | product | feat(cli): show changelog summary in update output and auto-generated PR body [GH#325] | Planning | Open | github | > **Area:** cli \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(cli): ensure update flow triggers sync to satisfy pre-PR enforcement [GH#324] | Planning | Open | github | > **Area:** cli \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(cli): integrate update preflight checks with CLI toolchain availability [GH#323] | Planning | Open | github | > **Area:** cli \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | devops | ci(autoupdate): create GitHub Action template for scheduled auto-update PRs [GH#322] | Planning | Open | github | > **Area:** devops \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(cli): implement agentkit-forge update --version X [GH#321] | Planning | Open | github | > **Area:** cli \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(cli): implement agentkit-forge update --rollback [GH#320] | Planning | Open | github | > **Area:** cli \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(cli): implement agentkit-forge update --apply [GH#319] | Planning | Open | github | > **Area:** cli \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(cli): implement agentkit-forge update command (check-only) [GH#318] | Planning | Open | github | > **Area:** cli \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | docs(analytics): document governance and access controls [GH#317] | Planning | Open | github | > **Area:** product \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(analytics): add per-person usage reports [GH#316] | Planning | Open | github | > **Area:** product \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(analytics): build cross-repo usage dashboard [GH#315] | Planning | Open | github | > **Area:** product \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(analytics): add data retention policy enforcement [GH#314] | Planning | Open | github | > **Area:** infra \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(analytics): build ingestion pipeline [GH#313] | Planning | Open | github | > **Area:** infra \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | feat(analytics): implement event collection SDK/helper [GH#312] | Planning | Open | github | > **Area:** cli \| **Priority:** P3 — Low \| **Phase:** active |
| P2 | product | docs(analytics): select ingestion approach with ADR [GH#311] | Planning | Open | github | > **Area:** product \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | docs(analytics): document identity and privacy model for usage tracking [GH#310] | Planning | Open | github | > **Area:** product \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | feat(analytics): define event schema v1 and versioning strategy [GH#309] | Planning | Open | github | > **Area:** product \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | product | epic(governance): governance pipeline and branch guardrails [GH#308] | Planning | Open | github | > **Area:** devops \| **Priority:** P2 — Medium \| **Phase:** active |
| P2 | frontend | Scaffold component library structure | Planning | Todo | waiting on design system | |
| P2 | auth | Implement JWT token refresh flow | Planning | Todo | access + refresh tokens | |
| P2 | medium | Important but not blocking; can be deferred one sprint | Next sprint | Open | p3 | Low |

## P3 — Low Priority

| Priority | Team | Task | Phase | Status | Source | Notes |
| -------- | ------------- | ------------------------------------------ | --------- | ------ | -------------------- | ----- |
| P3 | integration | Inventory third-party service requirements | Discovery | Todo | not yet scoped | |
| P3 | documentation | Create API documentation template | Planning | Todo | openapi/swagger | |
| P3 | platform | Create shared logging module | Planning | Todo | structured json logs | |
## Backlog Management Rules

## Completed
### Adding Items

1. Any team may add items to the **Backlog** section at any time.
2. New items must include all columns: Priority, Team, Task, Phase, Status, Notes.
3. Use the [Priority Definitions](#priority-definitions) below to assign priority.
4. Set the initial Phase based on how well-understood the task is.

### Promoting to Active Sprint

1. Items move from **Backlog** to **Active Sprint** during sprint planning.
2. The orchestrator (`/orchestrate`) may promote items automatically when
dependencies are resolved.
3. Maximum active sprint size: **15 items** across all teams.
4. Each team should have no more than **3 active items** at a time.

### Moving to Completed

1. Items move to **Completed** only when they reach the **Ship** phase and all
quality gates pass.
2. Record the sprint or date of completion in the **Completed** column.
3. Completed items are retained for **4 sprints** for reference, then archived.

### Handling Blocked Items

1. When a task is **Blocked**, add the blocker details in the **Notes** column.
2. Use the format: `Blocked by: T{n} - {description}`.
3. The orchestrator will attempt to resolve blockers during sync cycles.
4. If blocked for more than one phase cycle, escalate per UNIFIED_AGENT_TEAMS.md.

### Task files (optional)

When delegating work via `/orchestrate`, create per-task JSON files in `.claude/state/tasks/` (lifecycle: submitted → accepted → working → completed/failed/rejected). The project-status dashboard uses these to report throughput, WIP count, and lead time; if the directory is empty, those metrics show as N/A.

---

## Priority Definitions

| Priority | Label | Definition | SLA |
| -------- | -------- | ----------------------------------------------------------- | ------------- |
| P0 | Critical | Blocks all other work or affects production stability | Same day |
| P1 | High | Required for current milestone; has downstream dependencies | Within sprint |
| P2 | Medium | Important but not blocking; can be deferred one sprint | Next sprint |
| P3 | Low | Nice to have; backlog filler; exploratory | Best effort |

---

## Status Definitions

| Status | Description |
| ----------- | --------------------------------------------------------------- |
| Todo | Not yet started; waiting for sprint allocation or dependencies |
| In Progress | Actively being worked on by the assigned team |
| Done | Completed and passed quality gates for the current phase |
| Blocked | Cannot proceed; waiting on an external dependency or resolution |

### Phase Progression

Tasks move through phases as defined in UNIFIED_AGENT_TEAMS.md:

```
Discovery -> Planning -> Implementation -> Validation -> Ship
```

A task's **Status** resets to **Todo** when it advances to a new **Phase**, unless
the team immediately begins work (then it moves to **In Progress**).

---

## Cross-Team Dependencies

Track inter-team dependencies here for visibility during orchestration.

_None_
| Upstream Team | Downstream Team | Dependency Description | Status |
| ------------- | --------------- | ------------------------------- | -------- |
| T1-Backend | T2-Frontend | API contract for user endpoints | Pending |
| T3-Data | T1-Backend | Database schema for user model | Pending |
| T5-Auth | T1-Backend | Auth middleware interface | Pending |
| T4-Infra | T10-Quality | CI pipeline for test execution | Resolved |
| T8-DevEx | All Teams | Linting configuration | Resolved |

---

_This backlog is maintained by AgentKit Forge. Use `/sync-backlog` to refresh_
_or `agentkit import-issues` to import from external trackers._
_This backlog is maintained by Retort. Use `/orchestrate` to manage_
_tasks programmatically or edit this file directly for manual adjustments._
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.

⚠️ Potential issue | 🟠 Major

Verify this file's inclusion in an MCP-focused PR.

This entire file is a backlog management document that doesn't relate to the PR's stated objective: "make browser/crawler MCP servers conditional on project.yaml". The AI summary confirms this is a regeneration that replaces "agentkit-forge" style with "Retort" style and shifts workflows from /sync-backlog/agentkit import-issues to /orchestrate.

This appears to be an incidental regeneration rather than a purposeful change for MCP server configuration. If this regeneration is intentional and part of a broader documentation refresh, that should be noted in the PR description. Otherwise, consider whether this file should be included in this PR or moved to a separate documentation-update PR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENT_BACKLOG.md` around lines 1 - 157, The AGENT_BACKLOG.md change appears
to be an incidental Retort-generated documentation regen unrelated to the PR
goal ("make browser/crawler MCP servers conditional on project.yaml"); either
remove AGENT_BACKLOG.md from this PR (unstage/revert the changes to that file)
or explicitly document the regeneration in the PR description and split the
backlog/doc refresh into a separate documentation-update PR; mention "Retort"
regeneration and the shifted commands (/orchestrate vs /sync-backlog, agentkit
import-issues) so reviewers understand it is intentional if you keep it.

Comment on lines +103 to +105
### Task files (optional)

When delegating work via `/orchestrate`, create per-task JSON files in `.claude/state/tasks/` (lifecycle: submitted → accepted → working → completed/failed/rejected). The project-status dashboard uses these to report throughput, WIP count, and lead time; if the directory is empty, those metrics show as N/A.
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify task JSON files mechanism and dashboard integration

echo "=== Checking task JSON implementation ==="

# Check if .claude/state/tasks directory exists or is referenced in code
echo -e "\n1. Task directory references:"
fd -t d 'tasks' .claude/state 2>/dev/null || echo "Directory not found"
rg -n '\.claude/state/tasks' --type=ts --type=js --type=mjs

# Check for dashboard implementation
echo -e "\n2. Project status dashboard references:"
rg -n -C3 'project-status|dashboard.*throughput|WIP count|lead time' --type=ts --type=js --type=mjs --type=md

# Check orchestrate command for task file creation logic
echo -e "\n3. Task file creation in orchestrate:"
rg -n -C3 'submitted|accepted|working|completed.*task.*json|task.*lifecycle' .agentkit/templates/claude/commands/orchestrate.md

Repository: phoenixvc/retort

Length of output: 2428


🏁 Script executed:

# Search for dashboard, metrics, or task tracking implementations
echo "=== Broader dashboard/metrics search ==="

# Look for any dashboard or reporting implementation
rg -n 'dashboard|metrics|throughput|lead.*time' -i --type=ts --type=js

# Search for task file creation/reading beyond templates
rg -n 'tasks.*json|\.claude/state' -i

# Check if AGENT_BACKLOG.md itself clarifies planned vs. implemented
grep -n "planned\|TODO\|[Pp]roposed\|not.*implement" AGENT_BACKLOG.md | head -20

# Look for any state directory creation
rg -n '\.claude.*state' --type=ts --type=js

# Check directory structure
echo -e "\n=== Directory structure under .claude ==="
find .claude -type f 2>/dev/null | head -20

Repository: phoenixvc/retort

Length of output: 19352


🏁 Script executed:

# Check TasksPanel component for metric calculations
echo "=== TasksPanel metrics ==="
cat -n src/start/components/TasksPanel.tsx | head -50

# Check dashboard command implementation
echo -e "\n=== Dashboard command implementation ==="
rg -n -A15 "desc.*dashboard|progress.*risks" src/start/lib/commands.ts

# Check for WIP, throughput, lead time calculations
echo -e "\n=== Specific metrics calculation ==="
rg -n 'WIP|throughput|lead.*time|active.*count' -i src/start/ --type=ts --type=tsx --type=js

Repository: phoenixvc/retort

Length of output: 2305


🏁 Script executed:

# Find the dashboard command implementation/handler
echo "=== Dashboard handler implementation ==="
rg -n -A20 "dashboard|project-status" src/start/lib/commands.ts | grep -A20 "handler\|fn\|exec"

# Look for separate dashboard implementation
echo -e "\n=== Dashboard related files ==="
fd -t f 'dashboard|metrics' src/

# Check if dashboard is defined in a separate file or if it's a reference
echo -e "\n=== Search for /dashboard or project-dashboard command handler ==="
rg -n 'handler.*dashboard|/dashboard.*handler|\bdashboard\b.*=' src/start --type=ts --type=js -A5

# Look at the actual command implementation to see how metrics are exposed
echo -e "\n=== Commands file full context around dashboard ==="
sed -n '85,110p' src/start/lib/commands.ts

Repository: phoenixvc/retort

Length of output: 1020


🏁 Script executed:

# Search for /project-status handler in agentkit templates
echo "=== Search for /project-status handler ==="
find .agentkit -type f -name "*.md" -o -name "*.sh" | xargs grep -l "project-status" 2>/dev/null

# Check if it's a template command
echo -e "\n=== Check template commands ==="
ls -la .agentkit/templates/claude/commands/ | grep -i project

# Look for where commands are executed/handled
echo -e "\n=== Search for command execution/routing ==="
rg -n "project-status|/project-status" --type=md --type=mjs --type=js --type=ts -B2 -A5

# Check README or documentation for dashboard behavior
echo -e "\n=== Check dashboard metrics documentation ==="
rg -n "throughput|WIP count|lead time" --type=md -B2 -A2

Repository: phoenixvc/retort

Length of output: 13927


🏁 Script executed:

# Check the project-status.md template to see what metrics it actually displays
echo "=== Project-status template implementation ==="
head -100 .agentkit/templates/claude/commands/project-status.md

echo -e "\n=== Check for metric calculation or N/A handling ==="
rg -n "N/A|unavailable|not.*implement|TODO|planned" .agentkit/templates/claude/commands/project-status.md

Repository: phoenixvc/retort

Length of output: 4078


Update task lifecycle documentation to include all implemented states.

The task JSON files mechanism and project-status dashboard are correctly implemented. However, the documented lifecycle is incomplete. The actual lifecycle includes eight states:

Current (incomplete) in AGENT_BACKLOG.md: submitted → accepted → working → completed/failed/rejected

Should be: submitted → accepted → working → completed/failed/rejected/canceled (with blocked state: BLOCKED_ON_CANCELED when all blockers are canceled or failed)

Update lines 103-105 to reflect the full state machine from .agentkit/templates/claude/commands/orchestrate.md, which documents valid transitions and distinguishes between initial (submitted), transient (accepted, working), and terminal (completed, failed, rejected, canceled, BLOCKED_ON_CANCELED) states.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENT_BACKLOG.md` around lines 103 - 105, Update the task lifecycle line in
AGENT_BACKLOG.md to list the full set of implemented states from
.agentkit/templates/claude/commands/orchestrate.md: submitted → accepted →
working → completed/failed/rejected/canceled (and include the special blocked
state BLOCKED_ON_CANCELED used when all blockers are canceled or failed); also
explicitly classify initial (submitted), transient (accepted, working), and
terminal (completed, failed, rejected, canceled, BLOCKED_ON_CANCELED) states so
the documentation matches the actual state machine.

Comment on lines 1 to +3
<!-- GENERATED by Retort v3.1.0 — DO NOT EDIT -->
<!-- Source: .agentkit/spec + .agentkit/overlays/retort -->
<!-- Regenerate: pnpm --dir .agentkit agentkit:sync -->
<!-- Regenerate: pnpm --dir .agentkit retort:sync -->
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.

⚠️ Potential issue | 🟠 Major

Do not edit this generated doc directly; regenerate from source spec instead.

This file is explicitly marked generated, but it was edited in-place. Please apply changes in .agentkit/spec (or overlays) and commit the regenerated output.

As per coding guidelines, "Files with the header 'GENERATED by AgentKit Forge — DO NOT EDIT' must not be edited directly. Modify the source spec in .agentkit/spec/ and run 'pnpm --dir .agentkit agentkit:sync' to regenerate."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/engineering/04_git_workflow.md` around lines 1 - 3, The generated file
header indicates this doc was edited in-place; revert any direct edits to
docs/engineering/04_git_workflow.md and instead update the source spec under
.agentkit/spec (or relevant overlay), then regenerate the output by running the
sync command (pnpm --dir .agentkit agentkit:sync or pnpm --dir .agentkit
retort:sync as appropriate) and commit the regenerated docs; ensure the file
header remains the autogenerated comment ("GENERATED by ... — DO NOT EDIT") to
prevent future direct edits.

Comment on lines 13 to 17
| Branch | Purpose | Deploys To |
| ----------- | --------------------- | ---------- |
| `main` | Production-ready code | Production |
| `develop` | Integration branch | Staging |
| `main` | Integration branch | Staging |
| `feature/*` | New features | — |
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.

⚠️ Potential issue | 🟡 Minor

Branch strategy table is internally inconsistent.

Line 16 duplicates main as the integration/staging branch, which conflicts with Line 15 (main as production-ready). This likely should be dev (or whichever actual integration branch is used).

Proposed doc fix
-| `main`      | Integration branch    | Staging    |
+| `dev`       | Integration branch    | Staging    |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Branch | Purpose | Deploys To |
| ----------- | --------------------- | ---------- |
| `main` | Production-ready code | Production |
| `develop` | Integration branch | Staging |
| `main` | Integration branch | Staging |
| `feature/*` | New features ||
| Branch | Purpose | Deploys To |
| ----------- | --------------------- | ---------- |
| `main` | Production-ready code | Production |
| `dev` | Integration branch | Staging |
| `feature/*` | New features ||
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/engineering/04_git_workflow.md` around lines 13 - 17, The branch
strategy table is inconsistent: the second row incorrectly lists `main` as the
integration/staging branch; update that row to the correct integration branch
(e.g., change the branch name from `main` to `dev`) so the table reads `main` =
Production-ready code → Production and `dev` = Integration branch → Staging,
leaving `feature/*` as-is.

Comment on lines +80 to +84
- `Test`

Keep these checks **advisory** (not required initially):
- `Validate`

- `Semgrep (Advisory)`

Promotion guidance:

- Promote selected Semgrep checks to required only after at least 2 sprints of low-noise results.
- `Branch Protection / branch-rules`
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's read the full context around lines 80-84 in the documentation file
cat -n docs/engineering/04_git_workflow.md | head -100

Repository: phoenixvc/retort

Length of output: 2997


🏁 Script executed:

# Find .agentkit/spec files that might contain git workflow configuration
find .agentkit/spec -type f -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.json" | head -20

Repository: phoenixvc/retort

Length of output: 754


🏁 Script executed:

# Check the docs.yaml file for git workflow specification
cat -n .agentkit/spec/docs.yaml | grep -A 50 -B 5 "git_workflow\|Branch Protection\|Test\|Validate"

Repository: phoenixvc/retort

Length of output: 3098


🏁 Script executed:

# Find GitHub Actions workflow files to see actual check names
find .github/workflows -type f -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -20

Repository: phoenixvc/retort

Length of output: 766


🏁 Script executed:

# Read the CI workflow to see what check names are actually produced
cat -n .github/workflows/ci.yml | head -80

Repository: phoenixvc/retort

Length of output: 3180


🏁 Script executed:

# Read the branch-protection.yml workflow to see the "branch-rules" check
cat -n .github/workflows/branch-protection.yml

Repository: phoenixvc/retort

Length of output: 6829


🏁 Script executed:

# Check the quality-lint.yml workflow to see if it contains the YAML Lint check
cat -n .github/workflows/quality-lint.yml | grep -A 5 "name:\|yaml-lint" | head -40

Repository: phoenixvc/retort

Length of output: 1241


🏁 Script executed:

# Search for YAML Lint or yaml-lint in all workflow files
grep -r "yaml" .github/workflows/ --include="*.yml" --include="*.yaml" -i | grep -i "name:\|yaml.*lint"

Repository: phoenixvc/retort

Length of output: 934


🏁 Script executed:

# Read the rest of the ci.yml file to see the YAML Lint job and understand all required checks
cat -n .github/workflows/ci.yml | sed -n '80,140p'

Repository: phoenixvc/retort

Length of output: 2726


🏁 Script executed:

# Get the definitive status check names from the authoritative workflow comments
grep -A 10 "Configure GitHub branch protection" .github/workflows/branch-protection.yml

Repository: phoenixvc/retort

Length of output: 395


Update required status check names to match configured branch protection rules exactly.

The documentation lists simplified check names that don't match the authoritative configuration. Branch protection should require:

  • Retort CI / Test (ubuntu-latest)
  • Retort CI / Validate
  • YAML Lint
  • Branch Protection / branch-rules

Update lines 80-84 to include the workflow name prefix and add the missing YAML Lint check.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/engineering/04_git_workflow.md` around lines 80 - 84, Update the status
check list entries under the branch protection section to match the exact
branch-protection names: replace `Test` with `Retort CI / Test (ubuntu-latest)`,
replace `Validate` with `Retort CI / Validate`, add the missing `YAML Lint`
entry, and keep `Branch Protection / branch-rules` as-is so the documented
checks exactly match the configured branch protection rules.

@JustAGhosT JustAGhosT merged commit 67757d8 into dev Mar 31, 2026
20 of 23 checks passed
@JustAGhosT JustAGhosT deleted the feat/conditional-mcp-servers branch March 31, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): make browser/crawler MCP server conditional on project e2e + storybook config

1 participant