Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Memory
orchestrator
Try itCentral entry point of the afonsoft agent harness. Use when starting a new project, resuming an existing one, planning features/Epics/releases, or running any multi-step agent-driven work. Validates and reconciles SPECs (SDD), audits the codebase and harness for gaps (security, architecture, performance, hygiene), proposes improvements, fragments work into GitHub Issues, delegates implementation/QA/review to specialized skills, and re-validates everything until delivery. Also use to review unapproved SPECs, reconcile open GitHub Issues with code, or run a final gap check before closing a release.
What it does
The central control skill for agent-driven projects. It plans, governs, audits, delegates, and re-validates. It never executes complex work directly when a specialized skill exists.
The skill document
Orchestrator
The central control skill for agent-driven projects. It plans, governs, audits, delegates, and re-validates. It never executes complex work directly when a specialized skill exists.
All questions and confirmations directed at the user must be in Portuguese (pt-BR). Internal reasoning and documentation are in English.
When to Use
- Starting a new project or repository.
- Resuming an existing project with unclear state.
- Planning a feature, Epic, or release.
- Coordinating implementation of a SPEC SDD.
- Preparing a PR after implementation.
When NOT to Use
- Do not use when the task is a single, well-scoped code change — use
/tdd-specdirectly. - Do not use when only a code review is needed — use
/code-review-and-quality. - Do not use when only a bug fix is needed — use
/diagnose.
State File
The Orchestrator must read references/ESTADO_ORQUESTRATOR.md at the start of every session and write to it after every phase. This state file persists the DAG, task status, and decisions across sessions. See references/ESTADO_ORQUESTRATOR.md.
Phase -1 — Framework Update
Run this at the start of every Orchestrator session, before project preconditions.
- Find where the skills were installed from. For each loaded skill, resolve the real path of the link and locate the catalog clone that contains
README.mdandSKILL.md. - In the found clone, read
originremote, current branch, and local installed commit. - Check the framework remote with
git fetch origin --quiet. Never pull, merge, or reset the framework clone. - Compare local commit with
origin/or the equivalent remote reference. - If there are new commits, report immediately:
Framework update available
- Framework: afonsoft/skills
- Installed:
- Available:
- Changes:
- Action: reinstall the catalog with `npx skills add afonsoft/skills`
- If new commits are available, guide the user to reinstall skills with
npx skills add afonsoft/skills. - After reinstall, confirm
orchestratorandcreate-agent-harnesspoint to the new revision and report the result. - If no changes, log
Framework up-to-date ()without stopping the flow. - If the clone, remote, or network cannot be located, log
Unable to check framework updatesand continue only if local skills are available. Do not reinstall without confirming a new revision.
When a new revision is confirmed, the user must reinstall the skills. That is part of the Orchestrator contract.
Phase 0 — Governance Preconditions
Before creating files or delegating work:
- Verify Git is initialized.
- Verify a valid GitHub remote exists, preferably
origin. - Verify repository access with
gh repo viewor equivalent.
If the environment is empty, has no Git, or has no GitHub remote, stop the flow and guide the user to:
- Create the repository on GitHub;
- Initialize the local repository;
- Configure the
originremote; - Make the first commit and push;
- Return to the Orchestrator.
Never silently replace GitHub with a local tracker. GitHub is the source of traceability, Issues, review, and history for this framework.
Phase 1 — Documentation Provisioning
- Invoke
/create-agent-harnessto generateCLAUDE.md,AGENTS.md(thin reference),.claude/(settings, rules, agents, memory, context),docs/(technologies, architecture, decisions), and.specs/. - Invoke
/grill-me-with-specto consolidate domain language and architectural decisions, producing the SPEC SDD in.specs/SPEC-{YYYYMMDD}-{feature}.mdbefore any implementation. - In an empty repository, invoke
/scaffold-mvpafter domain alignment. - Review and persist documentation and the approved SPEC before starting implementation.
Documentation is not optional: the Orchestrator must leave a state another agent can continue.
Special Case — New Project with Only a PRD in the Folder
When the repository starts from a folder containing only a PRD (no code):
- Ensure GitHub repository is initialized with
originconfigured (Phase 0). - Create and check out a
developbranch from the default branch. - Invoke
/grill-me-with-specto turn the PRD into one or more SPEC SDDs in.specs/SPEC-{YYYYMMDD}-{slug}.md, one per Epic or well-delimited area. - Review and approve the SPECs; update
StatustoApprovedon each one. - Based on approved SPECs, open Issues on GitHub using
/create-issues(one per Epic, or a master Issue with Epics listed). - Use
/create-issuesto slice each Epic into atomic Issues (vertical, traceable, with acceptance criteria), recording the mapping.specs/SPEC-*.md→ Issue. - Proceed to Phase 4 using the sequential queue described below.
Phase 2 — Audit
Audit the structure produced by create-agent-harness:
[ ] Git initialized
[ ] GitHub remote configured and accessible
[ ] CLAUDE.md (single source of truth) and AGENTS.md (thin reference)
[ ] .claude/settings.json (permissions, hooks, env)
[ ] .claude/rules/global-rules.md and stack-scoped rules/
[ ] .claude/agents/ (review.md, plan.md, test.md)
[ ] .claude/memory/ and .claude/MEMORY.md
[ ] .claude/CONTEXT.md, .claude/RULES.md, .claude/TOOLS.md, .claude/WORKFLOWS.md
[ ] .claude/README.md (harness infrastructure)
[ ] .specs/ for SPEC SDD when features are in flight
[ ] docs/agents/ when domain tracker and labels exist
[ ] docs/adr/ when relevant architectural decisions exist
[ ] Skills installed in the chosen environment
Classify gaps as P1 (security/types), P2 (architecture), P3 (performance), or P4 (hygiene/documentation). To analyze and address gaps, invoke /improve-codebase-architecture.
Phase 3 — GitHub Fragmentation
Approved gaps must be turned into Issues by /create-issues. GitHub is the persistent source of scope, acceptance criteria, dependencies, and status; references/ESTADO_ORQUESTRATOR.md is only the operational view of the DAG.
- Pass the gaps, roadmap, and approved documentation to
/create-issues. - Present the decomposition for approval when HITL decision is needed.
- Publish Issues in dependency order, using real IDs in
Blocked by. - Record the mapping
Task -> GitHub Issue -> branch/worktree. - Never create a DAG only in memory or only in a local file when the task can be tracked on GitHub.
Phase 4 — Execution Loop
flowchart TB
subgraph Phase1["Phase 1 - Plan"]
P1_H[/create-agent-harness/]
P1_S[/grill-me-with-spec/]
P1_M[/scaffold-mvp/]
end
subgraph Phase2["Phase 2 - Audit"]
P2_A["Audit gaps"]
P2_F[/improve-codebase-architecture/]
end
subgraph Phase3["Phase 3 - Issues"]
P3_I[/create-issues/]
end
subgraph Slice["Per-Slice Loop"]
S_R["Read SPEC + Issue"]
S_T[/tdd-spec/]
S_C[/code-review-and-quality/]
S_D[/diagnose/]
S_V["Verify build / test / lint"]
S_G[/grill-me-with-spec/]
S_CM["Commit"]
end
subgraph Gate["Phase 5 - QA"]
G_Q[/qa-analyst/]
G_R[/code-review-and-quality/]
G_M[/create-readme/]
G_P["PR / Merge"]
end
P1_H --> P1_S
P1_S --> P1_M
P1_M --> P2_A
P2_A -->|P2 gap| P2_F
P2_F --> P2_A
P2_A --> P3_I
P3_I --> S_R
S_R --> S_T
S_T --> S_C
S_C --> S_V
S_V -->|green| S_CM
S_T -->|bug| S_D
S_D --> S_T
S_C -->|ambiguous| S_G
S_G --> S_R
S_V -->|fail| S_D
S_CM -->|next slice| S_R
S_CM -->|Epic done| G_Q
G_Q -->|approved| G_R
G_Q -->|fail| S_T
G_R -->|approved| G_M
G_R -->|fail| S_T
G_M --> G_P
The Orchestrator runs sliced Issues in a continuous loop until all SPEC implementations are complete. The focus is small vertical slices, one at a time, with constant re-validation.
General Rules
- Independent slices may run in parallel in isolated worktrees; slices that change schema, authentication, public APIs, or data require human confirmation.
- Before each slice, the agent must read the approved
.specs/SPEC-{YYYYMMDD}-{slug}.mdand the corresponding Issue. - After each slice, re-validate: build, tests, lint, type check.
- Do not move to the next slice while the current one is not green.
Per-Slice Cycle
1. READ → Approved SPEC + GitHub Issue
2. TDD → /tdd-spec (red-green-refactor) using acceptance criteria
3. CODE REVIEW → /code-review-and-quality on the slice diff
4. ARCH → /improve-codebase-architecture if architecture degrades
5. DIAGNOSE → /diagnose if a bug or mysterious failure appears
6. CLARIFY → /grill-me-with-spec if the SPEC is ambiguous
7. VERIFY → build, tests, lint pass
8. COMMIT → Conventional commit, reference the Issue
9. LOOP → Next slice in the queue
Skill Delegation by Situation
| Situation | Skill |
|---|---|
| Implement from SPEC | /tdd-spec |
| Review diff before continuing | /code-review-and-quality |
| Bug, regression, or mysterious build failure | /diagnose |
| Degraded architecture / too much coupling | /improve-codebase-architecture |
| Ambiguity in the SPEC | /grill-me-with-spec |
| Create/update Epic Issues | /create-issues |
| Need knowledge of a third-party API/library | manual / research subagent |
Sequential Queue for Epics Sliced from a PRD
When Issues come from the special case "new project with only a PRD" (Phase 1), execution is not parallel: dispatch one agent at a time, in Issue dependency order.
- For the current Epic, process its sliced Issues one by one:
- develop with
/tdd-spec; - QA (Phase 5);
- commit;
- next Issue in the queue. Repeat until all Issues of the Epic are exhausted.
- develop with
- When the Epic is complete, invoke
/qa-analyst, then/code-review-and-qualityfor the accumulated diff, then/drawio-architectureto refresh the system diagram, then/create-readmeto reflect what was delivered. - Epic exhausted → open a PR from the working branch to
develop.- Green PR (CI/tests pass) → merge into
develop. - Failed PR → fix with
/diagnose, re-run verification, then merge.
- Green PR (CI/tests pass) → merge into
- After the merge, return to the
developbranch and advance to the next Epic in the queue, repeating the loop until all PRD Epics are finished. - When all Epics are complete, open the final merge from
developtomain.
Phase 5 — Verification and QA
After each slice and at the end of each Epic/DAG:
- Run proportional verifications: tests, lint, type check, build.
- If it fails, invoke
/diagnosebefore continuing. - When the DAG is complete, invoke
/qa-analystwithout exception of tier. QA must confront requirements, Issues, implementation, tests, error scenarios, and out-of-scope changes. Failures reopen Issues or create new tasks. - After QA approval, invoke
/code-review-and-qualityfor a final review of the accumulated Epic diff (or set of slices). Quality failures reopen Issues or create new tasks. - After review approval, invoke
/drawio-architectureto update or create the system architecture diagram so documentation reflects the delivered structure. - After the architecture diagram is consistent, invoke
/create-readmeto updateREADME.mdwith the delivered features, stack, and instructions. - Only after that can delivery by PR occur. If no Git/PR flow skill is installed, describe the steps and ask for human confirmation; never invoke a nonexistent skill.
At the end of the project or release, ensure README.md reflects the current system state.
Skill Call Reference
| Phase / Situation | Skill | Why it is called | What it returns / does |
|---|---|---|---|
| Phase -1 — detect framework updates | /orchestrator (self) | Compare local installed catalog with remote origin | Reports whether a reinstall is needed |
| Phase 0 — missing Git / remote | manual | Cannot proceed without GitHub as source of truth | Guides user to create and connect repo |
| Phase 1 — create harness | /create-agent-harness | Generate CLAUDE.md, AGENTS.md, .claude/, docs/, .specs/ | Files ready for project governance |
| Phase 1 — write SPEC | /grill-me-with-spec | Consolidate domain language and architectural decisions | .specs/SPEC-{YYYYMMDD}-{slug}.md in Approved state |
| Phase 1 — empty repo | /scaffold-mvp | Bootstrap stack after domain alignment | Initial project skeleton and README |
| Phase 2 — architecture gaps | /improve-codebase-architecture | P2 (architecture) gaps or degraded seams | HTML report with deepening opportunities |
| Phase 3 — turn work into Issues | /create-issues | Gaps, roadmap, and approved docs become GitHub Issues | Real GitHub Issue numbers + dependency links |
| Phase 4 — implement slice | /tdd-spec | Approved SPEC → red-green-refactor slice | Working code + tests passing |
| Phase 4 — bug or build failure | /diagnose | Reproduce, minimise, instrument, fix, regress | Root cause resolved + regression test |
| Phase 4 — code review per slice | /code-review-and-quality | Review diff before next step | Required changes or approval |
| Phase 4 — SPEC ambiguity | /grill-me-with-spec | Missing or conflicting requirement | Updated SPEC with new decisions |
| Phase 5 — QA gate | /qa-analyst | Mandatory pre-PR verification | QA approval or new Issues |
| Phase 5 — final review | /code-review-and-quality | Accumulated Epic diff review | Final approval or rework |
| Phase 5 — architecture diagram | /drawio-architecture | Update system diagram after delivery | SVG/PNG architecture diagram |
| Phase 5 — documentation | /create-readme | Keep README.md in sync with delivery | Updated README |
Decision Tree
- Does the SPEC exist and is
Approved?- No →
/grill-me-with-spec.
- No →
- Is there a P2 architecture gap?
- Yes →
/improve-codebase-architecture.
- Yes →
- Is the work tracked on GitHub?
- No →
/create-issues.
- No →
- Did a test fail or build break?
- Yes →
/diagnose.
- Yes →
- Is the code written but not reviewed?
- Yes →
/code-review-and-quality.
- Yes →
- Is the Epic done and tests green?
- Yes →
/qa-analyst→/code-review-and-quality→/create-readme→ PR.
- Yes →
References
references/orchestrator-delegation-protocol.md— autonomy matrix, risk tiers, and delegation protocols.references/ESTADO_ORQUESTRATOR.md— operational state file for the session DAG./create-agent-harness— for generating the project harness/grill-me-with-spec— for authoring the SPEC SDD/scaffold-mvp— for bootstrapping a new project/create-issues— for turning work into GitHub Issues/improve-codebase-architecture— for analyzing and fixing architecture gaps/tdd-spec— for test-driven implementation from the SPEC/code-review-and-quality— for reviewing diffs/diagnose— for debugging regressions and bugs/qa-analyst— for the mandatory QA gate/create-readme— for keeping README in sync
Related skills
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Query and manage Linear issues, projects, teams, cycles, labels, and comments through a managed OAuth GraphQL endpoint.
Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.
More from afonsoft
Browse all skillsSingle owner of everything under docs/architecture/ — ADRs, architecture and design documents, and architecture diagrams. Routes each deliverable to the right engine: /mermaid-architecture for Markdown-native diagrams, /drawio-architecture for editable .drawio diagrams, and the optional third-party archify skill for interactive standalone HTML diagrams (installed on demand via `npx skills add tt-a1i/archify`, only with explicit user approval). Use whenever architecture documentation, ADRs, or architecture diagrams must be created or updated.
Use when building a new MCP server in TypeScript, Python, or C# that exposes tools to LLMs.
Use when the user asks to connect an AI agent to external apps via Composio, or when Composio CLI or MCP setup fails.
Use when initializing or migrating an AI agent harness in a repository.
Use when turning approved plans, specs, PRDs, or Epics into trackable GitHub Issues.
Use when generating or editing draw.io/diagrams.net architecture diagrams via MCP or native XML.