Commit 4c030f9
Add standard frontmatter fields with typed generic Markdown (metadata-only) (#122)
* Initial plan
* Add standard frontmatter fields for tasks and rules
- Implemented agent field as default selector (filters rules)
- Implemented language field as default selector (supports string or array)
- Added model, single_shot, timeout, mcp_servers as metadata fields
- Added comprehensive tests for all new functionality
- Updated documentation with detailed examples
- Added example files demonstrating standard fields
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Improve agent field handling consistency
Use type switching for agent field similar to language field for better consistency and code clarity
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Fix language casing, timeout format, agent behavior, and add types
- Changed all language examples from uppercase (Go, Python, JavaScript) to lowercase (go, python, javascript)
- Updated timeout field to use time.Duration format (e.g., "10m") instead of numeric seconds
- Fixed agent field behavior: now excludes agent's own directories (like -a flag) instead of acting as selector
- Added types.go with TaskFrontMatter and RuleFrontMatter struct definitions
- Updated all tests to reflect new behavior
- Updated documentation to correctly describe agent field behavior
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Add warning log for invalid agent names
Log a warning when an invalid agent name is found in task frontmatter to help users identify configuration issues
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Refactor FrontMatter to struct and split types into separate files
- Changed FrontMatter from type alias to struct with Content field
- Made TaskFrontMatter and RuleFrontMatter extend FrontMatter
- Split types into separate files (frontmatter.go, task_frontmatter.go, rule_frontmatter.go)
- Added MCP server config types in pkg/config package
- Updated all code and tests to work with new FrontMatter structure
- All tests passing
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Move MCP types from pkg/config to pkg/codingcontext
Moved all MCP server configuration types to pkg/codingcontext package as requested
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Make Markdown generic and update frontmatter types per review
- Made Markdown generic: Markdown[T any] with TaskMarkdown and RuleMarkdown type aliases
- Added NewFrontMatter() and NewTaskFrontMatter() constructor functions
- Deleted Config type from mcp_config.go as requested
- Removed ParseFrontmatter method (noop per review comment)
- Changed TaskFrontMatter.Language to Languages []string with yaml tag languages
- Changed RuleFrontMatter.TaskName to TaskNames []string with yaml tag task_names
- Changed RuleFrontMatter.Language to Languages []string with yaml tag languages
- Changed MCPServers to []MCPServerConfig in both frontmatter types
- Updated all tests to reflect new field names and types
- Updated example_test.go to work without ParseFrontmatter method
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Update docs/reference/file-formats.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Changes before error encountered
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Remove -a flag and add UnmarshalJSON for frontmatter types
- Removed -a flag from CLI as requested
- Added custom UnmarshalJSON methods to TaskFrontMatter and RuleFrontMatter
- Renamed FrontMatter to BaseFrontMatter (base struct)
- Updated all references throughout codebase
- Fixed test files to use correct field names
- All code compiles successfully
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Remove SyncToContent functions per review feedback
- Removed SyncToContent() methods from TaskFrontMatter and RuleFrontMatter
- Removed all calls to SyncToContent() in context.go
- Removed unused yaml imports from frontmatter files
- UnmarshalJSON already populates both typed fields and Content map, making sync functions unnecessary
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Remove automatic language filtering per review feedback
- Removed automatic filtering loop for languages field (lines 470-474)
- Languages field is now metadata only, does not filter rules
- Only the explicit selectors field filters rules
- Updated comments to clarify languages is metadata-only
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Refactor per review feedback: remove Path field, simplify agent handling, constrain Markdown generic
- Removed Path field from Markdown struct (unreachable/unused)
- Removed BootstrapPath() method (unreachable code)
- Changed Markdown[T any] to Markdown[T FrontMatter] for type constraint
- Removed agent default behavior check - agent field now always sets target agent when present
- Removed unused filepath and strings imports from result.go
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Refactor: task matching and resume handling
- Task names now based on filename instead of task_name frontmatter field
- Removed resume flag (-r), resume is now a selector (-s resume=true)
- Tasks no longer have bootstrap scripts (only rules do)
- Language field is metadata only, not automatically added as selector
- Updated all tests to reflect these changes
* Reinstate -r flag and add WithResume option
- Reinstated -r flag in main.go that was removed
- Added WithResume option to codingcontext package
- Updated findExecuteRuleFiles to check cc.resume directly
- Added comprehensive tests for resume mode including bootstrap script verification
- Resume mode now properly skips all rule discovery and bootstrap scripts
* feat: reinstate -a flag and merge TargetAgent into Agent
- Reinstated -a flag for specifying target agent
- Merged TargetAgent type into Agent type
- Renamed targetAgent field to agent throughout codebase
- Agent type now handles both agent identification and exclusion logic
- Task frontmatter agent field overrides -a flag when set
- Excludes agent-specific paths and rules with matching agent field
* feat: add MCPServers method to Result
- Added Result.MCPServers() method to collect all MCP servers
- Collects servers from both task and all included rules
- Task servers included first, followed by rule servers
- Added comprehensive tests for various scenarios
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alex Collins <alex_collins@intuit.com>1 parent 668c728 commit 4c030f9
24 files changed
Lines changed: 1792 additions & 683 deletions
File tree
- docs/reference
- examples/agents
- rules
- tasks
- pkg/codingcontext
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 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 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
48 | 200 | | |
49 | 201 | | |
50 | 202 | | |
| |||
75 | 227 | | |
76 | 228 | | |
77 | 229 | | |
78 | | - | |
| 230 | + | |
79 | 231 | | |
80 | 232 | | |
81 | 233 | | |
82 | 234 | | |
83 | 235 | | |
84 | 236 | | |
85 | | - | |
| 237 | + | |
86 | 238 | | |
87 | 239 | | |
88 | 240 | | |
89 | 241 | | |
90 | 242 | | |
91 | | - | |
| 243 | + | |
92 | 244 | | |
93 | 245 | | |
94 | 246 | | |
| |||
104 | 256 | | |
105 | 257 | | |
106 | 258 | | |
107 | | - | |
| 259 | + | |
108 | 260 | | |
109 | 261 | | |
110 | 262 | | |
| |||
113 | 265 | | |
114 | 266 | | |
115 | 267 | | |
116 | | - | |
| 268 | + | |
117 | 269 | | |
118 | 270 | | |
119 | 271 | | |
| |||
186 | 338 | | |
187 | 339 | | |
188 | 340 | | |
189 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
190 | 347 | | |
191 | 348 | | |
192 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
193 | 431 | | |
194 | 432 | | |
195 | 433 | | |
196 | | - | |
| 434 | + | |
| 435 | + | |
197 | 436 | | |
198 | 437 | | |
199 | 438 | | |
| |||
282 | 521 | | |
283 | 522 | | |
284 | 523 | | |
285 | | - | |
| 524 | + | |
286 | 525 | | |
287 | 526 | | |
288 | 527 | | |
289 | 528 | | |
290 | 529 | | |
291 | 530 | | |
292 | | - | |
| 531 | + | |
293 | 532 | | |
294 | 533 | | |
295 | 534 | | |
296 | 535 | | |
297 | 536 | | |
298 | 537 | | |
299 | 538 | | |
300 | | - | |
| 539 | + | |
301 | 540 | | |
302 | 541 | | |
303 | | - | |
| 542 | + | |
304 | 543 | | |
305 | 544 | | |
306 | 545 | | |
| |||
311 | 550 | | |
312 | 551 | | |
313 | 552 | | |
314 | | - | |
| 553 | + | |
315 | 554 | | |
316 | 555 | | |
317 | 556 | | |
318 | 557 | | |
319 | 558 | | |
320 | 559 | | |
321 | 560 | | |
322 | | - | |
| 561 | + | |
323 | 562 | | |
324 | 563 | | |
325 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments