Skip to content

Commit 28e1589

Browse files
authored
Merge pull request #10 from sampleXbro/develop
Develop
2 parents 4adc9ba + 5db8502 commit 28e1589

42 files changed

Lines changed: 689 additions & 831 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/rules/general.md

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,91 +2,72 @@
22

33
## Session Start
44

5-
- **Always** read `tasks/lessons.md` at the beginning of each session before doing any work
6-
- Apply relevant lessons to the current task
5+
- Read `tasks/lessons.md` before doing any work. Apply relevant lessons.
76

8-
## Workflow Orchestration
7+
## Workflow
98

10-
### 1. Plan Node Default
9+
### Planning
1110

12-
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
13-
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
14-
- Use plan mode for verification steps, not just building
15-
- Write detailed specs upfront to reduce ambiguity
11+
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions). Write plan to `tasks/todo.md`.
12+
- If something goes sideways, STOP and re-plan — don't keep pushing.
13+
- Check in before starting implementation. Mark items complete as you go.
1614

17-
### 2. Subagent Strategy
15+
### Subagents
1816

19-
- Use subagents liberally to keep main context window clean
20-
- Offload research, exploration, and parallel analysis to subagents
21-
- For complex problems, throw more compute at it via subagents
22-
- One tack per subagent for focused execution
17+
- Use subagents liberally for research, exploration, and parallel analysis. One tack per subagent.
2318

24-
### 3. Self-Improvement Loop
19+
### Lessons
2520

26-
- **When to amend** `tasks/lessons.md`: whenever something turns out wrong — user correction, test failure, CI failure, code review feedback, or any other signal that a mistake was made
27-
- **How to amend**: add a bullet with (1) what went wrong, (2) the root cause, (3) a rule that prevents the same mistake
28-
- **Best practice for AI agents**: updating lessons is the primary way to persist learning across sessions; agents lack long-term memory, so `tasks/lessons.md` is the project-specific memory that reduces repeated mistakes
29-
- Write rules for yourself that prevent the same mistake
30-
- Ruthlessly iterate on these lessons until mistake rate drops
31-
- Review lessons at session start for relevant project
21+
- **When**: user correction, test failure, CI failure, code review feedback, or any other mistake signal.
22+
- **How**: add a bullet to `tasks/lessons.md` with (1) what went wrong, (2) root cause, (3) a rule that prevents recurrence.
23+
- This is the primary cross-session memory — ruthlessly iterate until mistake rate drops.
3224

33-
### 4. Verification Before Done
25+
### Verification
3426

35-
- Never mark a task complete without proving it works
36-
- **After every feature/story completion**: Use the `post-feature-qa` skill (`.agents/skills/post-feature-qa/`) — run the QA checklist, ensure tests cover edge cases and implementation aligns with the story, fix gaps before marking done
37-
- Diff behavior between main and your changes when relevant
27+
- Never mark a task complete without proving it works — run tests, check logs, demonstrate correctness.
28+
- After every feature/story: use `post-feature-qa` skill (`.agents/skills/post-feature-qa/`).
3829
- Ask yourself: "Would a staff engineer approve this?"
39-
- Run tests, check logs, demonstrate correctness
4030

41-
### 5. Demand Elegance (Balanced)
31+
### Elegance
4232

4333
- For non-trivial changes: pause and ask "is there a more elegant way?"
44-
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
45-
- Skip this for simple, obvious fixes - don't over-engineer
46-
- Challenge your own work before presenting it
34+
- Skip this for simple, obvious fixes — don't over-engineer.
4735

48-
### 6. Autonomous Bug Fixing
36+
### Bug Fixing
4937

50-
- When given a bug report: just fix it. Don't ask for hand-holding
51-
- Point at logs, errors, failing tests - then resolve them
52-
- Zero context switching required from the user
53-
- Go fix failing CI tests without being told how
54-
55-
## Task Management
56-
57-
1. **Plan First**: Write plan to `tasks/todo.md` with checkable items
58-
2. **Verify Plan**: Check in before starting implementation
59-
3. **Track Progress**: Mark items complete as you go
60-
4. **Explain Changes**: High-level summary at each step
61-
5. **Document Results**: Add review section to `tasks/todo.md`
62-
6. **Capture Lessons**: Update `tasks/lessons.md` after corrections — see "When to amend" and "How to amend" in Self-Improvement Loop above
38+
- When given a bug report: just fix it. Find root cause, point at logs/errors, resolve. Zero hand-holding.
6339

