#+TITLE: SKILL: Org-GTD Archive Roam Daily (Universal Literate Note) #+ID: skill-org-gtd-archive-roam-daily #+STARTUP: content #+FILETAGS: :emacs:gtd:roam:archiving:psf: * Overview The **Org-GTD Archive Roam Daily** skill enables chronological archiving of completed GTD tasks. Instead of a flat archive file, tasks are moved to their respective `org-roam-dailies` files based on their `:CREATED:` property, preserving contextual and temporal integrity. * Phase A: Demand (PRD) :PROPERTIES: :STATUS: FROZEN :END: ** 1. Purpose Define the requirements for chronologically-aware task archiving. ** 2. User Needs - **Temporal Alignment:** Archive tasks to the daily file matching their creation date. - **Context Preservation:** Maintain all properties and sub-elements during the move. - **Robust Extraction:** Correctly parse `:CREATED:` property timestamps. - **Fail-safe Logic:** Default to current date if `:CREATED:` is missing (with a warning). ** 3. Success Criteria *** TODO Successful extraction of [YYYY-MM-DD] from :CREATED: *** TODO Automated creation of non-existent daily files during archive *** TODO Subtree relocation verification * Phase B: Blueprint (PROTOCOL) :PROPERTIES: :STATUS: SIGNED :END: ** 1. Architectural Intent Interfaces for subtree manipulation and Roam daily resolution. Source of truth is the task's metadata and the Roam directory. ** 2. Semantic Interfaces #+begin_src elisp (defun org-gtd-archive-to-roam-daily () "Main command to archive current subtree to its creation-date daily.") (defun get-target-roam-daily-path (creation-date) "Resolves the file path for a specific date in org-roam-dailies.") #+end_src * Phase D: Build (Implementation) Implementation logic is in `projects/org-gtd-archive-roam-daily/org-gtd-archive-roam-daily.el`. ** Archiving Command #+begin_src elisp ;; Logic for subtree movement #+end_src * Phase E: Chaos (Verification) Verification involves archiving tasks with various dates and ensuring they land in the correct files with zero data loss.