Skip to content

Subagents#15

Merged
rafaelpapastamatiou-afya merged 22 commits into
masterfrom
subagents
May 14, 2026
Merged

Subagents#15
rafaelpapastamatiou-afya merged 22 commits into
masterfrom
subagents

Conversation

@rafaelpapastamatiou-afya

@rafaelpapastamatiou-afya rafaelpapastamatiou-afya commented May 11, 2026

Copy link
Copy Markdown
Collaborator

✨ PR Description

Purpose: Migrate from bash-based file synchronization to Python-based distribution generation with embedded multi-agent frontmatter support for subagent architecture.

Main changes:

  • Created sync.py script parsing JSON configs, extracting embedded YAML frontmatter from markdown files, generating per-agent distributions with file prefix/directory customization
  • Replaced separate .frontmatter.yaml files with embedded frontmatter blocks (agent names as top-level keys within --- delimiters) in source markdown files
  • Updated documentation and all generated agent/skill files to reference @"agent-name (agent)" dispatch syntax instead of file-based prompt templates

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 49863dfe-f652-40c0-8e49-806f85ae1a40

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch subagents

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@gitstream-cm gitstream-cm Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ PR Review

LGTM

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the repo’s distribution-generation pipeline from a Bash-based sync script to a Python implementation, while restructuring per-agent metadata/frontmatter and “subagent” prompt content so it’s embedded in source markdown and emitted as dedicated agent files in dist/.

Changes:

  • Replaced sync.sh with sync.py (Python 3.9+, stdlib-only) to generate per-agent outputs and handle embedded multi-agent frontmatter extraction.
  • Moved per-agent frontmatter from separate *.frontmatter.yaml / frontmatter.yaml files into embedded frontmatter blocks inside the source .md files.
  • Replaced various “prompt template” markdown files with dedicated agent definitions under src/agents/, and updated skill docs to reference agent dispatches (e.g., @"plan-reviewer (agent)").

Reviewed changes

