"Administra las plantillas de documentación del proyecto. Úsala cuando necesites crear un nuevo formato de documentación transversal o mejorar uno existente. Supports plan-driven execution with subdelegation to support skills."
Install
npx skillscat add kodria/agentic-workflow/template-manager Install via the SkillsCat registry.
Template Manager
Paso 0: Autodescubrimiento Contextual de Recursos
Before interacting with the user or reading project files, you MUST dynamically locate your template directories.
0.1 Plantillas Globales (TEMPLATES_DIR) — Solo Lectura (Referencia)
- Use file search tools (e.g.,
find_by_name) to find the patterntemplate-wizard/resources/templateswithin your execution environment. - Search across:
.agents/skills/,.agent/skills/,~/.agents/skills/, etc. - Store the discovered absolute path as
TEMPLATES_DIR. - Do NOT hardcode paths. If the directory is not found, inform the user and stop.
- ⚠️ READ-ONLY. Global templates come from the AWM central registry and must NEVER be modified by this skill.
0.2 Plantillas Locales (LOCAL_TEMPLATES_DIR) — Directorio de Trabajo
- Define
LOCAL_TEMPLATES_DIRasdocs/templates/relative to the current project root. - If the directory does not exist, it will be created when the user approves saving a template.
- All write operations (create, edit, overwrite) happen EXCLUSIVELY here.
Paso 1: Detección de Modo de Operación
Determine how this skill was invoked:
Modo Plan: A documentation plan (generated by
docs-brainstorming) was provided or referenced. The plan is a.mdfile indocs/plans/with structured entregables of type "Template".
→ Proceed to Modo Plan (Paso 2P).Modo Directo: No documentation plan exists. The user is invoking this skill directly.
→ Proceed to Modo Directo (Paso 2D).
Modo Plan
Paso 2P: Lectura del Plan
- Read the documentation plan
.mdfile. - Extract:
- Contexto Recopilado — primary source of information.
- Entregables — the list of template deliverables with types, destinations, and support skill requirements.
- Criterios de Aceptación — definition of done.
Paso 3P: Ejecución por Entregable
For each entregable in the plan:
a. Evaluate support skill need:
- Check the entregable's "Requiere skill de apoyo" field.
- If a support skill is needed → follow the Protocolo de Subdelegación (below).
b. Execute the corresponding flow:
- Determine whether this entregable requires Creation, Edition, or Override based on the plan context and the current state of global/local templates.
- Creación: Generate template body in Markdown + YAML frontal metadata (
template_purpose,interview_questions). - Edición: Apply modifications to an existing local template.
- Override: Copy a global template to local, apply modifications.
c. Present to user:
- Show the complete template (Markdown + YAML) for review.
d. Iterate until approval:
- If the user requests changes → apply and present again.
- If the user approves → save and proceed to the next entregable.
Paso 4P: Guardado
- Write/overwrite the approved template(s) to
{LOCAL_TEMPLATES_DIR}. - IMPORTANT: Results are NEVER saved to
{TEMPLATES_DIR}(global). Always todocs/templates/. - Create the directory if it does not exist.
- Filenames must follow
kebab-caseconvention.
Modo Directo (Legacy Flow)
This mode preserves the original behavior for direct invocations without a plan.
Paso 2D: Ingreso del Concepto
- Extract the intention from the user's request (e.g., "A DB standard" or "Improve the ADR template").
Paso 3D: Evaluación de Similitudes
- List and read YAML metadata from files in both directories:
{TEMPLATES_DIR}(global templates — read-only).{LOCAL_TEMPLATES_DIR}(local templates — if exists).
- Reason whether the concept is already covered (fully or partially) by an existing template, analyzing
template_purpose. - If a match is found, present it to the user indicating whether it is global or local, and offer:
- A) Local Override (if global: copy to
docs/templates/and edit the copy). - B) Edit/Update (only if already local).
- C) Create from scratch (in
docs/templates/).
- A) Local Override (if global: copy to
- If no match, proceed transparently to "Creation from Scratch".
Paso 4D: Bifurcación de Flujos
Flow A: Creation from Scratch
- Ask only the high-level clarification questions needed to understand scope.
- In a single autonomous step, propose the Markdown body and the YAML frontal metadata with
template_purposeandinterview_questions.
Flow B: Edit Existing Local Template
- Ask what aspects of the current template the user wants to evolve.
- Propose the rewritten template (Markdown + YAML) incorporating changes coherently.
Flow C: Local Override of Global Template
- Copy the complete content of the selected global template.
- Apply the modifications requested by the user on the copy.
- IMPORTANT: The original file in
{TEMPLATES_DIR}is NOT touched.
Paso 5D: Aprobación Conversacional
- Present the proposed design (Markdown + YAML) complete in the chat.
- Wait for feedback. Adjust iteratively if the user requests modifications.
Paso 6D: Guardado Directo
- When the user explicitly approves, write/overwrite the file in
{LOCAL_TEMPLATES_DIR}. - Create
docs/templates/if it does not exist. - Filename must follow
kebab-caseconvention. - Confirm to the user that the task is complete.
Protocolo de Subdelegación a Skills de Apoyo
When executing an entregable and you encounter a block that requires specialized capabilities, follow this protocol:
SD-1: Detección
Identify the need via:
- Explícita: The plan indicates "Requiere skill de apoyo:
<name>" in the entregable. - Implícita: During execution you detect that a template block requires specialized capabilities.
SD-2: Consulta del Registro
Check the Support Skills Registry (below).
- If a match exists → proceed to SD-3.
- If NO match exists → inform the user. Offer: (a) generate the content with best judgment, or (b) leave the section marked as pending.
SD-3: Confirmación con el Usuario
Before invoking, inform the user:
- Which skill you will invoke and why.
- What context you will pass.
- Wait for explicit approval.
SD-4: Invocación
- Locate the skill's
SKILL.mdusing dynamic autodiscovery. - Read the
SKILL.mdto load instructions. - Pass relevant context from the plan.
- Execute the support skill's workflow.
SD-5: Incorporación
- Take the output and incorporate it into the template in the correct location.
- Continue with the next block or entregable.
Registro de Skills de Apoyo
| Tipo de Bloque | Skill | Detectar cuando... |
|---|---|---|
| Diagramas de arquitectura C4 | c4-architecture |
El entregable requiere diagramas de contexto, contenedores, componentes, despliegue o flujos dinámicos |
| Documento desde plantilla existente | template-wizard |
Un entregable necesita instanciar un documento nuevo basado en una plantilla oficial |
Extensibilidad: Para agregar una nueva skill de apoyo, agregar una fila a esta tabla.