reporails-cli 0.0.2__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claude/rules/writing-rules.md +0 -1
- reporails_cli-0.1.1/.claude/settings.json +15 -0
- reporails_cli-0.1.1/.claude/skills/add-changelog-entry/SKILL.md +61 -0
- reporails_cli-0.1.1/.github/FUNDING.yml +1 -0
- reporails_cli-0.1.1/.github/workflows/release.yml +53 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.gitignore +4 -1
- reporails_cli-0.1.1/.shared/knowledge/changelog.md +103 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/CLAUDE.md +18 -28
- reporails_cli-0.1.1/PKG-INFO +176 -0
- reporails_cli-0.1.1/README.md +141 -0
- reporails_cli-0.1.1/UNRELEASED.md +1 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/arch.md +3 -5
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/modules.md +52 -21
- reporails_cli-0.1.1/packages/npm/README.md +137 -0
- reporails_cli-0.1.1/packages/npm/bin/reporails.mjs +172 -0
- reporails_cli-0.1.1/packages/npm/package.json +30 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/pyproject.toml +3 -3
- reporails_cli-0.1.1/src/__init__.py +5 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/__init__.py +2 -2
- reporails_cli-0.1.1/src/reporails_cli/bundled/.semgrepignore +51 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/bundled/__init__.py +9 -4
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/bundled/capability-patterns.yml +19 -4
- reporails_cli-0.1.1/src/reporails_cli/bundled/detection.yml +15 -0
- reporails_cli-0.1.1/src/reporails_cli/bundled/levels.yml +52 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/agents.py +18 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/applicability.py +92 -16
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/bootstrap.py +126 -1
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/cache.py +8 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/capability.py +12 -93
- reporails_cli-0.1.1/src/reporails_cli/core/discover.py +140 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/engine.py +95 -15
- reporails_cli-0.1.1/src/reporails_cli/core/init.py +617 -0
- reporails_cli-0.1.1/src/reporails_cli/core/levels.py +263 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/models.py +61 -6
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/opengrep/runner.py +21 -4
- reporails_cli-0.1.1/src/reporails_cli/core/registry.py +383 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/sarif.py +12 -6
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/scorer.py +3 -2
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/semantic.py +1 -1
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/json.py +17 -1
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/box.py +2 -2
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/compact.py +4 -11
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/full.py +18 -6
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/violations.py +14 -8
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/cli/main.py +214 -38
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/mcp/server.py +101 -5
- reporails_cli-0.1.1/src/reporails_cli/templates/cli_violation.txt +1 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/conftest.py +7 -10
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/test_capability_detection.py +8 -47
- reporails_cli-0.1.1/tests/integration/test_symlink_validation.py +99 -0
- reporails_cli-0.1.1/tests/unit/test_agent_config.py +239 -0
- reporails_cli-0.1.1/tests/unit/test_backbone_gate.py +97 -0
- reporails_cli-0.1.1/tests/unit/test_gates.py +196 -0
- reporails_cli-0.1.1/tests/unit/test_package_levels.py +170 -0
- reporails_cli-0.1.1/tests/unit/test_project_config.py +278 -0
- reporails_cli-0.1.1/tests/unit/test_recommended.py +162 -0
- reporails_cli-0.1.1/tests/unit/test_registry.py +118 -0
- reporails_cli-0.1.1/tests/unit/test_symlink_detection.py +223 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/uv.lock +1 -1
- reporails_cli-0.0.2/.claude/rules/backbone.md +0 -7
- reporails_cli-0.0.2/.claude/settings.local.json +0 -66
- reporails_cli-0.0.2/PKG-INFO +0 -108
- reporails_cli-0.0.2/README.md +0 -73
- reporails_cli-0.0.2/scripts/link-rules.sh +0 -73
- reporails_cli-0.0.2/src/__init__.py +0 -5
- reporails_cli-0.0.2/src/reporails_cli/bundled/levels.yml +0 -99
- reporails_cli-0.0.2/src/reporails_cli/core/discover.py +0 -362
- reporails_cli-0.0.2/src/reporails_cli/core/init.py +0 -309
- reporails_cli-0.0.2/src/reporails_cli/core/levels.py +0 -177
- reporails_cli-0.0.2/src/reporails_cli/core/registry.py +0 -155
- reporails_cli-0.0.2/src/reporails_cli/templates/cli_violation.txt +0 -1
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claude/rules/checks-readonly.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claude/rules/documentation.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claude/rules/instruction-file-style.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claude/rules/specs.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.claudeignore +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.mcp.json.example +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/.reporails/backbone.yml +0 -0
- {reporails_cli-0.0.2/src/reporails_cli/bundled → reporails_cli-0.1.1}/.semgrepignore +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/LICENSE +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/caching.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/models.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/principles.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/scoring.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/docs/specs/testing.md +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/.env.example +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/opengrep/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/opengrep/semgrepignore.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/opengrep/templates.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/core/utils.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/mcp.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/chars.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/components.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/formatters/text/rules.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/cli/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/mcp/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/interfaces/mcp/tools.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/py.typed +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_box.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_cta.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_delta.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_file_header.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_legend.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_pending.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/src/reporails_cli/templates/cli_working.txt +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/fixtures/.gitkeep +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/test_exit_codes.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/test_rule_validation.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/test_scoring.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/integration/test_template_resolution.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/unit/__init__.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/unit/test_delta.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/unit/test_scoring.py +0 -0
- {reporails_cli-0.0.2 → reporails_cli-0.1.1}/tests/unit/test_templates.py +0 -0
|
@@ -26,4 +26,3 @@ paths: ["src/**/*.py"] # Optional: scope to specific files
|
|
|
26
26
|
- Use descriptive filenames (`api-validation.md` not `rules1.md`)
|
|
27
27
|
- Add `paths` frontmatter to reduce noise when not relevant
|
|
28
28
|
- No paths = loads globally for all files
|
|
29
|
-
- Content MUST be actionable, not explanatory
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"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"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-changelog-entry
|
|
3
|
+
description: Add a changelog entry to UNRELEASED.md
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /add-changelog-entry
|
|
7
|
+
|
|
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
|
|
27
|
+
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
|
|
30
|
+
|
|
31
|
+
## Format
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
### [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
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Do not ask for confirmation. Just do it.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: reporails
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
pypi:
|
|
9
|
+
name: Publish to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: release
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: astral-sh/setup-uv@v4
|
|
19
|
+
with:
|
|
20
|
+
version: "latest"
|
|
21
|
+
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: uv build
|
|
24
|
+
|
|
25
|
+
- name: Publish to PyPI
|
|
26
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
27
|
+
|
|
28
|
+
npm:
|
|
29
|
+
name: Publish to npm
|
|
30
|
+
needs: pypi
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: release
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
id-token: write
|
|
36
|
+
defaults:
|
|
37
|
+
run:
|
|
38
|
+
working-directory: packages/npm
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- uses: actions/setup-node@v4
|
|
43
|
+
with:
|
|
44
|
+
node-version: "24"
|
|
45
|
+
registry-url: "https://registry.npmjs.org"
|
|
46
|
+
|
|
47
|
+
- name: Set version from release tag
|
|
48
|
+
run: |
|
|
49
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
50
|
+
npm version "$VERSION" --no-git-tag-version
|
|
51
|
+
|
|
52
|
+
- name: Publish to npm
|
|
53
|
+
run: npm publish --access public --provenance
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
How to maintain the changelog and create releases.
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
|
|
7
|
+
[Keep a Changelog](https://keepachangelog.com/) with project-specific conventions.
|
|
8
|
+
|
|
9
|
+
## Files
|
|
10
|
+
|
|
11
|
+
| File | Purpose |
|
|
12
|
+
|------|---------|
|
|
13
|
+
| `UNRELEASED.md` | Accumulates changes during development |
|
|
14
|
+
| `CHANGELOG.md` | Released versions (moved from UNRELEASED) |
|
|
15
|
+
|
|
16
|
+
## Adding Entries
|
|
17
|
+
|
|
18
|
+
Add to `UNRELEASED.md` as you work:
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
### Added
|
|
22
|
+
- [AREA]: Brief description of what was added
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- [AREA]: Brief description of what changed
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- [AREA]: Brief description of what was fixed
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
- [AREA]: Brief description of what was removed
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Areas:** CLI, CORE, BUNDLED, FORMATTERS, DOCS, META
|
|
35
|
+
|
|
36
|
+
## Writing Good Entries
|
|
37
|
+
|
|
38
|
+
**Do:**
|
|
39
|
+
- Group by theme, not by file
|
|
40
|
+
- Lead with what matters to users
|
|
41
|
+
- Be specific but concise
|
|
42
|
+
|
|
43
|
+
**Don't:**
|
|
44
|
+
- List every file changed
|
|
45
|
+
- Use commit-message style entries
|
|
46
|
+
- Bury important changes in lists
|
|
47
|
+
|
|
48
|
+
**Good:**
|
|
49
|
+
```markdown
|
|
50
|
+
- [CORE]: Semantic rule caching support
|
|
51
|
+
- [CLI]: Added --quiet-semantic flag to suppress messages
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Bad:**
|
|
55
|
+
```markdown
|
|
56
|
+
- Added cache.py
|
|
57
|
+
- Changed main.py to add flag
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Creating a Release
|
|
61
|
+
|
|
62
|
+
**Process:**
|
|
63
|
+
1. Review `UNRELEASED.md`
|
|
64
|
+
2. Group similar changes by theme
|
|
65
|
+
3. Write release summary for `CHANGELOG.md`
|
|
66
|
+
4. Clear `UNRELEASED.md` (keep header)
|
|
67
|
+
5. Commit, tag, push
|
|
68
|
+
|
|
69
|
+
**Release entry template:**
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## [X.Y.Z] - YYYY-MM-DD
|
|
73
|
+
|
|
74
|
+
One-line summary of the release.
|
|
75
|
+
|
|
76
|
+
### Added
|
|
77
|
+
- **Theme**: Summary
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- **Theme**: Summary
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
- **Theme**: Summary
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Tagging
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git tag X.Y.Z
|
|
90
|
+
git push origin X.Y.Z
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Tag format: [SemVer](https://semver.org/) (e.g., `0.2.0`)
|
|
94
|
+
|
|
95
|
+
## Version Numbering
|
|
96
|
+
|
|
97
|
+
| Change Type | Bump | Example |
|
|
98
|
+
|-------------|------|---------|
|
|
99
|
+
| Breaking changes | Major | 1.0.0 → 2.0.0 |
|
|
100
|
+
| New features (backwards compatible) | Minor | 0.1.0 → 0.2.0 |
|
|
101
|
+
| Bug fixes | Patch | 0.1.0 → 0.1.1 |
|
|
102
|
+
|
|
103
|
+
Pre-1.0: Minor bumps for features, patch for fixes. Breaking changes OK.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Reporails CLI
|
|
1
|
+
# Reporails CLI v0.1.1
|
|
2
2
|
|
|
3
|
-
AI instruction
|
|
4
|
-
|
|
5
|
-
**repoRAILS** = **Repo** **R**ecursive **AI** **L**inting**S**
|
|
3
|
+
AI instruction validator. Validates instruction files against community-maintained rules.
|
|
6
4
|
|
|
7
5
|
## Development Context
|
|
8
6
|
|
|
@@ -14,11 +12,17 @@ You are developing the reporails CLI, not an end user.
|
|
|
14
12
|
|
|
15
13
|
Don't conflate these when discussing features, delivery, or documentation.
|
|
16
14
|
|
|
17
|
-
##
|
|
15
|
+
## File Reading Strategy
|
|
16
|
+
|
|
17
|
+
- Read specs (`docs/specs/*.md`) before modifying core modules
|
|
18
|
+
- Prefer reading specific files over broad glob patterns
|
|
19
|
+
|
|
20
|
+
## Search Efficiency
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
- Use `Grep --type py` for Python-specific searches
|
|
23
|
+
- Use `Glob "src/**/*.py"` to find Python files
|
|
24
|
+
- Limit searches to `src/` or `tests/` directories when possible
|
|
25
|
+
- Avoid grepping the entire repo; scope to relevant paths
|
|
22
26
|
|
|
23
27
|
## Quick Start
|
|
24
28
|
```bash
|
|
@@ -50,6 +54,8 @@ src/reporails_cli/
|
|
|
50
54
|
└── formatters/ # Output adapters
|
|
51
55
|
```
|
|
52
56
|
|
|
57
|
+
Path-scoped rules in `.claude/rules/` — see those files for context-specific constraints.
|
|
58
|
+
|
|
53
59
|
See `docs/specs/arch.md` for full architecture.
|
|
54
60
|
|
|
55
61
|
## Framework vs CLI
|
|
@@ -62,28 +68,12 @@ See `docs/specs/arch.md` for full architecture.
|
|
|
62
68
|
|
|
63
69
|
## QA Commands
|
|
64
70
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| `uv run poe qa_fast` | Lint, type check, unit tests (pre-commit) |
|
|
68
|
-
| `uv run poe qa` | Full QA including integration tests |
|
|
69
|
-
| `uv run poe lint` | Ruff linter |
|
|
70
|
-
| `uv run poe format` | Format code |
|
|
71
|
-
| `uv run poe type` | Mypy type checking |
|
|
72
|
-
| `uv run poe test_unit` | Unit tests only (fast, no OpenGrep) |
|
|
73
|
-
| `uv run poe test_integration` | Integration tests (requires OpenGrep) |
|
|
74
|
-
|
|
75
|
-
## Test Structure
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
tests/
|
|
79
|
-
├── unit/ # Fast tests, no external dependencies
|
|
80
|
-
└── integration/ # Requires OpenGrep binary
|
|
81
|
-
```
|
|
71
|
+
- `uv run poe qa_fast` — Lint, type check, unit tests (pre-commit)
|
|
72
|
+
- `uv run poe qa` — Full QA including integration tests
|
|
82
73
|
|
|
83
74
|
## Architecture
|
|
84
75
|
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
@docs/specs/arch.md for full architecture details.
|
|
77
|
+
|
|
87
78
|
- **OpenGrep-Powered**: Deterministic pattern matching
|
|
88
|
-
- **Two-Phase Detection**: Filesystem + content analysis for capability scoring
|
|
89
79
|
- **Framework Separation**: CLI orchestrates, framework defines rules
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reporails-cli
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Validate and score CLAUDE.md files — MCP-first AI context governance
|
|
5
|
+
Project-URL: Homepage, https://github.com/reporails/cli
|
|
6
|
+
Project-URL: Documentation, https://reporails.dev/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/reporails/cli
|
|
8
|
+
Project-URL: Issues, https://github.com/reporails/cli/issues
|
|
9
|
+
Author: Reporails Team
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,claude,claude-code,context,mcp,validation
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: httpx>=0.27.0
|
|
22
|
+
Requires-Dist: mcp>=1.0.0
|
|
23
|
+
Requires-Dist: pydantic>=2.0.0
|
|
24
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
25
|
+
Requires-Dist: rich>=13.0.0
|
|
26
|
+
Requires-Dist: typer>=0.12.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: poethepoet>=0.25.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.3.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# Reporails CLI
|
|
37
|
+
|
|
38
|
+
Score your CLAUDE.md files. See what's missing. Improve your AI coding setup.
|
|
39
|
+
[Why this exists](https://dev.to/cleverhoods/claudemd-lint-score-improve-repeat-2om5)
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### One-line install (npm)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @reporails/cli install
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This registers the MCP server with Claude Code. Then ask Claude: `What ails claude?`
|
|
50
|
+
|
|
51
|
+
### MCP Integration (manual)
|
|
52
|
+
|
|
53
|
+
For full semantic analysis, add the MCP server:
|
|
54
|
+
```bash
|
|
55
|
+
# Add the MCP and restart Claude
|
|
56
|
+
claude mcp add reporails -- uvx reporails-cli ails-mcp
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Then ask Claude:
|
|
60
|
+
```
|
|
61
|
+
❯ What ails claude?
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### CLI path (only deterministic rules)
|
|
65
|
+
```bash
|
|
66
|
+
# No install needed — run directly
|
|
67
|
+
uvx reporails-cli check
|
|
68
|
+
# or
|
|
69
|
+
npx @reporails/cli check
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
That's it. You'll get a score, capability level, and actionable violations.
|
|
73
|
+
```
|
|
74
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
75
|
+
║ SCORE: 8.1 / 10 (partial) | CAPABILITY: Governed (L5) ║
|
|
76
|
+
║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░ ║
|
|
77
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
78
|
+
|
|
79
|
+
Violations:
|
|
80
|
+
CLAUDE.md (7 issues)
|
|
81
|
+
○ MED C4.no-antipatterns :1 No NEVER or AVOID statements found
|
|
82
|
+
· LOW C12.no-version :1 No version or date marker found
|
|
83
|
+
...
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Fix the issues, run again, watch your score and your experience improve.
|
|
87
|
+
|
|
88
|
+
## Install
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Ephemeral (no install, always latest)
|
|
92
|
+
uvx reporails-cli check
|
|
93
|
+
npx @reporails/cli check
|
|
94
|
+
|
|
95
|
+
# Persistent (adds `ails` to PATH)
|
|
96
|
+
pip install reporails-cli
|
|
97
|
+
# or
|
|
98
|
+
npm install -g @reporails/cli
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Once installed, all commands use `ails` directly.
|
|
102
|
+
|
|
103
|
+
## What It Checks
|
|
104
|
+
|
|
105
|
+
- **Structure** — File organization, size limits
|
|
106
|
+
- **Content** — Clarity, completeness, anti-patterns
|
|
107
|
+
- **Efficiency** — Token usage, context management
|
|
108
|
+
- **Maintenance** — Versioning, review processes
|
|
109
|
+
- **Governance** — Ownership, security policies
|
|
110
|
+
|
|
111
|
+
## Capability Levels
|
|
112
|
+
|
|
113
|
+
| Level | Name | What it means |
|
|
114
|
+
|-------|------|---------------|
|
|
115
|
+
| L1 | Absent | No instruction file |
|
|
116
|
+
| L2 | Basic | Has CLAUDE.md |
|
|
117
|
+
| L3 | Structured | Sections, imports |
|
|
118
|
+
| L4 | Abstracted | .claude/rules/ directory |
|
|
119
|
+
| L5 | Governed | Shared files, 3+ components |
|
|
120
|
+
| L6 | Adaptive | Backbone + full governance |
|
|
121
|
+
|
|
122
|
+
## Commands
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ails check # Score your setup
|
|
126
|
+
ails check -f json # JSON output (for CI)
|
|
127
|
+
ails check --strict # Exit 1 if violations (for CI)
|
|
128
|
+
ails check --with-recommended # Include recommended rules
|
|
129
|
+
ails explain S1 # Explain a rule
|
|
130
|
+
ails map # Show project structure
|
|
131
|
+
ails map --save # Generate backbone.yml
|
|
132
|
+
ails update # Update rules framework
|
|
133
|
+
ails update --check # Check for rule updates
|
|
134
|
+
ails dismiss C6 # Dismiss a semantic finding
|
|
135
|
+
ails version # Show version info
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Updating
|
|
139
|
+
|
|
140
|
+
The **rules framework** updates separately from the CLI:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
ails update # Update rules to latest
|
|
144
|
+
ails update --check # Check without installing
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The **CLI itself** updates automatically with ephemeral runners (`uvx`, `npx`).
|
|
148
|
+
Persistent installs: `pip install --upgrade reporails-cli` or `npm install -g @reporails/cli@latest`
|
|
149
|
+
|
|
150
|
+
## Recommended Rules
|
|
151
|
+
|
|
152
|
+
The `--with-recommended` flag adds community [recommended rules](https://github.com/reporails/recommended) on top of the core set. These are methodology-backed checks (AILS_ namespace) that are auto-downloaded on first use:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
ails check --with-recommended # Include recommended rules
|
|
156
|
+
ails update --recommended # Re-fetch latest recommended rules
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Prerequisites
|
|
160
|
+
|
|
161
|
+
Depends on your install path:
|
|
162
|
+
|
|
163
|
+
- **uvx/pip path**: [uv](https://docs.astral.sh/uv/) — no separate Python install needed
|
|
164
|
+
- **npx/npm path**: Node.js >= 18 — uv is auto-installed if missing
|
|
165
|
+
- **MCP install/uninstall**: [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
|
|
166
|
+
|
|
167
|
+
## Rules
|
|
168
|
+
|
|
169
|
+
Core rules are maintained at [reporails/rules](https://github.com/reporails/rules).
|
|
170
|
+
Recommended rules at [reporails/recommended](https://github.com/reporails/recommended).
|
|
171
|
+
|
|
172
|
+
Want to add or improve rules? Please follow [Contribute](https://github.com/reporails/rules/blob/main/CONTRIBUTING.md) guide in the [Core repo](https://github.com/reporails/rules).
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
Apache 2.0
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Reporails CLI
|
|
2
|
+
|
|
3
|
+
Score your CLAUDE.md files. See what's missing. Improve your AI coding setup.
|
|
4
|
+
[Why this exists](https://dev.to/cleverhoods/claudemd-lint-score-improve-repeat-2om5)
|
|
5
|
+
|
|
6
|
+
## Quick Start
|
|
7
|
+
|
|
8
|
+
### One-line install (npm)
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @reporails/cli install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This registers the MCP server with Claude Code. Then ask Claude: `What ails claude?`
|
|
15
|
+
|
|
16
|
+
### MCP Integration (manual)
|
|
17
|
+
|
|
18
|
+
For full semantic analysis, add the MCP server:
|
|
19
|
+
```bash
|
|
20
|
+
# Add the MCP and restart Claude
|
|
21
|
+
claude mcp add reporails -- uvx reporails-cli ails-mcp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then ask Claude:
|
|
25
|
+
```
|
|
26
|
+
❯ What ails claude?
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### CLI path (only deterministic rules)
|
|
30
|
+
```bash
|
|
31
|
+
# No install needed — run directly
|
|
32
|
+
uvx reporails-cli check
|
|
33
|
+
# or
|
|
34
|
+
npx @reporails/cli check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
That's it. You'll get a score, capability level, and actionable violations.
|
|
38
|
+
```
|
|
39
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
40
|
+
║ SCORE: 8.1 / 10 (partial) | CAPABILITY: Governed (L5) ║
|
|
41
|
+
║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░ ║
|
|
42
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
43
|
+
|
|
44
|
+
Violations:
|
|
45
|
+
CLAUDE.md (7 issues)
|
|
46
|
+
○ MED C4.no-antipatterns :1 No NEVER or AVOID statements found
|
|
47
|
+
· LOW C12.no-version :1 No version or date marker found
|
|
48
|
+
...
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Fix the issues, run again, watch your score and your experience improve.
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Ephemeral (no install, always latest)
|
|
57
|
+
uvx reporails-cli check
|
|
58
|
+
npx @reporails/cli check
|
|
59
|
+
|
|
60
|
+
# Persistent (adds `ails` to PATH)
|
|
61
|
+
pip install reporails-cli
|
|
62
|
+
# or
|
|
63
|
+
npm install -g @reporails/cli
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Once installed, all commands use `ails` directly.
|
|
67
|
+
|
|
68
|
+
## What It Checks
|
|
69
|
+
|
|
70
|
+
- **Structure** — File organization, size limits
|
|
71
|
+
- **Content** — Clarity, completeness, anti-patterns
|
|
72
|
+
- **Efficiency** — Token usage, context management
|
|
73
|
+
- **Maintenance** — Versioning, review processes
|
|
74
|
+
- **Governance** — Ownership, security policies
|
|
75
|
+
|
|
76
|
+
## Capability Levels
|
|
77
|
+
|
|
78
|
+
| Level | Name | What it means |
|
|
79
|
+
|-------|------|---------------|
|
|
80
|
+
| L1 | Absent | No instruction file |
|
|
81
|
+
| L2 | Basic | Has CLAUDE.md |
|
|
82
|
+
| L3 | Structured | Sections, imports |
|
|
83
|
+
| L4 | Abstracted | .claude/rules/ directory |
|
|
84
|
+
| L5 | Governed | Shared files, 3+ components |
|
|
85
|
+
| L6 | Adaptive | Backbone + full governance |
|
|
86
|
+
|
|
87
|
+
## Commands
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
ails check # Score your setup
|
|
91
|
+
ails check -f json # JSON output (for CI)
|
|
92
|
+
ails check --strict # Exit 1 if violations (for CI)
|
|
93
|
+
ails check --with-recommended # Include recommended rules
|
|
94
|
+
ails explain S1 # Explain a rule
|
|
95
|
+
ails map # Show project structure
|
|
96
|
+
ails map --save # Generate backbone.yml
|
|
97
|
+
ails update # Update rules framework
|
|
98
|
+
ails update --check # Check for rule updates
|
|
99
|
+
ails dismiss C6 # Dismiss a semantic finding
|
|
100
|
+
ails version # Show version info
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Updating
|
|
104
|
+
|
|
105
|
+
The **rules framework** updates separately from the CLI:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
ails update # Update rules to latest
|
|
109
|
+
ails update --check # Check without installing
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The **CLI itself** updates automatically with ephemeral runners (`uvx`, `npx`).
|
|
113
|
+
Persistent installs: `pip install --upgrade reporails-cli` or `npm install -g @reporails/cli@latest`
|
|
114
|
+
|
|
115
|
+
## Recommended Rules
|
|
116
|
+
|
|
117
|
+
The `--with-recommended` flag adds community [recommended rules](https://github.com/reporails/recommended) on top of the core set. These are methodology-backed checks (AILS_ namespace) that are auto-downloaded on first use:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
ails check --with-recommended # Include recommended rules
|
|
121
|
+
ails update --recommended # Re-fetch latest recommended rules
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Prerequisites
|
|
125
|
+
|
|
126
|
+
Depends on your install path:
|
|
127
|
+
|
|
128
|
+
- **uvx/pip path**: [uv](https://docs.astral.sh/uv/) — no separate Python install needed
|
|
129
|
+
- **npx/npm path**: Node.js >= 18 — uv is auto-installed if missing
|
|
130
|
+
- **MCP install/uninstall**: [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
|
|
131
|
+
|
|
132
|
+
## Rules
|
|
133
|
+
|
|
134
|
+
Core rules are maintained at [reporails/rules](https://github.com/reporails/rules).
|
|
135
|
+
Recommended rules at [reporails/recommended](https://github.com/reporails/recommended).
|
|
136
|
+
|
|
137
|
+
Want to add or improve rules? Please follow [Contribute](https://github.com/reporails/rules/blob/main/CONTRIBUTING.md) guide in the [Core repo](https://github.com/reporails/rules).
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
Apache 2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Unreleased
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# Architecture Overview
|
|
2
2
|
|
|
3
|
-
> Version 0.1.
|
|
3
|
+
> Version 0.1.1 | AI Instruction Validator
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Reporails
|
|
8
|
-
|
|
9
|
-
**repoRAILS** = **Repo** **R**ecursive **AI** **L**inting**S**
|
|
7
|
+
Reporails validates AI coding agent instruction files against community-maintained rules.
|
|
10
8
|
|
|
11
9
|
| Purpose | Name |
|
|
12
10
|
|---------|------|
|
|
@@ -288,7 +286,7 @@ Engine extracts content
|
|
|
288
286
|
**Currently supported (v0.0.1):**
|
|
289
287
|
- Claude: `CLAUDE.md`, `.claude/rules/*.md`
|
|
290
288
|
|
|
291
|
-
**Discovery-ready (detection only, no
|
|
289
|
+
**Discovery-ready (detection only, no validation rules yet):**
|
|
292
290
|
|
|
293
291
|
| Agent | Instruction Files | Status |
|
|
294
292
|
|-------|-------------------|--------|
|