Generate Workflow Agents.prompt
---
description: "Generate, verify, or improve a full Apple-platform development workflow agent kit: analyze the repo, then create, audit, or update agents with quality gating."
agent: "Agent Builder"
---
# Generate Workflow Agents
Analyze the codebase first, classify project state, then act based on what exists:
- **Greenfield** (no agents): generate all agents from scratch
- **Established** (agents exist): run drift detection first (stale file refs, outdated conventions, abandoned patterns), then evaluate and improve existing agents, fill gaps, fix weak collaboration
- **Mixed** (partial setup): preserve working agents, fill gaps
Do not start with a broad interview — extract context by analyzing the codebase directly, then ask only if critical architecture-changing facts remain missing.
## Standard User-Facing Progress
1. Analyze the codebase
2. Assess the project and choose bundle architecture
3. Ask targeted follow-up only if needed
4. Generate or update the bundle
5. Audit and iterate until PASS
6. Deliver the final result
Do not add extra top-level phases for internal setup. Phase 3 auto-skips when no ambiguity remains.
Complete the entire workflow in this session. Use `vscode_askQuestions` for structured user input — never plain text questions. Never leave generation incomplete.
## Target Roles
Reference roles — full behavioral specifications per role in SKILL.md Artifact Requirements section.
| Role | Responsibility |
|------|---------------|
| Business Analyst | User stories, acceptance criteria, domain rules, edge cases |
| Investigator | As-is/to-be analysis, data flow tracing, impact matrix, investigation reports |
| Implementor | Production code, pre-impl checklist, verify-fix loop |
| Test Specialist | Unit tests (Swift Testing) + UI tests (XCTest), mocks, coverage |
| Code Review Orchestrator | Routes to sub-reviewers, aggregates verdicts, enforces short-circuit |
| Functional Reviewer | Business correctness, AC traceability, edge cases |
| Technical Reviewer | Architecture, performance, security, layer responsibility |
| Platform Reviewer | Apple-specific: memory, concurrency, SwiftUI, accessibility |
| Dev Orchestrator | Auto-routes intent, coordinates all stages, iteration loops |
Optionally: project-specific codebase analyzer for large/unfamiliar repos.
## Execution Steps
1. **Analyze** — Deeply scan project: architecture, conventions, domain, existing agents, build setup, testing, delivery workflow. Classify project state. Recommend where shared business knowledge should live: project context instruction only, domain-scoped instructions, a business domain registry / domain map, or a reusable business-domain skill. When MCP GitHub tools are available, discover relevant community skills from `twostraws/Swift-Agent-Skills` matched to the project's tech stack.
2. **Assess** — Summarize: project state, constraints, recommended bundle shape, gaps, workflow-family coverage matrix.
3. **Clarify only if needed** — Ask minimum targeted questions only if a missing fact would materially change architecture.
4. **Generate** — Produce full workflow kit per SKILL.md bundle shape. For established projects: improve weak agents, add missing roles, tighten collaboration contracts. Reference real project conventions. Name generated files with project-derived prefix, while treating `.github/copilot-instructions.md` as the standard non-prefixed workspace-level file: create it if missing, or update it if present while preserving relevant existing content. Also generate `<prefix>-project-context.instructions.md` for deeper reference context. When project business complexity warrants it, generate the appropriate shared business knowledge artifact and wire it into the relevant agents' inputs and decision rules.
5. **Audit** — Full audit including ecosystem coherence. Every finding (major and minor) must be resolved.
6. **Revise** — If `REVISE`, fix every finding and re-audit. Do not accept or skip minor findings. Repeat until `PASS` with zero open issues.
7. **Deliver** — Complete bundle with architecture rationale and residual risks (only genuine uncertainties, not fixable weaknesses).
Final quality expectation: zero open findings (including minor) and zero editor diagnostics in generated agent files before completion.
## Constraints
- Reference real project conventions, not generic boilerplate
- Project-derived file prefix for generated artifacts
- For established projects: preserve working behavior while fixing weak areas
- Skip 95% confidence interview — rely on analysis first
- Follow all bundle requirements and artifact patterns in SKILL.md — the generator's SKILL.md Compliance Checklist is the verification surface
- Complete the entire workflow in a single session — never abandon mid-generationwhen to use it
Community prompt sourced from the open-source GitHub repo lhhiep2204/apple-agent-builder-kit (MIT). A "Generate Workflow Agents.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
lhhiep2204/apple-agent-builder-kit · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar