PSF: Retrospective metadata injection complete. Kernel future-proofed with CREATED/EDITED drawer logic.

This commit is contained in:
2026-04-07 14:14:56 -04:00
parent c553ddc20f
commit 314107cf69
104 changed files with 803 additions and 1 deletions

10
system/extract-git-dates.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
NOTES_DIR="notes"
for f in $NOTES_DIR/*.org; do
CREATED=$(git log --diff-filter=A --format=%aI -- "$f" | tail -1)
EDITED=$(git log -1 --format=%aI -- "$f")
# If not in git, use file mtime
[ -z "$CREATED" ] && CREATED=$(date -Iseconds -r "$f")
[ -z "$EDITED" ] && EDITED=$(date -Iseconds -r "$f")
echo "$f|$CREATED|$EDITED"
done

View File

@@ -0,0 +1,18 @@
* Flight Plan: Fix Chat Skill Parsing
:PROPERTIES:
:STATUS: FINISHED
:END:
** Analyst Phase
The Chat skill currently tells the LLM to output Org-mode subtrees, but the =org-agent= kernel evaluates LLM output via =read-from-string=. This expects a valid s-expression, specifically a Common Lisp property list (plist) that targets an Emacs actuator with an =:insert-at-end= action. We must explicitly mandate that the LLM wraps its conversational output in this plist.
** Coder Phase
- [X] Create =inbox/flight-plan-chat-fix.org= (this file).
- [X] Update =notes/org-skill-chat.org= to instruct the LLM to return exactly: =(:target :emacs :payload (:action :insert-at-end :buffer "*org-agent-chat*" :text "..."))=
- [X] Fix tangle paths to root-relative =../projects/...=
** Tester Phase
- [X] Tangle the file via =emacs --batch=.
- [X] Perform syntax check with SBCL.
- [X] Verified that =projects/org-skill-chat/src/chat-logic.lisp= is correctly generated and valid.
- [X] User to reload skill and test in Emacs.

View File

@@ -0,0 +1,23 @@
* Flight Plan: Chat UI Refinement & Preamble Suppression
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
The user is seeing the agent's meta-commentary (e.g., "Okay, I've inserted...") and the "Thinking..." status block is not being removed. This is because:
1. The LLM prompt is not strict enough about forbidding explanations.
2. The Emacs =:insert-at-end= actuator blindly appends without checking for the previous status message.
** Coder Phase
- [X] Create =inbox/flight-plan-chat-ui-fix.org= (this file).
- [ ] Update =projects/org-agent/src/org-agent.el= to replace "Thinking..." lines.
- [ ] Update =notes/org-skill-chat.org= to suppress conversational preamble.
- [ ] Tangle and restart.
** Tester Phase
1. Tangle all modified files.
2. Restart the daemon.
3. Reload =org-agent.el= in Emacs.
4. Test chat and verify:
- "Thinking..." is replaced by the response.
- No "Okay, I've inserted..." preamble appears.

View File

@@ -0,0 +1,48 @@
#+TITLE: Flight Plan: Verified Clean Build & LLM Test
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-01
#+FILETAGS: :psf:build:qa:
#+STARTUP: content
* Overview
This flight plan defines the strict, step-by-step protocol for escaping the Lisp caching trap, properly tangling the literate source, and verifying the live OpenRouter connection.
*Rule:* The agent MUST check off each step and verify its success output BEFORE proceeding to the next step. No chained commands.
* Phase A: Purge & Verify (The Scientist)
** DONE 1. Nuke the Lisp Cache
- Action: Delete =~/.cache/common-lisp/= to destroy all stale =.fasl= binaries.
- Verification: The directory must not exist.
- Result: *SUCCESS: Cache purged.*
** DONE 2. Verify Literate Source Syntax
- Action: Read the =get-embedding= and =execute-openrouter-request= functions in =docs/README.org=.
- Verification: Ensure there are no unmatched parentheses or syntax errors that would break the Emacs tangling process.
- Result: *SUCCESS: Syntax verified (no unmatched parentheses found).*
* Phase B: Tangle & Audit (The Coder)
** TODO 3. Tangle the Literate Source
- Action: Run =emacs --batch --eval '(require (quote ob-tangle))' --eval '(org-babel-tangle-file "~/memex/projects/org-agent/docs/README.org")'=
- Verification: The command must exit with code 0 and report that blocks were tangled.
** TODO 4. Audit the Physical Lisp Files
- Action: Read =src/embedding.lisp= and =src/core.lisp=.
- Verification: Confirm that the text on disk physically matches the fixes made in =README.org= (e.g., =get-embedding= is correct, =start-daemon= skips whitespace).
* Phase C: Quality Gate (The Tester)
** TODO 5. Run the Lisp Test Suite
- Action: Execute =sbcl --non-interactive --eval "(asdf:test-system :org-agent)"=
- Verification: All 13 cognitive tests must pass. If any fail, STOP and return to Phase A.
** TODO 6. Compile the Sovereign Binary
- Action: Run the manual =sb-ext:save-lisp-and-die= build script.
- Verification: The binary is generated without fatal compiler errors.
* Phase D: Live Execution (The Sovereign)
** TODO 7. Clean Restart
- Action: Kill all stale =org-agent-server= processes and start the new binary in the background.
- Verification: The log shows =org-agent Kernel Booted Successfully= and =Daemon Listening=.
** TODO 8. Live Model Discovery Test
- Action: Send =@agent list models= via Emacs batch script.
- Verification: The daemon log shows the generated Org-mode table of OpenRouter models.

View File

@@ -0,0 +1,23 @@
* Flight Plan: Emacs OACP Outbound Bridge
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
The current =org-agent= kernel is a "one-way" sensory system. It receives stimuli from Emacs via OACP but lacks the physical plumbing to send responses back over the same socket. To fix this, we must:
1. Modify the kernel (literately) to pass the client TCP stream through the cognitive loop.
2. Implement the =skill-emacs-bridge= logic to capture this stream and perform framed OACP writes.
3. Update the =skill-chat= to utilize the new bridge.
** Coder Phase
- [X] Create =inbox/flight-plan-emacs-bridge.org= (this file).
- [ ] Update =projects/org-agent/docs/README.org= (Literate Kernel) with the stream-passing hook.
- [ ] Update =notes/org-skill-emacs-bridge.org= to implement the OACP outbound writer.
- [ ] Tangle the updated files.
- [ ] Rebuild the daemon binary.
** Tester Phase
1. Tangle all modified files.
2. Restart the daemon.
3. Run the =test-chat.lisp= script to verify two-way communication.
4. Verify in Emacs =*org-agent-chat*=.

View File

@@ -0,0 +1,41 @@
#+TITLE: Flight Plan: Flatten & Generalize Memex Environment Architecture
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-01
#+FILETAGS: :psf:arch:refactor:generalization:
#+STARTUP: content
* Overview
Refactor the =.env.example= and secure local =.env= to remove the legacy PARA structure and replace it with a generalized, anchor-based architecture. Move towards a unified =MEMEX_DIR= foundation while ensuring portability for different users and folder structures.
* Phase A: Analysis (The Scientist)
:PROPERTIES:
:STATUS: COMPLETE
:END:
** Findings
- Current =.env= relies on hardcoded absolute paths (=/home/user/memex/...=).
- Direct removal of PARA variables breaks skills (=org-skill-project-foundry=, etc.).
- The kernel's =context-resolve-path= already supports =$= expansion but needs to be the standard for all internal path lookups.
* Phase B: Blueprint (The Architect)
:PROPERTIES:
:STATUS: PENDING_AUTHORIZATION
:END:
** [Coder] Surgical Implementation Tasks
1. *Generalize .env.example:*
- Define =MEMEX_DIR= as the single mandatory anchor.
- Use variable references for all sub-directories (e.g., =PROJECTS_DIR="${MEMEX_DIR}/projects"=).
- Add documentation explaining how to override these for custom structures.
2. *Harden Path Resolution (README.org):*
- Update =load-all-skills= to use =context-resolve-path= when reading the =SKILLS_DIR= environment variable.
- This ensures that if a user sets =SKILLS_DIR="$MEMEX_DIR/notes"=, the Lisp kernel expands it correctly regardless of the OS or username.
3. *Sync Secure .env (~/.local/share/org-agent/.env):*
- Refactor the user's secure file to use this dynamic derivation.
** [Tester] Verification Strategy
1. *Portability Test:* Temporarily set =MEMEX_DIR=/tmp/memex-test= in the environment and verify that =(org-agent:context-get-skill-source "test")= attempts to read from the correct expanded path.
2. *Boot Test:* Restart daemon and ensure all skills load via the new expanded paths.
* NEXT Authorization Gate
** Sovereign, do you approve this Generalized Flattening plan?
- [ ] APPROVED
- [ ] REJECTED

View File

@@ -0,0 +1,21 @@
* Flight Plan: Night Shift Phase 1 (Neural Infrastructure)
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
Identify skeletal LLM provider and auth skills. Ensure they register their backends correctly with the kernel.
** Coder Phase
- [ ] Implement =org-skill-provider-gemini.org=
- [ ] Implement =org-skill-provider-openrouter.org=
- [ ] Implement =org-skill-provider-anthropic.org=
- [ ] Implement =org-skill-provider-openai.org=
- [ ] Implement =org-skill-provider-local.org=
- [ ] Implement =org-skill-auth-api-key.org=
- [ ] Implement =org-skill-auth-google-oauth.org=
** Tester Phase
1. Tangle each file.
2. Load into SBCL and check for package/symbol errors.
3. Verify registration in kernel backends table.

View File

@@ -0,0 +1,52 @@
#+TITLE: Flight Plan: Note Metadata Sovereignty
#+DATE: 2026-04-07
#+FILETAGS: :plan:metadata:integrity:psf:
* Phase D: Build (Implementation)
** 1. Extract Dates Script
#+begin_src bash :tangle extract-git-dates.sh
#!/bin/bash
NOTES_DIR="notes"
for f in $NOTES_DIR/*.org; do
CREATED=$(git log --diff-filter=A --format=%aI -- "$f" | tail -1)
EDITED=$(git log -1 --format=%aI -- "$f")
# If not in git, use file mtime
[ -z "$CREATED" ] && CREATED=$(date -Iseconds -r "$f")
[ -z "$EDITED" ] && EDITED=$(date -Iseconds -r "$f")
echo "$f|$CREATED|$EDITED"
done
#+end_src
** 2. Inject Properties Script (Elisp)
#+begin_src elisp :tangle inject-metadata.el
(require 'org)
(defun org-agent-inject-metadata (file created edited)
(with-current-buffer (find-file-noselect file)
(org-with-wide-buffer
(goto-char (point-min))
(let ((props (org-get-property-block)))
(unless props
(org-id-get-create) ; Ensure drawer exists
(setq props (org-get-property-block))))
(org-set-property "CREATED" (org-agent-format-iso created))
(org-set-property "EDITED" (org-agent-format-iso edited))
(save-buffer)
(kill-buffer))))
(defun org-agent-format-iso (iso-date)
"Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]"
(let ((time (parse-time-string iso-date)))
(format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time))))
;; Batch execution logic
(let ((lines (with-temp-buffer
(insert-file-contents "system/git-dates.txt")
(split-string (buffer-string) "\n" t))))
(dolist (line lines)
(let ((parts (split-string line "|")))
(when (= (length parts) 3)
(org-agent-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts))))))
#+end_src

View File

@@ -0,0 +1,17 @@
#+TITLE: Flight Plan: Reactive Reasoning Interface
#+DATE: 2026-04-07
#+FILETAGS: :plan:emacs:ui:reasoning:
* Phase A: Demand (Verify State)
- Current state: `org-agent.el` combines final outputs and internal thoughts into a single `*org-agent-chat*` buffer.
- Goal: Create a dedicated `*org-agent-reasoning*` buffer for internal LLM logs. Add an interrupt hotkey (`C-c C-k`).
* Phase B: Blueprint (Surgical Edits)
- Modify `projects/org-agent/src/org-agent.el` to route `(:log :LOG)` messages to `*org-agent-reasoning*`.
- Add `org-agent-interrupt` command that sends `(:type :EVENT :payload (:sensor :interrupt))` to the kernel.
- Bind `C-c C-k` to `org-agent-interrupt` in the chat buffer.
- Open `*org-agent-reasoning*` as a side-window when `org-agent-chat` is called.
* Phase C: Tester (Automated Proof)
- Test Emacs evaluation using batch mode to verify the syntax of the modified `org-agent.el`.
- Open Emacs and connect to the live kernel to verify message routing.

View File

@@ -0,0 +1,35 @@
# Plan: Recursive Cognitive Kernel
## Objective
Implement a recursive `cognitive-loop` that allows the agent to chain multiple actions (tool calls) and observe results before finalising a response, similar to SOTA agents like Claude Code.
## Key Files & Context
- `projects/org-agent/docs/README.org`: The primary source of truth for the kernel logic.
- `projects/org-agent/src/core.lisp`: Tangled kernel implementation.
- `projects/org-agent/src/symbolic.lisp`: Contains the `decide` logic.
## Implementation Steps
### 1. State & Interruption
- Define `*interrupt-flag*` and `*interrupt-lock*` in the kernel state.
- Update the `perceive` function to detect the `:interrupt` sensor stimulus and set the flag.
### 2. Recursive `cognitive-loop`
- Modify `cognitive-loop` to accept an optional `depth` parameter (default 0).
- Add a check at the beginning of the loop for `depth > 10` or `*interrupt-flag*`.
- Refactor the loop to capture the return value of `dispatch-action`.
- If the action was a "Tool Call" (any target except `:emacs` or `:system-message`) and produced a result, recursively call `cognitive-loop` with a new `:EVENT` containing that result.
### 3. Actuator Harmonization
- Ensure `execute-system-action` (for `:eval`) returns meaningful results that can be fed back into the loop.
- Update `dispatch-action` to return the result of the actuator call.
### 4. Literate Tangle & Load
- Apply these changes to the `README.org` document.
- Tangle to update `.lisp` files.
- Hot-load the updated code into the live image via Swank.
## Verification & Testing
- **Multi-turn Test**: In the chat, ask the agent to "Calculate the sum of 5+5 and then multiply it by 2 using eval".
- **Introspection Check**: Verify the `*org-agent-reasoning*` buffer shows the two distinct `eval` steps.
- **Interrupt Test**: Trigger a long-running or recursive task and press `C-c C-k` in Emacs to verify the loop halts.

View File

@@ -0,0 +1,49 @@
#+TITLE: Flight Plan: Hard Rollback & Verification
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-01
#+FILETAGS: :psf:build:qa:rollback:
#+STARTUP: content
* Overview
Break the cycle of chaotic debugging by performing a hard Git rollback to the last known stable state of the `org-agent` repository, surgically applying the verified fixes, and executing the Model Discovery connection test one strict step at a time.
* Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Rollback
- Action: Execute `git reset --hard` and `git clean -fd` in `~/memex/projects/org-agent`.
- Verification: Directory is clean of untracked files and uncommitted changes.
** TODO 2. Nuke the Lisp Cache
- Action: Delete `~/.cache/common-lisp/` and `~/.local/share/org-agent/quicklisp/cache/`.
- Verification: The directories do not exist.
** TODO 3. Verify Environment
- Action: Read `~/.local/share/org-agent/.env`.
- Verification: Ensure `OPENROUTER_API_KEY` and `MEMEX_DIR` are correctly set without trailing quotes or comments.
* Phase B: Surgical Implementation (The Coder)
** TODO 4. Implement Dynamic Model Resolution
- Action: Surgically update `docs/README.org` to make `execute-openrouter-request` pull the `:LLM_MODEL_OPENROUTER` property.
** TODO 5. Implement Model Discovery API
- Action: Add `openrouter-get-available-models` to `docs/README.org` and export it in `package.lisp`.
** TODO 6. Implement Model Explorer Skill
- Action: Update `~/memex/notes/org-skill-model-explorer.org` with the trigger, table builder, and actuator logic. Ensure it is correctly registered.
* Phase C: Tangle & Build (The Tester)
** TODO 7. Tangle
- Action: Run `emacs --batch` to regenerate `src/*.lisp` from the `README.org`.
- Verification: Exit code 0.
** TODO 8. Compile
- Action: Run a clean compilation script.
- Verification: The binary is generated successfully.
* Phase D: Live Execution (The Sovereign)
** TODO 9. Foreground Boot Test
- Action: Start the `org-agent-server` daemon in the foreground for 10 seconds.
- Verification: Visually confirm that `org-skill-model-explorer` successfully jails and hot-loads.
** TODO 10. Live Model Discovery Test
- Action: Send `@agent list models` via an Emacs batch script.
- Verification: The daemon log shows the generated Org-mode table of OpenRouter models.

View File

@@ -0,0 +1,17 @@
* Flight Plan: Shell Actuator Implementation
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
The Shell Actuator is missing registration, uses the wrong function signature `(action)` instead of `(action context)`, and uses incorrect tangle paths. Additionally, the Chat Agent needs to know how to call the Shell Actuator.
** Coder Phase
- [X] Create =inbox/flight-plan-shell-actuator.org= (this file).
- [ ] Update =notes/org-skill-shell-actuator.org= with correct tangle paths, signature, and registration.
- [ ] Update =notes/org-skill-chat.org= prompt to include an example of calling the shell.
- [ ] Tangle, clean build, and restart the daemon.
** Tester Phase
1. Send a chat message asking the agent to run "date" or "ls".
2. Verify the agent executes it and returns the output to Emacs.

View File

@@ -0,0 +1,34 @@
#+TITLE: Flight Plan: Kernel API Hardening & Skill Audit
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-02
#+FILETAGS: :psf:arch:refactor:
#+STARTUP: content
* Overview
Resolve the "No results" issue for LLM discovery by fixing package exports in the kernel and auditing the Org-Native skills for missing definitions.
* Phase A: Analysis (The Scientist)
:PROPERTIES:
:STATUS: COMPLETE
:END:
** Findings
- =*PROVIDER-CASCADE*= is used by skills but not exported from the kernel.
- =skill-model-explorer= requires a functional OpenRouter backend, which failed to load.
- Multiple skills (=skill-chat=, =skill-scribe=) have undefined trigger/neuro functions.
* Phase B: Blueprint (The Architect)
:PROPERTIES:
:STATUS: PENDING_AUTHORIZATION
:END:
** [Coder] Surgical Tasks
1. *Harden Kernel Exports:* Update the package definition in =docs/README.org= to export =*PROVIDER-CASCADE*= and ensure =register-neuro-backend= is correctly visible.
2. *Audit Skill Explorer:* Verify =notes/org-skill-model-explorer.org= logic and ensure it uses the correctly exported kernel symbols.
3. *Surgical Skill Fixes:* Audit the skills reporting =READER ERROR= in the logs and restore their missing Lisp blocks from the project's intended architecture.
** [Tester] Verification Strategy
1. *Clean Restart:* Nuke caches, re-tangle, and boot the kernel.
2. *Log Audit:* Confirm 0 =READER ERROR= messages during the boot sequence.
3. *Live Stimulus:* Execute =@agent list models= and verify the table appears.
* NEXT Authorization Gate
Sovereign, do you approve this plan to harden the Kernel API and audit the failing skills?

View File

@@ -0,0 +1,35 @@
#+TITLE: Flight Plan: Sovereign Brain Recovery
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-01
#+FILETAGS: :psf:recovery:build:
#+STARTUP: content
* Overview
Rigorous recovery of the =org-agent= kernel after a series of failed build loops.
* Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Git Reset
- Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/org-agent=.
- Verification: =git status= must be clean.
** TODO 2. Nuke Lisp & Quicklisp Caches
- Action: Delete =~/.cache/common-lisp/= and =~/.local/share/org-agent/quicklisp/cache/=.
- Verification: Directories must not exist.
** TODO 3. Verify Secure Environment
- Action: Check =~/.local/share/org-agent/.env=.
- Verification: Confirm =MEMEX_DIR= and =OPENROUTER_API_KEY= are correct.
* Phase B: Restoration (The Coder)
** TODO 4. Restore Literate Source
- Action: Ensure =docs/README.org= contains the modular kernel logic.
- Verification: Tangle the file and confirm =src/core.lisp= exists.
* Phase C: Verification (The Tester)
** TODO 5. Foreground Boot Test
- Action: Run daemon in foreground.
- Verification: Confirm "Daemon Listening" and skill jailing.
** TODO 6. Live Handshake
- Action: =emacs --batch= stimulus test.
- Verification: Confirm LLM response in log.

View File

@@ -0,0 +1,18 @@
* Flight Plan: System State and Shell Actuator
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
The user has requested an update on the state of the system and a test run to realize where it is failing and what features we were working on.
We were implementing the Shell Actuator (=org-skill-shell-actuator.org=) to enable the agent to run commands like "date". We ran into connection/daemon-crashing issues and response formatting issues.
** Coder Phase
- [X] Create =inbox/flight-plan-system-state.org= (this file).
- [ ] Run tests (=test-shell.lisp= and =prove-shell.el=).
- [ ] Inspect daemon logs to find the exact failure points.
** Tester Phase
1. Start the daemon in the background using a robust method.
2. Run =test-shell.lisp= and =prove-shell.el=.
3. Review the output and identify the bugs.

View File

@@ -0,0 +1,74 @@
#+TITLE: Flight Plan: Unified Tool Registry (def-cognitive-tool)
#+DATE: 2026-04-07
#+FILETAGS: :plan:kernel:architecture:tools:
* Phase A: Demand (Verify State)
- Current state: Tools like `read-file`, `grep-search`, and `eval` are implemented as loose actuators or skill-specific functions.
- The LLM's knowledge of available tools is manually hardcoded into prompts or "guessed" based on skill names.
- Objective: Create a formal, self-documenting Tool Registry that automatically injects tool definitions into neural prompts.
* Phase B: Blueprint (Surgical Edits)
** 1. Tool Registry Data Structure
- Define `*cognitive-tools*` hash table in `src/core.lisp`.
- Define a `cognitive-tool` struct to hold: name, description, parameters, guard, and body.
** 2. The `def-cognitive-tool` Macro
- Create a macro that simplifies tool definition.
** 3. Prompt Integration
- Update `think` in `src/neuro.lisp` to automatically inject the tool belt into the system prompt.
** 4. Recursive Loop Integration
- Update `cognitive-loop` to recognize and execute tool calls.
* Phase D: Build (Implementation)
** 1. Registry & Macro
#+begin_src lisp
(in-package :org-agent)
(defvar *cognitive-tools* (make-hash-table :test 'equal))
(defstruct cognitive-tool name description parameters guard body)
(defmacro def-cognitive-tool (name description &key parameters guard body)
`(setf (gethash ,(string-downcase (string name)) *cognitive-tools*)
(make-cognitive-tool :name ,(string-downcase (string name))
:description ,description
:parameters ',parameters
:guard ,guard
:body ,body)))
#+end_src
** 2. Tool-Belt Prompt Generator
#+begin_src lisp
(defun generate-tool-belt-prompt ()
(let ((output "AVAILABLE TOOLS:
You can call tools by returning a Lisp plist: (:target :tool :action :call :tool <name> :args (...))
"))
(maphash (lambda (name tool)
(setf output (concatenate 'string output
(format nil "- ~a: ~a\n Parameters: ~s\n\n"
name
(cognitive-tool-description tool)
(cognitive-tool-parameters tool)))))
*cognitive-tools*)
output))
#+end_src
** 3. Integration with 'think'
Refactor `think` to:
- Generate the tool belt prompt.
- Prepend it to the `system-prompt` in `ask-neuro`.
** 4. Integration with 'cognitive-loop'
Update the recursive check to:
- Handle `(:target :tool :action :call ...)` specifically.
- Look up the tool in `*cognitive-tools*`.
- Execute guard -> body.
* Phase C: Tester (Automated Proof)
- Refactor `eval` into a cognitive tool.
- Verify the agent can use it recursively.

86
system/git-dates.txt Normal file
View File

@@ -0,0 +1,86 @@
notes/amero-accounts.org|2026-04-07T13:42:42-04:00|2026-04-07T13:42:42-04:00
notes/closos-attributed-object-store.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/closos-memory-persistence.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/closos-multiple-environments.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/closos-protection-mechanisms.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/closos-single-address-space.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/help-emacs.org|2026-03-25T12:28:35-04:00|2026-04-07T13:42:42-04:00
notes/institutional-memory.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/modular-emacs-configuration.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-gtd-v4-migration.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-architect.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-ast-normalization.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-atomic-notes.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-auth-api-key.org|2026-03-31T18:13:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-auth-google-oauth.org|2026-03-31T18:13:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-brain-mapper.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-chaos.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-chat.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-consensus.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-context-manager.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-creator.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-cron.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-delegation.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-diagrammer.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-dotemacs.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-economist.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-emacs-bridge.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-embedding-generator.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-environment-config.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-formal-verification.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-function-calling.org|2026-03-31T18:43:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-git-steward.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-groomer.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-gtd.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-hardware-inhabitation.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-hook-manager.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-hyper-graph.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-inbound-gateway.org|2026-03-31T18:43:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-inbox-processor.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-infrastructure.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-linkedin.org|2026-04-05T19:12:25-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-lisp-machine-bootstrap.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-log-aggregator.org|2026-04-04T20:27:39-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-long-horizon.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-memex.org|2026-03-31T13:03:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-model-explorer.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-object-store-persistence.org|2026-03-31T18:28:47-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-onboarding.org|2026-03-31T18:13:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-agent.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-delivery.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-gtd-archive-roam-daily.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-json-bridge.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-mode.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-project-foundry.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-project-manager.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-provider-anthropic.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-provider-gemini.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-provider-ollama.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-provider-openai.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-provider-openrouter.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-router.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-safety-harness.org|2026-03-31T18:28:47-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-scientist.org|2026-03-31T20:28:06-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-scribe.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-scribe-rca.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-self-fix.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-shell-actuator.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-sub-agent-manager.org|2026-03-31T18:28:47-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-task-integrity.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-tdd-runner.org|2026-03-31T18:43:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-tech-analyst.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-token-accountant.org|2026-04-07T13:42:42-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-web-interface.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-web-research.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-workspace-manager.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/personal-software-foundry.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/project-modular-home-appliances.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-off-grid-field-guide.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-open-personal-equipment-system.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-personal-server-appliance.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-revenue-sustainability.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-sdr-suite-lisp.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-token-optimization.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/project-zotero-org-import-tool.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/readme.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/tool-failure-protocol.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00

29
system/inject-metadata.el Normal file
View File

@@ -0,0 +1,29 @@
(require 'org)
(defun org-agent-inject-metadata (file created edited)
(with-current-buffer (find-file-noselect file)
(org-with-wide-buffer
(goto-char (point-min))
(let ((props (org-get-property-block)))
(unless props
(org-id-get-create) ; Ensure drawer exists
(setq props (org-get-property-block))))
(org-set-property "CREATED" (org-agent-format-iso created))
(org-set-property "EDITED" (org-agent-format-iso edited))
(save-buffer)
(kill-buffer))))
(defun org-agent-format-iso (iso-date)
"Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]"
(let ((time (parse-time-string iso-date)))
(format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time))))
;; Batch execution logic
(let ((lines (with-temp-buffer
(insert-file-contents "system/git-dates.txt")
(split-string (buffer-string) "\n" t))))
(dolist (line lines)
(let ((parts (split-string line "|")))
(when (= (length parts) 3)
(org-agent-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts))))))