Skip to content

Commit 3865b5c

Browse files
docs(help): regenerate 10 stale .help features (incl. q39 staleness reference) (#95)
Key-gated handoff item (a) from specs/rag-gate-accuracy-baseline task 7: the staleness-and-maintenance reference was generated 2026-04-26 pre-refactor and documented only stale_count; it now covers the refactored StalenessReport (stale_docs et al). Regenerated all 10 stale-by-source-hash features (30 templates) with polish + soft fact-check on the fable-5 premium tier (server-side fallback beta), faithfulness judge ~$0.30.
1 parent bd0e671 commit 3865b5c

30 files changed

Lines changed: 1507 additions & 993 deletions

File tree

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
---
22
type: concept
3+
name: bootstrap-concept
34
feature: bootstrap
45
depth: concept
5-
generated_at: 2026-04-14T16:08:15.813184+00:00
6-
source_hash: 747d4d8b3e41bb5a6d7a534fb1402fcfcda15486e7b1994427f88a2f71907ebf
6+
generated_at: 2026-07-10T13:07:32.382854+00:00
7+
source_hash: 40cd7c5eca29231d1a865aa04654239348b46aed8c204904aacc473fc810affe
78
status: generated
9+
scaffold_hash: 86c6577f7fd5f4575d4b8c7ef0c1fb4ae3ef232e9436313a11797aea1ba12888
810
---
911

1012
# Bootstrap
1113

12-
Bootstrap automatically discovers features in a codebase by scanning directory structures and file patterns, then generates an initial feature manifest.
14+
Bootstrap scans an existing project and proposes an initial feature manifest, so you don't have to write one from scratch. Instead of listing every feature by hand, you run a scan, review the proposals, and convert the ones you accept into a manifest.
1315

14-
## Discovery process
16+
## How it works
1517

16-
The scanner examines your project's file system to identify potential features based on:
18+
The scan-and-convert flow has two steps, each backed by one public function:
1719

18-
- **Entry points** — Files like `main.py`, `app.py`, `cli.py`, `server.py` that typically contain application logic
19-
- **Configuration patterns** — Directories and files containing "config", "settings", or "conf" in their names
20-
- **Directory structure** — Organized code folders that suggest distinct functionality
20+
1. **`scan_project(project_root)`** walks the project's directory structure and Python package layout and returns a list of `ProposedFeature` objects — one per feature it thinks it found. The scanner skips noise directories such as `.git`, `__pycache__`, `.venv`, and `node_modules`, and it uses signals like entry-point filenames (for example `main.py`, `cli.py`, `server.py`) and configuration naming patterns (`config`, `settings`, `conf`) to decide what looks like a feature.
21+
2. **`proposals_to_manifest(proposals)`** takes the proposals you've accepted and converts them into a `FeatureManifest`, the structure the rest of the system consumes.
2122

22-
The scanner skips common directories that don't contain feature code, such as `.git`, `__pycache__`, `node_modules`, and virtual environments.
23+
Each `ProposedFeature` carries enough information for you to judge it before accepting:
2324

24-
## Feature proposals
25+
| Field | What it tells you |
26+
|---|---|
27+
| `name` | The proposed feature name |
28+
| `description` | What the scanner thinks the feature does |
29+
| `files` | The source files grouped under this feature |
30+
| `tags` | Searchable tags suggested for the feature |
31+
| `confidence` | How sure the scanner is (defaults to `medium`) |
32+
| `reason` | Why the scanner proposed this feature |
2533

26-
Each discovered feature becomes a `ProposedFeature` with these attributes:
34+
The `confidence` and `reason` fields exist because scanning is heuristic: the scanner explains its guesses so you can accept, edit, or discard each proposal rather than trusting the output blindly.
2735

28-
- **name** — Derived from directory or file names
29-
- **description** — Generated based on the context where the feature was found
30-
- **files** — List of relevant source files associated with the feature
31-
- **tags** — Categorization labels to help organize features
32-
- **confidence** — Assessment of how certain the scanner is about the feature (defaults to 'medium')
33-
- **reason** — Explanation of why this was identified as a feature
36+
## What connects to it
3437

35-
## Manifest generation
38+
Bootstrap sits at the front of the setup pipeline: it produces the manifest that scanning and generation later depend on. The rest of the codebase interacts with it through these interfaces:
3639

37-
After scanning, you can convert the feature proposals into a structured `FeatureManifest` using `proposals_to_manifest()`. This creates the foundation for documentation generation and project analysis workflows.
40+
| Interface | Purpose | File |
41+
|-----------|---------|------|
42+
| `scan_project` | Scan a project and propose features | `src/attune_author/bootstrap.py` |
43+
| `proposals_to_manifest` | Convert accepted proposals to a `FeatureManifest` | `src/attune_author/bootstrap.py` |
44+
| `ProposedFeature` | A feature discovered by scanning | `src/attune_author/bootstrap.py` |
3845

39-
The bootstrap process gives you a starting point that you can refine by accepting, rejecting, or modifying the proposed features before generating your final documentation.
46+
A useful mental model: bootstrap is the one-time (or occasional) step that turns a raw project tree into structured proposals, and `FeatureManifest` is the handoff point where its job ends and the rest of the system takes over.
Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,74 @@
11
---
22
type: reference
3+
name: bootstrap-reference
34
feature: bootstrap
45
depth: reference
5-
generated_at: 2026-04-14T16:08:35.223900+00:00
6-
source_hash: 747d4d8b3e41bb5a6d7a534fb1402fcfcda15486e7b1994427f88a2f71907ebf
6+
generated_at: 2026-07-10T13:07:32.401338+00:00
7+
source_hash: 40cd7c5eca29231d1a865aa04654239348b46aed8c204904aacc473fc810affe
78
status: generated
9+
scaffold_hash: 04376ece60b306ed2326639b284d6f17a8ea83d0455ee27fd1c9ca0edf713c11
810
---
911

1012
# Bootstrap reference
1113

12-
Scan projects and generate feature manifests from discovered code patterns.
14+
Scan a project directory to propose features and convert accepted proposals into an initial feature manifest.
15+
16+
## Functions
17+
18+
| Function | Parameters | Returns | Description | File |
19+
|----------|------------|---------|-------------|------|
20+
| `scan_project` | `project_root: str \| Path` | `list[ProposedFeature]` | Scans a project and proposes features from its directory structure. | `src/attune_author/bootstrap.py` |
21+
| `proposals_to_manifest` | `proposals: list[ProposedFeature]` | `FeatureManifest` | Converts accepted proposals to a `FeatureManifest`. | `src/attune_author/bootstrap.py` |
1322

1423
## Classes
1524

16-
| Class | Description |
17-
|-------|-------------|
18-
| `ProposedFeature` | A feature discovered by scanning |
25+
| Class | Description | File |
26+
|-------|-------------|------|
27+
| `ProposedFeature` | A feature discovered by scanning. | `src/attune_author/bootstrap.py` |
1928

2029
### ProposedFeature fields
2130

22-
| Field | Type | Default | Description |
23-
|-------|------|---------|-------------|
24-
| `name` | `str` | | Feature name |
25-
| `description` | `str` | | Human-readable description |
26-
| `files` | `list[str]` | `[]` | Associated file paths |
27-
| `tags` | `list[str]` | `[]` | Classification tags |
28-
| `confidence` | `str` | `'medium'` | Detection confidence level |
29-
| `reason` | `str` | `''` | Why this feature was proposed |
30-
31-
## Functions
31+
`ProposedFeature` is a dataclass.
3232

33-
| Function | Parameters | Returns | Description |
34-
|----------|------------|---------|-------------|
35-
| `scan_project` | `project_root: str \| Path` | `list[ProposedFeature]` | Scan a project and propose features |
36-
| `proposals_to_manifest` | `proposals: list[ProposedFeature]` | `FeatureManifest` | Convert accepted proposals to a FeatureManifest |
33+
| Field | Type | Default |
34+
|-------|------|---------|
35+
| `name` | `str` ||
36+
| `description` | `str` ||
37+
| `files` | `list[str]` | `field(default_factory=list)` |
38+
| `tags` | `list[str]` | `field(default_factory=list)` |
39+
| `confidence` | `str` | `'medium'` |
40+
| `reason` | `str` | `''` |
3741

3842
## Constants
3943

44+
These module constants control what the scanner skips and recognizes.
45+
4046
| Constant | Values | Description |
4147
|----------|--------|-------------|
42-
| `_SKIP_DIRS` | `'.git'`, `'.github'`, `'.help'`, `'.claude'`, `'.agents'`, `'__pycache__'`, `'.mypy_cache'`, `'.pytest_cache'`, `'.ruff_cache'`, `'.tox'`, `'.venv'`, `'venv'`, `'env'`, `'node_modules'`, `'dist'`, `'build'`, `'.egg-info'`, `'htmlcov'`, `'site'` | Directories to skip during scanning |
43-
| `_ENTRY_POINT_NAMES` | `'main.py'`, `'app.py'`, `'cli.py'`, `'server.py'`, `'manage.py'`, `'wsgi.py'`, `'asgi.py'`, `'index.ts'`, `'index.js'`, `'main.go'`, `'main.rs'` | Common application entry point filenames |
44-
| `_CONFIG_PATTERNS` | `'config'`, `'settings'`, `'conf'` | Filename patterns for configuration files |
48+
| `_SKIP_DIRS` | `'.git'`, `'.github'`, `'.help'`, `'.claude'`, `'.agents'`, `'__pycache__'`, `'.mypy_cache'`, `'.pytest_cache'`, `'.ruff_cache'`, `'.tox'`, `'.venv'`, `'venv'`, `'env'`, `'node_modules'`, `'dist'`, `'build'`, `'.egg-info'`, `'htmlcov'`, `'site'` | Directories the scan skips. |
49+
| `_ENTRY_POINT_NAMES` | `'main.py'`, `'app.py'`, `'cli.py'`, `'server.py'`, `'manage.py'`, `'wsgi.py'`, `'asgi.py'`, `'index.ts'`, `'index.js'`, `'main.go'`, `'main.rs'` | Filenames recognized as project entry points. |
50+
| `_CONFIG_PATTERNS` | `'config'`, `'settings'`, `'conf'` | Name patterns recognized as configuration files. |
51+
52+
## Source files
53+
54+
- `src/attune_author/bootstrap.py`
55+
56+
## Tags
57+
58+
`setup`, `scanning`, `manifest`
59+
## Faithfulness review
60+
61+
> Auto-generated by attune-author faithfulness judge. Score 0.83 fell below the configured threshold of 0.95. Review unsupported claims and either fix the source code or fix this doc.
62+
63+
**Score:** 0.83 (supported: 19, unsupported: 4)
64+
65+
### Unsupported claims
66+
67+
- The bootstrap reference was generated on 2026-07-10T13:07:32.401338+00:00
68+
- The source_hash is 40cd7c5eca29231d1a865aa04654239348b46aed8c204904aacc473fc810affe
69+
- The scaffold_hash is 04376ece60b306ed2326639b284d6f17a8ea83d0455ee27fd1c9ca0edf713c11
70+
- The tags are 'setup', 'scanning', 'manifest'
71+
72+
### Reasoning
73+
74+
The answer is primarily a reference documentation table extracted directly from the source code and docstrings provided in the passages. Nearly all technical claims about function signatures, parameter types, return types, dataclass fields, and constant values are explicitly stated in the code or docstrings. However, the generated metadata (generated_at timestamp, source_hash, scaffold_hash) and the tags listed at the bottom are not mentioned in the retrieved passages and appear to be document metadata added during generation rather than factual claims about the code itself.

.help/templates/bootstrap/task.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
11
---
22
type: task
3+
name: bootstrap-task
34
feature: bootstrap
45
depth: task
5-
generated_at: 2026-04-14T16:08:25.609534+00:00
6-
source_hash: 747d4d8b3e41bb5a6d7a534fb1402fcfcda15486e7b1994427f88a2f71907ebf
6+
generated_at: 2026-07-10T13:07:32.393353+00:00
7+
source_hash: 40cd7c5eca29231d1a865aa04654239348b46aed8c204904aacc473fc810affe
78
status: generated
9+
scaffold_hash: 1e565108f805b114bd830574e405d1c6d731937c97b5752702b3888cfe225f1c
810
---
911

1012
# Work with bootstrap
1113

12-
Use bootstrap when you need to automatically generate a feature manifest by scanning an existing project's directory structure and code organization.
14+
Use bootstrap when you're starting help authoring on an existing project and want a proposed features manifest generated from the project's directory structure instead of writing one by hand.
1315

1416
## Prerequisites
1517

1618
- Access to the project source code
17-
- Python environment with the bootstrap module available
19+
- Familiarity with `src/attune_author/bootstrap.py` and the two-stage flow: scan first, then convert accepted proposals to a manifest
1820

19-
## Scan a project for features
21+
## Steps
2022

21-
1. **Import the bootstrap module:**
22-
```python
23-
from attune_author.bootstrap import scan_project
24-
```
23+
1. **Trace the scan-to-manifest pipeline.**
24+
Read the two public functions in `src/attune_author/bootstrap.py`:
25+
- `scan_project(project_root)` walks the project and returns a `list[ProposedFeature]`. It skips noise directories such as `.git`, `__pycache__`, `.venv`, and `node_modules`, and recognizes entry-point files like `main.py`, `cli.py`, and `index.ts`.
26+
- `proposals_to_manifest(proposals)` converts the accepted proposals into a `FeatureManifest`.
2527

26-
2. **Run the project scan:**
27-
```python
28-
proposals = scan_project("/path/to/your/project")
29-
```
30-
The scanner examines your project structure, identifies entry points like `main.py` or `app.py`, and skips common directories like `.git`, `__pycache__`, and `node_modules`.
28+
2. **Pick the function that owns your change.**
29+
Modify `scan_project()` if your change affects how features are discovered — for example, which directories are skipped or how confidence is assigned. Modify `proposals_to_manifest()` if your change affects how accepted proposals become manifest entries.
3130

32-
3. **Review the proposed features:**
33-
Each `ProposedFeature` includes:
34-
- `name`: The feature identifier
35-
- `description`: What the feature does
36-
- `files`: Associated source files
37-
- `confidence`: Scanner's certainty level
38-
- `reason`: Why this feature was proposed
31+
3. **Edit the code and keep the `ProposedFeature` contract intact.**
32+
`ProposedFeature` carries `name`, `description`, `files`, `tags`, `confidence` (defaults to `'medium'`), and `reason`. If your change adds or reinterprets scan output, populate `reason` so users can see why the feature was proposed, and set `confidence` to reflect how strong the signal is.
3933

40-
## Convert proposals to manifest
34+
4. **Run the bootstrap tests.**
35+
Run `pytest -k "bootstrap"` to catch regressions before they reach other developers.
4136

42-
1. **Filter proposals as needed:**
43-
Review the confidence levels and reasons to accept or reject proposals.
37+
## Verify the change
4438

45-
2. **Generate the manifest:**
46-
```python
47-
from attune_author.bootstrap import proposals_to_manifest
48-
manifest = proposals_to_manifest(accepted_proposals)
49-
```
39+
Run `scan_project()` against a sample project root and confirm:
5040

51-
3. **Verify the output:**
52-
The resulting `FeatureManifest` should contain only the features you want to include in your project documentation.
41+
- It returns a `list[ProposedFeature]` with the fields you expect populated.
42+
- No proposals reference files inside skipped directories such as `.venv` or `__pycache__`.
43+
- Passing the proposals to `proposals_to_manifest()` produces a `FeatureManifest` without errors.
5344

54-
## Success criteria
55-
56-
- `scan_project()` returns a list of `ProposedFeature` objects
57-
- Each proposal includes relevant files from your project
58-
- The generated manifest contains structured feature definitions ready for documentation
45+
All bootstrap tests pass with `pytest -k "bootstrap"`.
5946

6047
## Key files
6148

62-
- `src/attune_author/bootstrap.py`
49+
- `src/attune_author/bootstrap.py` — contains `scan_project()`, `proposals_to_manifest()`, and the `ProposedFeature` dataclass
50+
## Faithfulness review
51+
52+
> Auto-generated by attune-author faithfulness judge. Score 0.80 fell below the configured threshold of 0.95. Review unsupported claims and either fix the source code or fix this doc.
53+
54+
**Score:** 0.80 (supported: 8, unsupported: 2)
55+
56+
### Unsupported claims
57+
58+
- scan_project() walks the project (the passage says it 'scans' but does not explicitly confirm it uses os.walk-style traversal for the initial phase)
59+
- Modify scan_project() if your change affects how confidence is assigned (the passage does not explicitly discuss how confidence assignment should guide which function to modify)
60+
61+
### Reasoning
62+
63+
The answer documentation provides guidance on working with the bootstrap module. The retrieved passages directly support the main technical claims: the presence and signatures of scan_project() and proposals_to_manifest(), the structure of ProposedFeature with its documented fields, the skipped directories (matching _SKIP_DIRS), entry-point file names (matching _ENTRY_POINT_NAMES), and the default confidence value. The answer accurately reflects what is in the code. Minor unsupported claims relate to implicit procedural guidance not explicitly stated in the passages (e.g., which function to modify for confidence changes), but these are reasonable inferences from the documented scope of each function and do not constitute significant hallucinations. The documentation is faithful to the underlying implementation.

0 commit comments

Comments
 (0)