Skip to content

Commit b4935bc

Browse files
authored
Merge pull request #3 from brickhouse-tech/feat/improvements-batch
feat: batch improvements — new targets, watch, import, hook, templates, LICENSE
2 parents 65488ed + 5cf1831 commit b4935bc

7 files changed

Lines changed: 498 additions & 54 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Brickhouse Tech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# sync-agents
22

3-
One set of agent rules to rule them all. `sync-agents` keeps your AI coding agent configurations in a single `.agents/` directory and syncs them to agent-specific directories (`.claude/`, `.windsurf/`) via symlinks. This ensures all agents follow the same rules, skills, and workflows without duplicating files.
3+
One set of agent rules to rule them all. `sync-agents` keeps your AI coding agent configurations in a single `.agents/` directory and syncs them to agent-specific directories (`.claude/`, `.windsurf/`, `.cursor/`, `.github/copilot/`) via symlinks. This ensures all agents follow the same rules, skills, and workflows without duplicating files.
44

55
AGENTS.md serves as an auto-generated index of everything in `.agents/` and is symlinked to CLAUDE.md for Claude compatibility.
66

77
## Installation
88

9+
### npm
10+
911
```bash
1012
npm install @brickhouse-tech/sync-agents
1113
```
@@ -16,6 +18,13 @@ or globally:
1618
npm install -g @brickhouse-tech/sync-agents
1719
```
1820

21+
### Standalone (no npm required)
22+
23+
```bash
24+
curl -fsSL https://raw.githubusercontent.com/brickhouse-tech/sync-agents/main/src/sh/sync-agents.sh -o /usr/local/bin/sync-agents
25+
chmod +x /usr/local/bin/sync-agents
26+
```
27+
1928
## Topology
2029

2130
`.agents/` is the source of truth. It contains all rules, skills, workflows, and state for your agents:
@@ -37,7 +46,7 @@ npm install -g @brickhouse-tech/sync-agents
3746
└── STATE.md
3847
```
3948

40-
Running `sync-agents sync` creates symlinks from `.agents/` subdirectories into `.claude/` and `.windsurf/`. Any changes to `.agents/` are automatically reflected in the target directories because they are symlinks, not copies.
49+
Running `sync-agents sync` creates symlinks from `.agents/` subdirectories into `.claude/`, `.windsurf/`, `.cursor/`, and `.github/copilot/`. Any changes to `.agents/` are automatically reflected in the target directories because they are symlinks, not copies.
4150

4251
AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively.
4352

@@ -50,7 +59,10 @@ AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively
5059
| Command | Description |
5160
|---|---|
5261
| `init` | Initialize the `.agents/` directory structure with `rules/`, `skills/`, `workflows/`, `STATE.md`, and generate `AGENTS.md` |
53-
| `sync` | Create symlinks from `.agents/` into `.claude/` and `.windsurf/`, and symlink `AGENTS.md` to `CLAUDE.md` |
62+
| `sync` | Create symlinks from `.agents/` into all target directories, and symlink `AGENTS.md` to `CLAUDE.md` |
63+
| `watch` | Watch `.agents/` for changes and auto-regenerate `AGENTS.md` |
64+
| `import <url>` | Import a rule/skill/workflow from a URL |
65+
| `hook` | Install a pre-commit git hook for auto-sync |
5466
| `status` | Show the current sync status of all targets and symlinks |
5567
| `add <type> <name>` | Add a new rule, skill, or workflow from a template (type is `rule`, `skill`, or `workflow`) |
5668
| `index` | Regenerate `AGENTS.md` by scanning the contents of `.agents/` |
@@ -63,7 +75,7 @@ AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively
6375
| `-h`, `--help` | Show help message |
6476
| `-v`, `--version` | Show version |
6577
| `-d`, `--dir <path>` | Set project root directory (default: current directory) |
66-
| `--targets <list>` | Comma-separated list of sync targets (default: `claude,windsurf`) |
78+
| `--targets <list>` | Comma-separated list of sync targets (default: `claude,windsurf,cursor,copilot`) |
6779
| `--dry-run` | Show what would be done without making changes |
6880
| `--force` | Overwrite existing files and symlinks |
6981

