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
feat!: namespaces, lint mode, and markdown-aware task parsing
Add multi-team isolation via namespaces, dry-run lint validation, and
goldmark-based parsing so slash commands inside code blocks are ignored.
Namespaces:
- Support namespace/taskname syntax (e.g. myteam/fix-bug) for shared .agents/
- Tasks, rules, commands, and skills under .agents/namespaces/<team>/
- Namespace assets take precedence over global; rules and skills merge
- Add docs/how-to/use-namespaces.md and namespace selector in rule frontmatter
Lint mode:
- Run context assembly without bootstrap or shell execution
- Track loaded files and collect structural errors (parse, missing commands,
skill validation, selector mismatches) in LintResult
- Add WithLint() option, ListTasks(), and include_unmatched task frontmatter
- Parse errors include line/column; selector/command errors use task path
Task parser:
- Integrate goldmark Extension for AST-based code range detection
- Slash commands in fenced, indented, and HTML code blocks no longer detected
- ParseMarkdownFile populates Markdown.Task; re-parse only on content change
Infrastructure:
- Enable golangci-lint with comprehensive linter configuration
- Fix lint issues across codebase (revive, gosec, wrapcheck, etc.)
- Add t.Parallel() to tests; expand test coverage
- Documentation corrections and new how-to guides.
Go Getter URL to a manifest file containing search paths (one per line). Every line is included as-is.
159
160
-p value
160
161
Parameter to substitute in the prompt. Can be specified multiple times as key=value.
161
-
-r Resume mode: skip outputting rules and select task with 'resume: true' in frontmatter.
162
+
-r Resume mode: set 'resume=true' selector to filter tasks by their frontmatter resume field. Does not skip rules; use --skip-bootstrap to skip rule discovery.
162
163
-s value
163
164
Include rules with matching frontmatter. Can be specified multiple times as key=value.
164
165
Note: Only matches top-level YAML fields in frontmatter.
165
166
-a string
166
167
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.
167
168
-w Write rules to agent's config file and output only task to stdout. Requires agent (via task or -a flag).
169
+
--skip-bootstrap
170
+
Skip discovering rules, skills, and running bootstrap scripts.
168
171
```
169
172
170
173
### Examples
@@ -325,6 +328,57 @@ coding-context \
325
328
/implement-feature
326
329
```
327
330
331
+
## Namespaces
332
+
333
+
Namespaces let multiple teams share a single `.agents/` directory without conflicts. Select a namespace by prefixing the task name with `namespace/`:
334
+
335
+
```bash
336
+
# Global task (existing behaviour)
337
+
coding-context fix-bug
338
+
339
+
# Namespaced task — activates the "myteam" namespace
340
+
coding-context myteam/fix-bug
341
+
```
342
+
343
+
**Directory structure:**
344
+
345
+
```
346
+
.agents/
347
+
├── tasks/ # Global tasks
348
+
├── rules/ # Global rules (always included)
349
+
├── commands/ # Global commands
350
+
├── skills/ # Global skills
351
+
└── namespaces/ # Namespace root (new)
352
+
├── myteam/
353
+
│ ├── tasks/ # Tasks accessed as "myteam/<name>"
354
+
│ ├── rules/ # Namespace rules (included first)
355
+
│ ├── commands/ # Override global commands
356
+
│ └── skills/
357
+
└── otherteam/
358
+
└── ...
359
+
```
360
+
361
+
**Resolution rules:**
362
+
-**Tasks**: Namespace directory first, falls back to global if not found
363
+
-**Rules**: Namespace rules included first, then all global rules (both always included)
364
+
-**Commands**: Namespace command wins over global command with the same name
365
+
-**Skills**: Namespace and global skills both discovered; namespace listed first
366
+
367
+
**Scoping rules to a namespace** — add `namespace: myteam` to a rule's frontmatter:
368
+
369
+
```markdown
370
+
---
371
+
namespace: myteam
372
+
---
373
+
# myteam Internal Standards
374
+
375
+
Only included for myteam/* tasks.
376
+
```
377
+
378
+
Rules with no `namespace` field are always included regardless of namespace.
379
+
380
+
For a complete guide, see [How to Use Namespaces](https://kitproj.github.io/coding-context-cli/how-to/use-namespaces).
381
+
328
382
## File Formats
329
383
330
384
### Task Files
@@ -438,23 +492,23 @@ The `expand` field works in:
438
492
439
493
### Resume Mode
440
494
441
-
Resume mode is designed for continuing work on a task where you've already established context. When using the `-r` flag:
495
+
Resume mode is designed for continuing work on a task where you've already established context. The `-r` flag adds a `resume=true` selector, which filters tasks to those with `resume: true` in their frontmatter.
442
496
443
-
1. **Rules are skipped**: All rule files are excluded from output, saving tokens and reducing context size
444
-
2. **Resume-specific task prompts are selected**: Automatically adds `-s resume=true` selector to find task files with `resume: true` in their frontmatter
497
+
**What the `-r` flag does:**
498
+
- Adds `-s resume=true` selector to find task files with `resume: true` in their frontmatter
445
499
446
-
This is particularly useful in agentic workflows where an AI agent has already been primed with rules and is continuing work from a previous session.
447
-
448
-
**The `-r` flag is shorthand for:**
449
-
- Adding `-s resume=true` selector
450
-
- Skipping all rules output
500
+
**What the `-r` flag does NOT do:**
501
+
- It does **not** skip rules or bootstrap scripts. To skip those, use `--skip-bootstrap`.
451
502
452
503
**Example usage:**
453
504
```bash
454
-
# Initial task invocation (includes all rules, uses task with resume: false)
505
+
# Initial task invocation (includes all rules and bootstrap)
455
506
coding-context -s resume=false fix-bug | ai-agent
456
507
457
-
# Resume the task (skips rules, uses task with resume: true)
508
+
# Resume the task with rules skipped (uses resume task, skips rules and bootstrap)
# Resume the task keeping rules (just selects the resume variant of the task)
458
512
coding-context -r fix-bug | ai-agent
459
513
```
460
514
@@ -482,7 +536,7 @@ Continue working on the bug fix.
482
536
Review your previous work and complete remaining tasks.
483
537
```
484
538
485
-
With this approach, you can have multiple task prompts for the same task name, differentiated by the `resume` frontmatter field. Use `-s resume=false` to select the initial task (with rules), or `-r` to select the resume task (without rules).
539
+
With this approach, you can have multiple task prompts for the same task name, differentiated by the `resume` frontmatter field. Use `-s resume=false` to select the initial task, or `-r` to select the resume task. Combine with `--skip-bootstrap` to also skip rules.
The frontmatter (with `selectors`, `languages`, etc.) is parsed and used to filter rules and control behavior, but it does not appear in the final output sent to the AI agent.
188
188
189
+
## Namespaced Tasks
190
+
191
+
If your project uses namespaces (multiple teams sharing `.agents/`), create team-specific tasks under `.agents/namespaces/<team>/tasks/`:
192
+
193
+
```
194
+
.agents/namespaces/myteam/tasks/build.md
195
+
```
196
+
197
+
Invoke with the `team/task` format:
198
+
199
+
```bash
200
+
coding-context myteam/build
201
+
```
202
+
203
+
If the task file doesn't exist in the namespace directory, the tool automatically falls back to `.agents/tasks/build.md`.
204
+
205
+
See [How to Use Namespaces](./use-namespaces) for a full guide including rules, commands, and skills.
206
+
189
207
## Best Practices
190
208
191
209
1.**Use descriptive task names**: Make them clear and specific
0 commit comments