Factory Spec - Phase MODEL Orchestrator

VerifiedCaution

Automated orchestrator that generates functional specs, technical specs, ADRs and rules by coordinating multiple agents (PM, Architect, Rules-Memory) with synchronization and gate checks.

Sby Skills Guide Bot
DevelopmentIntermediate
206/2/2026
Claude Code
#spec-generation#adr#documentation#workflow

Recommended for

Our review

Orchestrates the MODEL phase of generating specifications, ADRs, and rules from a brief.

Strengths

  • Automates creation of system, domain, and API specs
  • Generates structured ADRs
  • Produces assistant rules
  • Enforces step synchronization via gates

Limitations

  • Depends on quality of input documents (brief, scope)
  • Requires gate-check and factory-log tools
  • Does not handle failure of subagents gracefully
When to use it

To quickly bootstrap documentation structure for a project in the modeling phase.

When not to use it

When the project requires deep human validation of architectural decisions before generating ADRs.

Security analysis

Caution
Quality score80/100

The skill orchestrates a phase by running bash commands and delegating to subagents. It does not perform destructive actions or exfiltrate data, but it executes arbitrary Node scripts which could be dangerous if the project is compromised.

Findings
  • Uses Bash to execute Node.js scripts (tools/gate-check.js, tools/factory-log.js) which could be hijacked if the repository contains malicious code.
  • Assumes the tools directory is trustworthy; no validation of the scripts content.

Examples

Run MODEL phase
Run the MODEL phase for the factory spec to generate specs, ADR and rules.
Generate documentation from brief
Execute the factory-spec pipeline: check gates, delegate to pm, architect, and rules-memory agents to produce full specs and ADR.

name: factory-spec description: "Phase MODEL - Génère specs + ADR + rules" context: fork allowed-tools: Read, Glob, Grep, Task, Bash

Factory Spec - Phase MODEL

Tu es l'orchestrateur de la phase MODEL.

Workflow

⚠️ SYNCHRONISATION OBLIGATOIRE : Chaque étape DOIT être terminée avant de passer à la suivante. Les agents ont des dépendances : architect dépend de pm, rules-memory dépend de architect.

  1. Vérifier Gate 1 : node tools/gate-check.js 1

    • Si exit code ≠ 0 → STOP immédiat
  2. Déléguer à l'agent pm via Task tool :

    Task(
      subagent_type: "pm",
      prompt: "Produis docs/specs/system.md et docs/specs/domain.md depuis docs/brief.md et docs/scope.md",
      description: "PM - Specs fonctionnelles"
    )
    

    ⏳ ATTENDRE que le Task soit terminé avant de continuer. ✅ Vérifier : docs/specs/system.md ET docs/specs/domain.md existent.

  3. Déléguer à l'agent architect via Task tool :

    Task(
      subagent_type: "architect",
      prompt: "Produis docs/specs/api.md et docs/adr/ADR-0001-stack.md depuis docs/specs/system.md et docs/specs/domain.md",
      description: "Architect - Specs techniques"
    )
    

    ⏳ ATTENDRE que le Task soit terminé avant de continuer. ✅ Vérifier : docs/specs/api.md ET docs/adr/ADR-0001-*.md existent.

  4. Déléguer à l'agent rules-memory via Task tool :

    Task(
      subagent_type: "rules-memory",
      prompt: "Génère les rules dans .claude/rules/ et enrichis CLAUDE.md depuis docs/specs/* et docs/adr/*",
      description: "Rules-Memory - Rules et mémoire"
    )
    

    ⏳ ATTENDRE que le Task soit terminé avant de continuer.

  5. Vérifier les outputs :

    • docs/specs/system.md existe
    • docs/specs/domain.md existe
    • docs/specs/api.md existe
    • docs/adr/ADR-0001-*.md existe
  6. Exécuter Gate 2 : node tools/gate-check.js 2

    • Si exit code ≠ 0 → STOP immédiat avec rapport des erreurs
  7. Logger via :

    node tools/factory-log.js "MODEL" "completed" "Phase MODEL terminée"
    
  8. Retourner un résumé avec liste des specs générées

En cas d'échec

Si Gate 2 échoue → STOP et rapport des fichiers manquants.

Related skills