-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathskill-job-meta.md.jinja
More file actions
147 lines (117 loc) · 4.53 KB
/
Copy pathskill-job-meta.md.jinja
File metadata and controls
147 lines (117 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{#
Template: skill-job-meta.md.jinja
Purpose: Generates the job overview skill file for Claude Code
Template Variables:
- job_name: string - Job identifier (e.g., "competitive_research")
- job_summary: string - Short one-line summary of the job
- job_description: string|null - Full description (optional)
- total_steps: int - Number of steps in the job
- has_workflows: bool - True if workflows are defined
- workflows: list - Array of workflow objects:
- name: string - Workflow identifier
- summary: string - Short description of workflow
- steps: list[string] - Ordered list of step IDs
- first_step: string - First step ID to start workflow
- standalone_steps: list - Steps not in any workflow (same structure as steps)
- steps: list - Array of step objects:
- id: string - Step identifier
- name: string - Human-readable step name
- description: string - What the step does
- command_name: string - Slash command (e.g., "job_name.step_id")
- dependencies: list[string]|null - Required prior steps
- is_standalone: bool - True if not in any workflow
- workflow_name: string|null - Name of workflow if in one
#}
---
name: {{ job_name }}
description: "{{ job_summary }}"
---
# {{ job_name }}
{{ job_summary }}
> **CRITICAL**: Always invoke steps using the Skill tool. Never copy/paste step instructions directly.
{% if job_description %}
{{ job_description }}
{% endif %}
{% if has_workflows %}
## Workflows
{% for workflow in workflows %}
### {{ workflow.name }}
{{ workflow.summary }}
**Steps in order**:
{% for entry in workflow.step_entries %}
{% if entry.is_concurrent %}
{{ loop.index }}. **Concurrent Steps** - Execute the following tasks in parallel:
{% for task in entry.concurrent_steps %}
- **Background Task {{ task.task_number }}**: {{ task.id }} - {{ task.description }}
{% endfor %}
{% else %}
{% set step_id = entry.step_ids[0] %}
{% set step = steps | selectattr("id", "equalto", step_id) | first %}
{{ loop.index }}. **{{ step_id }}** - {{ step.description if step else "Unknown step" }}
{% endif %}
{% endfor %}
**Start workflow**: `/{{ job_name }}.{{ workflow.first_step }}`
{% endfor %}
{% endif %}
{% if standalone_steps %}
## Standalone Skills
These skills can be run independently at any time:
{% for step in standalone_steps %}
- **{{ step.id }}** - {{ step.description }}
Command: `/{{ step.command_name }}`
{% endfor %}
{% endif %}
{% if not has_workflows and not standalone_steps %}
## Available Steps
{% for step in steps %}
{{ loop.index }}. **{{ step.id }}** - {{ step.description }}{% if step.dependencies %} (requires: {{ step.dependencies | join(', ') }}){% endif %}
{% endfor %}
{% endif %}
## Execution Instructions
### Step 1: Analyze Intent
Parse any text following `/{{ job_name }}` to determine user intent:
{% if has_workflows %}
{% for workflow in workflows %}
- "{{ workflow.name }}" or related terms → start {{ workflow.name }} workflow at `{{ job_name }}.{{ workflow.first_step }}`
{% endfor %}
{% endif %}
{% for step in standalone_steps %}
- "{{ step.id }}" or related terms → run standalone skill `{{ step.command_name }}`
{% endfor %}
{% if not has_workflows and not standalone_steps %}
{% for step in steps %}
- "{{ step.id }}" or related terms → start at `{{ step.command_name }}`
{% endfor %}
{% endif %}
### Step 2: Invoke Starting Step
Use the Skill tool to invoke the identified starting step:
{% if has_workflows and workflows %}
```
Skill tool: {{ job_name }}.{{ workflows[0].first_step }}
```
{% else %}
```
Skill tool: {{ steps[0].command_name }}
```
{% endif %}
### Step 3: Continue Workflow Automatically
After each step completes:
1. Check if there's a next step in the workflow sequence
2. Invoke the next step using the Skill tool
3. Repeat until workflow is complete or user intervenes
**Note**: Standalone skills do not auto-continue to other steps.
### Handling Ambiguous Intent
If user intent is unclear, use AskUserQuestion to clarify:
{% if has_workflows %}
- Present available workflows and standalone skills as options
{% else %}
- Present available steps as numbered options
{% endif %}
- Let user select the starting point
## Guardrails
- Do NOT copy/paste step instructions directly; always use the Skill tool to invoke steps
- Do NOT skip steps in a workflow unless the user explicitly requests it
- Do NOT proceed to the next step if the current step's outputs are incomplete
- Do NOT make assumptions about user intent; ask for clarification when ambiguous
## Context Files
- Job definition: `.deepwork/jobs/{{ job_name }}/job.yml`