6440
## Skills
6541

66-
- **post-feature-qa** (`.agents/skills/post-feature-qa/`) — Apply after every feature or story implementation. Act as senior QA: verify test coverage for all edge cases and story alignment; produce QA report; fix gaps before claiming complete.
67-
- **add-agent-target** (`.agents/skills/add-agent-target/`) — Use when adding support for a new AI agent target. Requires current official-doc research, full import/generate implementation, rich realistic fixtures, complete unit/integration/e2e coverage, docs updates, and final QA.
42+
- **post-feature-qa** — Apply after every feature/story. Senior QA: verify edge-case coverage and story alignment.
43+
- **add-agent-target** — Use when adding a new AI agent target. Covers research, implementation, fixtures, full test coverage, docs.
6844

6945
## Core Principles
7046

71-
- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
47+
- **Simplicity**: Make every change as simple as possible. Only touch what's necessary.
7248
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
73-
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
7449

75-
## Project-Specific Rules
50+
## Project Rules
7651

77-
- **TDD mandatory**: Write failing tests FIRST, then implement. No exceptions.
52+
- **TDD mandatory**: Write failing tests FIRST, then implement.
7853
- **Max file size**: 200 lines. Split by responsibility if larger.
7954
- **No classes unless stateful**: Prefer pure functions + types.
8055
- **No `any`**: Use `unknown` + narrowing.
8156
- **Config source of truth**: `.agentsmesh/` directory. Generated files are artifacts.
8257
- **Test naming**: `{module}.test.ts` colocated with source. Integration tests in `tests/integration/`.
83-
- **Generated artifact tests must be strict**: For generated file structures, assert exact file paths, exact file counts, and exact referenced wrapper/script sets. Do not use loose checks like "at least one file", broad `some(...)`, or prefix-only path assertions when the full output set is known.
58+
- **Generated artifact tests must be strict**: Assert exact file paths, exact file counts, and exact referenced wrapper/script sets. No loose checks (`some(...)`, prefix-only, "at least one").
8459
- **Commit format**: conventional commits — `feat|fix|test|refactor(scope): message`
85-
- **README must stay current**: Any change to CLI commands, flags, config schema, supported targets, or canonical file formats **must** be reflected in `README.md` before the task is marked complete. Treat the README as part of the API surface.
86-
- **Website docs must stay current**: Any change to CLI commands, flags, config schema, supported targets, canonical file formats, or other user-facing behavior **must** also be reflected in the documentation website (`website/src/content/docs/`). The website is the primary public documentation — treat it with the same rigor as `README.md`.
60+
- **Docs must stay current**: Any change to CLI commands, flags, config schema, supported targets, or canonical file formats **must** be reflected in both `README.md` and the website (`website/src/content/docs/`) before the task is marked complete.
61+
- **Target data single source of truth** — do **not** hardcode target lists or support levels outside this chain:
62+
1. `src/targets/catalog/target-ids.ts` (`TARGET_IDS`) = canonical target ID list. Each target's `capabilities` in `src/targets/<name>/index.ts` = feature support levels.
63+
2. `src/core/matrix/data.ts` (`SUPPORT_MATRIX`) = built dynamically from descriptors. Never hardcode.
64+
3. `website/src/content/docs/reference/supported-tools.mdx` = **single docs page** for per-target support. All other pages link here — no duplicate tables.
65+
4. `README.md` matrix must stay in sync with code capabilities.
66+
5. No hardcoded target counts or enumerations on homepage, CLI overview, or other pages. Use generic language and link to the matrix.
67+
6. Adding/changing a target: update `target-ids.ts` + descriptor → `supported-tools.mdx``README.md` matrix. No other docs pages should need changes.
8768
- **Refer to PRD**: `docs/prd-v2-complete.md` for architecture decisions
8869
- **Refer to tasks**: `docs/agentsmesh-ai-first-tasks.md` for current task specs
8970

