Quickstart: Help System
Scan your project, build a feature manifest, and render your first help template in one session.
from help.bootstrap import scan_project, proposals_to_manifest
from help.generator import generate_feature_templates
from help.templates import populate
proposals = scan_project(".")
manifest = proposals_to_manifest(proposals)
feature = manifest.features[proposals[0].name]
result = generate_feature_templates(feature, help_dir=".help", project_root=".")
template = populate(result.templates[0].feature)
print(template.body)
Prerequisites
- The project is cloned and installed locally.
- The
.helpdirectory is writable.
Steps
1. Scan your project for features.
from help.bootstrap import scan_project, proposals_to_manifest
proposals = scan_project(".")
manifest = proposals_to_manifest(proposals)
print(list(manifest.features.keys()))
Expected output — a list of feature names discovered in your source tree:
['auth', 'billing', 'notifications']
2. Generate templates for one feature.
from help.generator import generate_feature_templates
feature = manifest.features["auth"]
result = generate_feature_templates(
feature, help_dir=".help", project_root="."
)
print(f"Generated {len(result.templates)} templates")
Expected output:
Generated 3 templates
The three files correspond to the concept, task, and reference depths.
3. Render and read a template.
from help.templates import populate, AudienceProfile
template = populate(
result.templates[0].feature,
audience=AudienceProfile(),
generated_dir=".help",
)
print(template.body)
You should see formatted help text for your feature. If populate returns None, confirm the template ID matches a file under .help.
4. Check for stale templates.
from help.maintenance import run_maintenance
report = run_maintenance(help_dir=".help", project_root=".")
print(f"Stale: {report.stale_count} Regenerated: {report.regenerated_count}")
Expected output when everything is current:
Stale: 0 Regenerated: 0
Next: read the task guide for generate_feature_templates to learn how to control which depth levels are generated and how to automate regeneration with run_hook.
Unresolved references
Auto-generated by attune-author fact-check. Review and either fix the source code, fix this doc, or add an override.
| Location | Severity | Issue |
|---|---|---|
| Line 15 (code fence) | error | from help.bootstrap import … — module not importable |
| Line 15 (code fence) | error | from help.generator import … — module not importable |
| Line 15 (code fence) | error | from help.templates import … — module not importable |
| Line 88 (code fence) | error | from help.maintenance import … — module not importable |
| Line 66 | error | 3 templates — actual count is 259 |