feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../system/skills/org-skill-project-foundry.org
|
||||
71
notes/org-skill-project-foundry.org
Normal file
71
notes/org-skill-project-foundry.org
Normal file
@@ -0,0 +1,71 @@
|
||||
#+TITLE: SKILL: Project Foundry Agent (Universal Literate Note)
|
||||
#+ID: skill-project-foundry
|
||||
#+STARTUP: content
|
||||
#+FILETAGS: :foundry:scaffolding:system:psf:
|
||||
|
||||
* Overview
|
||||
The **Project Foundry Agent** is responsible for the physical instantiation of new projects. It automates directory creation, version control initialization, and GTD integration, ensuring every new project adheres to PSF mandates.
|
||||
|
||||
* Phase A: Demand (PRD)
|
||||
:PROPERTIES:
|
||||
:STATUS: FROZEN
|
||||
:END:
|
||||
|
||||
** 1. Purpose
|
||||
Define automated project instantiation behaviors for the PSF.
|
||||
|
||||
** 2. User Needs
|
||||
- **Workspace Scaffolding:** Create standard `src/`, `tests/`, `docs/` layout and boilerplate files.
|
||||
- **Version Control:** Initialize Git in new project directories.
|
||||
- **GTD Integration:** Automatically append projects and initial tasks to `gtd.org`.
|
||||
- **Safety:** Prevent overwriting existing projects and log all actions.
|
||||
|
||||
** 3. Success Criteria
|
||||
*** TODO Structural Compliance
|
||||
*** TODO GTD Linkage Verification
|
||||
*** TODO Idempotency Check
|
||||
|
||||
* Phase B: Blueprint (PROTOCOL)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Architectural Intent
|
||||
Interfaces for project scaffolding and triggering. Source of truth is the filesystem and `gtd.org`.
|
||||
|
||||
** 2. Semantic Interfaces
|
||||
#+begin_src lisp
|
||||
(defun scaffold-project (name type)
|
||||
"Physically creates the PSF project structure and links it to GTD.")
|
||||
|
||||
(defun trigger-skill-project-foundry (context)
|
||||
"Triggers on :sensor :delegation :target-skill :foundry.")
|
||||
#+end_src
|
||||
|
||||
* Phase D: Build (Implementation)
|
||||
|
||||
** Workspace Scaffolding
|
||||
#+begin_src lisp :tangle projects/org-skill-project-foundry/src/foundry-logic.lisp
|
||||
(defun scaffold-project (name type)
|
||||
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
|
||||
(project-dir (format nil "~a/~a/" projects-dir name))
|
||||
(gtd-file (or (uiop:getenv "GTD_FILE") "gtd.org"))
|
||||
(timestamp (local-time:format-timestring nil (local-time:now) :format '("[" :year "-" :month "-" :day " " :weekday "]"))))
|
||||
(if (uiop:directory-exists-p project-dir)
|
||||
(format nil "ERROR: Project ~a exists." name)
|
||||
(progn
|
||||
(ensure-directories-exist (format nil "~asrc/" project-dir))
|
||||
(ensure-directories-exist (format nil "~atests/" project-dir))
|
||||
(ensure-directories-exist (format nil "~adocs/" project-dir))
|
||||
(uiop:run-program (list "git" "init" project-dir))
|
||||
(format nil "SUCCESS: Project ~a scaffolded." name)))))
|
||||
#+end_src
|
||||
|
||||
* Registration
|
||||
#+begin_src lisp
|
||||
(defskill :skill-project-foundry
|
||||
:priority 80
|
||||
:trigger #'trigger-skill-project-foundry
|
||||
:neuro #'neuro-skill-project-foundry
|
||||
:symbolic #'verify-skill-project-foundry)
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user