Create the Kimi (Moonshot AI) agent workspace per AGENTS.md conventions: Workspace Structure: - .kimi/AGENTS.md - Workspace guide and conventions - .kimi/README.md - Quick reference documentation - .kimi/CHECKPOINT.md - Session state tracking - .kimi/TODO.md - Task list for upcoming work - .kimi/notes/ - Working notes directory - .kimi/plans/ - Plan documents - .kimi/worktrees/ - Git worktrees (reserved) Development Scripts: - scripts/bootstrap.sh - One-time workspace setup (venv, deps, .env) - scripts/resume.sh - Quick status check + resume prompt - scripts/dev.sh - Development helpers (status, test, lint, format, clean, nuke) Features: - Validates Python 3.11+, venv, deps, .env, git config - Provides quick status on git, tests, Ollama, dashboard - Commands for testing, linting, formatting, cleaning Per AGENTS.md: - Kimi is Build Tier for large-context feature drops - Follows existing project patterns - No changes to source code - workspace only
74 lines
2.1 KiB
Bash
Executable File
74 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Kimi Workspace Resume Script
|
|
# Quick status check and resume prompt
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
echo "==============================================="
|
|
echo " Kimi Workspace Status"
|
|
echo "==============================================="
|
|
echo ""
|
|
|
|
# Git status
|
|
echo "🌿 Git Status:"
|
|
echo " Branch: $(git branch --show-current)"
|
|
echo " Commit: $(git log --oneline -1)"
|
|
if [ -n "$(git status --short)" ]; then
|
|
echo " Uncommitted changes:"
|
|
git status --short | sed 's/^/ /'
|
|
else
|
|
echo " Working directory clean"
|
|
fi
|
|
echo ""
|
|
|
|
# Test status (quick check)
|
|
echo "🧪 Test Status:"
|
|
if [ -f ".tox/unit/log/1-commands[0].log" ]; then
|
|
LAST_TEST=$(grep -o '[0-9]* passed' .tox/unit/log/1-commands[0].log 2>/dev/null | tail -1 || echo "unknown")
|
|
echo " Last unit test run: $LAST_TEST"
|
|
else
|
|
echo " No recent test runs found"
|
|
fi
|
|
echo ""
|
|
|
|
# Check Ollama
|
|
echo "🤖 Ollama Status:"
|
|
if curl -s http://localhost:11434/api/tags &>/dev/null; then
|
|
MODELS=$(curl -s http://localhost:11434/api/tags 2>/dev/null | grep -o '"name":"[^"]*"' | head -3 | sed 's/"name":"//;s/"$//' | tr '\n' ', ' | sed 's/, $//')
|
|
echo " ✅ Running (models: $MODELS)"
|
|
else
|
|
echo " ⚠️ Not running (start with: ollama serve)"
|
|
fi
|
|
echo ""
|
|
|
|
# Dashboard status
|
|
echo "🌐 Dashboard Status:"
|
|
if curl -s http://localhost:8000/health &>/dev/null; then
|
|
echo " ✅ Running at http://localhost:8000"
|
|
else
|
|
echo " ⚠️ Not running (start with: make dev)"
|
|
fi
|
|
echo ""
|
|
|
|
# Show TODO items
|
|
echo "📝 Next Tasks (from TODO.md):"
|
|
if [ -f ".kimi/TODO.md" ]; then
|
|
grep -E "^\s*- \[ \]" .kimi/TODO.md 2>/dev/null | head -5 | sed 's/^/ /' || echo " No pending tasks"
|
|
else
|
|
echo " No TODO.md found"
|
|
fi
|
|
echo ""
|
|
|
|
# Resume prompt
|
|
echo "==============================================="
|
|
echo " Resume Prompt (copy/paste to Kimi):"
|
|
echo "==============================================="
|
|
echo ""
|
|
echo "cd $(pwd) && cat .kimi/CHECKPOINT.md"
|
|
echo ""
|
|
echo "Continue from checkpoint. Check .kimi/TODO.md for next tasks."
|
|
echo "Run 'make test' after changes and update CHECKPOINT.md."
|
|
echo ""
|