-
Notifications
You must be signed in to change notification settings - Fork 1
Fix documentation inconsistencies with code implementation #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
…flag Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
docs/reference/search-paths.md
Outdated
| coding-context /review-code → Uses ./.opencode/command/review-code.md (from working directory) | ||
| coding-context /deploy → Uses ./.opencode/command/deploy.md (from working directory) | ||
| coding-context /code-review → Uses ~/.agents/tasks/code-review.md (from home directory) | ||
| coding-context /code-review → Uses ./.agents/tasks/code-review.md (from working directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot these slashes are not supported anymore.
| coding-context /code-review → Uses ./.agents/tasks/code-review.md (from working directory) | |
| coding-context code-review → Uses ./.agents/tasks/code-review.md (from working directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f0ca541. Removed slash prefix from all task invocation examples throughout the documentation. Tasks are now invoked as coding-context fix-bug (no slash). Slash commands with arguments still use the quoted form: coding-context "/fix-bug 123".
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes documentation inconsistencies with the code implementation, focusing on task invocation syntax, search path separation, frontmatter field names, and language standardization. However, several issues remain that need to be addressed.
Key Changes
- Task invocation syntax: Removed slash prefix from simple task invocations (e.g.,
coding-context fix-buginstead ofcoding-context /fix-bug) - Search path separation: Clarified that tasks are only in
.agents/tasks/, while commands are in.agents/commands/,.cursor/commands/,.opencode/command/ - Manifest flag: Documented the previously undocumented
-mflag for loading search paths from a manifest file - Language field standardization: Standardized on lowercase language values with
languages(plural) field
Critical Issues Found
-
task_name vs task_names mismatch (file-formats.md:398): The documentation states rules "should match" the selector, but this is misleading. The code sets selector
task_name(singular) while rules use frontmatter fieldtask_names(plural), preventing task-based rule filtering from working. -
Inconsistent task invocation syntax: Multiple examples throughout README.md and docs/reference/cli.md still use slash prefix (e.g.,
/implement-feature) when they should use simple names (e.g.,implement-feature). -
Markdown syntax error (search-paths.md:61): Extra closing code fence creates malformed markdown.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/reference/search-paths.md | Separated task and command search paths; updated discovery examples; clarified task matching by filename; fixed agent table notes |
| docs/reference/file-formats.md | Changed task_name to task_names in rule frontmatter documentation; updated task invocation examples; documented task_name/task_names mismatch |
| docs/reference/cli.md | Separated task name from slash command syntax; documented -m manifest flag; updated examples |
| docs/how-to/use-with-ai-agents.md | Updated task invocation syntax throughout examples |
| docs/how-to/use-selectors.md | Updated task invocation examples to remove slash prefix |
| docs/how-to/create-tasks.md | Updated task invocation examples |
| docs/explanation/architecture.md | Clarified task matching by filename instead of frontmatter |
| docs/explanation/agentic-workflows.md | Updated task invocation example |
| README.md | Documented -m flag; separated tasks from commands in search paths; standardized language field to lowercase plural format; updated file location lists |
| coding-context -m https://example.com/manifest.txt /fix-bug | ||
|
|
||
| # Combine manifest with additional directories | ||
| coding-context \ | ||
| -m https://example.com/manifest.txt \ | ||
| -d git::https://github.com/company/extra-rules.git \ | ||
| /fix-bug |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples use slash prefix for simple task invocation, which is inconsistent with the corrected syntax throughout the rest of the PR. Simple task names should not have a slash prefix.
Should be:
# Load search paths from a manifest file
coding-context -m https://example.com/manifest.txt fix-bug
# Combine manifest with additional directories
coding-context \
-m https://example.com/manifest.txt \
-d git::https://github.com/company/extra-rules.git \
fix-bug| coding-context -m https://example.com/manifest.txt /fix-bug | |
| # Combine manifest with additional directories | |
| coding-context \ | |
| -m https://example.com/manifest.txt \ | |
| -d git::https://github.com/company/extra-rules.git \ | |
| /fix-bug | |
| coding-context -m https://example.com/manifest.txt fix-bug | |
| # Combine manifest with additional directories | |
| coding-context \ | |
| -m https://example.com/manifest.txt \ | |
| -d git::https://github.com/company/extra-rules.git \ | |
| fix-bug |
| ``` | ||
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra closing code fence (```) at line 61 that creates malformed markdown. The code block already ends at line 60 with the closing triple backticks. This line should be removed.
| ``` |
| - Rules without `task_name` are included for all tasks (generic rules) | ||
| - The task's own `task_name` is automatically added as a selector | ||
| - When a task is run (e.g., `coding-context fix-bug`), the task name `fix-bug` is automatically added as a selector `task_name=fix-bug` (singular) | ||
| - Rules with `task_names: [ fix-bug ]` (plural) should match this selector |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The statement "Rules with task_names: [ fix-bug ] (plural) should match this selector" is misleading. Based on the code implementation:
- When a task runs, it sets selector
task_name=fix-bug(singular) - seecontext.go:156 - The selector matching logic looks for key
task_namein the frontmatter Content map - Rules with
task_names(plural) in frontmatter won't match because the key names don't match
This means the current code cannot match rules by task names. The field name mismatch (task_name selector vs task_names frontmatter field) prevents filtering from working as documented.
Suggest either:
- Changing line 398 to clarify this is currently broken: "Rules with
task_names: [ fix-bug ](plural) will NOT match this selector due to field name mismatch" - Or documenting a workaround if one exists
| - Rules with `task_names: [ fix-bug ]` (plural) should match this selector | |
| - **Rules with `task_names: [ fix-bug ]` (plural) will NOT match this selector due to a field name mismatch.** Only rules with a top-level `task_name: fix-bug` field will match. This is a known limitation. |
| coding-context -s languages=python /fix-bug | ||
|
|
||
| # Work on JavaScript code with JavaScript-specific rules | ||
| coding-context -s language=JavaScript /enhance-feature | ||
| ``` | ||
|
|
||
| **Common Linguist Languages** | ||
|
|
||
| When using language selectors, use the exact language names as defined by [GitHub Linguist](https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml). Here are common languages with correct capitalization: | ||
|
|
||
| - **C**: `C` | ||
| - **C#**: `C#` | ||
| - **C++**: `C++` | ||
| - **CSS**: `CSS` | ||
| - **Dart**: `Dart` | ||
| - **Elixir**: `Elixir` | ||
| - **Go**: `Go` | ||
| - **Haskell**: `Haskell` | ||
| - **HTML**: `HTML` | ||
| - **Java**: `Java` | ||
| - **JavaScript**: `JavaScript` | ||
| - **Kotlin**: `Kotlin` | ||
| - **Lua**: `Lua` | ||
| - **Markdown**: `Markdown` | ||
| - **Objective-C**: `Objective-C` | ||
| - **PHP**: `PHP` | ||
| - **Python**: `Python` | ||
| - **Ruby**: `Ruby` | ||
| - **Rust**: `Rust` | ||
| - **Scala**: `Scala` | ||
| - **Shell**: `Shell` | ||
| - **Swift**: `Swift` | ||
| - **TypeScript**: `TypeScript` | ||
| - **YAML**: `YAML` | ||
|
|
||
| Note the capitalization - for example, use `Go` not `go`, `JavaScript` not `javascript`, and `TypeScript` not `typescript`. | ||
| coding-context -s languages=javascript /enhance-feature |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples still use slash prefix for simple task invocation, which is inconsistent with the changes throughout the rest of the PR. According to the PR changes, simple task names should not have a slash prefix.
Should be:
# Work on Python code with Python-specific rules
coding-context -s languages=python fix-bug
# Work on JavaScript code with JavaScript-specific rules
coding-context -s languages=javascript enhance-feature| This is equivalent to: | ||
| ```bash | ||
| coding-context -s language=Go -s stage=implementation /implement-feature | ||
| coding-context -s languages=go -s stage=implementation /implement-feature |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example still uses slash prefix for simple task invocation, which is inconsistent with the corrected syntax shown at line 308 and throughout the rest of the PR. Simple task names should not have a slash prefix.
Should be:
coding-context -s languages=go -s stage=implementation implement-feature| coding-context -s languages=go -s stage=implementation /implement-feature | |
| coding-context -s languages=go -s stage=implementation implement-feature |
| # Command adds: -s priority=high | ||
| # Result: includes rules matching language=Go AND priority=high | ||
| # Result: includes rules matching languages=go AND priority=high | ||
| coding-context -s priority=high /implement-feature |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example still uses slash prefix for simple task invocation, which is inconsistent with the corrected syntax throughout the rest of the PR. Simple task names should not have a slash prefix.
Should be:
# Task has: selectors.languages = go
# Command adds: -s priority=high
# Result: includes rules matching languages=go AND priority=high
coding-context -s priority=high implement-feature| coding-context -s priority=high /implement-feature | |
| coding-context -s priority=high implement-feature |
| # These are equivalent: | ||
| coding-context /implement-feature # (task has agent: cursor) | ||
| coding-context implement-feature # (task has agent: cursor) | ||
| coding-context -a cursor /implement-feature |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example still uses slash prefix for simple task invocation, which is inconsistent with the corrected syntax at line 202. Simple task names should not have a slash prefix.
Should be:
coding-context -a cursor implement-feature| coding-context -a cursor /implement-feature | |
| coding-context -a cursor implement-feature |
Documentation incorrectly described task matching, search paths, and frontmatter field names. Several features were undocumented.
Changes
Task search paths - Separated tasks from commands
.agents/tasks/(matched by filename).agents/commands/,.cursor/commands/,.opencode/command/(referenced via slash commands inside tasks, not invoked directly)Rule frontmatter field - Corrected field name
task_name(singular)task_names(plural, as implemented in code)Manifest flag - Documented previously undocumented
-mflagLanguage field standardization - Consistent naming
languages(plural) with lowercase values:languages: [ go, python ]Task matching clarifications - Reinforced throughout docs
.md), nottask_namefrontmatter fieldTask invocation syntax - Corrected throughout all documentation
coding-context fix-bug(no slash prefix)coding-context "/fix-bug 123"(quoted, with slash)Potential Issue
Code sets
task_name(singular) selector when running tasks, but rule frontmatter usestask_names(plural) field. Array matching may not work as expected - documented for future investigation.Files Modified
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.