agentleFS
sponge-b0bsponge-b0b/Polaris/.agents/skills/classify-doc/SKILL.md

classify-doc

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Classify, reclassify, relocate, or rename an existing Living Entity Wiki-classified non-ADR document under docs/, updating inbound references and Wiki consequences when required.

The file

Show its rules and text

We split this skill into the rules it gives an agent

33 rules. About 0 are common, 19 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use it when a document:

    line 11
  2. Very specific:

    If it is under docs/adr/, use $to-adr-doc.

    line 27
  3. Very specific:

    If new content is being created, use $to-doc.

    line 29
  4. Very specific:

    If its path is matched by docs/.wikiignore, it is outside this skill's ownership.

    line 31
  5. Very specific:

    Read docs/.wikiignore when present and apply only the exclusion grammar defined by wiki/_schema.md.

    line 35
  6. Distinctive:

    If the current path is explicitly excluded:

    line 37
  7. Distinctive:

    do not classify, move, or rename it under this skill.

    line 39
  8. Distinctive:

    do not apply Living Entity Wiki prefix rules.

    line 40
  9. Distinctive:

    follow the workflow or repository owner responsible for that documentation tree.

    line 41
  10. Very specific:

    Do not infer exclusions for unfamiliar directories.

    line 43
  11. Distinctive:

    Do not use or introduce:

    line 63
  12. Very specific:

    If current vs proposed is genuinely ambiguous, follow the schema fail-safe and use proposed.

    line 70
  13. Distinctive:

    When the active entity registry exists:

    line 83
  14. Distinctive:

    use the primary Entity ID when the document belongs to one entity.

    line 85
  15. Very specific:

    use platform- only for genuinely cross-cutting documents.

    line 86
  16. Very specific:

    do not entity/platform-prefix process documents.

    line 87
  17. Very specific:

    Use wiki/index.md for active Entity IDs.

    line 89
  18. Distinctive:

    Create only the required target directory if missing.

    line 99
  19. Distinctive:

    If classification and filename are already correct, no move is required.

    line 101
  20. Distinctive:

    Before moving or renaming the file, find references to its existing path.

    line 105
  21. Distinctive:

    Use exact path discovery.

    line 115
  22. Very specific:

    Do not recreate linked_docs.

    line 117
  23. Distinctive:

    Use git mv or an equivalent history-preserving operation.

    line 121
  24. Distinctive:

    After the move, search for the old path again and resolve any remaining valid references.

    line 132
  25. Distinctive:

    Do not add classification metadata to the document body.

    line 134
  26. Distinctive:

    If the Living Entity Wiki has not been bootstrapped, skip this step.

    line 138
  27. Distinctive:

    If classification did not change and the operation is purely structural:

    line 170
  28. Distinctive:

    update citations and references mechanically.

    line 172
  29. Distinctive:

    do not semantically rewrite wiki claims solely because their source path changed.

    line 173
  30. Very specific:

    If $wiki-sync surfaces [source-conflict], do not resolve it by:

    line 179
  31. Very specific:

    If $wiki-sync makes a substantive wiki mutation, its semantic wiki/log.md entry must land with that mutation.

    line 194
  32. Very specific:

    Do not create a commit merely because $classify-doc or $wiki-sync ran.

    line 196
  33. Very specific:

    create new classified documents — use $to-doc.

    line 216

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Classify Doc

$classify-doc owns the structural lifecycle of existing Living Entity Wiki-classified non-ADR documents under docs/.

Use it when a document:

  • is unclassified or misplaced;
  • belongs in a different document class;
  • needs relocation because its purpose changed;
  • needs its entity or platform- prefix corrected;
  • is surfaced by $wiki-lint as structurally misclassified.

For a new classified document, use $to-doc.

For an ADR, use $to-adr-doc.

1. Confirm Scope

The file must already exist, must not be an ADR, and must be inside the Living Entity Wiki document universe after docs/.wikiignore is applied.

If it is under docs/adr/, use $to-adr-doc.

If new content is being created, use $to-doc.

If its path is matched by docs/.wikiignore, it is outside this skill's ownership; use the workflow or repository owner responsible for that documentation tree.

2. Respect the Wiki Exclusion Boundary

Read docs/.wikiignore when present and apply only the exclusion grammar defined by wiki/_schema.md.

If the current path is explicitly excluded:

  • do not classify, move, or rename it under this skill;
  • do not apply Living Entity Wiki prefix rules;
  • follow the workflow or repository owner responsible for that documentation tree.

