diff --git a/README.md b/README.md index d8fabdc..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: @@ -208,12 +209,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 @@ -240,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 @@ -277,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:**