Add Feynman skill and memory to workflow template
- feynman/skills/workflow-bootstrap/SKILL.md - Bootstrap skill - feynman/memory-template.md - Memory template - feynman/README.md - Feynman configs documentation - scripts/setup.sh - Updated to auto-install Feynman configs if detected - docs/workflow/INDEX.md - Updated with Feynman integration info - README.md - Updated with Feynman integration section When running 'pnpm run setup': 1. Checks for Feynman installation 2. Installs workflow-bootstrap skill to ~/.feynman/agent/skills/ 3. Creates .feynman/memory.md from template 4. Gives two-layer nudge: skill (manual) + memory (automatic)
This commit is contained in:
76
feynman/README.md
Normal file
76
feynman/README.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Feynman Configuration
|
||||
|
||||
This directory contains Feynman-specific configurations that can be installed alongside the workflow.
|
||||
|
||||
## What's Included
|
||||
|
||||
```
|
||||
feynman/
|
||||
├── README.md ← This file
|
||||
├── skills/
|
||||
│ └── workflow-bootstrap/
|
||||
│ └── SKILL.md ← Skill to bootstrap new projects
|
||||
└── memory-template.md ← Memory template to load into Feynman
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
These are installed automatically by `pnpm run setup` if Feynman is detected.
|
||||
|
||||
### Manual Installation
|
||||
|
||||
**Skill:**
|
||||
```bash
|
||||
mkdir -p ~/.feynman/agent/skills
|
||||
cp -r feynman/skills/* ~/.feynman/agent/skills/
|
||||
```
|
||||
|
||||
**Memory:**
|
||||
```bash
|
||||
# Copy as memory.md in your project's .feynman directory
|
||||
cp feynman/memory-template.md /path/to/your/project/.feynman/memory.md
|
||||
|
||||
# Or load into Feynman's persistent memory directly
|
||||
```
|
||||
|
||||
## What the Skill Does
|
||||
|
||||
The `workflow-bootstrap` skill allows Feynman to set up the issue-based workflow for any new project:
|
||||
|
||||
1. Clone the workflow template from `https://git.fbrns.co/shoko/workflow`
|
||||
2. Copy docs, issues structure, and hooks to the current project
|
||||
3. Run the setup script
|
||||
4. Summarize what was set up
|
||||
|
||||
**Trigger phrases:**
|
||||
- "feynman, start a new project"
|
||||
- "set up the workflow"
|
||||
- "apply the workflow template"
|
||||
- "initialize the issue-based workflow"
|
||||
|
||||
## What the Memory Does
|
||||
|
||||
The memory template contains:
|
||||
- `pref.new_project_workflow`: Location and structure of the workflow template
|
||||
- `lesson.workflow.new_project_nudge`: A nudge rule to remind you to use the workflow
|
||||
|
||||
This gives you a two-layer enforcement:
|
||||
1. **Skill** (manual trigger): You say "new project" and Feynman sets it up
|
||||
2. **Memory** (automatic nudge): If you forget, Feynman reminds you
|
||||
|
||||
## For Fresh Feynman Installations
|
||||
|
||||
If you're running Feynman on a new host:
|
||||
|
||||
```bash
|
||||
# 1. Clone the workflow template (it includes feynman configs)
|
||||
git clone https://git.fbrns.co/shoko/workflow.git my-project
|
||||
cd my-project
|
||||
|
||||
# 2. Run setup (installs pnpm, hooks, and feynman configs)
|
||||
pnpm run setup
|
||||
|
||||
# 3. Load the memory into Feynman
|
||||
# In Feynman: /memory.md to load the memory template
|
||||
# Or: copy feynman/memory-template.md to your project's .feynman/memory.md
|
||||
```
|
||||
17
feynman/memory-template.md
Normal file
17
feynman/memory-template.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Feynman Memory Template
|
||||
|
||||
Copy this file to your project's `.feynman/memory.md` or load it into Feynman's persistent memory.
|
||||
|
||||
## pref.new_project_workflow
|
||||
Workflow template lives at: https://git.fbrns.co/shoko/workflow
|
||||
Structure: /docs/workflow/ (INDEX, ISSUE-FORMAT, WORKFLOW, AGENT-PROMPTS), /.issues/ (INDEX + examples), /.hooks/ (issue-linter.js)
|
||||
Two-layer enforcement: Skill (manual trigger) + Memory (nudge if forgotten)
|
||||
Prefers file-based issues over external trackers like Gitea issues
|
||||
Pre-commit hook enforces issue format before commit
|
||||
Agent must think out loud: Plan, Status Log, Self-Verification in issue file
|
||||
Human approves reasoning, not tasks. Human does not manually test unless edge case.
|
||||
|
||||
## lesson.workflow.new_project_nudge
|
||||
When human mentions a new project, ALWAYS check memory for pref.new_project_workflow.
|
||||
If template exists but not used, nudge: "Do you want to use the workflow template from shoko/workflow? I can set it up automatically."
|
||||
Category: workflow
|
||||
136
feynman/skills/SKILL.md
Normal file
136
feynman/skills/SKILL.md
Normal file
@@ -0,0 +1,136 @@
|
||||
# Workflow Bootstrap Skill
|
||||
|
||||
## Description
|
||||
Set up the issue-based workflow for a new project by cloning the template from `https://git.fbrns.co/shoko/workflow`.
|
||||
|
||||
**This skill is automatically installed** when you run `pnpm run setup` in a project cloned from the workflow template.
|
||||
|
||||
Use this skill when:
|
||||
- Human asks to start a new project
|
||||
- Human asks to "set up the workflow"
|
||||
- Human asks to "apply the workflow template"
|
||||
- Human asks to "initialize the issue-based workflow"
|
||||
- Human is starting work in a new directory without the workflow structure
|
||||
|
||||
## Workflow Template Location
|
||||
- URL: `https://git.fbrns.co/shoko/workflow`
|
||||
- Clone: `https://git.fbrns.co/shoko/workflow.git`
|
||||
- Template repo contains:
|
||||
- `/docs/workflow/` — INDEX.md, ISSUE-FORMAT.md, WORKFLOW.md, AGENT-PROMPTS.md
|
||||
- `/.issues/` — INDEX.md, example issues
|
||||
- `/.hooks/` — issue-linter.js (pre-commit validator)
|
||||
- `/feynman/` — This skill + memory template
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Check if workflow already exists
|
||||
```bash
|
||||
# Check if /docs/workflow/INDEX.md exists
|
||||
ls -la /docs/workflow/INDEX.md 2>/dev/null && echo "exists" || echo "not found"
|
||||
```
|
||||
|
||||
If workflow already exists, tell the human and ask if they want to re-initialize or just proceed.
|
||||
|
||||
### 2. Fetch template from Gitea
|
||||
```bash
|
||||
# Clone the template repo
|
||||
git clone https://git.fbrns.co/shoko/workflow.git /tmp/workflow-template
|
||||
|
||||
# Or download as archive
|
||||
curl -L https://git.fbrns.co/shoko/workflow/archive/main.tar.gz | tar -xz -C /tmp/
|
||||
```
|
||||
|
||||
### 3. Copy template structure to current directory
|
||||
```bash
|
||||
# Copy workflow docs
|
||||
cp -r /tmp/workflow-template/docs/workflow/ ./docs/
|
||||
|
||||
# Copy issue structure (but not example files unless needed)
|
||||
mkdir -p ./.issues
|
||||
cp /tmp/workflow-template/.issues/INDEX.md ./.issues/
|
||||
|
||||
# Copy hooks
|
||||
mkdir -p ./.hooks
|
||||
cp /tmp/workflow-template/.hooks/issue-linter.js ./.hooks/
|
||||
|
||||
# Copy package.json scripts if they exist and merge with existing
|
||||
if [ -f /tmp/workflow-template/package.json ]; then
|
||||
# Merge workflow-scripts into existing package.json
|
||||
echo "Template has package.json - review scripts manually"
|
||||
fi
|
||||
```
|
||||
|
||||
### 4. Initialize git hooks (pre-commit)
|
||||
```bash
|
||||
# Make hook executable
|
||||
chmod +x ./.hooks/issue-linter.js
|
||||
|
||||
# Set up pre-commit hook
|
||||
mkdir -p .git/hooks
|
||||
cat > .git/hooks/pre-commit << 'EOF'
|
||||
#!/bin/bash
|
||||
node ./.hooks/issue-linter.js
|
||||
EOF
|
||||
chmod +x .git/hooks/pre-commit
|
||||
|
||||
# Or: install via husky if project uses it
|
||||
# npx husky add .husky/pre-commit "node ./.hooks/issue-linter.js"
|
||||
```
|
||||
|
||||
### 5. Verify setup
|
||||
```bash
|
||||
# Check structure
|
||||
ls -la docs/workflow/
|
||||
ls -la .issues/
|
||||
ls -la .hooks/
|
||||
ls -la .git/hooks/pre-commit
|
||||
|
||||
# Test hook manually
|
||||
echo "Testing pre-commit hook..."
|
||||
# Create a dummy change and try to commit
|
||||
```
|
||||
|
||||
### 6. Create first issue index if needed
|
||||
If `/.issues/INDEX.md` exists, review it and update if needed. If not, create it.
|
||||
|
||||
### 7. Summary for human
|
||||
Tell the human:
|
||||
- What was copied
|
||||
- Where to find the docs
|
||||
- How to start using it
|
||||
- That the pre-commit hook is now active
|
||||
|
||||
Example output:
|
||||
```
|
||||
Workflow template installed. Structure:
|
||||
|
||||
docs/workflow/ ← READ THIS FIRST (INDEX.md)
|
||||
.issues/ ← Your issues live here
|
||||
.hooks/ ← Pre-commit validator active
|
||||
|
||||
Pre-commit hook is installed. Any code change without a valid issue file will be rejected.
|
||||
|
||||
To start working:
|
||||
1. Read docs/workflow/INDEX.md
|
||||
2. Create your first issue in .issues/
|
||||
3. Follow the workflow stages defined there
|
||||
|
||||
Let me know when you're ready to create your first issue.
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Error | What to do |
|
||||
|---|---|
|
||||
| Gitea repo not accessible | Tell human, offer to create structure manually from documentation |
|
||||
| `.git/hooks/` already has pre-commit | Ask human whether to overwrite or merge |
|
||||
| Not in a git repo | Tell human "This requires a git repository. Run `git init` first." |
|
||||
| `node` not available for hook | Fall back to bash-based validator or skip hook with warning |
|
||||
|
||||
## Human Prompts That Trigger This Skill
|
||||
|
||||
- "feynman, start a new project"
|
||||
- "set up the workflow"
|
||||
- "apply the template"
|
||||
- "initialize the issue-based workflow"
|
||||
- "let's work on something new"
|
||||
Reference in New Issue
Block a user