project-doc-restructure
Skill1 starsChanged 9 months agoMITView on GitHub
Transform project documentation to follow session-continuous patterns with Inverted Pyramid structure. Use when working with PROJECT.md, PROJEKT.md, or similar project management documents that need restructuring for better session continuity, or when users mention reducing Time-to-Orientation, improving documentation health scores, or following session-continuous principles. Validates metrics (TTO, SCI, CLS, DocDebt), detects anti-patterns (chronicle, redundancy, wall-of-text), and automatically restructures documents into three layers: ACTION (Executive Summary, Immediate Actions) then CONTEXT (Phase Status, Active Work) then ARCHIVE (Completed and Planned phases collapsed).
In this repository8 other files it gives its agents.
- auto-taskSkill
- claude-md-restructureSkill
- prioritize-tasksSkill
- project-initSkill
- session-refreshSkill
- session-workflowSkill
- task-orchestratorSkill
- task-schedulerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 21 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 85
Use when you need to assess document quality before restructuring:
- Distinctive: line 106
Use when investigating specific documentation issues:
- Distinctive: line 127
Use when fully automating the transformation:
- Distinctive: line 144
Add Decision Log and Reference sections
- Distinctive: line 167
When to read: When you need detailed guidance on applying specific patterns or resolving edge cases.
- Distinctive: line 187
Restructuring preserves functionality: - no breaking changes after document restructure
- Distinctive: line 240
If health score < 50: Restructure automatically
- Distinctive: line 241
If health score 50-75: Fix specific anti-patterns manually
- Distinctive: line 249
Run both validation and anti-pattern detection
- Distinctive: line 251
If score < 75: Recommend restructuring
- Distinctive: line 252
If anti-patterns found: Explain impacts on TTO and SCI
- Distinctive: line 270
Document > 16 KB (regardless of health score)
- Distinctive: line 276
Document 12-16 KB (size reduction needed, even if health score > 75)
- Distinctive: line 282
Document has unique structure not fitting standard patterns
- Distinctive: line 284
Size Override Rule: Document size >= 12 KB triggers at minimum semi-automated action, regardless of health score.
- Distinctive: line 288
Always run validation after restructuring:
- Distinctive: line 316
Fix: Remove outdated content (~~strikethrough~~), delete TODOs, focus top 50 lines on actionable info
- Distinctive: line 322
Run standard restructure as baseline
- Distinctive: line 324
Document custom patterns in Decision Log
- Distinctive: line 325
Consider contributing back as reference material
- Very specific: line 391
After running restructure_document.py, the script automatically checks for migratable phases and displays a hint:
- Very specific: line 416
Verify
/run-next-tasksstill works: after migration (7-column schema preserved) - Distinctive: line 417
Use for historical phases only: - keep active and planned phases inline
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Project Documentation Restructuring
Transform traditional project documentation into session-continuous format following the "Inverted Pyramid" pattern for optimal Time-to-Orientation (TTO < 1min) and cognitive load reduction.
Quick Start
Most common workflow:
- Validate current document:
python3 scripts/validate_doc_metrics.py <project-file> - Detect anti-patterns:
python3 scripts/detect_anti_patterns.py <project-file> - Automatically restructure:
python3 scripts/restructure_document.py <project-file>
The restructure script automatically backs up the original to <file>.backup.
Core Principles
This skill applies patterns from "Konzept Session-kontinuierliche Projektdokumentation":
1. Inverted Pyramid Structure
Documents are organized by urgency, not chronology:
LAYER 1: ACTION LAYER (What NOW?)
├─ 📊 Executive Summary (3-5 sentences)
├─ 🎯 Immediate Next Actions (2-5 tasks)
└─ Quick Decision Points
LAYER 2: CONTEXT LAYER (What's the status?)
├─ 📈 Phase Status Overview (table)
└─ 🔄 Active Phase Details (expanded)
LAYER 3: ARCHIVE LAYER (What was/comes?)
├─ 🚀 Planned Phases (summary inline, details on demand)
├─ 📋 Completed Phases (migrated to docs/phases/)
└─ 📚 Reference Information (separate files with links)2. Progressive Disclosure
- Expanded: Active work, blocked items
- Migrated (separate file with link): Completed, planned, archived content
- Criterion: Status + recency determines visibility
3. Quality Metrics
Target scores:
- TTO < 1min: New session orients in under 1 minute
- SCI > 0.8: 80% of sessions continue correct task
- CLS < 3: Low cognitive load (1-10 scale)
- DocDebt < 0.2: Less than 20% outdated
- Health Score ≥ 75: Overall document health
Detailed Workflows
Validation Workflow
Use when you need to assess document quality before restructuring:
python3 scripts/validate_doc_metrics.py PROJECT.mdChecks performed:
- Executive Summary exists in top 100 lines (ideally top 20)
- Immediate Actions section present
- Timestamp exists and is recent (< 30 days optimal)
- Appropriate use of collapsed sections (for docs > 500 lines)
- Signal-to-noise ratio in top 50 lines
- Overall health score (0-100)
Exit codes:
0: Health score ≥ 75 (healthy)1: Health score 50-74 (needs improvement)2: Health score < 50 (critical)
Anti-Pattern Detection
Use when investigating specific documentation issues:
python3 scripts/detect_anti_patterns.py PROJECT.mdDetects:
- Chronicle Pattern: Chronological organization (oldest first)
- Redundancy: Duplicate information across sections
- Wall of Text: Lack of visual hierarchy (long unstructured paragraphs)
- Premature Optimization: Future planning before current status
- Assumed Context: Unexplained acronyms, task IDs without context
- HTML Details Blocks:
<details>tags hiding content inline instead of migrating to separate files
Exit codes:
0: No anti-patterns1: Medium-severity issues2: High-severity issues
Restructuring Workflow
Use when fully automating the transformation:
# Restructure in place (creates .backup):
python3 scripts/restructure_document.py PROJECT.md
# Or specify output file:
python3 scripts/restructure_document.py PROJECT.md PROJECT_NEW.mdWhat it does:
- Parse document sections and classify (ACTIVE, COMPLETED, PLANNED, ARCHIVE)
- Generate Executive Summary with extracted status
- Extract Immediate Actions from uncompleted checkboxes
- Build Phase Status Overview table
- Apply emoji system (📊🎯📈🔄📋🚀📚)
- Migrate non-active sections to
docs/phases/(with inline link) - Add Decision Log and Reference sections
Post-restructure tasks: The automated restructuring provides an 80% solution. Manual review needed for:
- Executive Summary: Update with actual project context
- Immediate Actions: Add specific task context (why, what, how)
- Phase descriptions: Verify auto-detected classifications
- Decision points: Add meaningful options
Reference Material
Pattern Reference
See references/konzept-patterns.md for complete pattern catalog including:
- Inverted Pyramid implementation details
- Progressive Disclosure rules
- Single Source of Truth (SSOT) pattern
- Temporal Layering strategy
- F-Pattern reading optimization
- 7±2 Chunks Rule (Miller's Law)
- Visual hierarchy with emoji system
- Complete anti-pattern catalog
When to read: When you need detailed guidance on applying specific patterns or resolving edge cases.
Template Asset & Task Schema Compatibility
See assets/projekt-template.md for a complete PROJECT.md template with placeholders.
Usage: Copy template for new projects, replace {{PLACEHOLDERS}} with actual content.
⚡ Task Schema Compatibility (Critical)
This skill maintains 7-column task schema compatibility with task-scheduler:
| UUID | Task | Status | Dependencies | Effort | Deliverable | Task-File |
|------|------|--------|--------------|--------|-------------|-----------|Why this matters:
- Dependencies column enables
/run-next-tasksdependency resolution - task-scheduler parses this exact schema to find ready tasks
- Restructuring preserves functionality - no breaking changes after document restructure
- Synchronized with project-init (Single Source of Truth principle)
Verification (after restructuring):
# Verify 7-column schema is present:
grep -A1 "| UUID | Task | Status | Dependencies" PROJECT.md
# Expected: ✅ Found (confirms task-scheduler compatibility)
# Test task-scheduler still works:
/run-next-tasks
# Expected: ✅ Ready tasks identified correctlyWhen did this align? 2026-01-20 (synchronized both templates to prevent breaking changes)
Emoji System
Apply consistently for visual hierarchy:
| Emoji | Usage | Placement |
| 📊 | Status, Overview | Executive Summary, metrics |
| 🎯 | Actions, To-Do | Immediate Actions |
| 📈 | Progress, Status | Phase Status Overview |
| 🔄 | Active Work | In-progress phases |
| ✅ | Completed | Checkboxes, finished items |
| 📋 | Completed Phase | Completed phase headers |
| 🚀 | Planned | Future work |
| ⏳ | Waiting | Pending tasks |
| 🧪 | Testing | QA phases |
| 🏗️ | Architecture | System design sections |
| 📚 | Reference | Documentation, lookup |
| ⚠️ | Warning | Problems, blockers |
Common Scenarios
Scenario 1: New Project Documentation
User says: "I need to create project documentation for [project name]"
Workflow:
- Use template:
cp assets/projekt-template.md PROJECT.md - Fill placeholders with project details
- Validate:
python3 scripts/validate_doc_metrics.py PROJECT.md
Scenario 2: Existing Document Needs Improvement
User says: "My PROJECT.md is messy and hard to navigate"
Workflow:
- Validate:
python3 scripts/validate_doc_metrics.py PROJECT.md - Detect issues:
python3 scripts/detect_anti_patterns.py PROJECT.md - If health score < 50: Restructure automatically
- If health score 50-75: Fix specific anti-patterns manually
- Revalidate after changes
Scenario 3: Review Before Team Handoff
User says: "Can you check if this documentation is ready for the team?"
Workflow:
- Run both validation and anti-pattern detection
- Report health score and critical issues
- If score < 75: Recommend restructuring
- If anti-patterns found: Explain impacts on TTO and SCI
Scenario 4: Apply Konzept Principles
User references: "@Konzept_Session-kontinuierliche_Projektdokumentation.md" or mentions "session-continuous"
Workflow:
- Recognize this triggers full restructuring
- Explain Inverted Pyramid rationale
- Run automatic restructure
- Highlight manual review areas (Executive Summary, Actions)
- Validate final result
Decision Logic for Automation Level
Fully automate (restructure script) when:
- Health score < 50 (critical)
- Multiple high-severity anti-patterns (including
<details>blocks) - Document > 16 KB (regardless of health score)
- User explicitly requests "restructure" or "apply Konzept patterns"
Semi-automate (guided fixes) when:
- Health score 50-75 (needs improvement)
- 1-2 medium-severity anti-patterns
- Document 12-16 KB (size reduction needed, even if health score > 75)
<details>blocks detected (migrate to separate files)
Manual only (provide guidance) when:
- Health score > 75 AND document < 12 KB AND no
<details>blocks - User wants to understand patterns first
- Document has unique structure not fitting standard patterns
Size Override Rule: Document size >= 12 KB triggers at minimum semi-automated action, regardless of health score. A document can be structurally sound but too large for efficient session orientation.
Validation After Changes
Always run validation after restructuring:
# After restructuring:
python3 scripts/validate_doc_metrics.py PROJECT.md
# Should show improved scores:
# [ OK ] Executive Summary (line 7)
# [ OK ] Immediate Actions section found
# [ OK ] Document fresh (updated 0 days ago)
# 🟢 HEALTHY - Overall health: 85/100Troubleshooting
Issue: "Executive Summary too far down (line 150)" Fix: Move or create Executive Summary at top (after header)
Issue: "Chronological organization detected" Fix: Reorder sections: Current Status → Future → Past (use restructure script)
Issue: "Wall of text detected" Fix: Break paragraphs into bullets, tables, add bold key terms, use emojis
Issue: "Redundant status information" Fix: Consolidate in Phase Status Overview table, remove duplicates, use SSOT pattern
Issue: "Low signal-to-noise ratio (0.3)"
Fix: Remove outdated content (strikethrough), delete TODOs, focus top 50 lines on actionable info
Advanced: Custom Patterns
For project-specific patterns not covered by the standard restructuring:
- Run standard restructure as baseline
- Manually adjust for domain-specific needs (e.g., sprint cycles, release cadence)
- Document custom patterns in Decision Log
- Consider contributing back as reference material
Phase Migration (NEW)
For projects with multiple completed phases, inline content can bloat PROJEKT.md beyond the recommended 8-12K character target. The phase migration feature automatically detects and migrates completed phases to docs/phases/.
Quick Start
# Check for migratable phases (dry run):
python3 scripts/migrate_completed_phases.py PROJECT.md --dry-run
# Migrate all completed phases automatically:
python3 scripts/migrate_completed_phases.py PROJECT.md --auto
# Interactive migration (prompts for each phase):
python3 scripts/migrate_completed_phases.py PROJECT.mdHow It Works
- Detection: Scans PROJEKT.md for completed phases (status indicators:
ABGESCHLOSSEN,COMPLETED,completed) - Migration: Creates
docs/phases/Phase-NN-Name.mdfor each completed phase - Link Update: Replaces inline content with a link reference in PROJEKT.md
- Backup: Creates
.pre-migration.backupbefore modifying PROJEKT.md - Vault-Sync (wenn
obsidian.com versionerfolgreich):obsidian.com property:set name="phase" value="..." type=text file="PROJECT-xxx"— aktualisiert Phase/Status im Vault-Projekt-Dokument. Fallback: Nur PROJEKT.md (bisheriges Verhalten).
Detection Patterns
The script recognizes completed phases via:
- Header patterns:
## Phase 1: Name (ABGESCHLOSSEN),## Phase 01: Name (completed) - Status emojis:
📋,✅ - Content indicators:
100%,all tasks completed
Example: Before Migration
## 📋 Phase 1: Foundation (ABGESCHLOSSEN)
> Ausgelagert: [Details](docs/phases/Phase-01-Foundation.md) | Abgeschlossen: 2026-01-15Example: After Migration
PROJEKT.md:
## 📋 Phase 1: Foundation (ABGESCHLOSSEN)
> Ausgelagert: [Details](phases/Phase-01-Foundation.md)docs/phases/Phase-01-Foundation.md:
# Phase 1: Foundation
> **Status:** Abgeschlossen
> **Migrated from PROJEKT.md:** 2026-01-21
---
**Abschlussdatum:** 2026-01-15
... full content preserved ...Integration with Restructuring
After running restructure_document.py, the script automatically checks for migratable phases and displays a hint:
==================================================
PHASE MIGRATION AVAILABLE
Found 2 completed phase(s) that could be migrated to docs/phases/
This can reduce PROJEKT.md size and improve session continuity.
To migrate, run:
python3 migrate_completed_phases.py PROJECT.md --dry-run
python3 migrate_completed_phases.py PROJECT.md --autoEdge Cases
| Scenario | Behavior |
| Phase without number | Warning issued, uses "XX" as placeholder |
| Phase already migrated | Skipped (detected via link presence) |
| Multiple phases | All migratable phases processed |
Phase with legacy <details> wrapper | Content extracted, wrapper stripped |
Best Practices
- Always run
--dry-runfirst to preview changes - Verify
/run-next-tasksstill works after migration (7-column schema preserved) - Use for historical phases only - keep active and planned phases inline
- Target: PROJEKT.md < 12K characters after migration
Success Criteria
A successfully restructured document has:
- ✅ Health score ≥ 75
- ✅ TTO < 1 minute (test: close doc, wait 1 week, reopen, time to first action)
- ✅ Executive Summary in top 20 lines
- ✅ No high-severity anti-patterns
- ✅ Active work visible, past/future migrated to separate files
- ✅ Actionable "Immediate Next Actions" section
- ✅ Current timestamp (< 7 days for active projects)
- ✅ Completed phases migrated to
docs/phases/(for multi-phase projects)
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
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.

