Compare commits
2 commits
0e2fd05bf4
...
2b8a599e35
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b8a599e35 | ||
|
|
c1818f997c |
5 changed files with 138 additions and 0 deletions
15
PULL_REQUEST_TEMPLATE.md
Normal file
15
PULL_REQUEST_TEMPLATE.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Pull Request Template
|
||||||
|
|
||||||
|
## Description
|
||||||
|
Provide a concise summary of the changes, referenced work, or new research.
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
- [ ] I followed the **COLLABORATION.md** workflow guidelines.
|
||||||
|
- [ ] All markdown files include a valid **front‑matter** block.
|
||||||
|
- [ ] The **ci‑pre-push.sh** script passed locally.
|
||||||
|
- [ ] I added an entry to `knowledge-base/index.md` if new knowledge was created.
|
||||||
|
- [ ] I updated or reviewed any relevant `AGENTS.md` files.
|
||||||
|
- [ ] No breaking changes were introduced.
|
||||||
|
|
||||||
|
---
|
||||||
|
*All automated processes will run on this PR before merging.*
|
||||||
16
knowledge-base/index.md
Normal file
16
knowledge-base/index.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Knowledge Base Index
|
||||||
|
|
||||||
|
Curated index of all distilled knowledge entries. Each entry links to its source research or daily log.
|
||||||
|
|
||||||
|
## Core Identity & Collaboration
|
||||||
|
- COLLABORATION.md: Complete agent collaboration playbook with forking, branching, PR process, CI checks, and communication channels
|
||||||
|
- knowledge-base/morpheus-identity.md: Morpheus agent identity, stack overview, active workstreams, and evolution suggestions
|
||||||
|
|
||||||
|
## Tech Studies
|
||||||
|
- 2026-06-11-forgejo-url-change-and-repo-access.md: Forgejo URL migration analysis and repo access details
|
||||||
|
|
||||||
|
## Daily Logs
|
||||||
|
*No entries yet – use `./scripts/new-study.sh "topic" "YYYY-MM-DD"` to add.*
|
||||||
|
|
||||||
|
## Backups
|
||||||
|
- backups/hermes-memory-sanitized-2026-06-10.md: Sanitized memory snapshot
|
||||||
69
scripts/ci-pre-push.sh
Normal file
69
scripts/ci-pre-push.sh
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# ci-pre-push.sh - Validate markdown files before push
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${YELLOW}Running pre-push checks...${NC}"
|
||||||
|
|
||||||
|
# Check if any markdown files changed
|
||||||
|
if [[ $(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(md|markdown)$' | wc -l) -eq 0 ]]; then
|
||||||
|
echo "No markdown files staged for commit."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ERRORS=0
|
||||||
|
|
||||||
|
# Validate each staged markdown file
|
||||||
|
while IFS= read -r file; do
|
||||||
|
echo "Checking $file..."
|
||||||
|
if [[ -f "$file" ]]; then
|
||||||
|
# Check front-matter existence (--- at start)
|
||||||
|
if ! head -n 1 "$file" | grep -q '^---$'; then
|
||||||
|
echo -e "${RED}ERROR: $file is missing front-matter (should start with ---)${NC}"
|
||||||
|
((ERRORS++))
|
||||||
|
else
|
||||||
|
# Extract front-matter block (lines between first and second ---)
|
||||||
|
front_matter=$(sed -n '2,/^---$/p' "$file" | head -n -1)
|
||||||
|
# Check for required fields
|
||||||
|
if ! echo "$front_matter" | grep -q '^title:'; then
|
||||||
|
echo -e "${RED}ERROR: $file missing title in front-matter${NC}"
|
||||||
|
((ERRORS++))
|
||||||
|
fi
|
||||||
|
if ! echo "$front_matter" | grep -q '^date:'; then
|
||||||
|
echo -e "${RED}ERROR: $file missing date in front-matter${NC}"
|
||||||
|
((ERRORS++))
|
||||||
|
fi
|
||||||
|
# Optional: check date format
|
||||||
|
date_line=$(echo "$front_matter" | grep '^date:' | sed 's/date: //')
|
||||||
|
if [[ -n "$date_line" && ! "$date_line" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
|
||||||
|
echo -e "${YELLOW}WARNING: $file date format not YYYY-MM-DD: $date_line${NC}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Spell check if aspell is available
|
||||||
|
if command -v aspell >/dev/null 2>&1; then
|
||||||
|
# Strip front-matter and code blocks, then spell check
|
||||||
|
content=$(sed '/^---$/,/^---$/d' "$file" | sed '/```.*/,/```/d')
|
||||||
|
if echo "$content" | aspell list | grep -v '^$' | head -n 5 | grep -q .; then
|
||||||
|
echo -e "${YELLOW}WARNING: $file has potential spelling errors (see above)${NC}"
|
||||||
|
# Don't fail on spelling
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for TODO/FIXME comments (optional warning)
|
||||||
|
if grep -n -i 'TODO\|FIXME' "$file" | head -n 5 | grep -q .; then
|
||||||
|
echo -e "${YELLOW}INFO: $file contains TODO/FIXME comments${NC}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < <(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(md|markdown)$')
|
||||||
|
|
||||||
|
if [[ $ERRORS -gt 0 ]]; then
|
||||||
|
echo -e "${RED}Pre-push checks failed. Fix errors above before committing.${NC}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}All pre-push checks passed.${NC}"
|
||||||
|
fi
|
||||||
1
scripts/env.sh
Executable file
1
scripts/env.sh
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
#!/bin/bash\nexport PATH=\$PATH:\$HOME/morpheus-brain/scripts
|
||||||
37
scripts/new-study.sh
Normal file
37
scripts/new-study.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# new-study.sh - Scaffold a new research markdown file
|
||||||
|
# Usage: ./scripts/new-study.sh <topic-name> [YYYY-MM-DD]
|
||||||
|
set -e
|
||||||
|
TOPIC="${1:?topic name required}"
|
||||||
|
DATE="${2:-$(date +%Y-%m-%d)}"
|
||||||
|
FILE="research/tech-study/${DATE}-${TOPIC}.md"
|
||||||
|
mkdir -p "$(dirname "$FILE")"
|
||||||
|
|
||||||
|
cat > "$FILE" <<EOF
|
||||||
|
---
|
||||||
|
title: "${TOPIC}"
|
||||||
|
date: ${DATE}
|
||||||
|
tags: ["#${TOPIC}", "#tech-study"]
|
||||||
|
status: draft
|
||||||
|
related: []
|
||||||
|
---
|
||||||
|
|
||||||
|
# ${TOPIC//-/ }
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Briefly describe the study's goal.
|
||||||
|
|
||||||
|
## Insights
|
||||||
|
-
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
-
|
||||||
|
|
||||||
|
## Action Items
|
||||||
|
- [ ]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Created $FILE"
|
||||||
|
# Append to knowledge-base/index.md
|
||||||
|
echo "- ${DATE}-${TOPIC}.md: ${TOPIC//-/ }" >> knowledge-base/index.md
|
||||||
|
echo "Appended entry to knowledge-base/index.md"
|
||||||
Loading…
Reference in a new issue