Skip to content

Commit 9ae0ad3

Browse files
authored
Merge pull request #7 from reporails/0.5.0
0.5.0
2 parents b5d340c + 6d8b9c1 commit 9ae0ad3

462 files changed

Lines changed: 28368 additions & 12309 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
version: 3
22
generator: manual
3+
auto_heal: true
4+
directive: >-
5+
If any path, command, or classification in this file does not
6+
match the project when accessed, update the entry and continue.
37
4-
depends_on:
5-
rules:
6-
schemas: [rule, agent, package, levels]
7-
artifacts: [levels, capability_levels]
8+
depends_on: {}
89

910
agents:
1011
claude:
1112
main_instruction_file: CLAUDE.md
12-
config: .claude/mcp.json
13+
config: .claude/settings.json
14+
mcp: .claude/mcp.json
1315
skills: .claude/skills/
1416
rules: .claude/rules/
17+
sub_agents: .claude/agents/
1518

1619
modules:
1720
core: src/reporails_cli/core/
1821
interfaces: src/reporails_cli/interfaces/
1922
formatters: src/reporails_cli/formatters/
2023
bundled: src/reporails_cli/bundled/
2124
templates: src/reporails_cli/templates/
25+
rules: framework/rules/
26+
schemas: framework/schemas/
27+
2228

2329
bundled:
24-
capability_patterns: src/reporails_cli/bundled/capability-patterns.yml
30+
project_types: src/reporails_cli/bundled/project-types.yml
2531

2632
artifacts:
2733
changelog: UNRELEASED.md
@@ -39,8 +45,8 @@ meta:
3945
version_file: VERSION
4046

4147
skills:
42-
check:
43-
path: .claude/skills/check/
48+
ails:
49+
path: .claude/skills/ails/
4450
entry: SKILL.md
4551
qa:
4652
path: .claude/skills/qa/
@@ -51,3 +57,6 @@ skills:
5157
add-changelog-entry:
5258
path: .claude/skills/add-changelog-entry/
5359
entry: SKILL.md
60+
bootstrap:
61+
path: .claude/skills/bootstrap/
62+
entry: SKILL.md

.ails/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
default_agent: claude
2+
exclude_dirs:
3+
- fixtures
4+
- research
5+
- _archive
6+
- _archived
7+
- .venv
8+
- docs
9+
- framework
10+
- .mypy_cache
11+
- .ruff_cache
12+
- .pytest_cache
13+
disabled_rules:
14+

.claude/rules/checks-readonly.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
2+
description: Bundled config protection — never modify without explicit instruction
23
paths: ["src/reporails_cli/bundled/**"]
34
---
45

56
# Bundled Config Files
67

7-
NEVER modify bundled config files without explicit human instruction.
8+
Leave `src/reporails_cli/bundled/capability-patterns.yml` unchanged unless the user explicitly asks for a modification. This file contains regex patterns for agent capability detection — it is CLI-owned orchestration logic, not a framework rule file under `framework/rules/`.
89

9-
- `capability-patterns.yml` — Regex patterns for capability detection
10+
## Discovery
1011

11-
These are CLI-owned orchestration logic, not framework rules.
12+
Applies to files matching `src/reporails_cli/bundled/**` via `paths` frontmatter. Loaded automatically by Claude Code from `.claude/rules/`.

.claude/rules/documentation.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
---
2+
description: User-facing documentation — copy-pasteable commands, no aspirational content
23
paths: ["docs/*.md", "README.md"]
34
---
45

56
# User-Facing Documentation
67

7-
These files are read by people, not coding agents.
8+
Write `docs/*.md` and `README.md` for people, not coding agents. Commands must be copy-pasteable and working — use `ails check .` not `reporails check .`. Examples must reflect actual CLI behavior from `uv run ails --help`.
89

