Files
bluecraft/skills/bluecraft-agentic-docs/SKILL.md
Ge Song 4fa6e18940 docs(bluecraft-agentic-docs): document explicit linking patterns and update skill rules
Add dedicated reference for root AGENTS.md to agent-docs linking patterns with
anti-patterns and explicit reference requirements. Update SKILL.md core rules to
emphasize directional, explicit references and minimal reference depth. Refine
template structures in inventory-doc-template.md and root-agents-template.md to
enforce clearer scope sections and required reading lists. Update agent interface
metadata to reflect focused maintenance scope.
2026-04-20 12:54:30 +08:00

7.9 KiB

name, description
name description
bluecraft-agentic-docs Use when creating, updating, splitting, merging, reviewing, auditing, or deleting the AGENTS.md at the root of the current Git working tree, or Markdown files inside any agent-docs/ directory

Maintain AGENTS.md and agent-docs

Overview

Use this skill to maintain the root AGENTS.md file and the applicable agent-docs/ files in the current Git working tree.

Treat covered files as required instructions. If one applies in scope, it must be followed, not treated as optional background reading.

When To Use

Use this skill when a task involves any of the following:

  • creating or editing the AGENTS.md at the root of the current Git working tree
  • creating, editing, splitting, merging, or deleting Markdown files inside any agent-docs/ directory
  • changing explicit references between AGENTS.md and agent-docs/ files
  • auditing whether AGENTS.md and agent-docs/ stay coherent, minimal, and fully connected

Do not use this skill for end-user documentation, product manuals, README content that is not part of AGENTS.md or agent-docs/, or project-specific business rules that do not govern agent-facing docs.

Core Rules

  • Each covered document should own one clear topic.
  • Titles and filenames should state purpose directly.
  • The opening section should explain what the document governs, when it applies, and that it must be followed in scope.
  • Rules should be actionable, not slogan-like.
  • Prefer standard Markdown headings and lists over wrapper tags for structure.
  • Write for maintainers. State actions, constraints, and decision criteria directly.
  • When referencing repository files from AGENTS.md or agent-docs/, prefer plain repository-relative paths in backticks such as agent-docs/example.md, not Markdown links.
  • Do not embed machine-local absolute filesystem paths such as /home/....
  • Do not mix general agentic-documentation rules with project-specific business rules, product instructions, media planning, or end-user documentation guidance in the same general-purpose file.
  • Keep common, repository-wide constraints in that root AGENTS.md.
  • In monorepos, keep common constraints in the root AGENTS.md and place subproject-specific constraints in the relevant agent-docs/ directory near that subproject.
  • Put project-specific or topic-specific constraints in the relevant child documents under agent-docs/.
  • Treat the AGENTS.md at the root of the current Git working tree as the starting point for required agent-docs.
  • Keep AGENTS.md focused on the next reading decision: reference only the agent-docs files that are actually needed.
  • Keep one authoritative home for each rule; link instead of duplicating.
  • When a file, path, or rule is obsolete, remove or update it in the same change instead of leaving stale references behind.
  • Delete or update any agent-docs file that is no longer referenced from the root AGENTS.md.
  • Prefer stable, semantic filenames.
  • Unless a specific instruction explicitly defines another base path, treat every path mentioned in the conversation or in agentic documentation as relative to the root of the current Git working tree, not relative to the current file.
  • Keep references directional and explicit: a parent document should point to the child documents that refine it.
  • Every active agent-docs file must still be reachable from the root AGENTS.md.
  • Match the child document shape to the document's job. Do not force inventory or registry documents into the same structure as rule or policy documents.

Workflow

  1. Identify the files and scope.

Start with the concrete files and scope that need to change:

  • root AGENTS.md
  • one or more agent-docs/ files
  • both root and child files
  • documentation-tree refactor
  1. Decide where the rule should live.
  • Root AGENTS.md: root entry document and repository-wide constraints
  • agent-docs/ child docs: scoped instructions for a topic, project area, or workflow

If a rule only matters within one child topic, do not keep it in the root file.

  1. Update explicit references.
  • Add or adjust references from the root file to the necessary child files.
  • If a child file introduces narrower subtopics, point to them explicitly.
  • Avoid extra reference layers unless they materially reduce ambiguity.
  • When moving project-specific constraints out of the root AGENTS.md, replace them with an explicit reference to the new child document instead of leaving the reference implicit.

See references/how-to-link-root-agents-and-agent-docs.md for reference patterns and anti-patterns.

  1. Pick the document shape.

Use the smallest fitting type:

  • rule doc: instructions, constraints, decision rules, policy, or workflow guidance
  • inventory doc: maintained list, registry, media plan, page-by-page backlog, or cleanup queue
  • hybrid doc: only when one short inventory is inseparable from the governing rules; otherwise split it

If a document spends most of its space enumerating items to maintain, do not force it into the rule-doc shape.

  1. Remove stale structure.
  • Delete obsolete files, references, and filenames in the same change.
  • If a split removes the need for an intermediate layer, remove that layer.
  • If a new file is added, ensure it is reachable from the root entrypoint.
  1. Apply the standard document shape.
  • For a root file update, use references/root-agents-template.md.
  • For a rule or policy child doc, use references/rule-doc-template.md.
  • For an inventory or registry child doc, use references/inventory-doc-template.md.
  • Use references/child-doc-template.md only as the compatibility entrypoint when you need help choosing between child templates.
  • Use standard Markdown headings and lists unless a narrower instruction requires another structure.
  • Treat inventory entry fields as a recommended starter shape, not a fixed schema. Keep only the fields that materially help maintainers scan and update the inventory.

Adapt the wording to the repository, but preserve the explicit-reference and scope model.

  1. Verify.
  • Check that the root AGENTS.md still acts as the starting point for required agent-docs.
  • Check that every active child doc is reachable from the root through explicit references.
  • Check that no rule is duplicated across multiple active files without a clear reason.
  • Check that rule docs and inventory docs are not mixed together without a clear reason.
  • Run the validation command actually used by the repository if the change affects rendered documentation or project checks.

Use references/refactor-checklist.md as the final pass.

Templates And References

  • Root file template: references/root-agents-template.md
  • Rule child template: references/rule-doc-template.md
  • Inventory child template: references/inventory-doc-template.md
  • Child template chooser: references/child-doc-template.md
  • Linking patterns: references/how-to-link-root-agents-and-agent-docs.md
  • Refactor checklist: references/refactor-checklist.md

Read only the reference files needed for the current task.

Completion Checklist

  • Does each covered document own one clear topic?
  • Does the filename clearly express the document's purpose?
  • Does the opening explain the document's purpose, trigger, and in-scope follow requirement?
  • Is the AGENTS.md at the root of the current Git working tree still the starting point for required agent-docs?
  • Is every active agent-docs/ file reachable from the root through explicit references?
  • Are obsolete paths, filenames, and documents removed?
  • Were obsolete index layers removed?
  • Does each rule live in one authoritative place?
  • Is the default path basis still the root of the current Git working tree unless an instruction explicitly overrides it?
  • Are repository-wide rules still in the root file?
  • Are topic-specific rules still in child files?
  • Are project-specific rules still kept in project-specific documents rather than the general rules layer?
  • Was the relevant repository validation command run if needed?