9071
## AgentsMesh Generation Contract
9172

92-
AgentsMesh is a config sync library for AI coding tools. The only canonical source of truth is the `.agentsmesh` directory at the project root; files emitted into target formats such as `AGENTS.md`, `.claude/`, `.cursor/`, `.junie/`, and similar directories are generated artifacts. When making changes, edit canonical config first, then regenerate and verify the target outputs. Preserve the library's bidirectional contract: import native tool config into canonical form, generate back to target-specific layouts, and keep projected or embedded features round-trippable rather than treating them as plain text exports.
73+
AgentsMesh syncs AI coding tool configuration from a single canonical `.agentsmesh` directory. All target-specific files (`.claude/`, `.cursor/`, `AGENTS.md`, etc.) are generated artifactsedit canonical config first, then regenerate. The import/generate contract is bidirectional and lossless: embedded or projected features round-trip without data loss.

.agentsmesh/.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Auto-generated. DO NOT EDIT MANUALLY.
22
# Tracks the state of all config files for team conflict resolution.
33

4-
generated_at: 2026-03-30T12:15:20.515Z
4+
generated_at: 2026-03-31T10:01:52.933Z
55
generated_by: serhii
6-
lib_version: 0.2.9
6+
lib_version: 0.2.10
77
checksums:
88
agents/code-debugger.md: sha256:707132841c606f117c83491d53ce101be0117eb50abe2861bcf93bdd45a56daf
99
agents/code-documenter.md: sha256:faa66b16d2e86578985e817d60e6705ae0e34a716c1f5c29411739a6d659fb96
@@ -16,11 +16,11 @@ checksums:
1616
commands/commit.md: sha256:3e6dcc5871ad157c36efe19c162b43cdc0d723a8695fb0d45c1f90cc28fa931c
1717
commands/review.md: sha256:ba3053410e7cc3271f41ba329056df07c6ccd2f07e2ed3dda601c56e46a77d54
1818
commands/test.md: sha256:a60932b216ff9eb407c2b38e4459ac4b9606a3aed275f4af84a646eb6c2937e7
19-
hooks.yaml: sha256:1016bf9b001da63776022e928088cc4971a123e79e9bab959f04557acd58e3ee
19+
hooks.yaml: sha256:9b2d2f11f9fe2bb7abd3b9dddc77df9ba9bda292aa5a6109c468b2dbff19ba2c
2020
ignore: sha256:9bd184903aee9e824fcd475e965103a8ef5efe5d5e98b0e7e275fb8017c4fc0e
2121
mcp.json: sha256:4269c04f9edf4142cde79d1e45f25958eaca54489cc19ec078eaba887d296018
2222
permissions.yaml: sha256:9c22c5221457f6c165a5f135448f3f95fedb8c9339cb9f91998d844184501158
23-
rules/_root.md: sha256:e2a08a31514ef65656fe3a35299f9a8a4a95c50f502918807c7faecd2ca62540
23+
rules/_root.md: sha256:59aa3f817487ff1053f0718589c0b075b6f97a17b32435563ca30c9555a499aa
2424
rules/typescript.md: sha256:18f52143dfdd3e219a5c6d6c0feb7283fe74cce99458c46dafcd1c3620ad4fba
2525
skills/add-agent-target/SKILL.md: sha256:53a76c84b87f7735c53ac5f5e584e55122c09728a14406e7088ea93b5b183406
2626
skills/add-agent-target/references/target-addition-checklist.md: sha256:66cd8f5ed4dd21b27e2bf4b34ae749ee301b28a208c83fecffa06748c2d2d61c

.agentsmesh/hooks.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
PreToolUse:
2-
- matcher: Edit|Write
2+
- matcher: Bash
33
type: command
4-
command: eslint --fix
4+
command: "echo \"Running: $(jq -r '.tool_input.command' < /dev/stdin)\""
55
PostToolUse:
6-
- matcher: Read
7-
type: prompt
8-
prompt: Review the file content for any security concerns
6+
- matcher: Edit|Write
7+
type: command
8+
command: "jq -r '.tool_input.file_path' | xargs eslint --fix"
9+

