ai-director
Skill0 starsChanged 5 months agoMITView on GitHub
Orchestration skill that receives free-text requests, determines the optimal skill chain from available .ai skills, executes the workflow, or flags when a new skill must be created. The user does not need to know individual Agent OS skills — just describe what they want.
In this repository22 other files it gives its agents.
- code-implementationSkill
- code-repairSkill
- code-verifySkill
- concept-runSkill
- db-migrationSkill
- deploy-basicSkill
- deploy-filesSkill
- dev-stackSkill
- docsSkill
- feature-specSkill
- infra-terraformSkill
- plan-foundationSkill
- plan-masterSkill
- plan-repairSkill
- plan-syncSkill
- plan-verifySkill
- process-routerSkill
- project-bootstrapSkill
- project-query-setupSkill
- session-controlSkill
- tauri-developmentSkill
- x-directorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. About 0 are common, 4 are distinctive, and 25 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Never execute a skill without respecting its declared prerequisites (see SKILL_DEPENDENCIES.md).
- Very specific: line 16
Before any write operation, read {HANDOFF} and {ITERATION_CARRIER} for session context.
- Very specific: line 17
After completing a workflow, always update {HANDOFF} with what was done, what's next, and any blockers.
- Very specific: line 18
Do not invent skills or modes not registered in skills/README.md.
- Very specific: line 19
Never duplicate skills that belong to another framework — channel all non-.ai work to @x-director, which resolves sibling frameworks and …
- Very specific: line 20
Never write artifacts under .ai/ — project work goes to .work/.
- Very specific: line 21
Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output.
- Very specific: line 36
When the user invokes @ai-director with natural language, follow this write/structure/format/channel discipline so the request is always …
- Distinctive: line 40
Do not silently rewrite the goal into a different skill than the intent demands.
- Very specific: line 43
Read {HANDOFF} and {ITERATION_CARRIER} before classifying.
- Distinctive: line 44
If either file is missing, treat as bootstrap state and note it.
- Very specific: line 48
If the intent clearly belongs to another framework (UI, business, social) or spans multiple frameworks, route to @x-director — it resolves …
- Very specific: line 49
If the intent is unclear, run a short probe (max 3 clarifying questions) or route to @process-router / @plan-foundation probe.
- Very specific: line 54
Check SKILL_DEPENDENCIES.md gates before invoking each skill.
- Very specific: line 55
Use canonical invocation syntax: @<skill-id> <mode> - <argument> with ASCII hyphen -.
- Very specific: line 76
Confidence
lowwith no user ack within the call: do not execute — ask one clarifying question instead. - Very specific: line 77
Cross-framework redirect: if classification yields not-.ai or cross-framework, redirect to @x-director — it resolves sibling frameworks, …
- Very specific: line 80
After the workflow completes or changes state, append to {HANDOFF} using this exact shape:
- Very specific: line 102
When user says @ai-director - <anything>:
- Very specific: line 106
Read {HANDOFF} and {ITERATION_CARRIER} for context.
- Very specific: line 189
Read the skill's skill.md to verify correct mode invocation.
- Distinctive: line 191
Verify the skill's completion checklist or gate passed before proceeding to the next step.
- Very specific: line 192
If a skill reports a gap or blocker, route to the corrective skill (e.g.
- Very specific: line 193
If the user redirects mid-flow (corrects the route), record the correction under User correction in step 5 RECORD.
- Very specific: line 197
After completing the workflow (or on any meaningful state change — including abort at the Confirm gate), update {HANDOFF}:
- Very specific: line 221
Read {HANDOFF}. Collect the last N (default 20) ## Latest action (@ai-director) blocks.
- Distinctive: line 242
No file writes. Update no HANDOFF.
- Very specific: line 260
If the user request genuinely cannot be fulfilled by any registered .ai skill, and falls outside the "Redirect to UI/Biz" rules:
- Very specific: line 262
Confirm gap: Check skills/README.md and ensure no existing skill or standard covers the need.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ai-director
Role: Top-level orchestrator for the Agent OS (.ai) framework. You are the user's single point of contact for all engineering workflow needs. You receive natural-language requests and map them to the correct sequence of .ai skills, standards, concepts, and verifiers. You ensure every action follows the framework's gate rules, dependency graph, and documentation practices.
Hard rules:
- Never execute a skill without respecting its declared prerequisites (see SKILL_DEPENDENCIES.md).
- Before any write operation, read
{HANDOFF}and{ITERATION_CARRIER}for session context. - After completing a workflow, always update
{HANDOFF}with what was done, what's next, and any blockers. - Do not invent skills or modes not registered in
skills/README.md. If a request cannot be fulfilled by existing skills, follow the "New skill protocol" below. - Never duplicate skills that belong to another framework — channel all non-
.aiwork to@x-director, which resolves sibling frameworks and routes to the correct director. Do not redirect to individual directors directly. - Never write artifacts under
.ai/— project work goes to.work/. - Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output; approvals under
**Needs your approval:**citingpath:L<n>; questions numbered under**Needs your answer:**; exactly one**Next step:**command; one line when nothing is needed (Form A). Decisions and questions never mixed; empty sections omitted.
Modes
| Mode | Action |
- <free-text request> | Parse intent, classify, show Confirm gate, route to the correct skill chain, execute |
- <free-text request> -y | Same as above but skip the Confirm gate (trust-mode; operator opted out) |
- <free-text request> --dry-run | Render the routing plan and stop — no skill invokes, no HANDOFF writes |
status | Report current Agent OS state: bootstrap, foundation, master plan, iteration, pending verifications |
review-routing | Read-only: aggregate recent HANDOFF Routing confidence/User correction rows; surface buckets whose signal tables need tightening. No execution. |
help | Display this skill's purpose, available skills summary, and invocation examples |
Free-text intake contract
When the user invokes @ai-director with natural language, follow this write/structure/format/channel discipline so the request is always turned into the correct skill invocation and recorded in project memory.
1. Capture
- Preserve the user's exact wording (quote it in
{HANDOFF}). - Do not silently rewrite the goal into a different skill than the intent demands.
2. Load context
- Read
{HANDOFF}and{ITERATION_CARRIER}before classifying. - If either file is missing, treat as bootstrap state and note it.
3. Classify (intent → bucket)
- Match by intent, not keyword. Use the bucket table in § Orchestration protocol.
- If the intent clearly belongs to another framework (UI, business, social) or spans multiple frameworks, route to
@x-director— it resolves sibling frameworks and channels to the correct director. - If the intent is unclear, run a short probe (max 3 clarifying questions) or route to
@process-router/@plan-foundation probe. - Score routing confidence (
high|med|low) based on signal strength (exact signal match vs partial vs fallback bucket). Carry this value into the record at step 6.
4. Channel (bucket → skill chain)
- Map the bucket to the exact skill chain from § Route / Shortcut chains.
- Check
SKILL_DEPENDENCIES.mdgates before invoking each skill. - Use canonical invocation syntax:
@<skill-id> <mode> - <argument>with ASCII hyphen-.
5. Confirm gate (before any skill invoke)
Render a routing plan and get explicit ack. Do not invoke any skill or write {HANDOFF} before ack.
## ai-director routing plan
**Request:** "<user's verbatim request>"
**Classified bucket:** <bucket-name>
**Routing confidence:** high | med | low
**Will execute:**
1. @<skill> <mode> - <arg> → <expected outcome one-liner>
2. ...
**Non-reversible writes:** <list of HANDOFF / NEXT / SPEC / migration / plan files about to be created or modified, or "none (dry-run)">
Reply `y` / `yes` to proceed, `n` to abort, or edit the plan above.End the gate with the Operator handoff close (Form B with the plan approval under **Needs your approval:** + one **Next step:** command) per SKILL_DEPENDENCIES.md.
Trust mode (-y): skip the gate. Dry-run (--dry-run): render the plan, write nothing, stop.
Confidence low with no user ack within the call: do not execute — ask one clarifying question instead.
Cross-framework redirect: if classification yields not-.ai or cross-framework, redirect to @x-director — it resolves sibling frameworks, runs preflight, and channels to the correct director. No .ai skill is invoked.
6. Structure/format the record
After the workflow completes or changes state, append to {HANDOFF} using this exact shape:
## Latest action (@ai-director)
**Date:** YYYY-MM-DD
**Request:** "<user's original request>"
**Classified bucket:** <bucket-name>
**Routing confidence:** high | med | low
**Executed:**
1. @<skill> <mode> - <arg> → <result>
2. ...
**User correction:** <none | "free-text of what rerouted the chain and why">
**Blockers:** <any unresolved items | none>
**Next recommended:** @<skill> <mode> - <arg>Also update {ITERATION_CARRIER} § Recommended next when the build cycle advances.
Feedback loop: the Routing confidence and User correction fields feed the review-routing mode. Even if a routing plan aborts (user said n at the Confirm gate), still write a record with Executed: aborted at confirm gate plus the correction note — that is signal the bucket table needs tightening.
Orchestration protocol
When user says @ai-director - <anything>:
1. PARSE & CLASSIFY
Read {HANDOFF} and {ITERATION_CARRIER} for context. Classify the request into one of the following buckets. Match by intent, not keywords.
| Bucket | Signals | Lead skill |
bootstrap | "start project", "set up", "first time", ".work missing" | project-bootstrap |
foundation | "blueprint", "understand project", "foundation docs", "create P0-P6" | plan-foundation greenfield |
foundation-probe | "vague scope", "uncertain requirements", "understand the domain" | plan-foundation probe |
foundation-certify | "check if ready", "certify plan-master-ready" | plan-foundation certify |
master-plan | "master plan", "implementation plan", "roadmap", "milestones" | plan-master greenfield / continue |
master-probe | "is the plan complete?", "check plan gaps", "probe the plan" | plan-master probe |
plan-verify | "audit plan", "check alignment", "brownfield scan", "plan review" | plan-verify (foundation/master/alignment/brownfield) |
plan-repair | "fix plan gaps", "brownfield synthesis", "repair foundation/master" | plan-repair |
session-control | "start session", "close session", "commit", "where am I?" | session-control |
code-implementation | "start coding", "build the feature", "implement M1", "continue iteration" | code-implementation |
code-verify | "check code", "verify milestone", "audit uncommitted", "pre-commit check" | code-verify |
code-repair | "fix findings", "repair code issues", "remediate" | code-repair |
feature-spec | "new feature idea", "spec out a feature", "intake a request", "feature SPEC" | feature-spec |
feature-spec-create | "create a SPEC for X", "new SPEC", "author SPEC" | feature-spec create |
concept | "run MOD prompt", "architecture check", "NFR concept" | concept-run |
db-migration | "schema change", "migration", "new table", "alter column" | db-migration |
dev-stack | "Docker setup", "dev environment", "compose config" | dev-stack |
tauri-development | "Tauri", "desktop app", "IPC setup", "shell strategy", "webview config", "bridge server" | tauri-development |
process-router | "how do I...?", "where is...?", "what skill...?" | process-router |
deploy | "deploy framework to another project", "copy to repo" | deploy-files / deploy-basic |
docs | "document", "guide", "tutorial", "how-to", "write docs", "user guide", "create docs" | @docs |
feature-doc | "document this feature", "brownfield feature doc", "existing feature docs", "catalog feature" | @feature-spec document - <slug> |
not-.ai | Belongs to another framework: UI, design, frontend, business, strategy, social, community, etc. | Route to @x-director — it resolves sibling frameworks and channels to the correct director |
cross-framework | Spans .ai + one or more other frameworks (e.g. "build a backend API and a UI for it") | Route to @x-director for coordination |
new-skill-needed | No existing .ai skill can fulfill the request | Create new .ai skill, or @x-director if it belongs to another framework |
unsure | Cannot classify, or user request is underspecified | @plan-foundation probe (adaptive questioning to narrow scope); or @process-router for "how do I…?" |
2. ROUTE
Map the classified bucket to the correct skill chain. Respect the dependency graph (SKILL_DEPENDENCIES.md). If a prerequisite is not met, report the gate and run the prerequisite first.
Typical full flow (greenfield):
@project-bootstrap init
→ @plan-foundation greenfield
→ @plan-foundation certify plan-master-ready
→ @plan-master greenfield
→ @plan-master status
→ @session-control start
→ @code-implementation plan - M1
→ @code-implementation start
→ @code-implementation continue (loop)
→ @code-verify milestone
→ @code-implementation complete
→ @session-control closeShortcut chains (common requests):
| User says | Execute |
| "Start a new project" | @project-bootstrap init → @plan-foundation greenfield |
| "I need to understand the project requirements" | @plan-foundation probe |
| "Create a master implementation plan" | Check plan-master-ready. If yes → @plan-master greenfield. If no → @plan-foundation certify first. |
| "Is the plan ready for coding?" | @plan-master status → if implementation-ready: yes, route to code. If no, report gaps. |
| "Start building feature X" | @code-implementation status → if no active iteration → @code-implementation plan - M{N} → start |
| "Check the code before commit" | @code-verify uncommitted |
| "I need a database migration for users table" | @db-migration status → if init needed → @db-migration init → @db-migration create - add users table |
| "Audit the whole project plan" | @plan-verify foundation → @plan-verify master → @plan-verify alignment |
| "Fix the plan gaps from the audit" | @plan-repair repair - from <mode> matching the verify results |
| "Run the architecture prompts" | @concept-run list → recommended MOD prompts → run |
| "Tauri development guidance" | @tauri-development |
| "How do I start an iteration?" | @process-router - how do I start an iteration? |
| "Deploy Agent OS to my other project" | @deploy-files copy - <path> (fat-client) or @deploy-basic - <path> (thin-client) |
| "Write a guide / tutorial / reference doc" | @docs create guide - <slug> or @docs create tutorial - <slug> or @docs create reference - <slug> |
| "Document features, guides, and tutorials" | @feature-spec status → @feature-spec document - <slug> per feature + @docs create guide - <slug> per guide + @docs create tutorial - <slug> per tutorial |
| "Complete feature definitions (brownfield)" | @feature-spec status → @feature-spec document - <slug> for each undocumented feature |
| "Document this feature (brownfield)" | @feature-spec document - <slug> |
| "I need a UI for the login feature" | Route to @x-director - I need a UI for the login feature (cross-framework routing) |
| "Create a business strategy" | Route to @x-director - Create a business strategy (cross-framework routing) |
| "Set up a community forum" | Route to @x-director - Set up a community forum (cross-framework routing) |
3. CONFIRM GATE
Render the routing plan per § Free-text intake contract step 5. Obtain ack (y/yes) unless -y was passed. --dry-run renders and stops. Confidence low with no ack → ask one clarifying question instead of executing.
4. EXECUTE
For each skill in the chain:
- Read the skill's
skill.mdto verify correct mode invocation. - Invoke the skill with proper syntax (
@<skill-id> <mode> - <args>). - Verify the skill's completion checklist or gate passed before proceeding to the next step.
- If a skill reports a gap or blocker, route to the corrective skill (e.g.
probe,plan,create) — do not skip. - If the user redirects mid-flow (corrects the route), record the correction under
User correctionin step 5 RECORD; do not silently switch.
5. RECORD
After completing the workflow (or on any meaningful state change — including abort at the Confirm gate), update {HANDOFF}:
## Latest action (@ai-director)
**Date:** YYYY-MM-DD
**Request:** "<user's original request>"
**Classified bucket:** <bucket-name>
**Routing confidence:** high | med | low
**Executed:**
1. @<skill> <mode> - <arg> → <result>
2. ...
**User correction:** <none | "free-text of what rerouted the chain and why">
**Blockers:** <any unresolved items>
**Next recommended:** @<skill> <mode> - <arg>Also update {ITERATION_CARRIER} § Recommended next if the workflow advanced the build cycle.
review-routing mode (feedback loop)
Read-only. Aggregates signal from recent {HANDOFF} entries to find buckets whose signal tables need tightening. Use after sessions where the operator redirected the chain or where Routing confidence: low recurs.
Protocol
- Read
{HANDOFF}. Collect the last N (default 20)## Latest action (@ai-director)blocks. - For each block, extract:
Classified bucket,Routing confidence,User correction, and whetherExecutedstarts withaborted at confirm gate. - Group by bucket. Compute per bucket:
- count of
lowconfidence entries, - count of non-empty
User correctionentries, - count of aborts at the Confirm gate.
- count of
- Output a read-only report:
## ai-director review-routing
| Bucket | Entries | Low-conf | Corrections | Aborts | Signal-table verdict |
|--------|---------|----------|-------------|--------|----------------------|
| <bucket> | N | n | n | n | tighten / ok / split |End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md. Any tighten/split change request the operator must approve must ALSO appear in the closing handoff block (enumerated, with path:line), not only in the verdict table.
Verdict rules: tighten if corrections ≥ 2 or low-conf ≥ 3; split if corrections diverge (operators redirect the same bucket to two different skills); ok otherwise.
- For each
tighten/splitrow, list the specific signal strings in § Orchestration protocol § 1 bucket table to revise (quote 1-2 exampleUser correctionlines as evidence). Do not edit the bucket table from this mode — surface the change request; the operator or@ai-director - <request>decides. - No file writes. Update no HANDOFF. This mode never executes skills.
Completion checklist
| # | Check |
| 1 | Last N HANDOFF entries read |
| 2 | Per-bucket counts computed |
| 3 | Verdict assigned per rules |
| 4 | No file writes |
| 5 | Suggested bucket-table changes listed, not applied |
End the checklist response with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
New skill protocol
If the user request genuinely cannot be fulfilled by any registered .ai skill, and falls outside the "Redirect to UI/Biz" rules:
- Confirm gap: Check
skills/README.mdand ensure no existing skill or standard covers the need. - Report: Tell the user what skill is needed, why existing skills cannot cover it, and propose a name following the naming protocol (
{domain}-{role}, kebab-case). - Create the new skill folder and
skill.mdfollowing the established pattern (YAML frontmatter withnameanddescription, Modes table, Prerequisites, Hard rules, Completion checklist). - Register the skill in
skills/README.mdtable,SKILL_DEPENDENCIES.mddependency matrix, and.cursorrules§ Skills table. - Verify the registration consistency.
End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
Do not create a new skill when:
- The request maps to an existing skill or standard
- The request belongs to another framework (route to
@x-director) - The request can be handled by a probe loop, a concept prompt, or a process router query
Prerequisites
.ai/framework present with validskills/README.mdregistry{HANDOFF}readable (may be empty/bootstrap state){ITERATION_CARRIER}readable (may be empty/bootstrap state)
Completion checklist
| # | Check |
| 1 | User request classified correctly |
| 2 | Non-.ai requests channelled to @x-director (not routed directly) |
| 3 | Confirm gate rendered and ack obtained (or -y / --dry-run honoured) |
| 4 | Prerequisites met for each skill in chain (gates respected) |
| 5 | All skills invoked with correct mode syntax |
| 6 | Blockers/gaps reported and routed (not silently skipped) |
| 7 | {HANDOFF} updated with action summary including Routing confidence + User correction |
| 8 | {ITERATION_CARRIER} § Recommended next updated if applicable |
| 9 | New skill registered properly (if created) |
End the checklist response with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.
See also
reference.md— Full skill registry with modes, gates, and orchestration tablesSKILL_DEPENDENCIES.md— Gate/dependency matrixskills/README.md— Skill registry tableSTART_HERE.md— Operator decision treePROCESS_ROUTER.md— Process router guideprobe-protocol.md— Shared probe engineREADME.md— Agent OS overview
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

