feat: add install script, unlicense, and comprehensive README
- Switch license to The Unlicense - Add idempotent install.sh supporting symlink/copy modes, target overrides, and backups - Add README with architecture diagram, skill matrix, and canonical workflows - Fix relative link in brain/inbox-curation/SKILL.md
This commit is contained in:
1 parent
cf14d806d3
commit
6281a26665
4 files changed
+300
-18
No files matched your search
@@ -1,21 +1,24 @@
|
||||
MIT License
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Copyright (c) 2026 kiskaadee
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
For more information, please refer to <https://unlicense.org>
|
||||
@@ -1 +1,108 @@
|
||||
# skills
|
||||
|
||||
**Modular, harness-agnostic skills for disciplined pair programming with coding agents.**
|
||||
|
||||
A collection of lightweight, single-purpose skills focused on low context overhead (≤50 lines), zero ceremony, and human-approved state transitions. Designed to enforce clean git history, scientific diagnosis, Socratic practice, and durable documentation across any compliant agent platform.
|
||||
|
||||
---
|
||||
|
||||
## The System Architecture
|
||||
|
||||
The skills form an orchestrated pair-programming workflow. `build-skill` governs meta-level skill design. Three core operational skills (`practice`, `diagnose`, `git-commit`) structure day-to-day engineering. `document` evaluates whether insights produced during work warrant durable preservation.
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
SB["build-skill<br/>meta-level design"]
|
||||
subgraph Core["Engineering Skills"]
|
||||
PRAC["practice<br/>learn it: user writes the code"]
|
||||
DIAG["diagnose<br/>find out: evidence-first RCA"]
|
||||
GIT["git-commit<br/>package it: clean atomic history"]
|
||||
end
|
||||
DOC["document<br/>preserve it: 5 epistemic types"]
|
||||
Storage["Vault / Repo Docs"]
|
||||
|
||||
SB --> Core
|
||||
Core --> DOC
|
||||
DOC --> Storage
|
||||
```
|
||||
|
||||
Every skill features an explicit **"Your call"** checkpoint where the agent pauses and asks the human to make critical architectural, diagnostic, and commit decisions with 2-3 concrete options.
|
||||
|
||||
---
|
||||
|
||||
## Active Skills
|
||||
|
||||
### Portable Core (`skills/`)
|
||||
|
||||
| Skill | Trigger / Command | Purpose | Length |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **[`practice`](skills/practice/SKILL.md)** | `/practice [topic]` | Socratic tutoring mode. The user writes all code and drives analysis. Uses graduated assistance and transfer challenges. | 47 lines |
|
||||
| **[`diagnose`](skills/diagnose/SKILL.md)** | `/diagnose [symptom]` | Evidence-first troubleshooting. Progresses from raw logs to proven root cause and minimal, reversible fixes. | 49 lines |
|
||||
| **[`git-commit`](skills/git-commit/SKILL.md)** | `/git-commit` | Working-tree inspection, atomic slice decomposition, and Conventional Commit drafting. Human approves every commit. | 54 lines |
|
||||
| **[`document`](skills/document/SKILL.md)** | `/document` | Second-order knowledge classifier (Discussion, ADR, Plan, Debug Record, Knowledge). User confirms type and provides core insight. | 49 lines |
|
||||
| **[`build-skill`](skills/build-skill/SKILL.md)** | `/build-skill [topic]` | Interactive design, sizing, authoring, and empirical dogfooding of agent skills. Enforces design review gate before file creation. | 48 lines |
|
||||
|
||||
### Brain Extensions (`brain/`)
|
||||
|
||||
| Skill | Status | Purpose |
|
||||
| :--- | :--- | :--- |
|
||||
| **[`inbox-curation`](brain/inbox-curation/SKILL.md)** | Active | Triages, classifies, and commits incoming notes from Brain's `00-inbox/` into lifecycle directories. |
|
||||
| **[`commit-logger`](brain/commit-logger/SKILL.md)** | Standby | Immutable Git commit event capture script into Brain ledger (planned consumer of future `journal-builder`). |
|
||||
|
||||
---
|
||||
|
||||
## Skill Interaction Matrix
|
||||
|
||||
| From \ To | Practice | Diagnose | Git Commit | Document | Build Skill |
|
||||
| :--- | :--- | :--- | :--- | :--- | :--- |
|
||||
| **Practice** | — | yields for production incidents | learner types the commit | optional handoff on key insights | — |
|
||||
| **Diagnose** | yields if user wants to find cause | — | hands off to package verified fix | hands off if RCA reveals non-obvious lesson | — |
|
||||
| **Git Commit** | learner-controlled | packages remediation result | — | delegates if commit warrants deeper doc | — |
|
||||
| **Document** | consumes practice milestones | consumes RCA findings | packages docs if committed | — | — |
|
||||
| **Build Skill** | — | — | delegates all commits | delegates all documentation | applies deletion test to itself |
|
||||
|
||||
---
|
||||
|
||||
## Canonical Flows
|
||||
|
||||
1. **Investigation to History**: `diagnose` (verify root cause) -> `git-commit` (atomic slice approval) -> `document` (optional Debug Record / ADR).
|
||||
2. **Deliberate Practice to Knowledge**: `practice` (solve transfer challenge) -> `document` (author durable knowledge article).
|
||||
3. **Skill Design Loop**: `build-skill` (approve spec) -> dogfood run -> minimal mechanism refinement.
|
||||
|
||||
---
|
||||
|
||||
## Installation & Portability
|
||||
|
||||
The repository includes an idempotent install script (`install.sh`) supporting both symlink and copy modes:
|
||||
|
||||
```bash
|
||||
# Default install to ~/.gemini/config/skills (symlink mode)
|
||||
./install.sh
|
||||
|
||||
# Verify installation health and detect missing skills
|
||||
./install.sh check
|
||||
|
||||
# Install to custom harness path in copy mode
|
||||
./install.sh --mode copy --target ~/.custom-agent/skills
|
||||
```
|
||||
|
||||
When run:
|
||||
- Portable skills and active extensions are linked/copied to the target directory.
|
||||
- Deprecated or superseded skills are safely relocated to a dated backup directory (`skills.backup-<date>`).
|
||||
- The global profile `profile/AGENTS.md` is installed as the user's base agent instruction.
|
||||
|
||||
---
|
||||
|
||||
## Governing Design Rules
|
||||
|
||||
1. **One authoritative owner per rule.** If a rule belongs in `AGENTS.md`, do not restate it in every skill.
|
||||
2. **The deletion test.** If deleting an instruction does not change agent behavior in a meaningful way, delete it.
|
||||
3. **Plain words over jargon.** Prefer "decision" over "epistemic commitment", "steps" over "state machine".
|
||||
4. **80 lines maximum for `SKILL.md`.** Deep templates and authoring specs live in `references/`.
|
||||
5. **Human ownership of critical decisions.** The AI investigates, drafts, and proposes; the human approves the architecture, commits, and destinations.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Released into the public domain under the [Unlicense](LICENSE).
|
||||
@@ -65,7 +65,7 @@ Select the target directory according to the repository's Directory Contracts:
|
||||
| **Engineering Best Practice** | `04-learning/knowledge/methods/` | `knowledge` | `<slug>.md` |
|
||||
| **Operational SOP / How-to Runbook** | `04-learning/guides/<project>/` | `guide` | `<slug>.md` |
|
||||
|
||||
Prepare the compliant YAML frontmatter block matching the destination contract (see [AGENTS.md](../../../AGENTS.md) for templates).
|
||||
Prepare the compliant YAML frontmatter block matching the destination contract (see Brain's `AGENTS.md` for templates).
|
||||
|
||||
### Step 4: Interactive Checkpoint
|
||||
Present a 4-point curation checkpoint to the user:
|
||||
|
||||
Executable
+172
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env bash
|
||||
# install.sh — Install and link/copy skills to agent configuration directories
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TARGET_DIR="${TARGET:-$HOME/.gemini/config/skills}"
|
||||
PROFILE_TARGET="${PROFILE_TARGET:-$HOME/.gemini/config/AGENTS.md}"
|
||||
MODE="link"
|
||||
CHECK_ONLY=0
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--mode)
|
||||
MODE="$2"
|
||||
shift 2
|
||||
;;
|
||||
--target)
|
||||
TARGET_DIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
check|--check)
|
||||
CHECK_ONLY=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
echo "Usage: ./install.sh [--mode link|copy] [--target DIR] [check]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Active skills to install
|
||||
ACTIVE_PORTABLE_SKILLS=(build-skill diagnose document git-commit practice)
|
||||
ACTIVE_BRAIN_SKILLS=(inbox-curation)
|
||||
# Note: commit-logger is NOT installed (planned consumer of journal-builder)
|
||||
|
||||
# Legacy / deprecated skills to clean up or back up if found in target
|
||||
OBSOLETE_SKILLS=(engineering-tutor engineering-investigation skill-builder documentation-router commit-logger)
|
||||
|
||||
echo "=== Target: $TARGET_DIR (mode: $MODE) ==="
|
||||
|
||||
if [[ "$CHECK_ONLY" -eq 1 ]]; then
|
||||
echo "Checking installation state..."
|
||||
missing=0
|
||||
for s in "${ACTIVE_PORTABLE_SKILLS[@]}"; do
|
||||
if [[ ! -e "$TARGET_DIR/$s" ]]; then
|
||||
echo " [MISSING] $s"
|
||||
missing=$((missing + 1))
|
||||
fi
|
||||
done
|
||||
for s in "${ACTIVE_BRAIN_SKILLS[@]}"; do
|
||||
if [[ ! -e "$TARGET_DIR/$s" ]]; then
|
||||
echo " [MISSING] $s (brain)"
|
||||
missing=$((missing + 1))
|
||||
fi
|
||||
done
|
||||
for obs in "${OBSOLETE_SKILLS[@]}"; do
|
||||
if [[ -e "$TARGET_DIR/$obs" || -L "$TARGET_DIR/$obs" ]]; then
|
||||
echo " [OBSOLETE PRESENT] $obs"
|
||||
fi
|
||||
done
|
||||
if [[ "$missing" -eq 0 ]]; then
|
||||
echo "All active skills are present."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Prepare backup directory timestamp if needed
|
||||
BACKUP_DIR="${TARGET_DIR}.backup-$(date +%Y%m%d%H%M%S)"
|
||||
backed_up=0
|
||||
|
||||
backup_if_exists() {
|
||||
local path="$1"
|
||||
if [[ -e "$path" || -L "$path" ]]; then
|
||||
if [[ "$backed_up" -eq 0 ]]; then
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
backed_up=1
|
||||
fi
|
||||
mv "$path" "$BACKUP_DIR/"
|
||||
echo " [BACKUP] $(basename "$path") -> $BACKUP_DIR/"
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
# Clean up obsolete skills
|
||||
for obs in "${OBSOLETE_SKILLS[@]}"; do
|
||||
if [[ -e "$TARGET_DIR/$obs" || -L "$TARGET_DIR/$obs" ]]; then
|
||||
backup_if_exists "$TARGET_DIR/$obs"
|
||||
fi
|
||||
done
|
||||
|
||||
# Install portable skills
|
||||
for s in "${ACTIVE_PORTABLE_SKILLS[@]}"; do
|
||||
src="$SCRIPT_DIR/skills/$s"
|
||||
dest="$TARGET_DIR/$s"
|
||||
|
||||
# Backup existing if it's not a symlink pointing to the right source
|
||||
if [[ -L "$dest" ]]; then
|
||||
target_link="$(readlink "$dest")"
|
||||
if [[ "$target_link" != "$src" ]]; then
|
||||
rm -f "$dest"
|
||||
fi
|
||||
elif [[ -d "$dest" ]]; then
|
||||
backup_if_exists "$dest"
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "link" ]]; then
|
||||
ln -sfn "$src" "$dest"
|
||||
echo " [LINKED] $s -> $dest"
|
||||
elif [[ "$MODE" == "copy" ]]; then
|
||||
mkdir -p "$dest"
|
||||
rsync -a --delete "$src/" "$dest/"
|
||||
echo "$SCRIPT_DIR@$(git -C "$SCRIPT_DIR" rev-parse HEAD 2>/dev/null || echo unknown)" > "$dest/.managed-by-skills-repo"
|
||||
echo " [COPIED] $s -> $dest"
|
||||
fi
|
||||
done
|
||||
|
||||
# Install brain skills
|
||||
for s in "${ACTIVE_BRAIN_SKILLS[@]}"; do
|
||||
src="$SCRIPT_DIR/brain/$s"
|
||||
dest="$TARGET_DIR/$s"
|
||||
|
||||
if [[ -L "$dest" ]]; then
|
||||
target_link="$(readlink "$dest")"
|
||||
if [[ "$target_link" != "$src" ]]; then
|
||||
rm -f "$dest"
|
||||
fi
|
||||
elif [[ -d "$dest" ]]; then
|
||||
backup_if_exists "$dest"
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "link" ]]; then
|
||||
ln -sfn "$src" "$dest"
|
||||
echo " [LINKED] $s (brain) -> $dest"
|
||||
elif [[ "$MODE" == "copy" ]]; then
|
||||
mkdir -p "$dest"
|
||||
rsync -a --delete "$src/" "$dest/"
|
||||
echo "$SCRIPT_DIR@$(git -C "$SCRIPT_DIR" rev-parse HEAD 2>/dev/null || echo unknown)" > "$dest/.managed-by-skills-repo"
|
||||
echo " [COPIED] $s (brain) -> $dest"
|
||||
fi
|
||||
done
|
||||
|
||||
# Install global AGENTS.md profile if parent directory exists
|
||||
if [[ -d "$(dirname "$PROFILE_TARGET")" ]]; then
|
||||
profile_src="$SCRIPT_DIR/profile/AGENTS.md"
|
||||
if [[ -L "$PROFILE_TARGET" ]]; then
|
||||
target_link="$(readlink "$PROFILE_TARGET")"
|
||||
if [[ "$target_link" != "$profile_src" ]]; then
|
||||
rm -f "$PROFILE_TARGET"
|
||||
fi
|
||||
elif [[ -f "$PROFILE_TARGET" ]]; then
|
||||
profile_backup="${PROFILE_TARGET}.backup-$(date +%Y%m%d%H%M%S)"
|
||||
cp "$PROFILE_TARGET" "$profile_backup"
|
||||
echo " [BACKUP] $PROFILE_TARGET -> $profile_backup"
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "link" ]]; then
|
||||
ln -sfn "$profile_src" "$PROFILE_TARGET"
|
||||
echo " [LINKED] AGENTS.md -> $PROFILE_TARGET"
|
||||
elif [[ "$MODE" == "copy" ]]; then
|
||||
cp "$profile_src" "$PROFILE_TARGET"
|
||||
echo " [COPIED] AGENTS.md -> $PROFILE_TARGET"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$backed_up" -eq 1 ]]; then
|
||||
echo "Backups stored in: $BACKUP_DIR"
|
||||
fi
|
||||
echo "Installation complete."
|
||||
Reference in new issue
Block a user