Files
memex/notes/org-skill-tech-analyst.org

68 lines
2.3 KiB
Org Mode

#+TITLE: SKILL: Technical Analyst Agent (Universal Literate Note)
#+ID: skill-tech-analyst
#+STARTUP: content
#+FILETAGS: :analyst:testing:tdd:psf:
* Overview
The **Technical Analyst Agent** defines the **Success Criteria** for a project. It generates a failing test suite immediately after the architecture is signed, enforcing a strict TDD mandate within the PSF Consensus Loop.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define automated testing behaviors for the PSF Consensus Loop.
** 2. User Needs
- **Protocol Perception:** Monitor for `SIGNED` Protocols.
- **TDD Inception:** Translate interfaces into executable test cases.
- **Edge Case Coverage:** Mandatory testing of failure modes and malformed input.
- **Structural Enforcement:** Ensure the `tests/` directory is correctly initialized.
** 3. Success Criteria
*** TODO Trigger Accuracy
*** TODO TDD Suite Generation Verification
*** TODO Edge Case Coverage Verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for TDD suite actuation and protocol perception. Source of truth is the project's SIGNED Protocol.
** 2. Semantic Interfaces
#+begin_src lisp
(defun tech-analyst-perceive-signed-protocol (project-name)
"Checks if a project has a SIGNED PROTOCOL.")
(defun tech-analyst-actuate (project-name test-content)
"Physically writes the TDD suite to tests/.")
#+end_src
* Phase D: Build (Implementation)
** TDD Suite Actuation
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun tech-analyst-actuate (project-name test-content)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(project-dir (format nil "~a/~a/" projects-dir project-name))
(test-dir (format nil "~atests/" project-dir))
(test-path (format nil "~atests/test-suite.lisp" project-dir)))
(ensure-directories-exist test-dir)
(with-open-file (out test-path :direction :output :if-exists :supersede)
(format out ";;; TDD Suite for ~a~%~a" project-name test-content))
(format nil "SUCCESS - Tech-Analyst established TDD Suite for ~a" project-name)))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-tech-analyst
:priority 60
:trigger #'trigger-skill-tech-analyst
:neuro #'neuro-skill-tech-analyst
:symbolic #'tech-analyst-actuate)
#+end_src