Skip to content

Commit c458584

Browse files
Copilotalexec
andauthored
Align documentation with code implementation (#167)
* Initial plan * Fix documentation discrepancies with code implementation Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> * Fix architecture.md documentation discrepancies Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> * Fix README agent flag description Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> * Fix SLIDES.md agent flag description Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
1 parent 5030f6e commit c458584

4 files changed

Lines changed: 18 additions & 17 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ This tool is compatible with configuration files from various AI coding agents a
2929
- **[OpenCode.ai](https://opencode.ai/)**: `.opencode/agent`, `.opencode/command`, `.opencode/rules`
3030
- **[GitHub Copilot](https://github.com/features/copilot)**: `.github/copilot-instructions.md`, `.github/agents`
3131
- **[Google Gemini](https://gemini.google.com/)**: `GEMINI.md`, `.gemini/styleguide.md`
32-
- **Generic AI Agents**: `AGENTS.md`, `.agents/rules`, `.agents/commands` (tasks), `.agents/tasks`
32+
- **Generic AI Agents**: `AGENTS.md`, `.agents/rules`, `.agents/commands` (reusable content blocks), `.agents/tasks`
3333

34-
The tool automatically discovers and includes rules from these locations in your project, parent directories, and user home directory (`~`).
34+
The tool automatically discovers and includes rules from these locations in your project and user home directory (`~`).
3535

3636
## Agentic Workflows
3737

@@ -106,7 +106,7 @@ Options:
106106
Include rules with matching frontmatter. Can be specified multiple times as key=value.
107107
Note: Only matches top-level YAML fields in frontmatter.
108108
-a string
109-
Target agent to use (excludes rules from that agent's own paths). Supported agents: cursor, opencode, copilot, claude, gemini, augment, windsurf, codex.
109+
Target agent to use. Required when using -w to write rules to the agent's user rules path. Supported agents: cursor, opencode, copilot, claude, gemini, augment, windsurf, codex.
110110
-w Write rules to agent's config file and output only task to stdout. Requires agent (via task or -a flag).
111111
```
112112

SLIDES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ coding-context -s languages=go -s stage=implementation implement-feature
180180
| `-C <dir>` | Change to directory before doing anything |
181181
| `-p key=value` | Parameter to substitute in the prompt |
182182
| `-s key=value` | Include rules with matching frontmatter |
183-
| `-a <agent>` | Target agent (excludes that agent's own rules) |
183+
| `-a <agent>` | Target agent (for -w flag) |
184184
| `-d <path>` | Remote directory with rules (git::, http://, s3::) |
185185
| `-m <url>` | URL to manifest file with search paths |
186186
| `-r` | Resume mode: skip rules, select resume task |

docs/explanation/architecture.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ The CLI searches for rule files in predetermined locations:
5454

5555
```
5656
Search paths (in order):
57-
1. Project-specific: ./.agents/rules/, ./.cursor/rules/, etc.
58-
2. Parent directories: ../AGENTS.md, ../../AGENTS.md, etc.
59-
3. User-specific: ~/.agents/rules/, ~/.claude/CLAUDE.md, etc.
57+
1. Directories specified via -d flags (in order)
58+
2. Working directory (automatically added): ./.agents/rules/, ./.cursor/rules/, etc.
59+
3. User home directory (automatically added): ~/.agents/rules/, ~/.claude/CLAUDE.md, etc.
6060
```
6161

6262
For each location:
@@ -155,22 +155,23 @@ Fix bug: BUG-123
155155
Description: Crashes
156156
```
157157

158-
Parameter substitution uses environment variable expansion syntax, allowing:
159-
- Simple substitution: `${var}`
160-
- Default values: `${var:-default}`
161-
- Error on unset: `${var:?error message}`
158+
If a parameter is not found, the placeholder remains unchanged (e.g., `${missing}` stays as `${missing}`).
162159

163160
### 9. Assemble Output
164161

165162
Combine all pieces in order:
166163

167164
```
168-
1. All included rule files (content only, no frontmatter)
169-
2. Task content (with parameters substituted)
165+
1. Task frontmatter (YAML format, automatically included if present)
166+
2. All included rule files (content only, no frontmatter)
167+
3. Task content (with parameters substituted)
170168
```
171169

172170
**Example output:**
173-
```markdown
171+
```yaml
172+
---
173+
resume: false
174+
---
174175
# Go Coding Standards
175176

176177
- Use gofmt

docs/reference/file-formats.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,12 @@ coding-context -s languages=go task # Matches languages: [ go ]
798798

799799
## Special Behaviors
800800

801-
### Multiple Tasks with Same `task_name`
801+
### Multiple Tasks with Same Filename
802802

803-
If multiple task files have the same `task_name`, selectors determine which one is used.
803+
If multiple task files have the same filename (without `.md` extension) in different search path directories, selectors determine which one is used. Remember, tasks are matched by filename, not by the `task_name` field in frontmatter.
804804

805805
**Without selectors:**
806-
- Error: "multiple tasks found with task_name: X"
806+
- Error: "multiple tasks found with name: X"
807807

808808
**With selectors:**
809809
- The task matching all selectors is used

0 commit comments

Comments
 (0)