Audit and organize workspace documents: $ARGUMENTS
$ARGUMENTS should be one of:
- "audit" — Full audit of all docs in docs/workspace/
- "fix" — Audit and auto-fix all issues found
- A specific section (e.g., "articles") — Audit that section only
- A specific file path — Audit that single file
- Empty — Run full audit
What This Skill Does
The workspace at /workspace reads markdown from docs/workspace/ and renders it in the browser. This skill ensures:
- Frontmatter is clean — Only the right fields, correctly formatted
- No metadata leaks — Status fields, editorial notes, and raw frontmatter never show in the reader
- Sections match directories — Every subdirectory is a sidebar section
- Ordering is intentional —
orderfield controls sort within each section - Filenames follow conventions — Lowercase kebab-case, no prefixes,
.mdextension - Content renders correctly — Headings, lists, blockquotes, code, and task lists all work in
workspace-prose
Phase 1: Scan
Read all files in docs/workspace/ recursively:
find docs/workspace -name "*.md" -not -name "README.md" | sort
For each file, extract and check:
Frontmatter Checks
| Field | Required | Rules |
|---|---|---|
title |
Yes | Non-empty string. Sentence case or title case. No quotes needed unless special chars. |
description |
Yes | 1 sentence, under 120 chars. Shown in sidebar/listing. |
order |
Yes | Integer. Controls sort within section. |
themes |
Articles only | Array of valid EEAT theme slugs |
status |
Articles only | One of: draft, review, published |
audience |
Articles only | One of: collaborators, internal, public |
author |
Articles only | Should be "Brad Brisco" |
updated |
Articles only | ISO date YYYY-MM-DD |
Fields that must NOT appear in non-article docs:
source,url,published_at,content_type,slug— these are article-specific- Any field not in the table above for the doc type
Content Checks
| Issue | Detection | Fix |
|---|---|---|
| Frontmatter visible in body | Body starts with --- after the closing --- |
Remove duplicate frontmatter |
| Raw YAML in body | Lines like status: draft or themes: in body text |
Move to frontmatter or remove |
| Broken frontmatter | Missing closing --- |
Add closing delimiter |
| Double frontmatter | Two ---..--- blocks |
Merge into one |
| H1 duplicates title | First heading matches title field exactly |
Remove the H1 (title is rendered by the viewer) |
| Empty description | description: "" or missing |
Generate from first paragraph |
| Missing order | No order field |
Assign based on alphabetical position |
| Invalid theme slug | Theme not in EEAT taxonomy | Flag for user review |
Filename Checks
| Issue | Detection | Fix |
|---|---|---|
| Uppercase letters | [A-Z] in filename |
Rename to lowercase |
| Spaces in filename | in filename |
Replace with - |
| Underscores | _ in filename |
Replace with - |
Prefix brad-brisco- |
Starts with brad-brisco- |
Strip prefix |
| Non-.md extension | .mdx, .markdown, etc. |
Rename to .md |
Section Checks
| Issue | Detection | Fix |
|---|---|---|
| Orphan file | .md in docs/workspace/ root (not in a subdirectory) |
Move to appropriate section or flag |
| Empty section | Directory with no .md files |
Flag for removal or content |
| Unknown section | Directory not in expected set | Flag for user review |
Expected sections (see docs/workspace/README.md and WORKSPACE_SECTION_ORDER in src/lib/workspace/docs.ts):
articles— Covocational articlesauthor— Voice identity, writing prompts, digital profilebooks— Published books and e-book manuscriptsideas— Notes and brainstormsinsights— Content pipeline, EEAT, gap analysis, playbooksmeta— Conventions, templates, article index (sidebar: Editorial)podcasts— Podcast notesprojects— Active project documentsresearch— Research notes and bibliographyvideos— Video scripts and outlines
Phase 2: Report
Present findings as a table:
## Audit Results
### Issues Found: N
| File | Issue | Severity | Auto-fixable |
|------|-------|----------|-------------|
| ... | ... | error/warn | yes/no |
### Section Summary
| Section | Docs | All Clean | Issues |
|---------|------|-----------|--------|
| articles | 15 | ✓ | 0 |
| ... | ... | ... | ... |
Severity levels:
- error — Will break rendering or leak metadata (auto-fix if possible)
- warn — Should be fixed but won't break anything
- info — Suggestion for improvement
Phase 3: Fix (if requested)
For each auto-fixable issue:
- Show the proposed change
- Apply with Edit tool
- Mark as fixed in the report
For non-auto-fixable issues, explain what the user needs to decide.
Phase 4: Verify Sidebar Rendering
After fixes, verify the API returns clean data:
- Read
src/lib/workspace/docs.tsto understand how the scanner works - Confirm every section directory is scanned
- Confirm every file has valid frontmatter that the scanner can parse
- Confirm
titleanddescriptionare the ONLY fields surfaced in the sidebar listing - Confirm no raw content or metadata appears in the sidebar (only title + description)
Frontend-Safe Content Rules
These rules ensure clean rendering in the workspace-prose class:
No frontmatter in body — The viewer strips frontmatter via
gray-matter. If there's a second---block, it renders as an<hr>and raw YAML text.No editorial metadata in prose — Lines like
Status: draft,Audience: internal, orUpdated: 2026-04-07must ONLY live in frontmatter, never in the body.H1 is optional in body — The doc viewer renders the
titlefield as the page heading. If the body also has an# H1, it creates a duplicate. Prefer starting body content with H2 or a lead paragraph.Task lists render —
- [ ]and- [x]are styled byworkspace-prose. Use them freely.Tables render — Standard GFM tables work.
workspace-prosestyles them with Inter label font.Blockquotes render —
>blockquotes are styled. Use> **Practice:**for callouts.Code blocks render — Fenced code blocks with language tags work. Inline
codeis styled.Images need relative paths — Use
or absolute URLs. No broken image refs.Internal links — Use relative paths from the file's location. e.g.,
[Voice Guide](../author/voice-identity.md)
Quick Commands
Audit everything
/workspace-organize audit
Fix a specific section
/workspace-organize fix articles
Check a single file before committing
/workspace-organize docs/workspace/articles/new-article.md