Copilot reviewed 56 out of 147 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sync.sh Removed Bash-based sync pipeline.
sync.py Added Python-based sync pipeline with embedded frontmatter extraction + distribution generation.
src/skills/writing-plans/SKILL.md Embedded multi-agent frontmatter; updated reviewer dispatch to plan-reviewer.
src/skills/writing-plans/plan-document-reviewer-prompt.md Removed legacy prompt template (replaced by agent).
src/skills/writing-plans/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/verification-before-completion/SKILL.md Embedded multi-agent frontmatter.
src/skills/verification-before-completion/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/test-driven-development/SKILL.md Embedded multi-agent frontmatter.
src/skills/test-driven-development/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/systematic-debugging/SKILL.md Embedded multi-agent frontmatter.
src/skills/systematic-debugging/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/subagent-driven-development/SKILL.md Embedded multi-agent frontmatter; updated implementer routing to agent dispatches.
src/skills/subagent-driven-development/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/reviewing/SKILL.md Embedded multi-agent frontmatter; updated review subagent dispatch references.
src/skills/reviewing/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/reviewing/code-reviewer.md Removed legacy code-reviewer template (replaced by agent).
src/skills/implementing/spec-reviewer-prompt.md Removed legacy prompt template (replaced by agent).
src/skills/implementing/SKILL.md Embedded multi-agent frontmatter.
src/skills/implementing/implementer-prompt.md Removed legacy prompt template (replaced by agent).
src/skills/implementing/implement-figma-design.md Removed legacy prompt template (replaced by agent).
src/skills/implementing/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/implementing/code-quality-reviewer-prompt.md Removed legacy prompt template (replaced by agent).
src/skills/figma-component/SKILL.md Embedded multi-agent frontmatter; updated implementer dispatch reference.
src/skills/figma-component/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/design/spec-document-reviewer-prompt.md Removed legacy prompt template (replaced by agent).
src/skills/design/SKILL.md Embedded multi-agent frontmatter; switched to design-reviewer loop wording.
src/skills/design/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/completing/SKILL.md Embedded multi-agent frontmatter.
src/skills/completing/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/skills/auto-documentation/SKILL.md Embedded multi-agent frontmatter.
src/skills/auto-documentation/frontmatter.yaml Removed legacy per-skill frontmatter file.
src/commands/switch.md Embedded multi-agent frontmatter.
src/commands/switch.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/status.md Embedded multi-agent frontmatter.
src/commands/status.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/next.md Embedded multi-agent frontmatter.
src/commands/next.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/new.md Embedded multi-agent frontmatter.
src/commands/new.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/history.md Embedded multi-agent frontmatter.
src/commands/history.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/features.md Embedded multi-agent frontmatter.
src/commands/features.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/component.md Embedded multi-agent frontmatter.
src/commands/component.frontmatter.yaml Removed legacy per-command frontmatter file.
src/commands/abort.md Embedded multi-agent frontmatter.
src/commands/abort.frontmatter.yaml Removed legacy per-command frontmatter file.
src/agents/tdd-implementer.md Added dedicated agent definition for TDD implementation tasks.
src/agents/spec-reviewer.md Added dedicated agent definition for spec compliance review.
src/agents/plan-reviewer.md Added dedicated agent definition for plan chunk review.
src/agents/figma-design-implementer.md Added dedicated agent definition for Figma design implementation tasks.
src/agents/design-reviewer.md Added dedicated agent definition for design document review.
src/agents/code-quality-reviewer.md Added dedicated agent definition for code quality review.
dist/github-copilot/skills/writing-plans/SKILL.md Regenerated output reflecting new agent dispatch references.
dist/github-copilot/skills/writing-plans/plan-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/github-copilot/skills/subagent-driven-development/SKILL.md Regenerated output reflecting new implementer agent dispatch references.
dist/github-copilot/skills/reviewing/SKILL.md Regenerated output reflecting new reviewer agent dispatch references.
dist/github-copilot/skills/implementing/spec-reviewer-prompt.md Removed from generated output (legacy template).
dist/github-copilot/skills/implementing/implementer-prompt.md Removed from generated output (legacy template).
dist/github-copilot/skills/implementing/code-quality-reviewer-prompt.md Removed from generated output (legacy template).
dist/github-copilot/skills/figma-component/SKILL.md Regenerated output reflecting new implementer dispatch reference.
dist/github-copilot/skills/design/spec-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/github-copilot/skills/design/SKILL.md Regenerated output reflecting design-reviewer dispatch changes.
dist/github-copilot/agents/tdd-implementer.md New generated agent file.
dist/github-copilot/agents/spec-reviewer.md New generated agent file.
dist/github-copilot/agents/plan-reviewer.md New generated agent file.
dist/github-copilot/agents/figma-design-implementer.md Updated/generated agent file name + content.
dist/github-copilot/agents/design-reviewer.md New generated agent file.
dist/github-copilot/agents/code-quality-reviewer.md Updated with frontmatter + additional checklist content.
dist/gemini/skills/writing-plans/SKILL.md Regenerated output reflecting new agent dispatch references.
dist/gemini/skills/writing-plans/plan-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/gemini/skills/verification-before-completion/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/skills/test-driven-development/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/skills/systematic-debugging/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/skills/subagent-driven-development/SKILL.md Regenerated output reflecting new implementer agent dispatch references.
dist/gemini/skills/reviewing/SKILL.md Regenerated output reflecting new reviewer agent dispatch references.
dist/gemini/skills/implementing/spec-reviewer-prompt.md Removed from generated output (legacy template).
dist/gemini/skills/implementing/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/skills/implementing/implementer-prompt.md Removed from generated output (legacy template).
dist/gemini/skills/implementing/code-quality-reviewer-prompt.md Removed from generated output (legacy template).
dist/gemini/skills/figma-component/SKILL.md Regenerated output reflecting new implementer dispatch reference.
dist/gemini/skills/design/spec-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/gemini/skills/design/SKILL.md Regenerated output reflecting design-reviewer dispatch changes.
dist/gemini/skills/completing/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/skills/auto-documentation/SKILL.md Regenerated output; frontmatter removed for gemini distribution.
dist/gemini/agents/tdd-implementer.md New generated agent content (no frontmatter).
dist/gemini/agents/spec-reviewer.md New generated agent content (no frontmatter).
dist/gemini/agents/plan-reviewer.md New generated agent content (no frontmatter).
dist/gemini/agents/figma-design-implementer.md Updated/generated agent content (no frontmatter).
dist/gemini/agents/figma-component-implementer.md New generated agent content.
dist/gemini/agents/design-reviewer.md New generated agent content (no frontmatter).
dist/gemini/agents/code-quality-reviewer.md Updated checklist text.
dist/cursor/skills/afyapowers-writing-plans/SKILL.md Regenerated output including model metadata + new agent dispatch references.
dist/cursor/skills/afyapowers-writing-plans/plan-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/cursor/skills/afyapowers-verification-before-completion/SKILL.md Regenerated output including model metadata.
dist/cursor/skills/afyapowers-test-driven-development/SKILL.md Regenerated output including model metadata.
dist/cursor/skills/afyapowers-systematic-debugging/SKILL.md Regenerated output including model metadata.
dist/cursor/skills/afyapowers-subagent-driven-development/SKILL.md Regenerated output including model metadata + new agent dispatch references.
dist/cursor/skills/afyapowers-reviewing/SKILL.md Regenerated output including model metadata + new agent dispatch references.
dist/cursor/skills/afyapowers-implementing/spec-reviewer-prompt.md Removed from generated output (legacy template).
dist/cursor/skills/afyapowers-implementing/SKILL.md Regenerated output including model metadata.
dist/cursor/skills/afyapowers-implementing/implementer-prompt.md Removed from generated output (legacy template).
dist/cursor/skills/afyapowers-implementing/code-quality-reviewer-prompt.md Removed from generated output (legacy template).
dist/cursor/skills/afyapowers-figma-component/SKILL.md Regenerated output including model metadata + new implementer dispatch reference.
dist/cursor/skills/afyapowers-design/spec-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/cursor/skills/afyapowers-design/SKILL.md Regenerated output including model metadata + new design-reviewer dispatch references.
dist/cursor/skills/afyapowers-completing/SKILL.md Regenerated output including model metadata.
dist/cursor/skills/afyapowers-auto-documentation/SKILL.md Regenerated output including model metadata.
dist/cursor/agents/afyapowers-tdd-implementer.md New generated agent file (prefixed name + model).
dist/cursor/agents/afyapowers-spec-reviewer.md New generated agent file (prefixed name + model).
dist/cursor/agents/afyapowers-plan-reviewer.md New generated agent file (prefixed name + model).
dist/cursor/agents/afyapowers-figma-design-implementer.md Updated/generated agent file (prefixed name + model).
dist/cursor/agents/afyapowers-design-reviewer.md New generated agent file (prefixed name + model).
dist/cursor/agents/afyapowers-code-quality-reviewer.md Updated/generated agent file (prefixed name + model + checklist).
dist/claude/skills/writing-plans/SKILL.md Regenerated output including model/effort metadata + new agent dispatch references.
dist/claude/skills/writing-plans/plan-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/claude/skills/verification-before-completion/SKILL.md Regenerated output including model/effort metadata.
dist/claude/skills/test-driven-development/SKILL.md Regenerated output including model/effort metadata.
dist/claude/skills/systematic-debugging/SKILL.md Regenerated output including model/effort metadata.
dist/claude/skills/subagent-driven-development/SKILL.md Regenerated output including model/effort metadata + new agent dispatch references.
dist/claude/skills/reviewing/SKILL.md Regenerated output including model/effort metadata + new agent dispatch references.
dist/claude/skills/implementing/spec-reviewer-prompt.md Removed from generated output (legacy template).
dist/claude/skills/implementing/SKILL.md Regenerated output including model/effort metadata.
dist/claude/skills/implementing/implementer-prompt.md Removed from generated output (legacy template).
dist/claude/skills/implementing/code-quality-reviewer-prompt.md Removed from generated output (legacy template).
dist/claude/skills/figma-component/SKILL.md Regenerated output including model/effort metadata + new implementer dispatch reference.
dist/claude/skills/design/spec-document-reviewer-prompt.md Removed from generated output (legacy template).
dist/claude/skills/design/SKILL.md Regenerated output including model/effort metadata + new design-reviewer dispatch references.
dist/claude/skills/completing/SKILL.md Regenerated output including model/effort metadata.
dist/claude/skills/auto-documentation/SKILL.md Regenerated output including model/effort metadata.
dist/claude/agents/tdd-implementer.md New generated agent file (with model/effort).
dist/claude/agents/spec-reviewer.md New generated agent file (with model/effort).
dist/claude/agents/plan-reviewer.md New generated agent file (with model/effort).
dist/claude/agents/figma-design-implementer.md Updated/generated agent file (with model/effort).
dist/claude/agents/design-reviewer.md New generated agent file (with model/effort).
dist/claude/agents/code-quality-reviewer.md Updated/generated agent file (with model/effort + checklist).
CLAUDE.md Updated build/sync + pipeline docs to reference sync.py and embedded frontmatter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sync.py
Comment thread sync.py
Comment thread CLAUDE.md

