You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -50,10 +44,10 @@ The tool assembles context into a structured prompt with the following component
50
44
```
51
45
52
46
**Key Points:**
53
-
-**Task Frontmatter**: Provides metadata for agent decision-making and workflow automation
54
-
-**Skills**: Enable progressive disclosure of specialized capabilities
55
47
-**Rules**: Reusable context that applies across multiple tasks
48
+
-**Skills**: Enable progressive disclosure of specialized capabilities
56
49
-**Task Content**: Specific instructions for the current task with dynamic content expansion
50
+
-**Note**: Task frontmatter is used for filtering and metadata but is not included in the output
57
51
58
52
## Features
59
53
@@ -767,40 +761,49 @@ The AI agent can then read the full skill content from the provided location whe
767
761
768
762
### Task Frontmatter
769
763
770
-
Task frontmatter is **always** automatically included at the beginning of the output when a task file has frontmatter. This allows the AI agent or downstream tool to access metadata about the task being executed. There is no flag needed to enable this - it happens automatically.
764
+
Task frontmatter contains metadata used for filtering, agent selection, and workflow automation. While the frontmatter itself is not included in the generated output, it serves important purposes:
765
+
766
+
**What frontmatter is used for:**
767
+
-**Task selection**: Filtering between multiple task files using selectors
768
+
-**Agent specification**: The `agent` field can override the `-a` command-line flag
769
+
-**Rule filtering**: The `selectors` field automatically filters rules without requiring explicit `-s` flags
770
+
-**Workflow control**: Fields like `resume` control task behavior in different modes
771
771
772
772
**Example usage:**
773
773
```bash
774
774
coding-context -p issue_number=123 fix-bug
775
775
```
776
776
777
-
**Output format:**
778
-
```yaml
777
+
**Example task file:**
778
+
```markdown
779
779
---
780
780
resume: false
781
+
selectors:
782
+
languages: go
783
+
stage: implementation
781
784
---
782
785
# Fix Bug Task
783
786
787
+
Fix the bug in issue #${issue_number}...
788
+
```
789
+
790
+
**Output format:**
791
+
The task frontmatter is NOT included in the output. Only the task content (below the frontmatter delimiters) is included:
792
+
```markdown
793
+
# Fix Bug Task
794
+
784
795
Fix the bug in issue #123...
785
796
```
786
797
787
-
This can be useful for:
788
-
-**Agent decision making**: The AI can see metadata like priority, environment, or stage
789
-
-**Workflow automation**: Downstream tools can parse the frontmatter to make decisions
790
-
-**Debugging**: You can verify which task variant was selected and what selectors were applied
798
+
This design keeps the output focused on actionable content while still allowing frontmatter to control behavior and filtering.
791
799
792
800
**Example with selectors in frontmatter:**
793
801
```bash
794
802
coding-context implement-feature
795
803
```
796
804
797
-
If the task has `selectors` in its frontmatter, they will be visible in the output:
798
-
```yaml
799
-
---
800
-
selectors:
801
-
languages: go
802
-
stage: implementation
803
-
---
805
+
If the task has `selectors` in its frontmatter, they will automatically filter rules, but the frontmatter itself won't appear in the output:
Copy file name to clipboardExpand all lines: SPECIFICATION.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ selectors:
230
230
**Rules:**
231
231
-`task_name` field is optional metadata
232
232
- Tasks matched by filename (e.g., `fix-bug.md` → task name `fix-bug`)
233
-
- Frontmatter is automatically output with task
233
+
- Frontmatter is used for filtering and metadata but not included in output
234
234
- Can specify `selectors` to auto-filter rules
235
235
- Supports parameter expansion: `${param_name}`
236
236
@@ -1096,20 +1096,28 @@ Remote directories support (via go-getter):
1096
1096
1097
1097
### 11.1 Assembly Order
1098
1098
1099
-
1.**Task frontmatter** (YAML format, automatically included if present)
1099
+
1.**Rule content** (all included rules, content only)
1100
1100
2.**Skill metadata** (XML format, if skills found)
1101
-
3.**Rule content** (all included rules, content only)
1102
-
4.**Task content** (with expansions applied)
1103
-
5.**User prompt** (if provided, after `---` delimiter)
1101
+
3.**Task content** (with expansions applied)
1102
+
4.**User prompt** (if provided, after `---` delimiter)
1103
+
1104
+
**Note**: Task frontmatter is used for filtering and metadata purposes but is not included in the output.
1104
1105
1105
1106
### 11.2 Output Format
1106
1107
1107
1108
**To stdout (the context):**
1108
-
```yaml
1109
-
---
1110
-
task_name: fix-bug
1111
-
resume: false
1112
-
---
1109
+
```markdown
1110
+
# Rule 1 Content
1111
+
1112
+
Rule 1 text...
1113
+
1114
+
# Rule 2 Content
1115
+
1116
+
Rule 2 text...
1117
+
1118
+
# Skills
1119
+
1120
+
You have access to the following skills. Skills are specialized capabilities that provide domain expertise, workflows, and procedural knowledge. When a task matches a skill's description, you can load the full skill content by reading the SKILL.md file at the location provided.
0 commit comments