2.6 KiB
2.6 KiB
SKILL: Project Foundry Agent (Universal Literate Note)
- Overview
- Phase A: Demand (PRD)
- Phase B: Blueprint (PROTOCOL)
- Phase D: Build (Implementation)
- Registration
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)
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)
1. Architectural Intent
Interfaces for project scaffolding and triggering. Source of truth is the filesystem and `gtd.org`.
2. Semantic Interfaces
(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.")
Phase D: Build (Implementation)
Workspace Scaffolding
(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)))))
Registration
(defskill :skill-project-foundry
:priority 80
:trigger #'trigger-skill-project-foundry
:neuro #'neuro-skill-project-foundry
:symbolic #'verify-skill-project-foundry)