@gitstream-cm gitstream-cm Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ PR Review

The PR introduces a Python-based sync system to replace bash scripts and migrates to an agent-based architecture with embedded frontmatter. The implementation is generally solid, but there are several reliability issues in the sync script around error handling and data loss risks.

4 issues detected:

🐞 Bug - Lines with unexpected indentation are silently excluded from the result, causing potential content loss.

Details: _The format_section function silently drops lines that don't start with exactly 2 spaces and aren't empty. If frontmatter content has irregular indentation (e.g., 3 spaces, 1 space, or tab characters), those lines are lost without warning. This creates a data integrity risk during the sync process.
File: sync.py (94-108)

🐞 Bug - Malformed JSON config files cause unhelpful crashes without indicating which file is problematic. 🛠️

Details: JSON parsing has no error handling. If a config file is malformed, the script crashes with a generic JSONDecodeError instead of providing helpful context about which config file failed.

File: sync.py (32-32)
🛠️ A suggested code correction is included in the review comments.

🐞 Bug - Missing validation of plugin_manifest dictionary structure before accessing nested keys. 🛠️

Details: Direct dictionary key access on plugin_manifest without validation. If the manifest structure is unexpected or malformed, this will raise KeyError. The function checks if plugin_manifest exists but not if it has the required 'from' and 'to' keys.

