Skip to content

Commit 557c165

Browse files
authored
Add 'marr standard sync' command (#54)
* Add 'marr standard sync' command to generate trigger list - Add sync subcommand with --dry-run option - Generate standards section with list format (not table) - Include file ownership verification for security - Add Conditional Reading Protocol imperatives to prevent skimming - Update templates to match new format * Discover standards dynamically from resources - Remove hardcoded REQUIRED_STANDARD (file was deleted in #47) - Remove hardcoded AVAILABLE_STANDARDS array - Add discoverAvailableStandards() to read from resources/project/common/ - Extract metadata (name, title, scope) from YAML frontmatter - Adding new standards now requires only creating the file * Remove help subcommand, delete redundant README - Use `command --help` pattern instead of `help [command]` - Delete resources/project/common/README.md (redundant with .claude/marr/README.md)
1 parent 08be644 commit 557c165

6 files changed

Lines changed: 395 additions & 136 deletions

File tree

.claude/marr/MARR-PROJECT-CLAUDE.md

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,54 @@ Standards define the boundary between acceptable and unacceptable work. They are
3434

3535
`standards/` contains standard prompt files that must be followed when working on a related activity.
3636

37-
In the table below the **Trigger** column is a condition that mandates the reading of its corresponding **Standard** before proceeding. When a Trigger is met, read its Standard immediately—the trigger is the authorization to read the Standard. When more than one Trigger is met, read all the corresponding Standards before proceeding further.
38-
39-
| Trigger | Standard |
40-
|---------|----------|
41-
| WHEN starting any feature, task, or implementation work. Also: git operations, branching, commits, PRs. Always when on main branch. | `prj-workflow-standard.md` |
42-
| WHEN running, writing, or modifying tests. Also: any code change that requires test coverage. | `prj-testing-standard.md` |
43-
| WHEN using MCP tools or integrating external services. | `prj-mcp-usage-standard.md` |
44-
| WHEN creating or modifying documentation files (READMEs, docs/, plans/). Also: restructuring project documentation. | `prj-documentation-standard.md` |
45-
| WHEN creating or modifying files in `.claude/marr/`. Also: editing any CLAUDE.md file. | `prj-writing-prompts-standard.md` |
37+
**IMPORTANT: Conditional Reading Protocol**
38+
39+
1. **DO NOT read standards proactively** — Only read a standard when its trigger condition matches your current task
40+
2. **Evaluate triggers against your current task** — Before each task, scan the trigger list below and identify which (if any) apply
41+
3. **Read triggered standards before proceeding** — When a trigger matches, read the full standard file immediately
42+
4. **Multiple triggers = multiple reads** — If more than one trigger matches, read all corresponding standards
43+
44+
### `prj-documentation-standard.md`
45+
Read this standard when:
46+
- WHEN creating, modifying, or organizing project documentation
47+
- WHEN working with README files, guides, or technical specifications
48+
- WHEN deciding where documentation should live in the project structure
49+
- WHEN adding explanations, examples, or user-facing content
50+
51+
### `prj-mcp-usage-standard.md`
52+
Read this standard when:
53+
- WHEN using MCP tools or integrating external services
54+
- WHEN selecting which tool to use for a task
55+
- WHEN troubleshooting tool behavior or failures
56+
- WHEN configuring or setting up MCP servers
57+
58+
### `prj-testing-standard.md`
59+
Read this standard when:
60+
- WHEN running, writing, or modifying tests
61+
- WHEN evaluating test coverage or testing strategy
62+
- WHEN investigating test failures or flaky tests
63+
- WHEN making code changes that should have test coverage
64+
65+
### `prj-ui-ux-standard.md`
66+
Read this standard when:
67+
- WHEN creating or modifying UI components or layouts
68+
- WHEN making visual design or styling decisions
69+
- WHEN implementing user interactions, forms, or navigation
70+
- WHEN evaluating accessibility or usability
71+
72+
### `prj-workflow-standard.md`
73+
Read this standard when:
74+
- WHEN starting any feature, task, or implementation work
75+
- WHEN working with git branches, commits, or pull requests
76+
- WHEN making changes while on the main branch
77+
- WHEN preparing code for review or merge
78+
79+
### `prj-writing-prompts-standard.md`
80+
Read this standard when:
81+
- WHEN creating or modifying prompt files or standards
82+
- WHEN editing CLAUDE.md or MARR configuration files
83+
- WHEN reviewing prompts or standards for quality
84+
- WHEN defining rules or constraints for AI agent behavior
4685

4786
---
4887

resources/project/MARR-PROJECT-CLAUDE.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MARR (Making Agents Really Reliable) provides project-level AI agent configurati
1212

1313
See `.claude/marr/README.md` for how MARR works.
1414

15-
## What is a MARR Standard
15+
## What is a Standard
1616

1717
A standard is a **binding constraint** on how you work.
1818

@@ -30,19 +30,51 @@ Standards define the boundary between acceptable and unacceptable work. They are
3030

3131
---
3232

33-
## MARR Standards
33+
## Standards
3434

3535
`standards/` contains standard prompt files that must be followed when working on a related activity.
3636

37-
In the table below the **Trigger** column is a condition that mandates the reading of its corresponding **Standard** before proceeding. When a Trigger is met, read its Standard immediately—the trigger is the authorization to read the Standard. When more than one Trigger is met, read all the corresponding Standards before proceeding further.
38-
39-
| Trigger | Standard |
40-
|---------|----------|
41-
| WHEN starting any feature, task, or implementation work. Also: git operations, branching, commits, PRs. Always when on main branch. | `prj-workflow-standard.md` |
42-
| WHEN running, writing, or modifying tests. Also: any code change that requires test coverage. | `prj-testing-standard.md` |
43-
| WHEN using MCP tools or integrating external services. | `prj-mcp-usage-standard.md` |
44-
| WHEN creating or modifying documentation files (READMEs, docs/, plans/). Also: restructuring project documentation. | `prj-documentation-standard.md` |
45-
| WHEN creating or modifying files in `.claude/marr/`. Also: editing any CLAUDE.md file. | `prj-writing-prompts-standard.md` |
37+
**IMPORTANT: Conditional Reading Protocol**
38+
39+
1. **DO NOT read standards proactively** — Only read a standard when its trigger condition matches your current task
40+
2. **Evaluate triggers against your current task** — Before each task, scan the trigger list below and identify which (if any) apply
41+
3. **Read triggered standards before proceeding** — When a trigger matches, read the full standard file immediately
42+
4. **Multiple triggers = multiple reads** — If more than one trigger matches, read all corresponding standards
43+
44+
### `prj-documentation-standard.md`
45+
Read this standard when:
46+
- WHEN creating, modifying, or organizing project documentation
47+
- WHEN working with README files, guides, or technical specifications
48+
- WHEN deciding where documentation should live in the project structure
49+
- WHEN adding explanations, examples, or user-facing content
50+
51+
### `prj-mcp-usage-standard.md`
52+
Read this standard when:
53+
- WHEN using MCP tools or integrating external services
54+
- WHEN selecting which tool to use for a task
55+
- WHEN troubleshooting tool behavior or failures
56+
- WHEN configuring or setting up MCP servers
57+
58+
### `prj-testing-standard.md`
59+
Read this standard when:
60+
- WHEN running, writing, or modifying tests
61+
- WHEN evaluating test coverage or testing strategy
62+
- WHEN investigating test failures or flaky tests
63+
- WHEN making code changes that should have test coverage
64+
65+
### `prj-workflow-standard.md`
66+
Read this standard when:
67+
- WHEN starting any feature, task, or implementation work
68+
- WHEN working with git branches, commits, or pull requests
69+
- WHEN making changes while on the main branch
70+
- WHEN preparing code for review or merge
71+
72+
### `prj-writing-prompts-standard.md`
73+
Read this standard when:
74+
- WHEN creating or modifying prompt files or standards
75+
- WHEN editing CLAUDE.md or MARR configuration files
76+
- WHEN reviewing prompts or standards for quality
77+
- WHEN defining rules or constraints for AI agent behavior
4678

4779
---
4880

resources/project/common/README.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)