Files
chemenu/docs/how-to/export-guidelines.md
T
torbenandClaude Opus 5.5 f9056c04f7
CI / verify (push) Successful in 6m17s
CI / pwsh (push) Successful in 1m59s
Release / release (push) Successful in 35s
feat: docs/ carries the operator's how-to guides, a configuration reference and the architecture and telemetry explanations carved out of README.md, INSTALL.md, INSTALL-MCP.md and EVALS.md; the last two retired (#190)
Files changed:
- .gitea/workflows/ci.yml
- .gitignore
- .vibe/hooks.toml
- AGENTS.md
- CHANGES.md
- EVALS.md
- INSTALL-MCP.md
- INSTALL.md
- README.md
- VERSION
- docs/dev/development.md
- docs/explanation/README.md
- docs/explanation/architecture.md
- docs/explanation/language-boundaries.md
- docs/explanation/telemetry-and-evaluation.md
- docs/how-to/README.md
- docs/how-to/browse-with-obsidian.md
- docs/how-to/capture-repository-docs.md
- docs/how-to/export-guidelines.md
- docs/how-to/ingest-a-source.md
- docs/how-to/maintain-the-wiki.md
- docs/how-to/query-the-wiki.md
- docs/how-to/run-the-weekly-review.md
- docs/how-to/set-up-the-mcp-server.md
- docs/how-to/trace-and-score-sessions.md
- docs/how-to/troubleshoot.md
- docs/how-to/update-an-instance.md
- docs/reference/README.md
- docs/reference/commands/distribution-and-versioning.md
- docs/reference/commands/instance-health.md
- docs/reference/commands/raw-material-and-uploads.md
- docs/reference/commands/telemetry.md
- docs/reference/commands/types-instructions-and-docs.md
- docs/reference/configuration.md
- instructions/dev/dev-setup.md
- instructions/dev/doc-pull-through.md
- instructions/dev/stack-build/SKILL.md
- instructions/dev/testing-conventions.md
- instructions/dev/version-parts.md
- instructions/setup-instance.md
- instructions/upgrade-instance.md
- reports/CONTRACT.md
- tools/.coveragerc
- tools/CONTRACT.md
- tools/README.md
- tools/chemenu/commands/dist_cmd.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/doctor.py
- tools/chemenu/commands/eval_cmd.py
- tools/chemenu/commands/git_publish.py
- tools/chemenu/commands/upload_cmd.py
- tools/chemenu/commands/version_cmd.py
- tools/chemenu/evals/__init__.py
- tools/chemenu/evals/scorecard.py
- tools/chemenu/evals/trajectory.py
- tools/chemenu/telemetry/policy.py
- tools/chemenu/tests/test_dist_cmd.py
- tools/chemenu/tests/test_git_publish.py
- tools/chemenu/tests/test_instructions_shell.py
- tools/chemenu/tests/test_pipeline_l0.py
- tools/chemenu/toc.py

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
2026-10-07 05:13:56 +02:00

55 lines
2.2 KiB
Markdown

# Export guidelines to captured repositories
The repositories the wiki captures documentation from can get something back: the wiki's
guidelines, as one generated `GUIDELINES.md` in each repository's root, which that repository's own
agents then read.
## What you prepare
- **Decide which pages count as guidelines.** That decision is yours, and it is written down in
`kb/CONVENTIONS.md` § Guidelines for other repositories. Usually it is a tag. To see the file
exactly as it would be written, without touching any repository:
```bash
tools/wikitool export guidelines --tag guideline
```
- **Opt each repository in, by hand, once.** A repository takes part only if it carries a
`GUIDELINES.md` whose first line is exactly:
```markdown
<!-- wikitool:export kind=guidelines -->
```
Commit that one line there. Then point the repository's own `AGENTS.md` at the file (for Claude
Code: `@GUIDELINES.md`). A `GUIDELINES.md` without that first line is hand-written, and the export
never touches it.
The repository has to be one the wiki has captured
([Capture documentation from a git repository](capture-repository-docs.md)). That is how the export
knows where the repository lives. Its capture also has to follow a branch: a repository captured by
a tag pattern is skipped, because a tag has no branch to commit onto.
## What you say
```text
Roll out the guidelines to the captured repositories
```
## Where the agent stops
The agent runs `export guidelines --push`, which stops before pushing anything. This is the
**Guideline Push Gate** (exit 42). For every repository, it prints the status, the diff it would
write and a `--confirm <token>` line. The agent puts every diff in front of you. Only your approval
pushes, and then only one commit per repository, which changes only `GUIDELINES.md` and goes
straight onto its branch.
The token is a digest of each target's branch tip and of the generated file. If a branch has moved
or a guideline was edited since you looked, the gate asks again rather than pushing something you
did not see.
## Related
- [Guideline export commands](../reference/commands/guideline-export.md)
- [Why the gates are code](../explanation/why-gates-are-code.md)