docs(bluecraft-agentic-docs): refine documentation structure terminology and patterns

Update skill definition and templates to use "references" instead of "routing"
throughout, clarify the root AGENTS.md as the entry document for agent-docs, and
add explicit linking patterns guidance. Improve template wording to emphasize
directional, explicit references and minimal reference depth.

- Rename and expand linking patterns reference
- Update SKILL.md trigger conditions and core rules
- Refine child doc template compatibility note
- Update refactor checklist to focus on reference depth
- Simplify root AGENTS.md template structure
This commit is contained in:
2026-04-20 12:48:31 +08:00
parent 98d5818b32
commit 3bf898afab
5 changed files with 33 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
# Routing Patterns
# `agent-docs` Linking Patterns
## Preferred Patterns
@@ -7,7 +7,7 @@
Use when the repository has a small set of clearly separate instruction topics.
```md
# Required Instructions Before Editing
# Read Required `agent-docs` Before Editing
- Read and follow `agent-docs/topic-a.md` when ...
- Read and follow `agent-docs/topic-b.md` when ...
@@ -15,7 +15,7 @@ Use when the repository has a small set of clearly separate instruction topics.
### Root -> Project Doc -> Leaf Docs
Use when one project-specific document can route to several closely related leaf docs.
Use when one project-specific document should explicitly reference several closely related leaf docs.
```md
AGENTS.md
@@ -24,7 +24,7 @@ AGENTS.md
-> agent-docs/topic-b.md
```
Use this only when the intermediate layer reduces ambiguity or repeated routing text.
Use this only when the intermediate layer reduces ambiguity or repeated cross-reference text.
### Root -> Subproject `agent-docs/`
@@ -42,15 +42,15 @@ Common rules stay in the root `AGENTS.md`. Subproject-specific rules stay near t
- Root file linking to every leaf doc in a large tree without grouping
- Child docs that are never reachable from the root
- Topic-specific rules stored in the root file without a routing reason
- Topic-specific rules stored in the root file without a reference reason
- Extra index files that only restate links without adding scope or decision logic
- Moving rules out of the root file without leaving an explicit route to the new child file
- Moving rules out of the root file without leaving an explicit reference to the new child file
- Keeping monorepo-wide and subproject-specific constraints mixed together in the same root section when they can be separated cleanly
## Routing Rule
## Explicit Reference Rule
Parent documents should point to the child documents that refine them.
If a child document exists and is active, there must be an explicit path from the root `AGENTS.md` to that document.
If a child document exists and is active, there must be an explicit reference path from the root `AGENTS.md` to that document.
The root `AGENTS.md` should route only to the next instruction documents that are actually needed. Do not add unnecessary next-step links just for completeness.
The root `AGENTS.md` should list only the next `agent-docs` documents that are actually needed. Do not add unnecessary next-step links just for completeness.

View File

@@ -16,4 +16,4 @@ Use this reference when you know you are editing a Markdown file inside `agent-d
## Compatibility Note
Older repositories may still refer to `references/child-doc-template.md` as the default child template. Keep this file as the entrypoint, but route new work to the specific template that matches the document's job.
Older repositories may still refer to `references/child-doc-template.md` as the default child template. Keep this file as the entrypoint, but point new work to the specific template that matches the document's job.

View File

@@ -5,7 +5,7 @@ Use this checklist after changing the root `AGENTS.md` or any file in `agent-doc
- Does each covered document own one clear topic?
- Does each filename clearly express the document's purpose?
- Does each opening explain purpose, trigger, and that the document must be followed in scope?
- Is the `AGENTS.md` at the root of the current Git working tree still the primary routing entrypoint?
- Is the `AGENTS.md` at the root of the current Git working tree still the root entry document?
- Does every active `agent-docs/` file have an explicit path from the root?
- Does each child doc use the right shape for its job: rule doc versus inventory doc?
- Did you remove stale references, filenames, and replaced paths?
@@ -15,5 +15,5 @@ Use this checklist after changing the root `AGENTS.md` or any file in `agent-doc
- Is the default path basis still the root of the current Git working tree unless explicitly overridden?
- Are repository-wide constraints still in the root file?
- Are topic-specific constraints still in child docs?
- Did you keep routing depth minimal?
- Did you keep reference depth minimal?
- If the repository has a validation command, did you run it?

View File

@@ -7,7 +7,7 @@ Use this structure for the `AGENTS.md` at the root of the current Git working tr
```md
# Root Entry
- State that this file is the primary routing entrypoint for the repository's agentic documentation tree.
- State that this file is the root entry for the repository's `agent-docs`.
- Define the default path basis.
# Common Constraints
@@ -15,9 +15,9 @@ Use this structure for the `AGENTS.md` at the root of the current Git working tr
- Keep repository-wide rules here.
- Do not repeat topic-specific rules that belong in child docs.
# Required Instructions Before Editing
# Read Required `agent-docs` Before Editing
- Route to the required child instruction docs.
- List the required `agent-docs` explicitly.
- Use explicit "Read and follow ..." wording.
```
@@ -25,6 +25,6 @@ Use this structure for the `AGENTS.md` at the root of the current Git working tr
- Keep this file short.
- Treat this file as an instruction document, not a passive index.
- Route to child docs only when they are actually needed.
- When routing to child docs, write repository-relative paths in backticks such as `agent-docs/example.md`, not Markdown links or machine-local absolute filesystem paths.
- Reference child docs only when they are actually needed.
- When referring to child docs, write repository-relative paths in backticks such as `agent-docs/example.md`, not Markdown links or machine-local absolute filesystem paths.
- Do not turn the root file into a dump of all topic-specific rules.