Do not infer exclusions for unfamiliar directories. If a project-owned path is not excluded and does not satisfy a normal document class, treat it as unclassified rather than inventing a new .wikiignore entry.

3. Determine Current and Target Classification

Derive the current class from the document's location.

Apply the target-class rules in wiki/_schema.md to the document's current content and purpose, not merely its existing folder.

Possible project-owned classes are:

current
proposed
research
reference
process

An existing loose or unrecognized document may be unclassified.

Do not use or introduce:

doc_class:
Doc-Class:

If current vs proposed is genuinely ambiguous, follow the schema fail-safe and use proposed.

Record:

current: <class | unclassified>
target:  <class>

4. Determine the Correct Filename and Destination

Apply the naming and cross-cutting-document rules in wiki/_schema.md.

When the active entity registry exists:

  • use the primary Entity ID when the document belongs to one entity;
  • use platform- only for genuinely cross-cutting documents;
  • do not entity/platform-prefix process documents.

Use wiki/index.md for active Entity IDs. Do not invent one.

Preserve the existing descriptive slug where reasonable.

The destination is:

docs/<target-class>/<correct-filename>

Create only the required target directory if missing.

If classification and filename are already correct, no move is required.

5. Find Inbound References

Before moving or renaming the file, find references to its existing path.

Check at minimum:

  • inline source: citations under wiki/entities/;
  • cross-cutting links in wiki/index.md;
  • other documents under docs/;
  • README.md;
  • repository instructions, skills, scripts, or configuration that explicitly reference the path.

Use exact path discovery.

Do not recreate linked_docs; inline source: citations remain the entity-document relationship mechanism.

6. Move Atomically

Use git mv or an equivalent history-preserving operation.

In the same change, update every known inbound reference to the new path.

This includes applicable:

  • inline source: citations;
  • wiki/index.md links;
  • documentation links;
  • repository instructions.

After the move, search for the old path again and resolve any remaining valid references.

Do not add classification metadata to the document body.

7. Apply Living Entity Wiki Follow-Through

If the Living Entity Wiki has not been bootstrapped, skip this step.

Otherwise invoke $wiki-sync when:

  • the document's classification authority changed;
  • an entity claim cites the moved document;
  • the document became current or proposed;
  • the document left current or proposed;
  • substantive content changed as part of the operation.

Pass the old/new class and old/new path.

Let $wiki-sync determine the semantic consequence.

In particular, do not locally assume that:

proposed → current

automatically means:

Planned → Strict Invariant

or that leaving current automatically deletes an invariant.

Those decisions require $wiki-sync's normal authority, implementation-evidence, and [source-conflict] evaluation.

Path-only move

If classification did not change and the operation is purely structural:

  • update citations and references mechanically;
  • do not semantically rewrite wiki claims solely because their source path changed.

Invoke full source reevaluation only if there is separate evidence that the claim itself may be stale.

8. Source Conflicts

If $wiki-sync surfaces [source-conflict], do not resolve it by:

  • rewriting the document;
  • altering an ADR;
  • forcing the entity wiki to follow the reclassified document;
  • choosing one authority unilaterally.

Complete safe mechanical path updates where appropriate, but leave judgment-bearing wiki changes unresolved until the conflict is resolved.

9. Commit Ownership

$classify-doc does not require a standalone commit when called by a parent workflow.

The document move, inbound-reference updates, and any resulting wiki mutation must land consistently with the caller's commit strategy.

If $wiki-sync makes a substantive wiki mutation, its semantic wiki/log.md entry must land with that mutation.

Do not create a commit merely because $classify-doc or $wiki-sync ran.

10. Report

Report:

  • old path;
  • new path;
  • current classification;
  • target classification;
  • inbound references updated;
  • whether $wiki-sync ran;
  • resulting wiki changes or unresolved review;
  • any [source-conflict].

Out of Scope

$classify-doc does not:

  • classify, move, or manage documentation matched by docs/.wikiignore;
  • create new classified documents — use $to-doc;
  • manage ADR lifecycle — use $to-adr-doc;
  • own classification, naming, or exclusion policy — see wiki/_schema.md;
  • decide entity topology — use $wiki-sync;
  • resolve [source-conflict];
  • rewrite content merely to justify a preferred classification;
  • maintain linked_docs;
  • perform a full wiki audit — use $wiki-lint.

Its responsibility is to put an existing classified non-ADR document in the correct structural location without breaking references or derived architectural knowledge.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.