* feat: add request-scoped context policies Add named turn profiles under agents.defaults so callers can opt into per-request context and tool policies without changing default chat behavior. Profiles can disable history, system context, skill prompts, or tools, and can limit skills/tools with allow lists. Wire profile selection through Pico message payloads, agent turn execution, Web chat selection, and Web visual config. Reject invalid turn profiles before saving config through Web APIs and document the new request context policy behavior. * fix: address turn profile review blockers * feat: simplify request context policy config * fix: suppress tool prompt when turn tools are disabled * fix: enforce turn profile tool restrictions
PicoClaw Documentation
PicoClaw documentation is organized by document type first and language second.
This file describes the recommended documentation layout, how translated files should be named, and what make lint-docs currently checks locally.
These conventions are intended as contributor guidance for new or moved docs. Existing docs may still have historical exceptions, and make lint-docs only checks a common subset of the patterns described here.
Reader Navigation
If you are browsing docs rather than reorganizing them, start with these directory indexes:
- Guides: setup, configuration, provider, and workflow guides.
- Reference: precise configuration and behavior reference.
- Operations: debugging and troubleshooting material.
- Security: security-focused guides and controls.
- Architecture: implementation notes and internal design docs.
- Migration: upgrade and migration notes.
For channel-specific setup, start with Chat Apps Configuration and then drill into docs/channels/<name>/README.md as needed.
Principles
- Choose the document type directory first. Do not create language buckets such as
docs/zh/ordocs/fr/. - Keep each translated document next to its English source document.
- Use English as the base filename with no locale suffix.
- Use lowercase locale suffixes for translations, for example
configuration.zh.mdorREADME.pt-br.md. - Keep module-specific docs next to the code they describe instead of moving them into
docs/.
Recommended Directories
README.md: English project entry document at the repository root.docs/project/: translated project entry documents such asREADME.zh.mdandCONTRIBUTING.zh.md.docs/guides/: setup and usage guides.docs/reference/: reference material and detailed configuration docs.docs/operations/: debugging and troubleshooting docs.docs/security/: security-related documentation.docs/architecture/: architecture and internal design notes.docs/channels/: channel-specific integration guides.docs/design/: design proposals and investigations.docs/migration/: migration notes.
Recommended Naming
- English documents use the base filename:
README.mdconfiguration.md
- Translations use
.<locale>.md:README.zh.mdconfiguration.fr.mdREADME.pt-br.md
- Code-adjacent translated READMEs follow the same rule:
pkg/audio/asr/README.zh.mdpkg/isolation/README.zh.md
Common Patterns To Avoid
- Root-level translated entry docs such as
README.zh.mdorCONTRIBUTING.fr.md- Use
docs/project/README.zh.mdordocs/project/CONTRIBUTING.fr.mdinstead.
- Use
- Language directories under
docs/such asdocs/zh/,docs/ZH/,docs/ja/, ordocs/fr/- Use
docs/<type>/<name>.<locale>.mdinstead.
- Use
- Nested locale buckets such as
docs/guides/zh/configuration.mdordocs/channels/telegram/zh/README.md- Keep translations beside the English source file instead.
- Legacy translation filenames such as
README_zh.mdorREADME_CN.md- Use
README.zh.md.
- Use
- Non-canonical locale suffixes such as
configuration_zh.mdorconfiguration.ZH.md- Use lowercase
.<locale>.md, for exampleconfiguration.zh.md.
- Use lowercase
Translation Placement
- For docs under
docs/guides,docs/reference,docs/operations,docs/security,docs/architecture,docs/channels, anddocs/migration, keep translations beside the English source file. - For project entry translations, keep translated files in
docs/project/and keep the English source in the repository root. - In most cases, each translated file should have an English source document:
docs/guides/configuration.zh.mdusually sits besidedocs/guides/configuration.mddocs/project/README.zh.mdusually corresponds toREADME.md
- Exception:
docs/design/may contain locale-specific working notes without an English source document. The naming rules still apply there.
Code-Adjacent Docs
Keep documentation next to the implementation when it primarily describes a package, command, example, or subproject.
Examples:
pkg/**/README.mdcmd/**/README.mdweb/README.mdexamples/**/README.md
These files still follow the same translation naming rules.
Adding a New Document
- Pick the correct document type directory.
- Create the English source file first.
- Add translated siblings after the English source exists when that source is part of the same docs set.
- Update links from existing docs when the new doc becomes a navigation target.
- Run
make lint-docslocally when adding or moving docs.
Examples
- New setup guide:
docs/guides/launcher-setup.mddocs/guides/launcher-setup.zh.md
- New security guide:
docs/security/token-rotation.md
- New translated package README:
pkg/channels/README.zh.md
Validation
Run:
make lint-docs
The local docs linter currently checks these common cases:
- no root-level translated
READMEorCONTRIBUTINGfiles - no
docs/<locale>/language buckets, regardless of case - no nested locale buckets under typed docs directories
- no legacy
README_*.mdfilenames - no non-canonical translation-like filenames such as
_zh.mdor.ZH.md - no extra Markdown files directly under
docs/exceptdocs/README.md - every translated Markdown file has a matching English source file
- except for locale-specific working notes under
docs/design/
- except for locale-specific working notes under
make lint-docs is a local consistency check for common naming and placement mistakes. It helps contributors stay close to the recommended layout, but it is not intended to describe every acceptable documentation pattern in the repository.
When a check fails, make lint-docs prints the failing path, the reason, and a suggested fix.
If you change these recommendations or want the local linter to reflect them more closely, update this file and scripts/lint-docs.sh together.