1.7 KiB
1.7 KiB
SKILL: Git Steward (Universal Literate Note)
- Overview
- Phase A: Demand (PRD)
- Phase B: Blueprint (PROTOCOL)
- Phase D: Build (Implementation)
- Registration
Overview
The Git Steward maintains the integrity of the workspace by automating version control operations.
Phase A: Demand (PRD)
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)
1. Architectural Intent
Workspace version control management.
2. Semantic Interfaces
(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.")
Phase D: Build (Implementation)
(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")))
Registration
(defskill :skill-git-steward
:priority 40
:trigger (lambda (context) nil)
:neuro (lambda (context) nil)
:symbolic (lambda (action context) action))