File: sync.py (251-252)
🛠️ A suggested code correction is included in the review comments.

🧾 Readability - Unnecessary `or ''` operators that don't change behavior since the default is already an empty string. 🛠️

Details: The or '' clauses after .get('filePrefix', '') are redundant. The .get() call already returns '' as default, so the or '' serves no purpose and adds noise.

File: sync.py (37-39)
🛠️ A suggested code correction is included in the review comments.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

Comment thread sync.py Outdated
Comment thread sync.py Outdated
Comment thread sync.py Outdated

@gitstream-cm gitstream-cm Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ PR Review

The PR introduces a Python-based sync system to generate per-agent distributions. The core sync logic is sound, but there are file type mismatch issues in the copy operations that will cause sync failures when source items change types between runs. All four previously flagged issues remain unresolved.

2 issues detected:

🐞 Bug - Missing cleanup of file-type destinations before directory copy operations

Details: When syncing skill directories, if a destination exists as a file but the source is now a directory (or vice versa), the cleanup logic only handles dest.is_dir() case but doesn't remove existing files before calling copytree. This causes sync to fail when source items change types between syncs. The same pattern appears in the manifest processing.
File: sync.py (186-191)

🐞 Bug - Missing cleanup of file-type destinations before directory copy operations 🛠️

Details: In manifest processing, when copying from source to destination, if dest exists as a file but source is a directory, copytree will fail because dest already exists with wrong type. The code only removes dest if it's already a directory.

File: sync.py (262-263)
🛠️ A suggested code correction is included in the review comments.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

Comment thread sync.py Outdated

@gitstream-cm gitstream-cm Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✨ PR Review

The PR successfully migrates from bash to Python with improved error handling in JSON parsing and manifest processing. However, two previously reported issues remain unresolved (silent line dropping in frontmatter parsing and type mismatch in skill directory sync), and a new error handling gap exists for required configuration keys.

1 issues detected:

🐞 Bug - Direct dictionary access data["agent"] and data["outputDir"] will raise KeyError if keys are missing, providing no context about which config file or which required field is at fault.

Details: Required configuration keys 'agent' and 'outputDir' are accessed directly from the JSON data dictionary without validation. If a config file is missing these required fields, the script will crash with an unhelpful KeyError instead of providing clear feedback about which required field is missing.
File: sync.py (39-40)

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how

@rafaelpapastamatiou-afya
rafaelpapastamatiou-afya merged commit a28e6fc into master May 14, 2026
2 checks passed
@gitstream-cm

gitstream-cm Bot commented May 14, 2026

Copy link
Copy Markdown

gitStream Summary — Low Noise (Staff Engineer focus)

AI PR Description: Updated in the PR body above.
ETR: 1 min review
Unresolved threads: 0

Suggested Reviewers (auto-assigned)

Jira Reference

⚠️ Missing Jira ticket. Please add one (e.g., ABC-123 or an atlassian.net/browse/... link).

Labels/reviewers were applied quietly to keep this PR clean.

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.

2 participants