PSF: Stabilizing workspace after crash. Valid kernel/skill fixes.
This commit is contained in:
63
notes/org-skill-git-steward.org
Normal file
63
notes/org-skill-git-steward.org
Normal file
@@ -0,0 +1,63 @@
|
||||
#+TITLE: SKILL: Git Steward (Universal Literate Note)
|
||||
#+ID: skill-git-steward
|
||||
#+STARTUP: content
|
||||
#+FILETAGS: :git:vcs:system:psf:
|
||||
|
||||
* Overview
|
||||
The *Git Steward* maintains the integrity of the workspace by automating version control operations.
|
||||
|
||||
* Phase A: Demand (PRD)
|
||||
:PROPERTIES:
|
||||
:STATUS: FROZEN
|
||||
:END:
|
||||
|
||||
** 1. Purpose
|
||||
Automate Git operations for the Memex.
|
||||
|
||||
** 2. User Needs
|
||||
- *Status:* Retrieve the current state of the repository.
|
||||
- *Commit:* Automate staging and committing changes.
|
||||
- *Push:* Synchronize with remote repositories.
|
||||
|
||||
* Phase B: Blueprint (PROTOCOL)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Architectural Intent
|
||||
Workspace version control management.
|
||||
|
||||
** 2. Semantic Interfaces
|
||||
#+begin_src lisp
|
||||
(defun git-status () "Return status of current repository.")
|
||||
(defun git-commit (message) "Stage and commit changes with MESSAGE.")
|
||||
(defun git-push () "Push changes to origin.")
|
||||
#+end_src
|
||||
|
||||
* Phase D: Build (Implementation)
|
||||
|
||||
#+begin_src lisp :tangle ../projects/org-skill-git-steward/src/git-steward.lisp
|
||||
(defun git-status ()
|
||||
"Executes git status and returns the output."
|
||||
(uiop:run-program '("git" "status" "--short") :output :string))
|
||||
|
||||
(defun git-commit (message)
|
||||
"Stages all tracked changes and commits them."
|
||||
(kernel-log "GIT - Committing: ~a" message)
|
||||
(uiop:run-program '("git" "add" "-u"))
|
||||
(uiop:run-program `("git" "commit" "-m" ,message)))
|
||||
|
||||
(defun git-push ()
|
||||
"Pushes to the current branch origin."
|
||||
(kernel-log "GIT - Pushing to origin...")
|
||||
(uiop:run-program '("git" "push")))
|
||||
#+end_src
|
||||
|
||||
* Registration
|
||||
#+begin_src lisp
|
||||
(defskill :skill-git-steward
|
||||
:priority 40
|
||||
:trigger (lambda (context) nil)
|
||||
:neuro (lambda (context) nil)
|
||||
:symbolic (lambda (action context) action))
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user