src/md/SKILL_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
trigger: always_on
3+
---
4+
5+
# ${NAME}
6+
7+
## Description
8+
9+
Brief description of what this skill enables.
10+
11+
## Usage
12+
13+
When to use this skill and how to invoke it.
14+
15+
## Examples
16+
17+
```
18+
Example usage or invocation here.
19+
```
20+
21+
## Notes
22+
23+
Any caveats, prerequisites, or related skills.

src/md/STATE_TEMPLATE.md

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,16 @@
1-
21
---
32
trigger: always_on
43
---
54

65
# State
76

8-
This is the state template for sync-agents. It is used to define the state of the agent and its environment. The state markdown file itself is a human readble source for the agent to read and understand its current situation. It can be used to track the progress of the agent, identify any issues or challenges it may be facing, and provide a clear overview of its goals and objectives. The state is an important tool for the agent to use in order to make informed decisions and take appropriate actions to achieve its goals. By maintaining an up-to-date state, the agent can continuously learn and evolve, becoming more effective and efficient in its tasks.
9-
10-
The goal is to improve the performance of the agent by providing it with a clear and structured representation of its current situation. This allows the agent to make informed decisions and take appropriate actions to achieve its goals. The state is also used to track the progress of the agent and identify any issues or areas for improvement. By maintaining an up-to-date state, the agent can continuously learn and evolve, becoming more effective and efficient in its xtasks.
11-
12-
## TRACKING Agent State
13-
14-
Every state tracking will begin with a header of `### YYYYMMDDHHMMSS STATE: <STATE_NAME or OBJECTIVE` followed by a description of the state, any relevant information about the agent's performance, issues, or updates, and any actions taken or planned to address the current state. This format allows for easy tracking and monitoring of the agent's progress over time, as well as providing a clear record of the agent's history and development. By maintaining a detailed and organized state history, the agent can learn from past experiences and make informed decisions to improve its performance in the future.>
15-
16-
The format above will be written below the `## STATE HISTORY BELOW` header in the STATE.md file. This allows for easy tracking and monitoring of the agent's progress over time, as well as providing a clear record of the agent's history and development. By maintaining a detailed and organized state history, the agent can learn from past experiences and make informed decisions to improve its performance in the future.
17-
18-
## Formatted Agent State
7+
Track project progress, current objectives, and resumption context.
8+
Update this file regularly so agents can pick up where they left off.
199

20-
The formatted agent state will be a structured representation of the agent's current situation, including its goals, objectives, performance metrics, and any relevant information about its environment. This formatted state will be used by the agent to make informed decisions and take appropriate actions to achieve its goals. By maintaining an up-to-date and well-structured formatted state, the agent can continuously learn and evolve, becoming more effective and efficient in its tasks. The formatted state will also be used to track the progress of the agent and identify any issues or areas for improvement, allowing for continuous optimization of the agent's performance.
10+
## Format
2111

22-
Example:
12+
### YYYYMMDDHHMMSS STATE: <objective>
2313

24-
The state is structured as follows:
25-
26-
```json
27-
{
28-
"agent_name": "string",
29-
"goals": ["string"],
30-
"skills": ["string"],
31-
"workflows": ["string"],
32-
"issues": ["string"],
33-
"last_updated": "timestamp"
34-
}
35-
```
36-
to `.agents/state.json`
14+
Description of current state, progress, blockers, and next steps.
3715

3816
## STATE HISTORY BELOW
39-
40-
41-
42-

src/md/WORKFLOW_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
trigger: always_on
3+
---
4+
5+
# ${NAME}
6+
7+
## Trigger
8+
9+
Describe when this workflow should be activated.
10+
11+
## Steps
12+
13+
1. Step one
14+
2. Step two
15+
3. Step three
16+
17+
## Conditions
18+
19+
- Pre-conditions that must be met
20+
- Any guards or checks
21+
22+
## Output
23+
24+
What the workflow produces or changes when complete.

0 commit comments

Comments
 (0)