.agentsmesh/rules/_root.md

Lines changed: 33 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,87 +6,68 @@ root: true
66

77
## Session Start
88

9-
- **Always** read `tasks/lessons.md` at the beginning of each session before doing any work
10-
- Apply relevant lessons to the current task
9+
- Read `tasks/lessons.md` before doing any work. Apply relevant lessons.
1110

12-
## Workflow Orchestration
11+
## Workflow
1312

14-
### 1. Plan Node Default
13+
### Planning
1514

16-
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
17-
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
18-
- Use plan mode for verification steps, not just building
19-
- Write detailed specs upfront to reduce ambiguity
15+
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions). Write plan to `tasks/todo.md`.
16+
- If something goes sideways, STOP and re-plan — don't keep pushing.
17+
- Check in before starting implementation. Mark items complete as you go.
2018

21-
### 2. Subagent Strategy
19+
### Subagents
2220

23-
- Use subagents liberally to keep main context window clean
24-
- Offload research, exploration, and parallel analysis to subagents
25-
- For complex problems, throw more compute at it via subagents
26-
- One tack per subagent for focused execution
21+
- Use subagents liberally for research, exploration, and parallel analysis. One tack per subagent.
2722

28-
### 3. Self-Improvement Loop
23+
### Lessons
2924

30-
- **When to amend** `tasks/lessons.md`: whenever something turns out wrong — user correction, test failure, CI failure, code review feedback, or any other signal that a mistake was made
31-
- **How to amend**: add a bullet with (1) what went wrong, (2) the root cause, (3) a rule that prevents the same mistake
32-
- **Best practice for AI agents**: updating lessons is the primary way to persist learning across sessions; agents lack long-term memory, so `tasks/lessons.md` is the project-specific memory that reduces repeated mistakes
33-
- Write rules for yourself that prevent the same mistake
34-
- Ruthlessly iterate on these lessons until mistake rate drops
35-
- Review lessons at session start for relevant project
25+
- **When**: user correction, test failure, CI failure, code review feedback, or any other mistake signal.
26+
- **How**: add a bullet to `tasks/lessons.md` with (1) what went wrong, (2) root cause, (3) a rule that prevents recurrence.
27+
- This is the primary cross-session memory — ruthlessly iterate until mistake rate drops.
3628

37-
### 4. Verification Before Done
29+
### Verification
3830

39-
- Never mark a task complete without proving it works
40-
- **After every feature/story completion**: Use the `post-feature-qa` skill (`.agentsmesh/skills/post-feature-qa/`) — run the QA checklist, ensure tests cover edge cases and implementation aligns with the story, fix gaps before marking done
41-
- Diff behavior between main and your changes when relevant
31+
- Never mark a task complete without proving it works — run tests, check logs, demonstrate correctness.
32+
- After every feature/story: use `post-feature-qa` skill (`.agentsmesh/skills/post-feature-qa/`).
4233
- Ask yourself: "Would a staff engineer approve this?"
43-
- Run tests, check logs, demonstrate correctness
4434

45-
### 5. Demand Elegance (Balanced)
35+
### Elegance
4636

4737
- For non-trivial changes: pause and ask "is there a more elegant way?"
48-
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
49-
- Skip this for simple, obvious fixes - don't over-engineer
50-
- Challenge your own work before presenting it
38+
- Skip this for simple, obvious fixes — don't over-engineer.
5139

52-
### 6. Autonomous Bug Fixing
40+
### Bug Fixing
5341

54-
- When given a bug report: just fix it. Don't ask for hand-holding
55-
- Point at logs, errors, failing tests - then resolve them
56-
- Zero context switching required from the user
57-
- Go fix failing CI tests without being told how
58-
59-
## Task Management
60-
61-
1. **Plan First**: Write plan to `tasks/todo.md` with checkable items
62-
2. **Verify Plan**: Check in before starting implementation
63-
3. **Track Progress**: Mark items complete as you go
64-
4. **Explain Changes**: High-level summary at each step
65-
5. **Document Results**: Add review section to `tasks/todo.md`
66-
6. **Capture Lessons**: Update `tasks/lessons.md` after corrections — see "When to amend" and "How to amend" in Self-Improvement Loop above
42+
- When given a bug report: just fix it. Find root cause, point at logs/errors, resolve. Zero hand-holding.
6743