9-
- These files are for user-facing documentation, not AI agent instructions
10-
- Commands must be copy-pasteable and working (`ails check .`, not `reporails check .`)
11-
- Examples must reflect actual CLI behavior
12-
- Only document features that exist; remove references to unimplemented features
13-
- Keep installation/usage sections current with pyproject.toml
14-
- Use consistent terminology: "rules" not "checks" in user-facing text
15-
- When fixing errors, make targeted edits — don't rewrite sections and lose valid content
10+
- Keep installation and usage sections current with `pyproject.toml` version and dependencies
11+
- Use "rules" not "checks" in user-facing text — consistent with CLI output from `uv run ails check`
12+
- Only document features that exist in `src/reporails_cli/`. Remove references to unimplemented features.
13+
- When fixing errors, make targeted edits — rewriting entire sections risks losing valid content
14+
15+
## Discovery
16+
17+
Applies to files matching `docs/*.md` and `README.md` via `paths` frontmatter. Loaded automatically by Claude Code from `.claude/rules/`.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2+
description: Instruction file style — actionable content only, no meta-commentary
23
paths: ["CLAUDE.md", ".claude/rules/**"]
34
---
45

56
# Instruction File Style
67

7-
When writing or editing CLAUDE.md or .claude/rules/*.md files:
8+
Write `CLAUDE.md` and `.claude/rules/*.md` files for AI agent behavior, not user-facing documentation. Every line should be a directive (`Use ruff for formatting`), a constraint (`Do NOT modify .env`), or a concrete reference (`src/reporails_cli/core/pipeline.py`). Actionable content gives the model something to anchor on.
89

9-
- These files are for AI agent behavior, not user-facing documentation
10-
- State facts, commands, rules only
11-
- No meta-commentary ("this section explains...", "as mentioned above...")
12-
- Every line MUST be actionable or informative — passive filler wastes context tokens
13-
- Avoid redundant context that wastes tokens
10+
Remove meta-commentary like "this section explains..." or "as mentioned above..." from instruction files. Remove redundant context that restates what the file already says. These patterns waste context tokens without adding coupling.
11+
12+
## Discovery
13+
14+
Applies to files matching `CLAUDE.md` and `.claude/rules/**` via `paths` frontmatter. Loaded automatically by Claude Code from `.claude/rules/`.

.claude/rules/specs.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2+
description: Spec file accuracy — specs must match implementation
23
paths: ["docs/specs/**"]
34
---
45

56
# Specification Files
67

7-
Specs must accurately reflect the implementation.
8+
Update `docs/specs/*.md` when changing behavior in `src/reporails_cli/core/`. Function signatures, return types, and interfaces in specs must match what `checks.py`, `rule_runner.py`, and `content_checker.py` actually implement.
89

9-
- Update specs when changing code behavior
10-
- Function signatures, return types, and interfaces must match code
11-
- Remove features from specs when removing from code
12-
- Add features to specs when adding to code
13-
- No aspirational content - document what exists, not what might exist
10+
Remove features from `docs/specs/` when removing them from `src/`. Add features to specs when adding them to code. Specs document what exists in the current codebase — not aspirational features or planned work.
11+
12+
## Discovery
13+
14+
Applies to files matching `docs/specs/**` via `paths` frontmatter. Loaded automatically by Claude Code from `.claude/rules/`.

.claude/rules/writing-rules.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
2+
description: Rule file authoring — format, scope, and constraints for .claude/rules/
23
paths: [".claude/rules/**"]
34
---
45

56
# Writing Rule Files
67

7-
Rule files in `.claude/rules/` are loaded into Claude's context.
8+
Rule files in `.claude/rules/` are loaded into Claude's context at session start.
89

910
## Format
1011

@@ -21,7 +22,11 @@ paths: ["src/**/*.py"] # Optional: scope to specific files
2122

2223
## Constraints
2324

24-
- One concern per file (e.g., access control separate from styling)
25-
- Keep under 500 lines — everything consumes tokens
26-
- Use descriptive filenames (`api-validation.md` not `rules1.md`)
27-
- Add `paths` frontmatter to scope rules to relevant files; omit for global rules
25+
- Keep each `.claude/rules/*.md` file focused on one concern — access control separate from styling, testing separate from documentation
26+
- Keep files under 500 lines — every line consumes context tokens
27+
- Use descriptive filenames like `api-validation.md` not `rules1.md`
28+
- Add `paths` or `globs` frontmatter to scope rules to relevant files under `src/`, `tests/`, or `docs/`. Omit for global rules.
29+
30+
## Discovery
31+
32+
Applies to files matching `.claude/rules/**` via `paths` frontmatter. Loaded automatically by Claude Code from `.claude/rules/`.

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"hooks": [
2626
{
2727
"type": "command",
28-
"command": "jq -r '.tool_input.file_path // .tool_input.filePath // empty' | grep -q 'src/reporails_cli/bundled/' && echo '{\"decision\": \"block\", \"reason\": \"Bundled config files (levels.yml, capability-patterns.yml) must not be modified without explicit human instruction. These are CLI-owned orchestration logic.\"}' && exit 2 || exit 0"
28+
"command": "jq -r '.tool_input.file_path // .tool_input.filePath // empty' | grep -q 'capability-patterns\\.yml' && echo '{\"decision\": \"block\", \"reason\": \"capability-patterns.yml is CLI-owned orchestration logic. Do not modify without explicit human instruction.\"}' && exit 2 || exit 0"
2929
}
3030
]
3131
}

