# Guide: organise & maintain the library

Folders, moves, renames, and the habits that keep a systemHUB library navigable as it grows. Bodies are **abridged and illustrative** — full contracts in the [tool reference](/docs/tool-reference).

## The shape of a good library

systemHUB libraries work best organised **by department, in run-order**, with numbered folder prefixes so the tree reads top-to-bottom:

```
1. Marketing
2. Sales
3. Client Delivery
4. Finance
5. HR
6. Operations
```

Documents inside are **named as actions** ("Onboard a new client", "Reconcile the weekly payments") — a title should say what running the system achieves.

## Working with folders

Each section has its own folder tools:

```
→ create_folder          { "parent": "root", "title": "3. Client Delivery" }   // Systems
→ create_policy_folder   { "parent": "root", "title": "HR Policies" }          // Policies
→ create_training_folder { "parent": "root", "title": "New Starter Training" } // Trainings
```

Rename with `rename_system_folder` / `rename_policy_folder` / `rename_training_folder`; relocate documents with `move_system` / `move_policy` / `move_training`.

**Rule: read before you restructure.** Always `get_folder_tree` first and confirm with the user before bulk moves — folder structure is something teams navigate by muscle memory, and a "tidy up" an owner didn't ask for is a regression, not a favour.

## Keeping states honest

The review cycle runs on document states (see [Document lifecycle](/docs/concepts/document-lifecycle)):

- New AI drafts → `state: 1` (ORANGE) so a human reviews them.
- A useful maintenance sweep: walk the tree for `state: 2` (RED, overdue) documents and report them by owner — that's the library's review debt.
- Don't set documents to GREEN (`state: 3`) yourself unless the user explicitly says the content is approved. Approval is a human call.

## Master templates

Trees include master-template content (`isMasterTemplate: true`) supplied from the master workspace: browsable for reference, **never editable** — edit/move/publish/delete all fail, and `get_*_details` returns `404` on them by design. When a user wants "their own version" of a master template, read the template's *structure* from the tree, then create a fresh document in their folders and author it for their business.

## Tags

`add_document_tags` / `remove_document_tags` attach tags to any document — useful for cross-cutting views the folder tree can't express (e.g. tag everything touching a software tool, a compliance regime, or a client type). Keep the tag set small and deliberate; fifty ad-hoc tags are worse than none.

## Learning tracks

For trainings, `create_training_learning_track` / `edit_training_learning_track` / `remove_training_learning_tracks` group training documents into ordered tracks (e.g. "New starter week 1"). Pair with `get_document_training_progress` to report completion per track — see the [auditing guide](/docs/guides/auditing-access).
