From 8a59b093b8e77f0302c3aedf3a379fe97c20079c Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Mon, 28 Sep 2026 15:58:11 -0500 Subject: [PATCH] infra(validator): add DirectoryContract validation and migration manifest --- .gitignore | 4 +- {inbox => 00-inbox}/README.md | 0 .../brain}/deterministic-term-extraction.md | 0 .../incident-debug-and-journal-workflow.md | 0 .../brain}/validate-brain-refactoring.md | 0 .../homelab}/api-security-hardening.md | 0 .../appctl/appctl-engine-v2-refactoring.md | 0 .../appctl/smart-deployment-pipeline.md | 0 ...e-consolidation-implementation-guide-v2.md | 0 ...e-consolidation-implementation-guide-v3.md | 0 .../architecture-consolidation-roadmap-v2.md | 0 .../architecture-consolidation-roadmap-v3.md | 0 .../architecture-consolidation-roadmap.md | 0 .../brain-sync-and-gitea-mirroring.md | 0 .../core-sites-cutover-testing-plan.md | 0 .../homelab}/domain-migration-roadtotech.md | 0 .../homelab}/dynu-monitor-rust-daemon.md | 0 .../homelab}/git-sync-and-lifecycle.md | 0 .../gitea/deployment-and-cicd-strategy.md | 0 .../gitea/github-to-gitea-migration-plan.md | 0 .../multirepo-refactor-homepage-courses.md | 0 .../homelab}/nixos-appliance-migration.md | 0 .../homelab}/nixos-server-laptop-migration.md | 0 .../homelab}/portainer-deprecation-plan.md | 0 .../homelab}/refactor-and-metadata-sync.md | 0 .../folder-structure-reorganization.md | 0 .../lvm-storage-optimization-and-resizing.md | 0 ...alwart-email-server-implementation-plan.md | 0 ...ning-platform-specification-and-roadmap.md | 0 .../browser-extension-integration.md | 0 .../new-repo}/provisioning-cli-plan.md | 0 .../nixos}/channel-tarball-migration-plan.md | 0 .../nixos}/decommission-desktop-derivation.md | 0 .../dms-reproducibility-and-docs-plan.md | 0 ...ts-architecture-and-workstation-cleanup.md | 0 ...r-decoupling-and-standalone-workstation.md | 0 .../nixos}/sops-restructuring-plan.md | 0 .../praxis/praxis-domain-model-v1.0.1.md | 0 .../praxis/praxis-domain-model.md | 0 .../praxis-implementation-blueprint.md | 0 .../praxis/praxis-srs-v1.0.2.md | 0 {projects => 01-plans}/praxis/praxis-srs.md | 0 .../supervisor-system-specification.md | 0 .../validate-brain-refactor-architecture.md | 0 .../authelia-dynamic-user-backend-lldap.md | 0 .../authelia-session-email-architecture.md | 0 .../homelab}/chatbot-assistant-design.md | 0 ...qualification-and-portainer-deprecation.md | 0 .../dozzle-auth-and-storage-architecture.md | 0 .../dual-email-schema-lldap-stalwart.md | 0 ...-monitor-polling-and-language-tradeoffs.md | 0 .../gitea-credentials-and-backup-strategy.md | 0 .../gitops-dispatcher-architecture.md | 0 .../homelab-repo-location-analysis.md | 0 .../hostinger-vs-stalwart-email-evaluation.md | 0 .../mail-server-evaluation-stalwart.md | 0 .../multirepo-refactor-homepage-courses.md | 0 .../homelab}/nixos-monorepo-decoupling.md | 0 .../homelab}/nixos-monorepo-vs-multirepo.md | 0 ...26-09-14-server-unexpected-shutdown-rca.md | 0 ...2026-09-18-gitea-actions-nix-runner-fix.md | 0 ...ea-github-mirror-dns-resolution-failure.md | 0 ...-21-gitea-actions-fhs-nix-container-fix.md | 0 ...tops-webhook-payload-signature-mismatch.md | 0 ...proxy-integration-and-stalwart-alerting.md | 0 ...iun-workload-isolation-and-load-shaping.md | 0 .../2026-09-26-validate-brain-refactor.md | 0 ...-27-laptop-memory-exhaustion-postmortem.md | 0 .../decisions/antigravity-flake-packaging.md | 0 .../terminal-workspace-architecture.md | 0 {records => 03-records}/journal/2026-06-25.md | 0 {records => 03-records}/journal/2026-06-26.md | 0 {records => 03-records}/journal/2026-06-29.md | 0 {records => 03-records}/journal/2026-06-30.md | 0 {records => 03-records}/journal/2026-07-01.md | 0 {records => 03-records}/journal/2026-08-10.md | 0 {records => 03-records}/journal/2026-08-16.md | 0 {records => 03-records}/journal/2026-09-11.md | 0 {records => 03-records}/journal/2026-09-13.md | 0 {records => 03-records}/journal/2026-09-14.md | 0 {records => 03-records}/journal/2026-09-15.md | 0 {records => 03-records}/journal/2026-09-18.md | 0 {records => 03-records}/journal/2026-09-21.md | 0 {records => 03-records}/journal/2026-09-22.md | 0 {records => 03-records}/journal/2026-09-23.md | 0 {records => 03-records}/journal/2026-09-24.md | 0 {records => 03-records}/journal/2026-09-25.md | 0 {records => 03-records}/journal/2026-09-26.md | 0 {records => 03-records}/journal/2026-09-27.md | 0 .../appctl-operations-and-manifest-guide.md | 0 .../brain-gitops-deployment-pipeline.md | 0 .../homelab}/dynu-ddns-troubleshooting.md | 0 ...tea-actions-and-cicd-pipeline-standards.md | 0 .../homelab}/homepage-core-reintegration.md | 0 .../jellyfin-gpu-hardware-acceleration.md | 0 .../homelab}/lldap-authelia-integration.md | 0 .../mail-deliverability-rdns-relay-guide.md | 0 .../managing-secrets-and-authelia-users.md | 0 .../homelab}/onboarding-a-new-service.md | 0 .../server-maintenance-and-updates.md | 0 .../server-unexpected-shutdown-diagnosis.md | 0 .../channel-tarball-migration-walkthrough.md | 0 .../desktop-decommission-walkthrough.md | 0 ...ootstrap-and-reproducibility-validation.md | 0 .../guides/nixos}/nix-flake-check-linters.md | 0 .../nixos}/sops-restructuring-walkthrough.md | 0 .../standalone-workstation-walkthrough.md | 0 .../nixos}/terminal-workspace-subsystem.md | 0 .../knowledge}/concepts/binary-search.md | 0 .../knowledge}/concepts/hashmap.md | 0 .../knowledge}/concepts/linked-list.md | 0 .../knowledge}/methods/adrs.md | 0 .../knowledge}/methods/auth.md | 0 .../methods/cicd-fundamentals-and-gitops.md | 0 .../methods/deterministic-tag-extraction.md | 0 .../incident-investigation-and-journaling.md | 0 .../knowledge}/methods/notes-to-docs.md | 0 .../knowledge}/methods/sql.md | 0 .../knowledge}/methods/testing.md | 0 .../knowledge}/technologies/aria2c.md | 0 .../knowledge}/technologies/devShell.md | 0 .../knowledge}/technologies/docker.md | 0 .../knowledge}/technologies/environments.md | 0 .../printer-setup-avahi-lpinfo.md | 0 .../technologies/python/enumerate.md | 0 .../technologies/python/pydantic.md | 0 .../knowledge}/technologies/python/pytest.md | 0 .../technologies/python/string-methods.md | 0 .../knowledge}/technologies/python/zip.md | 0 .../knowledge}/technologies/tea.md | 0 .../knowledge}/technologies/tmux.md | 0 .../practice}/.obsidian/app.json | 0 .../practice}/.obsidian/appearance.json | 0 .../practice}/.obsidian/core-plugins.json | 0 .../practice}/.obsidian/workspace.json | 0 .../practice}/.python-version | 0 .../LeetCode/00-practiced-patterns.md | 0 .../practice}/LeetCode/0001-two-sum.md | 0 .../LeetCode/0009-palindrome-number.md | 0 .../LeetCode/0013-roman-to-integer.md | 0 .../LeetCode/0014-longest-common-prefix.md | 0 .../LeetCode/0020-valid-parentheses.md | 0 .../LeetCode/0021-merge-two-sorted-lists.md | 0 ...026-remove-duplicates-from-sorted-array.md | 0 .../practice}/LeetCode/0027-remove-element.md | 0 ...dex-of-the-first-occurrence-in-a-string.md | 0 .../LeetCode/0035-search-insert-position.md | 0 .../LeetCode/0058-length-of-last-word.md | 0 .../practice}/LeetCode/1927-sum-game.md | 0 ...k-divisibility-by-digit-sum-and-product.md | 0 .../LeetCode/Solutions/0001-two-sum.py | 0 .../Solutions/0009-palindrome-number.py | 0 .../Solutions/0013-roman-to-integer.py | 0 .../Solutions/0014-longest_common_prefix.py | 0 .../Solutions/0020-valid-parentheses.py | 0 .../Solutions/0021-merge-two-sorted-lists.py | 0 ...026-remove-duplicates-from-sorted-array.py | 0 .../LeetCode/Solutions/0027-remove-element.py | 0 ...dex-of-the-first-occurrence-in-a-string.py | 0 .../Solutions/0035-search-insert-position.py | 0 .../Solutions/0058-length-of-last-word.py | 0 .../LeetCode/Solutions/1927-sum-game.py | 0 ...k-divisibility-by-digit-sum-and-product.py | 0 {practice => 04-learning/practice}/flake.lock | 0 {practice => 04-learning/practice}/flake.nix | 0 {practice => 04-learning/practice}/main.py | 0 .../practice}/placeholder.py | 0 .../practice}/pyproject.toml | 0 {practice => 04-learning/practice}/uv.lock | 0 {agents => 05-agents}/README.md | 0 .../profiles}/homelab-core.md | 0 .../profiles}/homelab-operations.md | 0 {agents => 05-agents/profiles}/magnetflix.md | 0 {agents => 05-agents/profiles}/nekoweb.md | 0 .../profiles}/nixos-workstation.md | 0 .../profiles}/second-brain.md | 0 {projects => 06-projects}/brain/README.md | 0 {projects => 06-projects}/homelab/README.md | 0 {projects => 06-projects}/learning/README.md | 0 .../magnetflix/README.md | 0 {projects => 06-projects}/nekoweb/README.md | 0 .../nixos => 06-projects}/new-repo/README.md | 0 {projects => 06-projects}/nixos/README.md | 0 {projects => 06-projects}/praxis/README.md | 0 .../supervisor/README.md | 0 scripts/migration_manifest.json | 980 ++++++++++++++++++ scripts/test_validator.py | 119 +++ scripts/validate-brain.py | 159 ++- 188 files changed, 1246 insertions(+), 16 deletions(-) rename {inbox => 00-inbox}/README.md (100%) rename {projects/brain/plans => 01-plans/brain}/deterministic-term-extraction.md (100%) rename {projects/brain/plans => 01-plans/brain}/incident-debug-and-journal-workflow.md (100%) rename {projects/brain/plans => 01-plans/brain}/validate-brain-refactoring.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/api-security-hardening.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/appctl/appctl-engine-v2-refactoring.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/appctl/smart-deployment-pipeline.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/architecture-consolidation-implementation-guide-v2.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/architecture-consolidation-implementation-guide-v3.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/architecture-consolidation-roadmap-v2.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/architecture-consolidation-roadmap-v3.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/architecture-consolidation-roadmap.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/brain-sync-and-gitea-mirroring.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/core-sites-cutover-testing-plan.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/domain-migration-roadtotech.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/dynu-monitor-rust-daemon.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/git-sync-and-lifecycle.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/gitea/deployment-and-cicd-strategy.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/gitea/github-to-gitea-migration-plan.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/multirepo-refactor-homepage-courses.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/nixos-appliance-migration.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/nixos-server-laptop-migration.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/portainer-deprecation-plan.md (100%) rename {projects/homelab/archive => 01-plans/homelab}/refactor-and-metadata-sync.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/server-24-7/folder-structure-reorganization.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/server-24-7/lvm-storage-optimization-and-resizing.md (100%) rename {projects/homelab/plans => 01-plans/homelab}/stalwart-email-server-implementation-plan.md (100%) rename {projects/learning/plans => 01-plans/learning}/learning-platform-specification-and-roadmap.md (100%) rename {projects/magnetflix/plans => 01-plans/magnetflix}/browser-extension-integration.md (100%) rename {projects/nixos/new-repo/plans => 01-plans/new-repo}/provisioning-cli-plan.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/channel-tarball-migration-plan.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/decommission-desktop-derivation.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/dms-reproducibility-and-docs-plan.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/secrets-architecture-and-workstation-cleanup.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/server-decoupling-and-standalone-workstation.md (100%) rename {projects/nixos/plans => 01-plans/nixos}/sops-restructuring-plan.md (100%) rename {projects => 01-plans}/praxis/praxis-domain-model-v1.0.1.md (100%) rename {projects => 01-plans}/praxis/praxis-domain-model.md (100%) rename {projects/praxis/plans => 01-plans/praxis}/praxis-implementation-blueprint.md (100%) rename {projects => 01-plans}/praxis/praxis-srs-v1.0.2.md (100%) rename {projects => 01-plans}/praxis/praxis-srs.md (100%) rename {projects/supervisor/plans => 01-plans/supervisor}/supervisor-system-specification.md (100%) rename records/discussions/2026-09-26-validate-brain-refactor-architecture.md => 02-discussions/brain/validate-brain-refactor-architecture.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/authelia-dynamic-user-backend-lldap.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/authelia-session-email-architecture.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/chatbot-assistant-design.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/core-service-qualification-and-portainer-deprecation.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/dozzle-auth-and-storage-architecture.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/dual-email-schema-lldap-stalwart.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/dynu-monitor-polling-and-language-tradeoffs.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/gitea-credentials-and-backup-strategy.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/gitops-dispatcher-architecture.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/homelab-repo-location-analysis.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/hostinger-vs-stalwart-email-evaluation.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/mail-server-evaluation-stalwart.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/multirepo-refactor-homepage-courses.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/nixos-monorepo-decoupling.md (100%) rename {projects/homelab/discussions => 02-discussions/homelab}/nixos-monorepo-vs-multirepo.md (100%) rename {records => 03-records}/debug/2026-09-14-server-unexpected-shutdown-rca.md (100%) rename {records => 03-records}/debug/2026-09-18-gitea-actions-nix-runner-fix.md (100%) rename {records => 03-records}/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md (100%) rename {records => 03-records}/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md (100%) rename {records => 03-records}/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md (100%) rename {records => 03-records}/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md (100%) rename {records => 03-records}/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md (100%) rename {records => 03-records}/debug/2026-09-26-validate-brain-refactor.md (100%) rename {records => 03-records}/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md (100%) rename {records => 03-records}/decisions/antigravity-flake-packaging.md (100%) rename {records => 03-records}/decisions/terminal-workspace-architecture.md (100%) rename {records => 03-records}/journal/2026-06-25.md (100%) rename {records => 03-records}/journal/2026-06-26.md (100%) rename {records => 03-records}/journal/2026-06-29.md (100%) rename {records => 03-records}/journal/2026-06-30.md (100%) rename {records => 03-records}/journal/2026-07-01.md (100%) rename {records => 03-records}/journal/2026-08-10.md (100%) rename {records => 03-records}/journal/2026-08-16.md (100%) rename {records => 03-records}/journal/2026-09-11.md (100%) rename {records => 03-records}/journal/2026-09-13.md (100%) rename {records => 03-records}/journal/2026-09-14.md (100%) rename {records => 03-records}/journal/2026-09-15.md (100%) rename {records => 03-records}/journal/2026-09-18.md (100%) rename {records => 03-records}/journal/2026-09-21.md (100%) rename {records => 03-records}/journal/2026-09-22.md (100%) rename {records => 03-records}/journal/2026-09-23.md (100%) rename {records => 03-records}/journal/2026-09-24.md (100%) rename {records => 03-records}/journal/2026-09-25.md (100%) rename {records => 03-records}/journal/2026-09-26.md (100%) rename {records => 03-records}/journal/2026-09-27.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/appctl-operations-and-manifest-guide.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/brain-gitops-deployment-pipeline.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/dynu-ddns-troubleshooting.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/gitea-actions-and-cicd-pipeline-standards.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/homepage-core-reintegration.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/jellyfin-gpu-hardware-acceleration.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/lldap-authelia-integration.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/mail-deliverability-rdns-relay-guide.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/managing-secrets-and-authelia-users.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/onboarding-a-new-service.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/server-maintenance-and-updates.md (100%) rename {projects/homelab/guides => 04-learning/guides/homelab}/server-unexpected-shutdown-diagnosis.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/channel-tarball-migration-walkthrough.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/desktop-decommission-walkthrough.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/dms-bootstrap-and-reproducibility-validation.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/nix-flake-check-linters.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/sops-restructuring-walkthrough.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/standalone-workstation-walkthrough.md (100%) rename {projects/nixos/guides => 04-learning/guides/nixos}/terminal-workspace-subsystem.md (100%) rename {knowledge => 04-learning/knowledge}/concepts/binary-search.md (100%) rename {knowledge => 04-learning/knowledge}/concepts/hashmap.md (100%) rename {knowledge => 04-learning/knowledge}/concepts/linked-list.md (100%) rename {knowledge => 04-learning/knowledge}/methods/adrs.md (100%) rename {knowledge => 04-learning/knowledge}/methods/auth.md (100%) rename {knowledge => 04-learning/knowledge}/methods/cicd-fundamentals-and-gitops.md (100%) rename {knowledge => 04-learning/knowledge}/methods/deterministic-tag-extraction.md (100%) rename {knowledge => 04-learning/knowledge}/methods/incident-investigation-and-journaling.md (100%) rename {knowledge => 04-learning/knowledge}/methods/notes-to-docs.md (100%) rename {knowledge => 04-learning/knowledge}/methods/sql.md (100%) rename {knowledge => 04-learning/knowledge}/methods/testing.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/aria2c.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/devShell.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/docker.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/environments.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/printer-setup-avahi-lpinfo.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/python/enumerate.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/python/pydantic.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/python/pytest.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/python/string-methods.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/python/zip.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/tea.md (100%) rename {knowledge => 04-learning/knowledge}/technologies/tmux.md (100%) rename {practice => 04-learning/practice}/.obsidian/app.json (100%) rename {practice => 04-learning/practice}/.obsidian/appearance.json (100%) rename {practice => 04-learning/practice}/.obsidian/core-plugins.json (100%) rename {practice => 04-learning/practice}/.obsidian/workspace.json (100%) rename {practice => 04-learning/practice}/.python-version (100%) rename {practice => 04-learning/practice}/LeetCode/00-practiced-patterns.md (100%) rename {practice => 04-learning/practice}/LeetCode/0001-two-sum.md (100%) rename {practice => 04-learning/practice}/LeetCode/0009-palindrome-number.md (100%) rename {practice => 04-learning/practice}/LeetCode/0013-roman-to-integer.md (100%) rename {practice => 04-learning/practice}/LeetCode/0014-longest-common-prefix.md (100%) rename {practice => 04-learning/practice}/LeetCode/0020-valid-parentheses.md (100%) rename {practice => 04-learning/practice}/LeetCode/0021-merge-two-sorted-lists.md (100%) rename {practice => 04-learning/practice}/LeetCode/0026-remove-duplicates-from-sorted-array.md (100%) rename {practice => 04-learning/practice}/LeetCode/0027-remove-element.md (100%) rename {practice => 04-learning/practice}/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md (100%) rename {practice => 04-learning/practice}/LeetCode/0035-search-insert-position.md (100%) rename {practice => 04-learning/practice}/LeetCode/0058-length-of-last-word.md (100%) rename {practice => 04-learning/practice}/LeetCode/1927-sum-game.md (100%) rename {practice => 04-learning/practice}/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0001-two-sum.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0009-palindrome-number.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0013-roman-to-integer.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0014-longest_common_prefix.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0020-valid-parentheses.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0021-merge-two-sorted-lists.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0026-remove-duplicates-from-sorted-array.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0027-remove-element.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0028-find-the-index-of-the-first-occurrence-in-a-string.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0035-search-insert-position.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/0058-length-of-last-word.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/1927-sum-game.py (100%) rename {practice => 04-learning/practice}/LeetCode/Solutions/3622-check-divisibility-by-digit-sum-and-product.py (100%) rename {practice => 04-learning/practice}/flake.lock (100%) rename {practice => 04-learning/practice}/flake.nix (100%) rename {practice => 04-learning/practice}/main.py (100%) rename {practice => 04-learning/practice}/placeholder.py (100%) rename {practice => 04-learning/practice}/pyproject.toml (100%) rename {practice => 04-learning/practice}/uv.lock (100%) rename {agents => 05-agents}/README.md (100%) rename {agents => 05-agents/profiles}/homelab-core.md (100%) rename {agents => 05-agents/profiles}/homelab-operations.md (100%) rename {agents => 05-agents/profiles}/magnetflix.md (100%) rename {agents => 05-agents/profiles}/nekoweb.md (100%) rename {agents => 05-agents/profiles}/nixos-workstation.md (100%) rename {agents => 05-agents/profiles}/second-brain.md (100%) rename {projects => 06-projects}/brain/README.md (100%) rename {projects => 06-projects}/homelab/README.md (100%) rename {projects => 06-projects}/learning/README.md (100%) rename {projects => 06-projects}/magnetflix/README.md (100%) rename {projects => 06-projects}/nekoweb/README.md (100%) rename {projects/nixos => 06-projects}/new-repo/README.md (100%) rename {projects => 06-projects}/nixos/README.md (100%) rename {projects => 06-projects}/praxis/README.md (100%) rename {projects => 06-projects}/supervisor/README.md (100%) create mode 100644 scripts/migration_manifest.json create mode 100755 scripts/test_validator.py diff --git a/.gitignore b/.gitignore index 64d7866..fd282a3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ __pycache__ # Uncommitted Capture & Drafts (Staging Area) -inbox/* -!inbox/README.md +00-inbox/* +!00-inbox/README.md diff --git a/inbox/README.md b/00-inbox/README.md similarity index 100% rename from inbox/README.md rename to 00-inbox/README.md diff --git a/projects/brain/plans/deterministic-term-extraction.md b/01-plans/brain/deterministic-term-extraction.md similarity index 100% rename from projects/brain/plans/deterministic-term-extraction.md rename to 01-plans/brain/deterministic-term-extraction.md diff --git a/projects/brain/plans/incident-debug-and-journal-workflow.md b/01-plans/brain/incident-debug-and-journal-workflow.md similarity index 100% rename from projects/brain/plans/incident-debug-and-journal-workflow.md rename to 01-plans/brain/incident-debug-and-journal-workflow.md diff --git a/projects/brain/plans/validate-brain-refactoring.md b/01-plans/brain/validate-brain-refactoring.md similarity index 100% rename from projects/brain/plans/validate-brain-refactoring.md rename to 01-plans/brain/validate-brain-refactoring.md diff --git a/projects/homelab/plans/api-security-hardening.md b/01-plans/homelab/api-security-hardening.md similarity index 100% rename from projects/homelab/plans/api-security-hardening.md rename to 01-plans/homelab/api-security-hardening.md diff --git a/projects/homelab/plans/appctl/appctl-engine-v2-refactoring.md b/01-plans/homelab/appctl/appctl-engine-v2-refactoring.md similarity index 100% rename from projects/homelab/plans/appctl/appctl-engine-v2-refactoring.md rename to 01-plans/homelab/appctl/appctl-engine-v2-refactoring.md diff --git a/projects/homelab/plans/appctl/smart-deployment-pipeline.md b/01-plans/homelab/appctl/smart-deployment-pipeline.md similarity index 100% rename from projects/homelab/plans/appctl/smart-deployment-pipeline.md rename to 01-plans/homelab/appctl/smart-deployment-pipeline.md diff --git a/projects/homelab/archive/architecture-consolidation-implementation-guide-v2.md b/01-plans/homelab/architecture-consolidation-implementation-guide-v2.md similarity index 100% rename from projects/homelab/archive/architecture-consolidation-implementation-guide-v2.md rename to 01-plans/homelab/architecture-consolidation-implementation-guide-v2.md diff --git a/projects/homelab/plans/architecture-consolidation-implementation-guide-v3.md b/01-plans/homelab/architecture-consolidation-implementation-guide-v3.md similarity index 100% rename from projects/homelab/plans/architecture-consolidation-implementation-guide-v3.md rename to 01-plans/homelab/architecture-consolidation-implementation-guide-v3.md diff --git a/projects/homelab/archive/architecture-consolidation-roadmap-v2.md b/01-plans/homelab/architecture-consolidation-roadmap-v2.md similarity index 100% rename from projects/homelab/archive/architecture-consolidation-roadmap-v2.md rename to 01-plans/homelab/architecture-consolidation-roadmap-v2.md diff --git a/projects/homelab/plans/architecture-consolidation-roadmap-v3.md b/01-plans/homelab/architecture-consolidation-roadmap-v3.md similarity index 100% rename from projects/homelab/plans/architecture-consolidation-roadmap-v3.md rename to 01-plans/homelab/architecture-consolidation-roadmap-v3.md diff --git a/projects/homelab/archive/architecture-consolidation-roadmap.md b/01-plans/homelab/architecture-consolidation-roadmap.md similarity index 100% rename from projects/homelab/archive/architecture-consolidation-roadmap.md rename to 01-plans/homelab/architecture-consolidation-roadmap.md diff --git a/projects/homelab/archive/brain-sync-and-gitea-mirroring.md b/01-plans/homelab/brain-sync-and-gitea-mirroring.md similarity index 100% rename from projects/homelab/archive/brain-sync-and-gitea-mirroring.md rename to 01-plans/homelab/brain-sync-and-gitea-mirroring.md diff --git a/projects/homelab/archive/core-sites-cutover-testing-plan.md b/01-plans/homelab/core-sites-cutover-testing-plan.md similarity index 100% rename from projects/homelab/archive/core-sites-cutover-testing-plan.md rename to 01-plans/homelab/core-sites-cutover-testing-plan.md diff --git a/projects/homelab/archive/domain-migration-roadtotech.md b/01-plans/homelab/domain-migration-roadtotech.md similarity index 100% rename from projects/homelab/archive/domain-migration-roadtotech.md rename to 01-plans/homelab/domain-migration-roadtotech.md diff --git a/projects/homelab/plans/dynu-monitor-rust-daemon.md b/01-plans/homelab/dynu-monitor-rust-daemon.md similarity index 100% rename from projects/homelab/plans/dynu-monitor-rust-daemon.md rename to 01-plans/homelab/dynu-monitor-rust-daemon.md diff --git a/projects/homelab/archive/git-sync-and-lifecycle.md b/01-plans/homelab/git-sync-and-lifecycle.md similarity index 100% rename from projects/homelab/archive/git-sync-and-lifecycle.md rename to 01-plans/homelab/git-sync-and-lifecycle.md diff --git a/projects/homelab/plans/gitea/deployment-and-cicd-strategy.md b/01-plans/homelab/gitea/deployment-and-cicd-strategy.md similarity index 100% rename from projects/homelab/plans/gitea/deployment-and-cicd-strategy.md rename to 01-plans/homelab/gitea/deployment-and-cicd-strategy.md diff --git a/projects/homelab/plans/gitea/github-to-gitea-migration-plan.md b/01-plans/homelab/gitea/github-to-gitea-migration-plan.md similarity index 100% rename from projects/homelab/plans/gitea/github-to-gitea-migration-plan.md rename to 01-plans/homelab/gitea/github-to-gitea-migration-plan.md diff --git a/projects/homelab/plans/multirepo-refactor-homepage-courses.md b/01-plans/homelab/multirepo-refactor-homepage-courses.md similarity index 100% rename from projects/homelab/plans/multirepo-refactor-homepage-courses.md rename to 01-plans/homelab/multirepo-refactor-homepage-courses.md diff --git a/projects/homelab/archive/nixos-appliance-migration.md b/01-plans/homelab/nixos-appliance-migration.md similarity index 100% rename from projects/homelab/archive/nixos-appliance-migration.md rename to 01-plans/homelab/nixos-appliance-migration.md diff --git a/projects/homelab/archive/nixos-server-laptop-migration.md b/01-plans/homelab/nixos-server-laptop-migration.md similarity index 100% rename from projects/homelab/archive/nixos-server-laptop-migration.md rename to 01-plans/homelab/nixos-server-laptop-migration.md diff --git a/projects/homelab/plans/portainer-deprecation-plan.md b/01-plans/homelab/portainer-deprecation-plan.md similarity index 100% rename from projects/homelab/plans/portainer-deprecation-plan.md rename to 01-plans/homelab/portainer-deprecation-plan.md diff --git a/projects/homelab/archive/refactor-and-metadata-sync.md b/01-plans/homelab/refactor-and-metadata-sync.md similarity index 100% rename from projects/homelab/archive/refactor-and-metadata-sync.md rename to 01-plans/homelab/refactor-and-metadata-sync.md diff --git a/projects/homelab/plans/server-24-7/folder-structure-reorganization.md b/01-plans/homelab/server-24-7/folder-structure-reorganization.md similarity index 100% rename from projects/homelab/plans/server-24-7/folder-structure-reorganization.md rename to 01-plans/homelab/server-24-7/folder-structure-reorganization.md diff --git a/projects/homelab/plans/server-24-7/lvm-storage-optimization-and-resizing.md b/01-plans/homelab/server-24-7/lvm-storage-optimization-and-resizing.md similarity index 100% rename from projects/homelab/plans/server-24-7/lvm-storage-optimization-and-resizing.md rename to 01-plans/homelab/server-24-7/lvm-storage-optimization-and-resizing.md diff --git a/projects/homelab/plans/stalwart-email-server-implementation-plan.md b/01-plans/homelab/stalwart-email-server-implementation-plan.md similarity index 100% rename from projects/homelab/plans/stalwart-email-server-implementation-plan.md rename to 01-plans/homelab/stalwart-email-server-implementation-plan.md diff --git a/projects/learning/plans/learning-platform-specification-and-roadmap.md b/01-plans/learning/learning-platform-specification-and-roadmap.md similarity index 100% rename from projects/learning/plans/learning-platform-specification-and-roadmap.md rename to 01-plans/learning/learning-platform-specification-and-roadmap.md diff --git a/projects/magnetflix/plans/browser-extension-integration.md b/01-plans/magnetflix/browser-extension-integration.md similarity index 100% rename from projects/magnetflix/plans/browser-extension-integration.md rename to 01-plans/magnetflix/browser-extension-integration.md diff --git a/projects/nixos/new-repo/plans/provisioning-cli-plan.md b/01-plans/new-repo/provisioning-cli-plan.md similarity index 100% rename from projects/nixos/new-repo/plans/provisioning-cli-plan.md rename to 01-plans/new-repo/provisioning-cli-plan.md diff --git a/projects/nixos/plans/channel-tarball-migration-plan.md b/01-plans/nixos/channel-tarball-migration-plan.md similarity index 100% rename from projects/nixos/plans/channel-tarball-migration-plan.md rename to 01-plans/nixos/channel-tarball-migration-plan.md diff --git a/projects/nixos/plans/decommission-desktop-derivation.md b/01-plans/nixos/decommission-desktop-derivation.md similarity index 100% rename from projects/nixos/plans/decommission-desktop-derivation.md rename to 01-plans/nixos/decommission-desktop-derivation.md diff --git a/projects/nixos/plans/dms-reproducibility-and-docs-plan.md b/01-plans/nixos/dms-reproducibility-and-docs-plan.md similarity index 100% rename from projects/nixos/plans/dms-reproducibility-and-docs-plan.md rename to 01-plans/nixos/dms-reproducibility-and-docs-plan.md diff --git a/projects/nixos/plans/secrets-architecture-and-workstation-cleanup.md b/01-plans/nixos/secrets-architecture-and-workstation-cleanup.md similarity index 100% rename from projects/nixos/plans/secrets-architecture-and-workstation-cleanup.md rename to 01-plans/nixos/secrets-architecture-and-workstation-cleanup.md diff --git a/projects/nixos/plans/server-decoupling-and-standalone-workstation.md b/01-plans/nixos/server-decoupling-and-standalone-workstation.md similarity index 100% rename from projects/nixos/plans/server-decoupling-and-standalone-workstation.md rename to 01-plans/nixos/server-decoupling-and-standalone-workstation.md diff --git a/projects/nixos/plans/sops-restructuring-plan.md b/01-plans/nixos/sops-restructuring-plan.md similarity index 100% rename from projects/nixos/plans/sops-restructuring-plan.md rename to 01-plans/nixos/sops-restructuring-plan.md diff --git a/projects/praxis/praxis-domain-model-v1.0.1.md b/01-plans/praxis/praxis-domain-model-v1.0.1.md similarity index 100% rename from projects/praxis/praxis-domain-model-v1.0.1.md rename to 01-plans/praxis/praxis-domain-model-v1.0.1.md diff --git a/projects/praxis/praxis-domain-model.md b/01-plans/praxis/praxis-domain-model.md similarity index 100% rename from projects/praxis/praxis-domain-model.md rename to 01-plans/praxis/praxis-domain-model.md diff --git a/projects/praxis/plans/praxis-implementation-blueprint.md b/01-plans/praxis/praxis-implementation-blueprint.md similarity index 100% rename from projects/praxis/plans/praxis-implementation-blueprint.md rename to 01-plans/praxis/praxis-implementation-blueprint.md diff --git a/projects/praxis/praxis-srs-v1.0.2.md b/01-plans/praxis/praxis-srs-v1.0.2.md similarity index 100% rename from projects/praxis/praxis-srs-v1.0.2.md rename to 01-plans/praxis/praxis-srs-v1.0.2.md diff --git a/projects/praxis/praxis-srs.md b/01-plans/praxis/praxis-srs.md similarity index 100% rename from projects/praxis/praxis-srs.md rename to 01-plans/praxis/praxis-srs.md diff --git a/projects/supervisor/plans/supervisor-system-specification.md b/01-plans/supervisor/supervisor-system-specification.md similarity index 100% rename from projects/supervisor/plans/supervisor-system-specification.md rename to 01-plans/supervisor/supervisor-system-specification.md diff --git a/records/discussions/2026-09-26-validate-brain-refactor-architecture.md b/02-discussions/brain/validate-brain-refactor-architecture.md similarity index 100% rename from records/discussions/2026-09-26-validate-brain-refactor-architecture.md rename to 02-discussions/brain/validate-brain-refactor-architecture.md diff --git a/projects/homelab/discussions/authelia-dynamic-user-backend-lldap.md b/02-discussions/homelab/authelia-dynamic-user-backend-lldap.md similarity index 100% rename from projects/homelab/discussions/authelia-dynamic-user-backend-lldap.md rename to 02-discussions/homelab/authelia-dynamic-user-backend-lldap.md diff --git a/projects/homelab/discussions/authelia-session-email-architecture.md b/02-discussions/homelab/authelia-session-email-architecture.md similarity index 100% rename from projects/homelab/discussions/authelia-session-email-architecture.md rename to 02-discussions/homelab/authelia-session-email-architecture.md diff --git a/projects/homelab/discussions/chatbot-assistant-design.md b/02-discussions/homelab/chatbot-assistant-design.md similarity index 100% rename from projects/homelab/discussions/chatbot-assistant-design.md rename to 02-discussions/homelab/chatbot-assistant-design.md diff --git a/projects/homelab/discussions/core-service-qualification-and-portainer-deprecation.md b/02-discussions/homelab/core-service-qualification-and-portainer-deprecation.md similarity index 100% rename from projects/homelab/discussions/core-service-qualification-and-portainer-deprecation.md rename to 02-discussions/homelab/core-service-qualification-and-portainer-deprecation.md diff --git a/projects/homelab/discussions/dozzle-auth-and-storage-architecture.md b/02-discussions/homelab/dozzle-auth-and-storage-architecture.md similarity index 100% rename from projects/homelab/discussions/dozzle-auth-and-storage-architecture.md rename to 02-discussions/homelab/dozzle-auth-and-storage-architecture.md diff --git a/projects/homelab/discussions/dual-email-schema-lldap-stalwart.md b/02-discussions/homelab/dual-email-schema-lldap-stalwart.md similarity index 100% rename from projects/homelab/discussions/dual-email-schema-lldap-stalwart.md rename to 02-discussions/homelab/dual-email-schema-lldap-stalwart.md diff --git a/projects/homelab/discussions/dynu-monitor-polling-and-language-tradeoffs.md b/02-discussions/homelab/dynu-monitor-polling-and-language-tradeoffs.md similarity index 100% rename from projects/homelab/discussions/dynu-monitor-polling-and-language-tradeoffs.md rename to 02-discussions/homelab/dynu-monitor-polling-and-language-tradeoffs.md diff --git a/projects/homelab/discussions/gitea-credentials-and-backup-strategy.md b/02-discussions/homelab/gitea-credentials-and-backup-strategy.md similarity index 100% rename from projects/homelab/discussions/gitea-credentials-and-backup-strategy.md rename to 02-discussions/homelab/gitea-credentials-and-backup-strategy.md diff --git a/projects/homelab/discussions/gitops-dispatcher-architecture.md b/02-discussions/homelab/gitops-dispatcher-architecture.md similarity index 100% rename from projects/homelab/discussions/gitops-dispatcher-architecture.md rename to 02-discussions/homelab/gitops-dispatcher-architecture.md diff --git a/projects/homelab/discussions/homelab-repo-location-analysis.md b/02-discussions/homelab/homelab-repo-location-analysis.md similarity index 100% rename from projects/homelab/discussions/homelab-repo-location-analysis.md rename to 02-discussions/homelab/homelab-repo-location-analysis.md diff --git a/projects/homelab/discussions/hostinger-vs-stalwart-email-evaluation.md b/02-discussions/homelab/hostinger-vs-stalwart-email-evaluation.md similarity index 100% rename from projects/homelab/discussions/hostinger-vs-stalwart-email-evaluation.md rename to 02-discussions/homelab/hostinger-vs-stalwart-email-evaluation.md diff --git a/projects/homelab/discussions/mail-server-evaluation-stalwart.md b/02-discussions/homelab/mail-server-evaluation-stalwart.md similarity index 100% rename from projects/homelab/discussions/mail-server-evaluation-stalwart.md rename to 02-discussions/homelab/mail-server-evaluation-stalwart.md diff --git a/projects/homelab/discussions/multirepo-refactor-homepage-courses.md b/02-discussions/homelab/multirepo-refactor-homepage-courses.md similarity index 100% rename from projects/homelab/discussions/multirepo-refactor-homepage-courses.md rename to 02-discussions/homelab/multirepo-refactor-homepage-courses.md diff --git a/projects/homelab/discussions/nixos-monorepo-decoupling.md b/02-discussions/homelab/nixos-monorepo-decoupling.md similarity index 100% rename from projects/homelab/discussions/nixos-monorepo-decoupling.md rename to 02-discussions/homelab/nixos-monorepo-decoupling.md diff --git a/projects/homelab/discussions/nixos-monorepo-vs-multirepo.md b/02-discussions/homelab/nixos-monorepo-vs-multirepo.md similarity index 100% rename from projects/homelab/discussions/nixos-monorepo-vs-multirepo.md rename to 02-discussions/homelab/nixos-monorepo-vs-multirepo.md diff --git a/records/debug/2026-09-14-server-unexpected-shutdown-rca.md b/03-records/debug/2026-09-14-server-unexpected-shutdown-rca.md similarity index 100% rename from records/debug/2026-09-14-server-unexpected-shutdown-rca.md rename to 03-records/debug/2026-09-14-server-unexpected-shutdown-rca.md diff --git a/records/debug/2026-09-18-gitea-actions-nix-runner-fix.md b/03-records/debug/2026-09-18-gitea-actions-nix-runner-fix.md similarity index 100% rename from records/debug/2026-09-18-gitea-actions-nix-runner-fix.md rename to 03-records/debug/2026-09-18-gitea-actions-nix-runner-fix.md diff --git a/records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md b/03-records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md similarity index 100% rename from records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md rename to 03-records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md diff --git a/records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md b/03-records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md similarity index 100% rename from records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md rename to 03-records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md diff --git a/records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md b/03-records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md similarity index 100% rename from records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md rename to 03-records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md diff --git a/records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md b/03-records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md similarity index 100% rename from records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md rename to 03-records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md diff --git a/records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md b/03-records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md similarity index 100% rename from records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md rename to 03-records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md diff --git a/records/debug/2026-09-26-validate-brain-refactor.md b/03-records/debug/2026-09-26-validate-brain-refactor.md similarity index 100% rename from records/debug/2026-09-26-validate-brain-refactor.md rename to 03-records/debug/2026-09-26-validate-brain-refactor.md diff --git a/records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md b/03-records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md similarity index 100% rename from records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md rename to 03-records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md diff --git a/records/decisions/antigravity-flake-packaging.md b/03-records/decisions/antigravity-flake-packaging.md similarity index 100% rename from records/decisions/antigravity-flake-packaging.md rename to 03-records/decisions/antigravity-flake-packaging.md diff --git a/records/decisions/terminal-workspace-architecture.md b/03-records/decisions/terminal-workspace-architecture.md similarity index 100% rename from records/decisions/terminal-workspace-architecture.md rename to 03-records/decisions/terminal-workspace-architecture.md diff --git a/records/journal/2026-06-25.md b/03-records/journal/2026-06-25.md similarity index 100% rename from records/journal/2026-06-25.md rename to 03-records/journal/2026-06-25.md diff --git a/records/journal/2026-06-26.md b/03-records/journal/2026-06-26.md similarity index 100% rename from records/journal/2026-06-26.md rename to 03-records/journal/2026-06-26.md diff --git a/records/journal/2026-06-29.md b/03-records/journal/2026-06-29.md similarity index 100% rename from records/journal/2026-06-29.md rename to 03-records/journal/2026-06-29.md diff --git a/records/journal/2026-06-30.md b/03-records/journal/2026-06-30.md similarity index 100% rename from records/journal/2026-06-30.md rename to 03-records/journal/2026-06-30.md diff --git a/records/journal/2026-07-01.md b/03-records/journal/2026-07-01.md similarity index 100% rename from records/journal/2026-07-01.md rename to 03-records/journal/2026-07-01.md diff --git a/records/journal/2026-08-10.md b/03-records/journal/2026-08-10.md similarity index 100% rename from records/journal/2026-08-10.md rename to 03-records/journal/2026-08-10.md diff --git a/records/journal/2026-08-16.md b/03-records/journal/2026-08-16.md similarity index 100% rename from records/journal/2026-08-16.md rename to 03-records/journal/2026-08-16.md diff --git a/records/journal/2026-09-11.md b/03-records/journal/2026-09-11.md similarity index 100% rename from records/journal/2026-09-11.md rename to 03-records/journal/2026-09-11.md diff --git a/records/journal/2026-09-13.md b/03-records/journal/2026-09-13.md similarity index 100% rename from records/journal/2026-09-13.md rename to 03-records/journal/2026-09-13.md diff --git a/records/journal/2026-09-14.md b/03-records/journal/2026-09-14.md similarity index 100% rename from records/journal/2026-09-14.md rename to 03-records/journal/2026-09-14.md diff --git a/records/journal/2026-09-15.md b/03-records/journal/2026-09-15.md similarity index 100% rename from records/journal/2026-09-15.md rename to 03-records/journal/2026-09-15.md diff --git a/records/journal/2026-09-18.md b/03-records/journal/2026-09-18.md similarity index 100% rename from records/journal/2026-09-18.md rename to 03-records/journal/2026-09-18.md diff --git a/records/journal/2026-09-21.md b/03-records/journal/2026-09-21.md similarity index 100% rename from records/journal/2026-09-21.md rename to 03-records/journal/2026-09-21.md diff --git a/records/journal/2026-09-22.md b/03-records/journal/2026-09-22.md similarity index 100% rename from records/journal/2026-09-22.md rename to 03-records/journal/2026-09-22.md diff --git a/records/journal/2026-09-23.md b/03-records/journal/2026-09-23.md similarity index 100% rename from records/journal/2026-09-23.md rename to 03-records/journal/2026-09-23.md diff --git a/records/journal/2026-09-24.md b/03-records/journal/2026-09-24.md similarity index 100% rename from records/journal/2026-09-24.md rename to 03-records/journal/2026-09-24.md diff --git a/records/journal/2026-09-25.md b/03-records/journal/2026-09-25.md similarity index 100% rename from records/journal/2026-09-25.md rename to 03-records/journal/2026-09-25.md diff --git a/records/journal/2026-09-26.md b/03-records/journal/2026-09-26.md similarity index 100% rename from records/journal/2026-09-26.md rename to 03-records/journal/2026-09-26.md diff --git a/records/journal/2026-09-27.md b/03-records/journal/2026-09-27.md similarity index 100% rename from records/journal/2026-09-27.md rename to 03-records/journal/2026-09-27.md diff --git a/projects/homelab/guides/appctl-operations-and-manifest-guide.md b/04-learning/guides/homelab/appctl-operations-and-manifest-guide.md similarity index 100% rename from projects/homelab/guides/appctl-operations-and-manifest-guide.md rename to 04-learning/guides/homelab/appctl-operations-and-manifest-guide.md diff --git a/projects/homelab/guides/brain-gitops-deployment-pipeline.md b/04-learning/guides/homelab/brain-gitops-deployment-pipeline.md similarity index 100% rename from projects/homelab/guides/brain-gitops-deployment-pipeline.md rename to 04-learning/guides/homelab/brain-gitops-deployment-pipeline.md diff --git a/projects/homelab/guides/dynu-ddns-troubleshooting.md b/04-learning/guides/homelab/dynu-ddns-troubleshooting.md similarity index 100% rename from projects/homelab/guides/dynu-ddns-troubleshooting.md rename to 04-learning/guides/homelab/dynu-ddns-troubleshooting.md diff --git a/projects/homelab/guides/gitea-actions-and-cicd-pipeline-standards.md b/04-learning/guides/homelab/gitea-actions-and-cicd-pipeline-standards.md similarity index 100% rename from projects/homelab/guides/gitea-actions-and-cicd-pipeline-standards.md rename to 04-learning/guides/homelab/gitea-actions-and-cicd-pipeline-standards.md diff --git a/projects/homelab/guides/homepage-core-reintegration.md b/04-learning/guides/homelab/homepage-core-reintegration.md similarity index 100% rename from projects/homelab/guides/homepage-core-reintegration.md rename to 04-learning/guides/homelab/homepage-core-reintegration.md diff --git a/projects/homelab/guides/jellyfin-gpu-hardware-acceleration.md b/04-learning/guides/homelab/jellyfin-gpu-hardware-acceleration.md similarity index 100% rename from projects/homelab/guides/jellyfin-gpu-hardware-acceleration.md rename to 04-learning/guides/homelab/jellyfin-gpu-hardware-acceleration.md diff --git a/projects/homelab/guides/lldap-authelia-integration.md b/04-learning/guides/homelab/lldap-authelia-integration.md similarity index 100% rename from projects/homelab/guides/lldap-authelia-integration.md rename to 04-learning/guides/homelab/lldap-authelia-integration.md diff --git a/projects/homelab/guides/mail-deliverability-rdns-relay-guide.md b/04-learning/guides/homelab/mail-deliverability-rdns-relay-guide.md similarity index 100% rename from projects/homelab/guides/mail-deliverability-rdns-relay-guide.md rename to 04-learning/guides/homelab/mail-deliverability-rdns-relay-guide.md diff --git a/projects/homelab/guides/managing-secrets-and-authelia-users.md b/04-learning/guides/homelab/managing-secrets-and-authelia-users.md similarity index 100% rename from projects/homelab/guides/managing-secrets-and-authelia-users.md rename to 04-learning/guides/homelab/managing-secrets-and-authelia-users.md diff --git a/projects/homelab/guides/onboarding-a-new-service.md b/04-learning/guides/homelab/onboarding-a-new-service.md similarity index 100% rename from projects/homelab/guides/onboarding-a-new-service.md rename to 04-learning/guides/homelab/onboarding-a-new-service.md diff --git a/projects/homelab/guides/server-maintenance-and-updates.md b/04-learning/guides/homelab/server-maintenance-and-updates.md similarity index 100% rename from projects/homelab/guides/server-maintenance-and-updates.md rename to 04-learning/guides/homelab/server-maintenance-and-updates.md diff --git a/projects/homelab/guides/server-unexpected-shutdown-diagnosis.md b/04-learning/guides/homelab/server-unexpected-shutdown-diagnosis.md similarity index 100% rename from projects/homelab/guides/server-unexpected-shutdown-diagnosis.md rename to 04-learning/guides/homelab/server-unexpected-shutdown-diagnosis.md diff --git a/projects/nixos/guides/channel-tarball-migration-walkthrough.md b/04-learning/guides/nixos/channel-tarball-migration-walkthrough.md similarity index 100% rename from projects/nixos/guides/channel-tarball-migration-walkthrough.md rename to 04-learning/guides/nixos/channel-tarball-migration-walkthrough.md diff --git a/projects/nixos/guides/desktop-decommission-walkthrough.md b/04-learning/guides/nixos/desktop-decommission-walkthrough.md similarity index 100% rename from projects/nixos/guides/desktop-decommission-walkthrough.md rename to 04-learning/guides/nixos/desktop-decommission-walkthrough.md diff --git a/projects/nixos/guides/dms-bootstrap-and-reproducibility-validation.md b/04-learning/guides/nixos/dms-bootstrap-and-reproducibility-validation.md similarity index 100% rename from projects/nixos/guides/dms-bootstrap-and-reproducibility-validation.md rename to 04-learning/guides/nixos/dms-bootstrap-and-reproducibility-validation.md diff --git a/projects/nixos/guides/nix-flake-check-linters.md b/04-learning/guides/nixos/nix-flake-check-linters.md similarity index 100% rename from projects/nixos/guides/nix-flake-check-linters.md rename to 04-learning/guides/nixos/nix-flake-check-linters.md diff --git a/projects/nixos/guides/sops-restructuring-walkthrough.md b/04-learning/guides/nixos/sops-restructuring-walkthrough.md similarity index 100% rename from projects/nixos/guides/sops-restructuring-walkthrough.md rename to 04-learning/guides/nixos/sops-restructuring-walkthrough.md diff --git a/projects/nixos/guides/standalone-workstation-walkthrough.md b/04-learning/guides/nixos/standalone-workstation-walkthrough.md similarity index 100% rename from projects/nixos/guides/standalone-workstation-walkthrough.md rename to 04-learning/guides/nixos/standalone-workstation-walkthrough.md diff --git a/projects/nixos/guides/terminal-workspace-subsystem.md b/04-learning/guides/nixos/terminal-workspace-subsystem.md similarity index 100% rename from projects/nixos/guides/terminal-workspace-subsystem.md rename to 04-learning/guides/nixos/terminal-workspace-subsystem.md diff --git a/knowledge/concepts/binary-search.md b/04-learning/knowledge/concepts/binary-search.md similarity index 100% rename from knowledge/concepts/binary-search.md rename to 04-learning/knowledge/concepts/binary-search.md diff --git a/knowledge/concepts/hashmap.md b/04-learning/knowledge/concepts/hashmap.md similarity index 100% rename from knowledge/concepts/hashmap.md rename to 04-learning/knowledge/concepts/hashmap.md diff --git a/knowledge/concepts/linked-list.md b/04-learning/knowledge/concepts/linked-list.md similarity index 100% rename from knowledge/concepts/linked-list.md rename to 04-learning/knowledge/concepts/linked-list.md diff --git a/knowledge/methods/adrs.md b/04-learning/knowledge/methods/adrs.md similarity index 100% rename from knowledge/methods/adrs.md rename to 04-learning/knowledge/methods/adrs.md diff --git a/knowledge/methods/auth.md b/04-learning/knowledge/methods/auth.md similarity index 100% rename from knowledge/methods/auth.md rename to 04-learning/knowledge/methods/auth.md diff --git a/knowledge/methods/cicd-fundamentals-and-gitops.md b/04-learning/knowledge/methods/cicd-fundamentals-and-gitops.md similarity index 100% rename from knowledge/methods/cicd-fundamentals-and-gitops.md rename to 04-learning/knowledge/methods/cicd-fundamentals-and-gitops.md diff --git a/knowledge/methods/deterministic-tag-extraction.md b/04-learning/knowledge/methods/deterministic-tag-extraction.md similarity index 100% rename from knowledge/methods/deterministic-tag-extraction.md rename to 04-learning/knowledge/methods/deterministic-tag-extraction.md diff --git a/knowledge/methods/incident-investigation-and-journaling.md b/04-learning/knowledge/methods/incident-investigation-and-journaling.md similarity index 100% rename from knowledge/methods/incident-investigation-and-journaling.md rename to 04-learning/knowledge/methods/incident-investigation-and-journaling.md diff --git a/knowledge/methods/notes-to-docs.md b/04-learning/knowledge/methods/notes-to-docs.md similarity index 100% rename from knowledge/methods/notes-to-docs.md rename to 04-learning/knowledge/methods/notes-to-docs.md diff --git a/knowledge/methods/sql.md b/04-learning/knowledge/methods/sql.md similarity index 100% rename from knowledge/methods/sql.md rename to 04-learning/knowledge/methods/sql.md diff --git a/knowledge/methods/testing.md b/04-learning/knowledge/methods/testing.md similarity index 100% rename from knowledge/methods/testing.md rename to 04-learning/knowledge/methods/testing.md diff --git a/knowledge/technologies/aria2c.md b/04-learning/knowledge/technologies/aria2c.md similarity index 100% rename from knowledge/technologies/aria2c.md rename to 04-learning/knowledge/technologies/aria2c.md diff --git a/knowledge/technologies/devShell.md b/04-learning/knowledge/technologies/devShell.md similarity index 100% rename from knowledge/technologies/devShell.md rename to 04-learning/knowledge/technologies/devShell.md diff --git a/knowledge/technologies/docker.md b/04-learning/knowledge/technologies/docker.md similarity index 100% rename from knowledge/technologies/docker.md rename to 04-learning/knowledge/technologies/docker.md diff --git a/knowledge/technologies/environments.md b/04-learning/knowledge/technologies/environments.md similarity index 100% rename from knowledge/technologies/environments.md rename to 04-learning/knowledge/technologies/environments.md diff --git a/knowledge/technologies/printer-setup-avahi-lpinfo.md b/04-learning/knowledge/technologies/printer-setup-avahi-lpinfo.md similarity index 100% rename from knowledge/technologies/printer-setup-avahi-lpinfo.md rename to 04-learning/knowledge/technologies/printer-setup-avahi-lpinfo.md diff --git a/knowledge/technologies/python/enumerate.md b/04-learning/knowledge/technologies/python/enumerate.md similarity index 100% rename from knowledge/technologies/python/enumerate.md rename to 04-learning/knowledge/technologies/python/enumerate.md diff --git a/knowledge/technologies/python/pydantic.md b/04-learning/knowledge/technologies/python/pydantic.md similarity index 100% rename from knowledge/technologies/python/pydantic.md rename to 04-learning/knowledge/technologies/python/pydantic.md diff --git a/knowledge/technologies/python/pytest.md b/04-learning/knowledge/technologies/python/pytest.md similarity index 100% rename from knowledge/technologies/python/pytest.md rename to 04-learning/knowledge/technologies/python/pytest.md diff --git a/knowledge/technologies/python/string-methods.md b/04-learning/knowledge/technologies/python/string-methods.md similarity index 100% rename from knowledge/technologies/python/string-methods.md rename to 04-learning/knowledge/technologies/python/string-methods.md diff --git a/knowledge/technologies/python/zip.md b/04-learning/knowledge/technologies/python/zip.md similarity index 100% rename from knowledge/technologies/python/zip.md rename to 04-learning/knowledge/technologies/python/zip.md diff --git a/knowledge/technologies/tea.md b/04-learning/knowledge/technologies/tea.md similarity index 100% rename from knowledge/technologies/tea.md rename to 04-learning/knowledge/technologies/tea.md diff --git a/knowledge/technologies/tmux.md b/04-learning/knowledge/technologies/tmux.md similarity index 100% rename from knowledge/technologies/tmux.md rename to 04-learning/knowledge/technologies/tmux.md diff --git a/practice/.obsidian/app.json b/04-learning/practice/.obsidian/app.json similarity index 100% rename from practice/.obsidian/app.json rename to 04-learning/practice/.obsidian/app.json diff --git a/practice/.obsidian/appearance.json b/04-learning/practice/.obsidian/appearance.json similarity index 100% rename from practice/.obsidian/appearance.json rename to 04-learning/practice/.obsidian/appearance.json diff --git a/practice/.obsidian/core-plugins.json b/04-learning/practice/.obsidian/core-plugins.json similarity index 100% rename from practice/.obsidian/core-plugins.json rename to 04-learning/practice/.obsidian/core-plugins.json diff --git a/practice/.obsidian/workspace.json b/04-learning/practice/.obsidian/workspace.json similarity index 100% rename from practice/.obsidian/workspace.json rename to 04-learning/practice/.obsidian/workspace.json diff --git a/practice/.python-version b/04-learning/practice/.python-version similarity index 100% rename from practice/.python-version rename to 04-learning/practice/.python-version diff --git a/practice/LeetCode/00-practiced-patterns.md b/04-learning/practice/LeetCode/00-practiced-patterns.md similarity index 100% rename from practice/LeetCode/00-practiced-patterns.md rename to 04-learning/practice/LeetCode/00-practiced-patterns.md diff --git a/practice/LeetCode/0001-two-sum.md b/04-learning/practice/LeetCode/0001-two-sum.md similarity index 100% rename from practice/LeetCode/0001-two-sum.md rename to 04-learning/practice/LeetCode/0001-two-sum.md diff --git a/practice/LeetCode/0009-palindrome-number.md b/04-learning/practice/LeetCode/0009-palindrome-number.md similarity index 100% rename from practice/LeetCode/0009-palindrome-number.md rename to 04-learning/practice/LeetCode/0009-palindrome-number.md diff --git a/practice/LeetCode/0013-roman-to-integer.md b/04-learning/practice/LeetCode/0013-roman-to-integer.md similarity index 100% rename from practice/LeetCode/0013-roman-to-integer.md rename to 04-learning/practice/LeetCode/0013-roman-to-integer.md diff --git a/practice/LeetCode/0014-longest-common-prefix.md b/04-learning/practice/LeetCode/0014-longest-common-prefix.md similarity index 100% rename from practice/LeetCode/0014-longest-common-prefix.md rename to 04-learning/practice/LeetCode/0014-longest-common-prefix.md diff --git a/practice/LeetCode/0020-valid-parentheses.md b/04-learning/practice/LeetCode/0020-valid-parentheses.md similarity index 100% rename from practice/LeetCode/0020-valid-parentheses.md rename to 04-learning/practice/LeetCode/0020-valid-parentheses.md diff --git a/practice/LeetCode/0021-merge-two-sorted-lists.md b/04-learning/practice/LeetCode/0021-merge-two-sorted-lists.md similarity index 100% rename from practice/LeetCode/0021-merge-two-sorted-lists.md rename to 04-learning/practice/LeetCode/0021-merge-two-sorted-lists.md diff --git a/practice/LeetCode/0026-remove-duplicates-from-sorted-array.md b/04-learning/practice/LeetCode/0026-remove-duplicates-from-sorted-array.md similarity index 100% rename from practice/LeetCode/0026-remove-duplicates-from-sorted-array.md rename to 04-learning/practice/LeetCode/0026-remove-duplicates-from-sorted-array.md diff --git a/practice/LeetCode/0027-remove-element.md b/04-learning/practice/LeetCode/0027-remove-element.md similarity index 100% rename from practice/LeetCode/0027-remove-element.md rename to 04-learning/practice/LeetCode/0027-remove-element.md diff --git a/practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md b/04-learning/practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md similarity index 100% rename from practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md rename to 04-learning/practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md diff --git a/practice/LeetCode/0035-search-insert-position.md b/04-learning/practice/LeetCode/0035-search-insert-position.md similarity index 100% rename from practice/LeetCode/0035-search-insert-position.md rename to 04-learning/practice/LeetCode/0035-search-insert-position.md diff --git a/practice/LeetCode/0058-length-of-last-word.md b/04-learning/practice/LeetCode/0058-length-of-last-word.md similarity index 100% rename from practice/LeetCode/0058-length-of-last-word.md rename to 04-learning/practice/LeetCode/0058-length-of-last-word.md diff --git a/practice/LeetCode/1927-sum-game.md b/04-learning/practice/LeetCode/1927-sum-game.md similarity index 100% rename from practice/LeetCode/1927-sum-game.md rename to 04-learning/practice/LeetCode/1927-sum-game.md diff --git a/practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md b/04-learning/practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md similarity index 100% rename from practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md rename to 04-learning/practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md diff --git a/practice/LeetCode/Solutions/0001-two-sum.py b/04-learning/practice/LeetCode/Solutions/0001-two-sum.py similarity index 100% rename from practice/LeetCode/Solutions/0001-two-sum.py rename to 04-learning/practice/LeetCode/Solutions/0001-two-sum.py diff --git a/practice/LeetCode/Solutions/0009-palindrome-number.py b/04-learning/practice/LeetCode/Solutions/0009-palindrome-number.py similarity index 100% rename from practice/LeetCode/Solutions/0009-palindrome-number.py rename to 04-learning/practice/LeetCode/Solutions/0009-palindrome-number.py diff --git a/practice/LeetCode/Solutions/0013-roman-to-integer.py b/04-learning/practice/LeetCode/Solutions/0013-roman-to-integer.py similarity index 100% rename from practice/LeetCode/Solutions/0013-roman-to-integer.py rename to 04-learning/practice/LeetCode/Solutions/0013-roman-to-integer.py diff --git a/practice/LeetCode/Solutions/0014-longest_common_prefix.py b/04-learning/practice/LeetCode/Solutions/0014-longest_common_prefix.py similarity index 100% rename from practice/LeetCode/Solutions/0014-longest_common_prefix.py rename to 04-learning/practice/LeetCode/Solutions/0014-longest_common_prefix.py diff --git a/practice/LeetCode/Solutions/0020-valid-parentheses.py b/04-learning/practice/LeetCode/Solutions/0020-valid-parentheses.py similarity index 100% rename from practice/LeetCode/Solutions/0020-valid-parentheses.py rename to 04-learning/practice/LeetCode/Solutions/0020-valid-parentheses.py diff --git a/practice/LeetCode/Solutions/0021-merge-two-sorted-lists.py b/04-learning/practice/LeetCode/Solutions/0021-merge-two-sorted-lists.py similarity index 100% rename from practice/LeetCode/Solutions/0021-merge-two-sorted-lists.py rename to 04-learning/practice/LeetCode/Solutions/0021-merge-two-sorted-lists.py diff --git a/practice/LeetCode/Solutions/0026-remove-duplicates-from-sorted-array.py b/04-learning/practice/LeetCode/Solutions/0026-remove-duplicates-from-sorted-array.py similarity index 100% rename from practice/LeetCode/Solutions/0026-remove-duplicates-from-sorted-array.py rename to 04-learning/practice/LeetCode/Solutions/0026-remove-duplicates-from-sorted-array.py diff --git a/practice/LeetCode/Solutions/0027-remove-element.py b/04-learning/practice/LeetCode/Solutions/0027-remove-element.py similarity index 100% rename from practice/LeetCode/Solutions/0027-remove-element.py rename to 04-learning/practice/LeetCode/Solutions/0027-remove-element.py diff --git a/practice/LeetCode/Solutions/0028-find-the-index-of-the-first-occurrence-in-a-string.py b/04-learning/practice/LeetCode/Solutions/0028-find-the-index-of-the-first-occurrence-in-a-string.py similarity index 100% rename from practice/LeetCode/Solutions/0028-find-the-index-of-the-first-occurrence-in-a-string.py rename to 04-learning/practice/LeetCode/Solutions/0028-find-the-index-of-the-first-occurrence-in-a-string.py diff --git a/practice/LeetCode/Solutions/0035-search-insert-position.py b/04-learning/practice/LeetCode/Solutions/0035-search-insert-position.py similarity index 100% rename from practice/LeetCode/Solutions/0035-search-insert-position.py rename to 04-learning/practice/LeetCode/Solutions/0035-search-insert-position.py diff --git a/practice/LeetCode/Solutions/0058-length-of-last-word.py b/04-learning/practice/LeetCode/Solutions/0058-length-of-last-word.py similarity index 100% rename from practice/LeetCode/Solutions/0058-length-of-last-word.py rename to 04-learning/practice/LeetCode/Solutions/0058-length-of-last-word.py diff --git a/practice/LeetCode/Solutions/1927-sum-game.py b/04-learning/practice/LeetCode/Solutions/1927-sum-game.py similarity index 100% rename from practice/LeetCode/Solutions/1927-sum-game.py rename to 04-learning/practice/LeetCode/Solutions/1927-sum-game.py diff --git a/practice/LeetCode/Solutions/3622-check-divisibility-by-digit-sum-and-product.py b/04-learning/practice/LeetCode/Solutions/3622-check-divisibility-by-digit-sum-and-product.py similarity index 100% rename from practice/LeetCode/Solutions/3622-check-divisibility-by-digit-sum-and-product.py rename to 04-learning/practice/LeetCode/Solutions/3622-check-divisibility-by-digit-sum-and-product.py diff --git a/practice/flake.lock b/04-learning/practice/flake.lock similarity index 100% rename from practice/flake.lock rename to 04-learning/practice/flake.lock diff --git a/practice/flake.nix b/04-learning/practice/flake.nix similarity index 100% rename from practice/flake.nix rename to 04-learning/practice/flake.nix diff --git a/practice/main.py b/04-learning/practice/main.py similarity index 100% rename from practice/main.py rename to 04-learning/practice/main.py diff --git a/practice/placeholder.py b/04-learning/practice/placeholder.py similarity index 100% rename from practice/placeholder.py rename to 04-learning/practice/placeholder.py diff --git a/practice/pyproject.toml b/04-learning/practice/pyproject.toml similarity index 100% rename from practice/pyproject.toml rename to 04-learning/practice/pyproject.toml diff --git a/practice/uv.lock b/04-learning/practice/uv.lock similarity index 100% rename from practice/uv.lock rename to 04-learning/practice/uv.lock diff --git a/agents/README.md b/05-agents/README.md similarity index 100% rename from agents/README.md rename to 05-agents/README.md diff --git a/agents/homelab-core.md b/05-agents/profiles/homelab-core.md similarity index 100% rename from agents/homelab-core.md rename to 05-agents/profiles/homelab-core.md diff --git a/agents/homelab-operations.md b/05-agents/profiles/homelab-operations.md similarity index 100% rename from agents/homelab-operations.md rename to 05-agents/profiles/homelab-operations.md diff --git a/agents/magnetflix.md b/05-agents/profiles/magnetflix.md similarity index 100% rename from agents/magnetflix.md rename to 05-agents/profiles/magnetflix.md diff --git a/agents/nekoweb.md b/05-agents/profiles/nekoweb.md similarity index 100% rename from agents/nekoweb.md rename to 05-agents/profiles/nekoweb.md diff --git a/agents/nixos-workstation.md b/05-agents/profiles/nixos-workstation.md similarity index 100% rename from agents/nixos-workstation.md rename to 05-agents/profiles/nixos-workstation.md diff --git a/agents/second-brain.md b/05-agents/profiles/second-brain.md similarity index 100% rename from agents/second-brain.md rename to 05-agents/profiles/second-brain.md diff --git a/projects/brain/README.md b/06-projects/brain/README.md similarity index 100% rename from projects/brain/README.md rename to 06-projects/brain/README.md diff --git a/projects/homelab/README.md b/06-projects/homelab/README.md similarity index 100% rename from projects/homelab/README.md rename to 06-projects/homelab/README.md diff --git a/projects/learning/README.md b/06-projects/learning/README.md similarity index 100% rename from projects/learning/README.md rename to 06-projects/learning/README.md diff --git a/projects/magnetflix/README.md b/06-projects/magnetflix/README.md similarity index 100% rename from projects/magnetflix/README.md rename to 06-projects/magnetflix/README.md diff --git a/projects/nekoweb/README.md b/06-projects/nekoweb/README.md similarity index 100% rename from projects/nekoweb/README.md rename to 06-projects/nekoweb/README.md diff --git a/projects/nixos/new-repo/README.md b/06-projects/new-repo/README.md similarity index 100% rename from projects/nixos/new-repo/README.md rename to 06-projects/new-repo/README.md diff --git a/projects/nixos/README.md b/06-projects/nixos/README.md similarity index 100% rename from projects/nixos/README.md rename to 06-projects/nixos/README.md diff --git a/projects/praxis/README.md b/06-projects/praxis/README.md similarity index 100% rename from projects/praxis/README.md rename to 06-projects/praxis/README.md diff --git a/projects/supervisor/README.md b/06-projects/supervisor/README.md similarity index 100% rename from projects/supervisor/README.md rename to 06-projects/supervisor/README.md diff --git a/scripts/migration_manifest.json b/scripts/migration_manifest.json new file mode 100644 index 0000000..c90ec15 --- /dev/null +++ b/scripts/migration_manifest.json @@ -0,0 +1,980 @@ +[ + { + "source": "AGENTS.md", + "destination": "AGENTS.md", + "type": "meta", + "rationale": "Root repository governance and license files." + }, + { + "source": "README.md", + "destination": "README.md", + "type": "meta", + "rationale": "Root repository governance and license files." + }, + { + "source": "agents/README.md", + "destination": "05-agents/README.md", + "type": "meta", + "rationale": "Catalog overview of agent profiles and operational guardrails." + }, + { + "source": "agents/homelab-core.md", + "destination": "05-agents/profiles/homelab-core.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "agents/homelab-operations.md", + "destination": "05-agents/profiles/homelab-operations.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "agents/magnetflix.md", + "destination": "05-agents/profiles/magnetflix.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "agents/nekoweb.md", + "destination": "05-agents/profiles/nekoweb.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "agents/nixos-workstation.md", + "destination": "05-agents/profiles/nixos-workstation.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "agents/second-brain.md", + "destination": "05-agents/profiles/second-brain.md", + "type": "agent", + "rationale": "Machine-readable agent persona specification and behavioral guardrails." + }, + { + "source": "inbox/README.md", + "destination": "00-inbox/README.md", + "type": "meta", + "rationale": "Staging zone entrypoint." + }, + { + "source": "inbox/brain-taxonomy-refactor-analysis.md", + "destination": "00-inbox/brain-taxonomy-refactor-analysis.md", + "type": "inbox", + "rationale": "Ephemeral staging draft outside committed knowledge graph." + }, + { + "source": "knowledge/concepts/binary-search.md", + "destination": "04-learning/knowledge/concepts/binary-search.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/concepts/hashmap.md", + "destination": "04-learning/knowledge/concepts/hashmap.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/concepts/linked-list.md", + "destination": "04-learning/knowledge/concepts/linked-list.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/adrs.md", + "destination": "04-learning/knowledge/methods/adrs.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/auth.md", + "destination": "04-learning/knowledge/methods/auth.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/cicd-fundamentals-and-gitops.md", + "destination": "04-learning/knowledge/methods/cicd-fundamentals-and-gitops.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/deterministic-tag-extraction.md", + "destination": "04-learning/knowledge/methods/deterministic-tag-extraction.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/incident-investigation-and-journaling.md", + "destination": "04-learning/knowledge/methods/incident-investigation-and-journaling.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/notes-to-docs.md", + "destination": "04-learning/knowledge/methods/notes-to-docs.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/sql.md", + "destination": "04-learning/knowledge/methods/sql.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/methods/testing.md", + "destination": "04-learning/knowledge/methods/testing.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/aria2c.md", + "destination": "04-learning/knowledge/technologies/aria2c.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/devShell.md", + "destination": "04-learning/knowledge/technologies/devShell.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/docker.md", + "destination": "04-learning/knowledge/technologies/docker.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/environments.md", + "destination": "04-learning/knowledge/technologies/environments.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/printer-setup-avahi-lpinfo.md", + "destination": "04-learning/knowledge/technologies/printer-setup-avahi-lpinfo.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/python/enumerate.md", + "destination": "04-learning/knowledge/technologies/python/enumerate.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/python/pydantic.md", + "destination": "04-learning/knowledge/technologies/python/pydantic.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/python/pytest.md", + "destination": "04-learning/knowledge/technologies/python/pytest.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/python/string-methods.md", + "destination": "04-learning/knowledge/technologies/python/string-methods.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/python/zip.md", + "destination": "04-learning/knowledge/technologies/python/zip.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/tea.md", + "destination": "04-learning/knowledge/technologies/tea.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "knowledge/technologies/tmux.md", + "destination": "04-learning/knowledge/technologies/tmux.md", + "type": "knowledge", + "rationale": "Durable conceptual, technological, or methodological understanding." + }, + { + "source": "practice/LeetCode/00-practiced-patterns.md", + "destination": "04-learning/practice/LeetCode/00-practiced-patterns.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0001-two-sum.md", + "destination": "04-learning/practice/LeetCode/0001-two-sum.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0009-palindrome-number.md", + "destination": "04-learning/practice/LeetCode/0009-palindrome-number.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0013-roman-to-integer.md", + "destination": "04-learning/practice/LeetCode/0013-roman-to-integer.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0014-longest-common-prefix.md", + "destination": "04-learning/practice/LeetCode/0014-longest-common-prefix.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0020-valid-parentheses.md", + "destination": "04-learning/practice/LeetCode/0020-valid-parentheses.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0021-merge-two-sorted-lists.md", + "destination": "04-learning/practice/LeetCode/0021-merge-two-sorted-lists.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0026-remove-duplicates-from-sorted-array.md", + "destination": "04-learning/practice/LeetCode/0026-remove-duplicates-from-sorted-array.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0027-remove-element.md", + "destination": "04-learning/practice/LeetCode/0027-remove-element.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md", + "destination": "04-learning/practice/LeetCode/0028-find-the-index-of-the-first-occurrence-in-a-string.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0035-search-insert-position.md", + "destination": "04-learning/practice/LeetCode/0035-search-insert-position.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/0058-length-of-last-word.md", + "destination": "04-learning/practice/LeetCode/0058-length-of-last-word.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/1927-sum-game.md", + "destination": "04-learning/practice/LeetCode/1927-sum-game.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md", + "destination": "04-learning/practice/LeetCode/3622-check-divisibility-by-digit-sum-and-product.md", + "type": "practice", + "rationale": "Deliberate algorithm exercise and LeetCode problem drill." + }, + { + "source": "projects/brain/README.md", + "destination": "06-projects/brain/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/brain/plans/deterministic-term-extraction.md", + "destination": "01-plans/brain/deterministic-term-extraction.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/brain/plans/incident-debug-and-journal-workflow.md", + "destination": "01-plans/brain/incident-debug-and-journal-workflow.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/brain/plans/validate-brain-refactoring.md", + "destination": "01-plans/brain/validate-brain-refactoring.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/homelab/README.md", + "destination": "06-projects/homelab/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/homelab/archive/architecture-consolidation-implementation-guide-v2.md", + "destination": "01-plans/homelab/architecture-consolidation-implementation-guide-v2.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/architecture-consolidation-roadmap-v2.md", + "destination": "01-plans/homelab/architecture-consolidation-roadmap-v2.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/architecture-consolidation-roadmap.md", + "destination": "01-plans/homelab/architecture-consolidation-roadmap.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/brain-sync-and-gitea-mirroring.md", + "destination": "01-plans/homelab/brain-sync-and-gitea-mirroring.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/core-sites-cutover-testing-plan.md", + "destination": "01-plans/homelab/core-sites-cutover-testing-plan.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/domain-migration-roadtotech.md", + "destination": "01-plans/homelab/domain-migration-roadtotech.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/git-sync-and-lifecycle.md", + "destination": "01-plans/homelab/git-sync-and-lifecycle.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/nixos-appliance-migration.md", + "destination": "01-plans/homelab/nixos-appliance-migration.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/nixos-server-laptop-migration.md", + "destination": "01-plans/homelab/nixos-server-laptop-migration.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/archive/refactor-and-metadata-sync.md", + "destination": "01-plans/homelab/refactor-and-metadata-sync.md", + "type": "plan", + "rationale": "Completed implementation roadmap; archived state expressed via metadata (status: completed)." + }, + { + "source": "projects/homelab/discussions/authelia-dynamic-user-backend-lldap.md", + "destination": "02-discussions/homelab/authelia-dynamic-user-backend-lldap.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/authelia-session-email-architecture.md", + "destination": "02-discussions/homelab/authelia-session-email-architecture.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/chatbot-assistant-design.md", + "destination": "02-discussions/homelab/chatbot-assistant-design.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/core-service-qualification-and-portainer-deprecation.md", + "destination": "02-discussions/homelab/core-service-qualification-and-portainer-deprecation.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/dozzle-auth-and-storage-architecture.md", + "destination": "02-discussions/homelab/dozzle-auth-and-storage-architecture.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/dual-email-schema-lldap-stalwart.md", + "destination": "02-discussions/homelab/dual-email-schema-lldap-stalwart.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/dynu-monitor-polling-and-language-tradeoffs.md", + "destination": "02-discussions/homelab/dynu-monitor-polling-and-language-tradeoffs.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/gitea-credentials-and-backup-strategy.md", + "destination": "02-discussions/homelab/gitea-credentials-and-backup-strategy.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/gitops-dispatcher-architecture.md", + "destination": "02-discussions/homelab/gitops-dispatcher-architecture.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/homelab-repo-location-analysis.md", + "destination": "02-discussions/homelab/homelab-repo-location-analysis.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/hostinger-vs-stalwart-email-evaluation.md", + "destination": "02-discussions/homelab/hostinger-vs-stalwart-email-evaluation.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/mail-server-evaluation-stalwart.md", + "destination": "02-discussions/homelab/mail-server-evaluation-stalwart.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/multirepo-refactor-homepage-courses.md", + "destination": "02-discussions/homelab/multirepo-refactor-homepage-courses.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/nixos-monorepo-decoupling.md", + "destination": "02-discussions/homelab/nixos-monorepo-decoupling.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/discussions/nixos-monorepo-vs-multirepo.md", + "destination": "02-discussions/homelab/nixos-monorepo-vs-multirepo.md", + "type": "discussion", + "rationale": "Prospective architectural inquiry, trade-off analysis, and option evaluation." + }, + { + "source": "projects/homelab/guides/appctl-operations-and-manifest-guide.md", + "destination": "04-learning/guides/homelab/appctl-operations-and-manifest-guide.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/brain-gitops-deployment-pipeline.md", + "destination": "04-learning/guides/homelab/brain-gitops-deployment-pipeline.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/dynu-ddns-troubleshooting.md", + "destination": "04-learning/guides/homelab/dynu-ddns-troubleshooting.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/gitea-actions-and-cicd-pipeline-standards.md", + "destination": "04-learning/guides/homelab/gitea-actions-and-cicd-pipeline-standards.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/homepage-core-reintegration.md", + "destination": "04-learning/guides/homelab/homepage-core-reintegration.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/jellyfin-gpu-hardware-acceleration.md", + "destination": "04-learning/guides/homelab/jellyfin-gpu-hardware-acceleration.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/lldap-authelia-integration.md", + "destination": "04-learning/guides/homelab/lldap-authelia-integration.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/mail-deliverability-rdns-relay-guide.md", + "destination": "04-learning/guides/homelab/mail-deliverability-rdns-relay-guide.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/managing-secrets-and-authelia-users.md", + "destination": "04-learning/guides/homelab/managing-secrets-and-authelia-users.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/onboarding-a-new-service.md", + "destination": "04-learning/guides/homelab/onboarding-a-new-service.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/server-maintenance-and-updates.md", + "destination": "04-learning/guides/homelab/server-maintenance-and-updates.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/guides/server-unexpected-shutdown-diagnosis.md", + "destination": "04-learning/guides/homelab/server-unexpected-shutdown-diagnosis.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/homelab/plans/api-security-hardening.md", + "destination": "01-plans/homelab/api-security-hardening.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/appctl/appctl-engine-v2-refactoring.md", + "destination": "01-plans/homelab/appctl/appctl-engine-v2-refactoring.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/appctl/smart-deployment-pipeline.md", + "destination": "01-plans/homelab/appctl/smart-deployment-pipeline.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/architecture-consolidation-implementation-guide-v3.md", + "destination": "01-plans/homelab/architecture-consolidation-implementation-guide-v3.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/architecture-consolidation-roadmap-v3.md", + "destination": "01-plans/homelab/architecture-consolidation-roadmap-v3.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/dynu-monitor-rust-daemon.md", + "destination": "01-plans/homelab/dynu-monitor-rust-daemon.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/gitea/deployment-and-cicd-strategy.md", + "destination": "01-plans/homelab/gitea/deployment-and-cicd-strategy.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/gitea/github-to-gitea-migration-plan.md", + "destination": "01-plans/homelab/gitea/github-to-gitea-migration-plan.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/multirepo-refactor-homepage-courses.md", + "destination": "01-plans/homelab/multirepo-refactor-homepage-courses.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/portainer-deprecation-plan.md", + "destination": "01-plans/homelab/portainer-deprecation-plan.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/server-24-7/folder-structure-reorganization.md", + "destination": "01-plans/homelab/server-24-7/folder-structure-reorganization.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/server-24-7/lvm-storage-optimization-and-resizing.md", + "destination": "01-plans/homelab/server-24-7/lvm-storage-optimization-and-resizing.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/homelab/plans/stalwart-email-server-implementation-plan.md", + "destination": "01-plans/homelab/stalwart-email-server-implementation-plan.md", + "type": "plan", + "rationale": "Actionable homelab implementation roadmap under project subsystem." + }, + { + "source": "projects/learning/README.md", + "destination": "06-projects/learning/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/learning/plans/learning-platform-specification-and-roadmap.md", + "destination": "01-plans/learning/learning-platform-specification-and-roadmap.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/magnetflix/README.md", + "destination": "06-projects/magnetflix/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/magnetflix/plans/browser-extension-integration.md", + "destination": "01-plans/magnetflix/browser-extension-integration.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nekoweb/README.md", + "destination": "06-projects/nekoweb/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/nixos/README.md", + "destination": "06-projects/nixos/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/nixos/guides/channel-tarball-migration-walkthrough.md", + "destination": "04-learning/guides/nixos/channel-tarball-migration-walkthrough.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/desktop-decommission-walkthrough.md", + "destination": "04-learning/guides/nixos/desktop-decommission-walkthrough.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/dms-bootstrap-and-reproducibility-validation.md", + "destination": "04-learning/guides/nixos/dms-bootstrap-and-reproducibility-validation.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/nix-flake-check-linters.md", + "destination": "04-learning/guides/nixos/nix-flake-check-linters.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/sops-restructuring-walkthrough.md", + "destination": "04-learning/guides/nixos/sops-restructuring-walkthrough.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/standalone-workstation-walkthrough.md", + "destination": "04-learning/guides/nixos/standalone-workstation-walkthrough.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/guides/terminal-workspace-subsystem.md", + "destination": "04-learning/guides/nixos/terminal-workspace-subsystem.md", + "type": "guide", + "rationale": "Operational SOP and standard runbook for using/maintaining system capabilities." + }, + { + "source": "projects/nixos/new-repo/README.md", + "destination": "06-projects/new-repo/README.md", + "type": "project", + "rationale": "Standalone project landing hub for the new-repo automated provisioning CLI." + }, + { + "source": "projects/nixos/new-repo/plans/provisioning-cli-plan.md", + "destination": "01-plans/new-repo/provisioning-cli-plan.md", + "type": "plan", + "rationale": "Actionable implementation plan for new-repo CLI." + }, + { + "source": "projects/nixos/plans/channel-tarball-migration-plan.md", + "destination": "01-plans/nixos/channel-tarball-migration-plan.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nixos/plans/decommission-desktop-derivation.md", + "destination": "01-plans/nixos/decommission-desktop-derivation.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nixos/plans/dms-reproducibility-and-docs-plan.md", + "destination": "01-plans/nixos/dms-reproducibility-and-docs-plan.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nixos/plans/secrets-architecture-and-workstation-cleanup.md", + "destination": "01-plans/nixos/secrets-architecture-and-workstation-cleanup.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nixos/plans/server-decoupling-and-standalone-workstation.md", + "destination": "01-plans/nixos/server-decoupling-and-standalone-workstation.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/nixos/plans/sops-restructuring-plan.md", + "destination": "01-plans/nixos/sops-restructuring-plan.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "projects/praxis/README.md", + "destination": "06-projects/praxis/README.md", + "type": "project", + "rationale": "Praxis project topology overview, forge repo links, and cross-cutting index." + }, + { + "source": "projects/praxis/plans/praxis-implementation-blueprint.md", + "destination": "01-plans/praxis/praxis-implementation-blueprint.md", + "type": "plan", + "rationale": "Core software requirements specification and domain design baseline for Praxis." + }, + { + "source": "projects/praxis/praxis-domain-model-v1.0.1.md", + "destination": "01-plans/praxis/praxis-domain-model-v1.0.1.md", + "type": "plan", + "rationale": "Core software requirements specification and domain design baseline for Praxis." + }, + { + "source": "projects/praxis/praxis-domain-model.md", + "destination": "01-plans/praxis/praxis-domain-model.md", + "type": "plan", + "rationale": "Core software requirements specification and domain design baseline for Praxis." + }, + { + "source": "projects/praxis/praxis-srs-v1.0.2.md", + "destination": "01-plans/praxis/praxis-srs-v1.0.2.md", + "type": "plan", + "rationale": "Core software requirements specification and domain design baseline for Praxis." + }, + { + "source": "projects/praxis/praxis-srs.md", + "destination": "01-plans/praxis/praxis-srs.md", + "type": "plan", + "rationale": "Core software requirements specification and domain design baseline for Praxis." + }, + { + "source": "projects/supervisor/README.md", + "destination": "06-projects/supervisor/README.md", + "type": "project", + "rationale": "Canonical project topology hub, source repositories, and cross-cutting index." + }, + { + "source": "projects/supervisor/plans/supervisor-system-specification.md", + "destination": "01-plans/supervisor/supervisor-system-specification.md", + "type": "plan", + "rationale": "Actionable project implementation roadmap." + }, + { + "source": "records/debug/2026-09-14-server-unexpected-shutdown-rca.md", + "destination": "03-records/debug/2026-09-14-server-unexpected-shutdown-rca.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-18-gitea-actions-nix-runner-fix.md", + "destination": "03-records/debug/2026-09-18-gitea-actions-nix-runner-fix.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md", + "destination": "03-records/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md", + "destination": "03-records/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md", + "destination": "03-records/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md", + "destination": "03-records/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md", + "destination": "03-records/debug/2026-09-24-diun-workload-isolation-and-load-shaping.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-26-validate-brain-refactor.md", + "destination": "03-records/debug/2026-09-26-validate-brain-refactor.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md", + "destination": "03-records/debug/2026-09-27-laptop-memory-exhaustion-postmortem.md", + "type": "debug", + "rationale": "Empirical root-cause analysis and post-mortem of an operational incident/failure." + }, + { + "source": "records/decisions/antigravity-flake-packaging.md", + "destination": "03-records/decisions/antigravity-flake-packaging.md", + "type": "decision", + "rationale": "Immutable Architectural Decision Record (ADR) capturing commitment and rationale." + }, + { + "source": "records/decisions/terminal-workspace-architecture.md", + "destination": "03-records/decisions/terminal-workspace-architecture.md", + "type": "decision", + "rationale": "Immutable Architectural Decision Record (ADR) capturing commitment and rationale." + }, + { + "source": "records/discussions/2026-09-26-validate-brain-refactor-architecture.md", + "destination": "02-discussions/brain/validate-brain-refactor-architecture.md", + "type": "discussion", + "rationale": "Prospective design trade-off and refactoring option evaluation for validate-brain.py." + }, + { + "source": "records/journal/2026-06-25.md", + "destination": "03-records/journal/2026-06-25.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-06-26.md", + "destination": "03-records/journal/2026-06-26.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-06-29.md", + "destination": "03-records/journal/2026-06-29.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-06-30.md", + "destination": "03-records/journal/2026-06-30.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-07-01.md", + "destination": "03-records/journal/2026-07-01.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-08-10.md", + "destination": "03-records/journal/2026-08-10.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-08-16.md", + "destination": "03-records/journal/2026-08-16.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-11.md", + "destination": "03-records/journal/2026-09-11.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-13.md", + "destination": "03-records/journal/2026-09-13.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-14.md", + "destination": "03-records/journal/2026-09-14.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-15.md", + "destination": "03-records/journal/2026-09-15.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-18.md", + "destination": "03-records/journal/2026-09-18.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-21.md", + "destination": "03-records/journal/2026-09-21.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-22.md", + "destination": "03-records/journal/2026-09-22.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-23.md", + "destination": "03-records/journal/2026-09-23.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-24.md", + "destination": "03-records/journal/2026-09-24.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-25.md", + "destination": "03-records/journal/2026-09-25.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-26.md", + "destination": "03-records/journal/2026-09-26.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + }, + { + "source": "records/journal/2026-09-27.md", + "destination": "03-records/journal/2026-09-27.md", + "type": "journal", + "rationale": "Chronological daily engineering log and retrospective." + } +] \ No newline at end of file diff --git a/scripts/test_validator.py b/scripts/test_validator.py new file mode 100755 index 0000000..3d6e60e --- /dev/null +++ b/scripts/test_validator.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +""" +Unit tests for validate-brain.py DirectoryContract and invariants. +Run: python3 scripts/test_validator.py +""" + +from __future__ import annotations + +import importlib.util +import pathlib +import sys +import unittest + +ROOT = pathlib.Path(__file__).parent.parent.resolve() + +from typing import Any + +spec = importlib.util.spec_from_file_location("validate_brain", ROOT / "scripts" / "validate-brain.py") +if spec is None or spec.loader is None: + raise ImportError("Could not load validate-brain.py") +vb = importlib.util.module_from_spec(spec) +sys.modules["validate_brain"] = vb +spec.loader.exec_module(vb) + + +class TestDirectoryContracts(unittest.TestCase): + def make_doc(self, rel_path: str, content: str, validates_frontmatter: bool = True) -> Any: + p = ROOT / rel_path + return vb.Document( + path=p, + rel=pathlib.Path(rel_path), + content=content, + validates_frontmatter=validates_frontmatter, + ) + + def test_plans_valid(self) -> None: + doc = self.make_doc( + "01-plans/homelab/appctl/smart-deploy.md", + "---\ntype: plan\nstatus: active\n---\n# Plan", + ) + issues = vb.check_directory_contracts(doc) + self.assertEqual(len(issues), 0) + + def test_plans_type_mismatch(self) -> None: + doc = self.make_doc( + "01-plans/homelab/knowledge-note.md", + "---\ntype: knowledge\nstatus: stable\n---\n# Note", + ) + issues = vb.check_directory_contracts(doc) + self.assertTrue(any("Directory/type contract violation" in i.message for i in issues)) + + def test_plans_max_depth_exceeded(self) -> None: + doc = self.make_doc( + "01-plans/homelab/subsystem/deep/too-deep.md", + "---\ntype: plan\nstatus: active\n---\n# Plan", + ) + issues = vb.check_directory_contracts(doc) + self.assertTrue(any("Nesting violation" in i.message for i in issues)) + + def test_discussions_valid(self) -> None: + doc = self.make_doc( + "02-discussions/homelab/auth.md", + "---\ntype: discussion\nstatus: open\n---\n# Disc", + ) + issues = vb.check_directory_contracts(doc) + self.assertEqual(len(issues), 0) + + def test_journal_valid(self) -> None: + doc = self.make_doc( + "03-records/journal/2026-09-28.md", + "---\ntype: journal\n---\n# Log", + ) + issues = vb.check_directory_contracts(doc) + self.assertEqual(len(issues), 0) + + def test_journal_invalid_filename(self) -> None: + doc = self.make_doc( + "03-records/journal/my-notes.md", + "---\ntype: journal\n---\n# Log", + ) + issues = vb.check_directory_contracts(doc) + self.assertTrue(any("does not match required pattern" in i.message for i in issues)) + + def test_projects_valid_readme(self) -> None: + doc = self.make_doc( + "06-projects/homelab/README.md", + "---\ntype: project\nstatus: active\n---\n# Hub", + ) + issues = vb.check_directory_contracts(doc) + self.assertEqual(len(issues), 0) + + def test_projects_invalid_arbitrary_file(self) -> None: + doc = self.make_doc( + "06-projects/homelab/guide.md", + "---\ntype: project\nstatus: active\n---\n# Hub", + ) + issues = vb.check_directory_contracts(doc) + self.assertTrue(any("must be named 'README.md'" in i.message for i in issues)) + + def test_projects_invalid_depth(self) -> None: + doc = self.make_doc( + "06-projects/homelab/sub/README.md", + "---\ntype: project\nstatus: active\n---\n# Hub", + ) + issues = vb.check_directory_contracts(doc) + self.assertTrue(any("exceeds max depth" in i.message for i in issues)) + + def test_inbox_exempt(self) -> None: + doc = self.make_doc( + "00-inbox/scratch.md", + "No frontmatter at all! Just raw unclassified capture.", + validates_frontmatter=False, + ) + issues = vb.check_directory_contracts(doc) + self.assertEqual(len(issues), 0) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/validate-brain.py b/scripts/validate-brain.py index d850bc8..f9ac6ba 100755 --- a/scripts/validate-brain.py +++ b/scripts/validate-brain.py @@ -29,22 +29,30 @@ ROOT = pathlib.Path(__file__).parent.parent.resolve() VALID_TYPES: frozenset[str] = frozenset({ "knowledge", "project", "plan", "guide", "decision", - "journal", "discussion", "experiment", "practice", "inbox", "reference", + "journal", "discussion", "experiment", "practice", "reference", "agent", "debug", }) -DEPRECATED_DIRS: tuple[str, ...] = ( - "homelab", "journal", "learning", "docs", - "knowledge/dsa", "knowledge/python", "knowledge/tools", - "knowledge/devenv", "knowledge/skills", -) - REQUIRED_ROOT_FILES: tuple[str, ...] = ("README.md", "AGENTS.md", "LICENSE") +# Deprecated paths are exact repository-relative paths, NEVER substring greps +DEPRECATED_ROOT_DIRS: frozenset[str] = frozenset({ + "homelab", "journal", "learning", "docs", "practice", + "projects", "records", "agents", "knowledge", "inbox", +}) + +DEPRECATED_NESTED_PATHS: frozenset[str] = frozenset({ + "knowledge/dsa", "knowledge/python", "knowledge/tools", + "knowledge/devenv", "knowledge/skills", "projects/homelab/archive", + "records/discussions", +}) + # Paths (or path substrings) excluded entirely from validation. EXEMPT_PATTERNS: tuple[str, ...] = ( ".obsidian", + "00-inbox", "inbox", + "04-learning/practice/LeetCode/Solutions", "practice/LeetCode/Solutions", "scripts", ".git", @@ -55,7 +63,9 @@ EXEMPT_PATTERNS: tuple[str, ...] = ( FRONTMATTER_EXEMPT_FILES: frozenset[pathlib.Path] = frozenset({ ROOT / "README.md", ROOT / "AGENTS.md", + ROOT / "00-inbox" / "README.md", ROOT / "inbox" / "README.md", + ROOT / "05-agents" / "README.md", ROOT / "agents" / "README.md", }) @@ -66,11 +76,59 @@ MERMAID_TYPES: frozenset[str] = frozenset({ "block-beta", "packet-beta", "architecture-beta", }) -# ── Types ────────────────────────────────────────────────────────────────────── +# ── Types & Contracts ───────────────────────────────────────────────────────── Severity = Literal["error", "warning"] +class DirectoryContract(NamedTuple): + prefix: str + expected_type: str | None + max_depth: int | None = None + require_filename: str | None = None + filename_regex: re.Pattern[str] | None = None + allow_unclassified: bool = False + + +DIRECTORY_CONTRACTS: tuple[DirectoryContract, ...] = ( + # 00-inbox: Staging zone, completely exempt from frontmatter validation + DirectoryContract(prefix="00-inbox", expected_type=None, allow_unclassified=True), + + # 01-plans: Intent (allows max_depth=3 for project subsystems e.g. homelab/appctl/*.md) + DirectoryContract(prefix="01-plans", expected_type="plan", max_depth=3), + + # 02-discussions: Prospective option explorations (max_depth=2: project/*.md) + DirectoryContract(prefix="02-discussions", expected_type="discussion", max_depth=2), + + # 03-records: Historical Memory + DirectoryContract( + prefix="03-records/journal", + expected_type="journal", + max_depth=2, + filename_regex=re.compile(r"^\d{4}-\d{2}-\d{2}\.md$"), + ), + DirectoryContract(prefix="03-records/debug", expected_type="debug", max_depth=2), + DirectoryContract(prefix="03-records/decisions", expected_type="decision", max_depth=2), + + # 04-learning: Durable understanding & practice + DirectoryContract(prefix="04-learning/knowledge", expected_type="knowledge"), + DirectoryContract(prefix="04-learning/guides", expected_type="guide", max_depth=3), + DirectoryContract(prefix="04-learning/practice", expected_type="practice"), + + # 05-agents: Agent persona profiles & reusable skills + DirectoryContract(prefix="05-agents/profiles", expected_type="agent", max_depth=2), + DirectoryContract(prefix="05-agents/skills", expected_type="agent", max_depth=2), + + # 06-projects: System topology hubs strictly at depth 2 named README.md + DirectoryContract( + prefix="06-projects", + expected_type="project", + max_depth=2, + require_filename="README.md", + ), +) + + class Document(NamedTuple): path: pathlib.Path rel: pathlib.Path @@ -183,11 +241,16 @@ def _line_of(content: str, pos: int) -> int: # ── Repository checks ────────────────────────────────────────────────────────── def check_deprecated_dirs(root: pathlib.Path) -> list[Issue]: - return [ - Issue("error", root / d, None, f"Deprecated directory still exists: {d}/") - for d in DEPRECATED_DIRS - if (root / d).exists() - ] + issues: list[Issue] = [] + for d in sorted(DEPRECATED_ROOT_DIRS): + target = root / d + if target.is_dir() and not target.is_symlink(): + issues.append(Issue("error", target, None, f"Deprecated root directory still exists: {d}/")) + for p in sorted(DEPRECATED_NESTED_PATHS): + target = root / p + if target.exists(): + issues.append(Issue("error", target, None, f"Deprecated nested path still exists: {p}")) + return issues def check_required_files(root: pathlib.Path) -> list[Issue]: @@ -200,6 +263,70 @@ def check_required_files(root: pathlib.Path) -> list[Issue]: # ── Document checks ──────────────────────────────────────────────────────────── +def check_directory_contracts(doc: Document) -> list[Issue]: + if not doc.validates_frontmatter: + return [] + + rel_str = str(doc.rel) + matched_contract: DirectoryContract | None = None + for contract in DIRECTORY_CONTRACTS: + if rel_str.startswith(contract.prefix + "/") or rel_str == contract.prefix: + matched_contract = contract + break + + if matched_contract is None: + return [Issue("error", doc.rel, 1, f"Document outside target taxonomy: {doc.rel}")] + + if matched_contract.allow_unclassified: + return [] + + issues: list[Issue] = [] + + # Check filename requirement + if matched_contract.require_filename and doc.path.name != matched_contract.require_filename: + issues.append(Issue( + "error", doc.rel, 1, + f"Structural violation: {doc.rel} must be named '{matched_contract.require_filename}'", + )) + + # Check filename regex + if matched_contract.filename_regex and not matched_contract.filename_regex.match(doc.path.name): + issues.append(Issue( + "error", doc.rel, 1, + f"Structural violation: {doc.rel} does not match required pattern '{matched_contract.filename_regex.pattern}'", + )) + + # Check max depth relative to contract prefix + if matched_contract.max_depth is not None: + sub_path = rel_str[len(matched_contract.prefix):].strip("/") + depth = len([p for p in sub_path.split("/") if p]) + if depth > matched_contract.max_depth: + issues.append(Issue( + "error", doc.rel, 1, + f"Nesting violation: {doc.rel} exceeds max depth {matched_contract.max_depth} for {matched_contract.prefix}", + )) + + # Check frontmatter type against expected_type + content = doc.content + doc_type = None + type_line = 1 + if content.startswith("---"): + end = content.find("\n---", 3) + if end != -1: + fm_block = content[3:end] + type_match = re.search(r'^type:\s*(\S+)', fm_block, re.MULTILINE) + if type_match: + doc_type = type_match.group(1) + type_line = _line_of(content, 3 + type_match.start()) + + if matched_contract.expected_type is not None and doc_type != matched_contract.expected_type: + issues.append(Issue( + "error", doc.rel, type_line, + f"Directory/type contract violation: {doc.rel} has type '{doc_type}', expected '{matched_contract.expected_type}'", + )) + + return issues + def check_frontmatter(doc: Document) -> list[Issue]: if not doc.validates_frontmatter: return [] @@ -351,8 +478,11 @@ def run_pyright(root: pathlib.Path) -> list[Issue]: if not shutil.which("pyright"): print(" ℹ Pyright not in PATH — type check skipped.") return [] + practice_dir = root / "04-learning" / "practice" + if not practice_dir.exists(): + practice_dir = root / "practice" res = subprocess.run( - ["pyright", str(root / "scripts"), str(root / "practice")], + ["pyright", str(root / "scripts"), str(practice_dir)], capture_output=True, text=True, check=False, ) if res.returncode != 0: @@ -412,6 +542,7 @@ def main() -> int: document_checks = ( check_frontmatter, + check_directory_contracts, check_links, check_code_fences, check_mermaid,