6844
## Skills
6945

70-
- **post-feature-qa** (`.agentsmesh/skills/post-feature-qa/`) — Apply after every feature or story implementation. Act as senior QA: verify test coverage for all edge cases and story alignment; produce QA report; fix gaps before claiming complete.
71-
- **add-agent-target** (`.agentsmesh/skills/add-agent-target/`) — Use when adding support for a new AI agent target. Requires current official-doc research, full import/generate implementation, rich realistic fixtures, complete unit/integration/e2e coverage, docs updates, and final QA.
46+
- **post-feature-qa** — Apply after every feature/story. Senior QA: verify edge-case coverage and story alignment.
47+
- **add-agent-target** — Use when adding a new AI agent target. Covers research, implementation, fixtures, full test coverage, docs.
7248

7349
## Core Principles
7450

75-
- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
51+
- **Simplicity**: Make every change as simple as possible. Only touch what's necessary.
7652
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
77-
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
7853

79-
## Project-Specific Rules
54+
## Project Rules
8055

81-
- **TDD mandatory**: Write failing tests FIRST, then implement. No exceptions.
56+
- **TDD mandatory**: Write failing tests FIRST, then implement.
8257
- **Max file size**: 200 lines. Split by responsibility if larger.
8358
- **No classes unless stateful**: Prefer pure functions + types.
8459
- **No `any`**: Use `unknown` + narrowing.
8560
- **Config source of truth**: `.agentsmesh/` directory. Generated files are artifacts.
8661
- **Test naming**: `{module}.test.ts` colocated with source. Integration tests in `tests/integration/`.
87-
- **Generated artifact tests must be strict**: For generated file structures, assert exact file paths, exact file counts, and exact referenced wrapper/script sets. Do not use loose checks like "at least one file", broad `some(...)`, or prefix-only path assertions when the full output set is known.
62+
- **Generated artifact tests must be strict**: Assert exact file paths, exact file counts, and exact referenced wrapper/script sets. No loose checks (`some(...)`, prefix-only, "at least one").
8863
- **Commit format**: conventional commits — `feat|fix|test|refactor(scope): message`
89-
- **README must stay current**: Any change to CLI commands, flags, config schema, supported targets, or canonical file formats **must** be reflected in `README.md` before the task is marked complete. Treat the README as part of the API surface.
90-
- **Website docs must stay current**: Any change to CLI commands, flags, config schema, supported targets, canonical file formats, or other user-facing behavior **must** also be reflected in the documentation website (`website/src/content/docs/`). The website is the primary public documentation — treat it with the same rigor as `README.md`.
64+
- **Docs must stay current**: Any change to CLI commands, flags, config schema, supported targets, or canonical file formats **must** be reflected in both `README.md` and the website (`website/src/content/docs/`) before the task is marked complete.
65+
- **Target data single source of truth** — do **not** hardcode target lists or support levels outside this chain:
66+
1. `src/targets/catalog/target-ids.ts` (`TARGET_IDS`) = canonical target ID list. Each target's `capabilities` in `src/targets/<name>/index.ts` = feature support levels.
67+
2. `src/core/matrix/data.ts` (`SUPPORT_MATRIX`) = built dynamically from descriptors. Never hardcode.
68+
3. `website/src/content/docs/reference/supported-tools.mdx` = **single docs page** for per-target support. All other pages link here — no duplicate tables.
69+
4. `README.md` matrix must stay in sync with code capabilities.
70+
5. No hardcoded target counts or enumerations on homepage, CLI overview, or other pages. Use generic language and link to the matrix.
71+
6. Adding/changing a target: update `target-ids.ts` + descriptor → `supported-tools.mdx``README.md` matrix. No other docs pages should need changes.
9172
- **Refer to PRD**: `docs/prd-v2-complete.md` for architecture decisions
9273
- **Refer to tasks**: `docs/agentsmesh-ai-first-tasks.md` for current task specs

0 commit comments

Comments
 (0)