Skip to content

Commit 1d29c74

Browse files
committed
update stale agent, readme file and smart defaults
1 parent 0bc0803 commit 1d29c74

3 files changed

Lines changed: 30 additions & 12 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ npx --yes jscpd docsible --pattern "**/*.py"
3434

3535
`jscpd` is informational: its current baseline is 21 clones and 1.30% duplicated lines, not a zero-threshold gate. Update the baseline only after reviewing intentional duplication.
3636

37-
## Verified Baseline (2026-08-27)
37+
## Verified Baseline (2026-09-13)
3838

39-
- `uv run pytest`: 1156 passed, 10 warnings.
40-
- `uv run ruff check .`: 47 findings.
41-
- `uv run mypy docsible`: 3 errors in 2 files.
39+
- `uv run pytest` passes with 1215 tests (3 xpassed).
40+
- `uv run ruff check .` reports no findings.
41+
- `uv run mypy docsible` reports no issues.
4242

4343
Treat these results as a starting point, not permission to introduce additional failures.

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ Project home: https://github.com/jier/docsible
6262
- Preset system — four built-in presets covering personal, team, enterprise, and consulting use cases
6363
- Suppression system — silence false-positive recommendations with audit trail and optional expiry
6464
- Interactive setup wizard (`docsible init`) with optional CI/CD workflow generation
65+
- Source-backed `RoleExecutionGraph` — typed include/import, cross-role, notification and variable edges, each with static / dynamic / unknown resolution and a source location
66+
- README "Execution Routes" + "Execution Graph Summary" — role entry point, statically vs dynamically reachable and unreachable files, and dynamic boundaries, instead of filesystem-order phases
67+
- Collections get per-role documentation plus a collection-level complexity overview and a role index sorted by complexity
68+
- Machine-readable `--output-format json` exposes the complexity metrics and the serialized execution graph for CI and downstream renderers
6569

6670
## Installation
6771

@@ -125,7 +129,8 @@ docsible scan collection . --fail-on warning --output-format json
125129

126130
### `--output-format json`
127131

128-
Use `--output-format json` with `docsible analyze role` for machine-readable output:
132+
Use `--output-format json` with `docsible analyze role` (also supported by
133+
`validate role` and `document role`) for machine-readable output:
129134

130135
```bash
131136
docsible analyze role --role . --output-format json
@@ -137,13 +142,26 @@ Output schema:
137142
{
138143
"role": "my-role",
139144
"findings": [
140-
{ "severity": "WARNING", "message": "No example playbook found", "category": "documentation" }
145+
{ "severity": "warning", "message": "No example playbook found", "category": "documentation" }
141146
],
142-
"summary": { "total": 3, "critical": 0, "warning": 2, "info": 1 },
143-
"truncated": false
147+
"summary": { "total": 3, "shown": 3, "critical": 0, "warning": 2, "info": 1 },
148+
"truncated": false,
149+
"complexity": {
150+
"total_tasks": 3, "task_files": 1, "handlers": 0,
151+
"task_includes": 0, "conditional_tasks": 1, "error_handlers": 0,
152+
"static_reachable_task_files": 1, "dynamically_reachable_task_files": 0,
153+
"unreachable_task_files": 0, "dynamic_boundaries": 0, "loop_tasks": 0,
154+
"notification_edges": 0, "collection_dependencies": 0
155+
},
156+
"execution_graph": { "role_id": "role:my-role", "nodes": ["..."], "edges": ["..."] }
144157
}
145158
```
146159

160+
`complexity` is derived from the `RoleExecutionGraph` (the single source of
161+
truth for boundary, loop, notification and reachability counts), and
162+
`execution_graph` is the full serialized node/edge model. `truncated` applies
163+
to `findings`; the graph itself is never truncated.
164+
147165
### Ready-to-use CI examples
148166

149167
See [`examples/ci_pipeline/`](examples/ci_pipeline/) for complete, ready-to-use configurations:

tests/defaults/test_smart_defaults_cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def test_complex_role_gets_graphs_by_default(self, complex_role_fixture, tmp_pat
4949
# Complex role should have visualization enabled (smart default)
5050
content = output_file.read_text()
5151

52-
# Complex roles may use either Mermaid diagrams OR execution phases
52+
# Complex roles may use either Mermaid diagrams OR execution routes
5353
has_mermaid = "```mermaid" in content
54-
has_execution_phases = "Execution Phases" in content
54+
has_execution_routes = "Execution Routes" in content
5555
has_architecture = "Architecture Overview" in content
5656

57-
assert has_mermaid or (has_execution_phases and has_architecture), \
58-
f"Complex role should have visualization (mermaid: {has_mermaid}, phases: {has_execution_phases}, arch: {has_architecture})"
57+
assert has_mermaid or (has_execution_routes and has_architecture), \
58+
f"Complex role should have visualization (mermaid: {has_mermaid}, routes: {has_execution_routes}, arch: {has_architecture})"
5959

6060
def test_user_override_respected(self, simple_role, tmp_path):
6161
"""User --graph flag should override smart default."""

0 commit comments

Comments
 (0)