From c1aa4ec02ec4dbd040da1563aa8767982e92defc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 18:36:29 +0000 Subject: [PATCH 1/3] Initial plan From 306c2ddd4926f10ec2883e97a52ba218ba3660b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 18:43:22 +0000 Subject: [PATCH 2/3] Document skills in README "How It Works" section Updated the "How It Works" section to include skill discovery in step 4 and clarified the output order in step 9. The actual output order is: rules -> skills -> task, which now matches the documentation. Fixes issue where skills were not mentioned in the workflow documentation. Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d8fabdc..66947c3 100644 --- a/README.md +++ b/README.md @@ -208,12 +208,13 @@ The tool assembles the context in the following order: 1. **Rule Files**: It searches for rule files (`.md` or `.mdc`) in directories specified via `-d` flags and automatically-added working directory and home directory. 2. **Rule Bootstrap Scripts**: For each rule file found (e.g., `my-rule.md`), it looks for an executable script named `my-rule-bootstrap`. If found, it runs the script before processing the rule file. These scripts are meant for bootstrapping the environment (e.g., installing tools) and their output is sent to `stderr`, not into the main context. 3. **Filtering**: If `-s` (include) flag is used, it parses the YAML frontmatter of each rule file to decide whether to include it. Note that selectors can only match top-level YAML fields (e.g., `language: go`), not nested fields. -4. **Task Prompt**: It searches for a task file matching the filename (without `.md` extension). Tasks are matched by filename, not by `task_name` in frontmatter. If selectors are provided with `-s`, they are used to filter between multiple task files with the same filename. -5. **Task Bootstrap Script**: For the task file found (e.g., `fix-bug.md`), it looks for an executable script named `fix-bug-bootstrap`. If found, it runs the script before processing the task file. This allows task-specific environment setup or data preparation. -6. **User Prompt Appending**: If a user-prompt argument is provided, it is appended to the task content after a delimiter (`---`). -7. **Parameter Expansion**: It substitutes variables in the task prompt and user-prompt using the `-p` flags. -8. **Output**: It prints the content of all included rule files, followed by the expanded task prompt, to standard output. -9. **Token Count**: A running total of estimated tokens is printed to standard error. +4. **Skill Discovery**: It searches for skill directories (`.agents/skills/*/SKILL.md`) and loads only their metadata (name and description) for progressive disclosure. Skills can be filtered by selectors just like rules. +5. **Task Prompt**: It searches for a task file matching the filename (without `.md` extension). Tasks are matched by filename, not by `task_name` in frontmatter. If selectors are provided with `-s`, they are used to filter between multiple task files with the same filename. +6. **Task Bootstrap Script**: For the task file found (e.g., `fix-bug.md`), it looks for an executable script named `fix-bug-bootstrap`. If found, it runs the script before processing the task file. This allows task-specific environment setup or data preparation. +7. **User Prompt Appending**: If a user-prompt argument is provided, it is appended to the task content after a delimiter (`---`). +8. **Parameter Expansion**: It substitutes variables in the task prompt and user-prompt using the `-p` flags. +9. **Output**: It prints the content of all included rule files, followed by available skills metadata (as XML for progressive disclosure), followed by the expanded task prompt, to standard output. +10. **Token Count**: A running total of estimated tokens is printed to standard error. ### File Search Paths From 636cb194306a1d49e822138069a2a7f1c81d7c06 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Dec 2025 18:54:46 +0000 Subject: [PATCH 3/3] Fix additional README errors - mention skills in examples Updated README to consistently mention skills alongside rules and tasks: - Example command output description now includes skills discovery step - "Print combined context" now shows (rules + skills + task) order - Remote directory descriptions now mention rules, skills, and tasks - Directory structure examples now include .agents/skills Addresses feedback to correct more errors in the README. Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 66947c3..82bf5c7 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Options: -C string Change to directory before doing anything. (default ".") -d value - Remote directory containing rules and tasks. Can be specified multiple times. Supports various protocols via go-getter (http://, https://, git::, s3::, etc.). + Remote directory containing rules, skills, and tasks. Can be specified multiple times. Supports various protocols via go-getter (http://, https://, git::, s3::, etc.). -m string Go Getter URL to a manifest file containing search paths (one per line). Every line is included as-is. -p value @@ -137,10 +137,11 @@ This command will: 1. Find a task file named `fix-bug.md` in the task search paths. 2. Find all rule files in the search paths. 3. Filter the rules based on selectors. -4. Execute any associated bootstrap scripts. -5. Substitute `${jira_issue_key}` with `PROJ-1234` in the task prompt. -6. Print the combined context (rules + task) to `stdout`. -7. Pipe the output to another program (in this case, `llm`). +4. Discover available skills and load their metadata. +5. Execute any associated bootstrap scripts. +6. Substitute `${jira_issue_key}` with `PROJ-1234` in the task prompt. +7. Print the combined context (rules + skills + task) to `stdout`. +8. Pipe the output to another program (in this case, `llm`). **Using remote directories:** ```bash @@ -152,8 +153,8 @@ coding-context \ This command will: 1. Download remote directories using go-getter -2. Search for rules and tasks in the downloaded directories -3. Combine them with local rules and tasks +2. Search for rules, skills, and tasks in the downloaded directories +3. Combine them with local rules, skills, and tasks 4. Apply the same processing as with local files The `-d` flag supports various protocols via go-getter: @@ -241,7 +242,7 @@ The tool searches for a variety of files and directories, including: ### Remote File System Support -The tool supports loading rules and tasks from remote locations via HTTP/HTTPS URLs. This enables: +The tool supports loading rules, skills, and tasks from remote locations via HTTP/HTTPS URLs. This enables: - **Shared team guidelines**: Host coding standards on a central server - **Organization-wide rules**: Distribute common rules across multiple projects @@ -278,7 +279,7 @@ coding-context \ - Remote directories are downloaded to a temporary location - Bootstrap scripts work in downloaded directories - Downloaded directories are cleaned up after execution -- Supports all standard directory structures (`.agents/rules`, `.agents/tasks`, etc.) +- Supports all standard directory structures (`.agents/rules`, `.agents/skills`, `.agents/tasks`, etc.) **Example: Using a Git repository:**