.claude/skills/add-changelog-entry/SKILL.md

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,27 @@ description: Add a changelog entry to UNRELEASED.md
55

66
# /add-changelog-entry
77

8-
Automatically add a changelog entry to PROJECT_ROOT/UNRELEASED.md.
9-
10-
## Instructions
11-
12-
1. Check git diff or recent file modifications
13-
2. Determine the area from the file path:
14-
- interfaces/cli/ → [CLI]
15-
- core/ → [CORE]
16-
- bundled/ → [BUNDLED]
17-
- formatters/ → [FORMATTERS]
18-
- README.md → [DOCS]
19-
- CLAUDE.md, backbone.yml, .claude/, .reporails/ → [META]
20-
3. Determine the category:
21-
- New files/content → Added
22-
- Modified existing → Changed
23-
- Marked as deprecated/obsolete → Deprecated
24-
- Removed content → Removed
25-
- Bug fixes → Fixed
26-
- Security-related changes → Security
8+
Add a changelog entry to `UNRELEASED.md` based on recent changes.
9+
10+
## Process
11+
12+
1. Run `git diff` or check recent file modifications to determine what changed
13+
2. Determine the **area** from the file path:
14+
- `src/reporails_cli/interfaces/cli/``[CLI]`
15+
- `src/reporails_cli/core/``[CORE]`
16+
- `src/reporails_cli/bundled/``[BUNDLED]`
17+
- `src/reporails_cli/formatters/``[FORMATTERS]`
18+
- `README.md`, `docs/``[DOCS]`
19+
- `CLAUDE.md`, `.ails/backbone.yml`, `.claude/``[META]`
20+
3. Determine the **category**: Added (new files/content), Changed (modified existing), Deprecated, Removed, Fixed (bug fixes), Security
2721
4. Write a concise description (3-7 words)
28-
5. Append to UNRELEASED.md under the correct category section
29-
6. Create the category section if it doesn't exist
22+
5. Append to `UNRELEASED.md` under the correct `### [Category]` section — create the section if it doesn't exist
3023

3124
## Format
3225

3326
```markdown
3427
### [Category]
35-
- [Area]: [Description]
36-
```
37-
38-
## Categories
39-
40-
Added, Changed, Deprecated, Removed, Fixed, Security
41-
42-
## Areas
43-
44-
- [CLI] – CLI interface (interfaces/cli/)
45-
- [CORE] – Core domain logic
46-
- [BUNDLED] – Bundled config (levels.yml, capability-patterns.yml)
47-
- [FORMATTERS] – Output formatters
48-
- [DOCS] – README, general documentation
49-
- [META] – CLAUDE.md, backbone.yml, repo structure
50-
51-
## Example
52-
53-
```markdown
54-
### Added
55-
- [CORE]: Semantic rule caching support
56-
57-
### Changed
58-
- [FORMATTERS]: Updated compact output format
28+
- [Area]: Description
5929
```
6030

61-
Do not ask for confirmation. Just do it.
31+
Append directly without asking for confirmation.

.claudeignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ build/
2727
# IDE & editor
2828
.idea/
2929

30+
# Research corpus — contains 4600+ CLAUDE.md and 6700+ .claude/rules/ files
31+
# from third-party repos. Without this exclusion, Claude Code loads them as
32+
# project instructions, contaminating every session.
33+
research/data/corpus/
34+
3035
# Environment & secrets
3136
.env
3237
.env.local

0 commit comments

Comments
 (0)