PSF: Mass-regeneration complete. 53/53 high-fidelity blueprints and TDD suites established. Zero-cost Pro bridge active.

This commit is contained in:
2026-04-07 08:58:08 -04:00
parent f4a91ae747
commit 77c0dac025
58 changed files with 2154 additions and 1671 deletions

View File

@@ -25,30 +25,61 @@ Define the requirements for chronologically-aware task archiving.
*** TODO Automated creation of non-existent daily files during archive
*** TODO Subtree relocation verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: DRAFT
:END:
** 1. Architectural Intent
Interfaces for subtree manipulation and Roam daily resolution. Source of truth is the task's metadata and the Roam directory.
The system will utilize Emacs Lisp to extract the `:CREATED:` property from a GTD task, derive a date, locate (or create) the corresponding `org-roam-daily` file, and move the task subtree to that file. Error handling will include a fallback mechanism to the current date, accompanied by a user notification. The design emphasizes modularity and testability.
** 2. Semantic Interfaces
#+begin_src elisp
(defun org-gtd-archive-to-roam-daily ()
"Main command to archive current subtree to its creation-date daily.")
** 2. Semantic Interfaces (Lisp Signatures)
(defun get-target-roam-daily-path (creation-date)
"Resolves the file path for a specific date in org-roam-dailies.")
#+end_src
- `(org-gtd-archive-roam-daily &optional subtree)`
- *Purpose:* Main entry point. Archives a GTD task to its corresponding `org-roam-daily` file based on the `:CREATED:` property.
- *Arguments:*
- `subtree` (optional): The subtree to archive. Defaults to the current subtree.
- *Return Value:* `t` on success, `nil` on failure.
- *Side Effects:* Modifies Org files.
* Phase D: Build (Implementation)
Implementation logic is in `projects/org-gtd-archive-roam-daily/org-gtd-archive-roam-daily.el`.
- `(org-gtd-archive-roam-daily-extract-created-date subtree)`
- *Purpose:* Extracts the date from the `:CREATED:` property of a subtree.
- *Arguments:*
- `subtree`: The subtree to extract the date from.
- *Return Value:* A string in `YYYY-MM-DD` format, or `nil` if the property is missing or invalid.
** Archiving Command
#+begin_src elisp
;; Logic for subtree movement
#+end_src
- `(org-gtd-archive-roam-daily-get-daily-file-path date)`
- *Purpose:* Determines the file path for a given date, according to `org-roam-dailies` conventions.
- *Arguments:*
- `date`: A string in `YYYY-MM-DD` format.
- *Return Value:* A string representing the file path.
- `(org-gtd-archive-roam-daily-ensure-daily-file-exists file-path)`
- *Purpose:* Creates an `org-roam-daily` file if it does not already exist.
- *Arguments:*
- `file-path`: The path to the `org-roam-daily` file.
- *Return Value:* `t` if the file exists (either originally or after creation), `nil` if creation failed.
- *Side Effects:* Creates a new file.
- `(org-gtd-archive-roam-daily-move-subtree subtree file-path)`
- *Purpose:* Moves a subtree to a specified file.
- *Arguments:*
- `subtree`: The subtree to move.
- `file-path`: The destination file path.
- *Return Value:* `t` on success, `nil` on failure.
- *Side Effects:* Modifies Org files.
- `(org-gtd-archive-roam-daily-warn message)`
- *Purpose:* Displays a warning message to the user.
- *Arguments:*
- `message`: The warning message to display.
- *Return Value:* `nil`
- *Side Effects:* Displays a message.
* Phase E: Chaos (Verification)
Verification involves archiving tasks with various dates and ensuring they land in the correct files with zero data loss.