singularity-forge/justfile
Mikael Hugo d33e30e885 feat(notifications): NOTICE_KIND enum, schema v2 dedup, sf-db cleanup
- notification-store: schema v2 — repeatCount/lastTs merge for non-blocking
  notices; NOTICE_KIND enum (SYSTEM_NOTICE, TOOL_NOTICE, BLOCKING_NOTICE,
  USER_VISIBLE) for renderer classification without message parsing
- sf-db: remove gate_runs and audit_events tables (replaced by uok audit.js
  and trace-writer); schema reduced by ~370 lines
- notify-interceptor: tag auto-mode system notices with NOTICE_KIND.SYSTEM_NOTICE
- auto-prompts, guided-flow, system-context: use NOTICE_KIND on emit calls
- cli-status: expanded headless status surface + test coverage
- headless-types: new status fields
- Makefile/justfile: dev workflow improvements
- record-promoter, requirement-promoter: minor cleanup
- sf-db-migration tests: updated for dropped tables
- uok-gate-runner, uok-metrics, uok-outcome, uok-status tests: updated

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 20:13:58 +02:00

91 lines
2.5 KiB
Makefile

set shell := ["bash", "-c"]
# List available tasks
default:
@just --list
# Install workspace dependencies
install:
npm install
# Full build (core + web); includes npm run copy-resources via build:core
build:
npm run build
# Build core runtime only (faster); includes npm run copy-resources
build-core:
npm run build:core
# Rebuild bundled extension resources into dist/ (~/.sf sync on next launch)
copy-resources:
npm run copy-resources
# Compile rust-engine native binaries (release)
build-native:
npm run build:native
# Build @singularity-forge/native workspace package (TS/N-API shims — used by build:pi)
build-native-pkg:
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 SF-local harness spec (usage: just harness-spec "behavior-name")
harness-spec name:
#!/usr/bin/env bash
set -euo pipefail
dest=".sf/harness/specs/{{name}}.md"
if [ -f "${dest}" ]; then echo "Already exists: ${dest}"; exit 1; fi
mkdir -p "$(dirname "${dest}")"
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}"