singularity-forge/justfile
Mikael Hugo 6f877b61ab feat: harness scaffold, runtime pattern sync, and ARCHITECTURE injection
- Add harness/ directory to SF repo (specs/, evals/, graders/ with AGENTS.md)
  and seed harness/specs/bootstrap.md (agent-legibility verification)
- Extend agentic-docs-scaffold.ts: new repos get harness/ + ADR-TEMPLATE.md
  and just adr / just spec / just harness-spec recipes via justfile
- Sync SF_RUNTIME_PATTERNS (gitignore.ts canonical) → git-service.ts and
  worktree-manager.ts: add audit/, exec/, model-benchmarks/, reports/,
  notifications.jsonl, routing-history.json, self-feedback.jsonl, repo-meta.json,
  and milestone continue-marker patterns
- Inject ARCHITECTURE.md into system prompt via loadArchitectureBlock() in
  system-context.ts (capped at 8 000 chars, after KNOWLEDGE block)
- Write real ARCHITECTURE.md for this repo (system map, .sf/ layout, key flows)
- Add ADR-TEMPLATE.md to docs/design-docs/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 22:46:28 +02:00

82 lines
2.1 KiB
Makefile

set shell := ["bash", "-c"]
# List available tasks
default:
@just --list
# Install workspace dependencies
install:
npm install
# Full build (core + web)
build:
npm run build
# Build core runtime only (faster)
build-core:
npm run build:core
# Build native Rust addon (release)
build-native:
npm run build:native-pkg
# Run all tests
test:
npm test
# Run unit tests only
test-unit:
npm run test:unit
# Run smoke tests
test-smoke:
npm run test:smoke
# Run TypeScript type checking
typecheck:
npm run typecheck:extensions
# Lint
lint:
npm run lint
# Lint and auto-fix
lint-fix:
npm run lint:fix
# Remove build outputs
clean:
rm -rf dist dist-test
# Run SF CLI from source (usage: just sf <args>)
sf *args:
./bin/sf-from-source {{args}}
# Create a new ADR from the template (usage: just adr "My Decision Title")
adr title:
#!/usr/bin/env bash
set -euo pipefail
next=$(ls docs/dev/ADR-*.md 2>/dev/null | sed 's/.*ADR-\([0-9]*\).*/\1/' | sort -n | tail -1)
num=$(printf "%03d" $(( ${next:-0} + 1 )))
slug=$(echo "{{title}}" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')
dest="docs/dev/ADR-${num}-${slug}.md"
sed "s/ADR-NNN/ADR-${num}/; s/Title/{{title}}/" docs/design-docs/ADR-TEMPLATE.md > "${dest}"
echo "Created: ${dest}"
# Create a new product spec (usage: just spec "my-feature-name")
spec name:
#!/usr/bin/env bash
set -euo pipefail
dest="docs/product-specs/{{name}}.md"
if [ -f "${dest}" ]; then echo "Already exists: ${dest}"; exit 1; fi
printf "# {{name}}\n\n## Job to be done\n\n## Workflow\n\n## Edge cases\n\n## Non-goals\n\n## Verification\n\n\`\`\`bash\n# command that proves this spec passes\n\`\`\`\n" > "${dest}"
echo "Created: ${dest}"
# Create a new harness spec (usage: just harness-spec "behavior-name")
harness-spec name:
#!/usr/bin/env bash
set -euo pipefail
dest="harness/specs/{{name}}.md"
if [ -f "${dest}" ]; then echo "Already exists: ${dest}"; exit 1; fi
printf "# Harness Spec: {{name}}\n\n## Behavior\n\n## Verification command\n\n\`\`\`bash\n\n\`\`\`\n\n## Pass criteria\n\n" > "${dest}"
echo "Created: ${dest}"