{
	"schemaVersion": 1,
	"templates": {
		"full-project": {
			"name": "Full Project",
			"description": "Complete SF workflow with roadmap, milestones, slices, and full ceremony",
			"file": "full-project.md",
			"phases": ["init", "discuss", "plan", "execute", "verify"],
			"triggers": [
				"new project",
				"greenfield",
				"from scratch",
				"build an app",
				"create a new"
			],
			"artifact_dir": ".sf/",
			"estimated_complexity": "high",
			"requires_project": true
		},
		"bugfix": {
			"name": "Bug Fix",
			"description": "Triage, reproduce, fix, test, and ship a bug fix",
			"file": "bugfix.md",
			"phases": ["triage", "fix", "verify", "ship"],
			"triggers": [
				"bug",
				"issue",
				"fix",
				"broken",
				"regression",
				"error",
				"crash",
				"failing",
				"github.com/*/issues/*"
			],
			"artifact_dir": ".sf/workflows/bugfixes/",
			"estimated_complexity": "low",
			"requires_project": false
		},
		"small-feature": {
			"name": "Small Feature",
			"description": "Lightweight feature development with optional discussion and research",
			"file": "small-feature.md",
			"phases": ["scope", "plan", "implement", "verify"],
			"triggers": [
				"add",
				"feature",
				"implement",
				"build",
				"create",
				"new command",
				"new endpoint"
			],
			"artifact_dir": ".sf/workflows/features/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"refactor": {
			"name": "Refactor / Migration",
			"description": "Systematic code transformation with inventory and wave-based execution",
			"file": "refactor.md",
			"phases": ["inventory", "plan", "migrate", "verify"],
			"triggers": [
				"refactor",
				"migrate",
				"rename",
				"restructure",
				"move",
				"reorganize",
				"clean up"
			],
			"artifact_dir": ".sf/workflows/refactors/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"spike": {
			"name": "Research Spike",
			"description": "Investigate a question, prototype, and document findings",
			"file": "spike.md",
			"phases": ["scope", "research", "synthesize"],
			"triggers": [
				"research",
				"investigate",
				"explore",
				"spike",
				"compare",
				"evaluate",
				"should we",
				"what if",
				"how does"
			],
			"artifact_dir": ".sf/workflows/spikes/",
			"estimated_complexity": "low",
			"requires_project": false
		},
		"hotfix": {
			"name": "Hotfix",
			"description": "Minimal ceremony: fix the thing, test it, ship it",
			"file": "hotfix.md",
			"phases": ["fix", "ship"],
			"triggers": [
				"hotfix",
				"urgent",
				"critical",
				"asap",
				"production down",
				"p0"
			],
			"artifact_dir": null,
			"estimated_complexity": "minimal",
			"requires_project": false
		},
		"security-audit": {
			"name": "Security Audit",
			"description": "Scan for vulnerabilities, triage findings, remediate, and verify",
			"file": "security-audit.md",
			"phases": ["scan", "triage", "remediate", "re-scan"],
			"triggers": [
				"security",
				"audit",
				"vulnerability",
				"owasp",
				"cve",
				"penetration",
				"hardening"
			],
			"artifact_dir": ".sf/workflows/audits/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"dep-upgrade": {
			"name": "Dependency Upgrade",
			"description": "Assess impact, upgrade dependencies, fix breaking changes",
			"file": "dep-upgrade.md",
			"phases": ["assess", "upgrade", "fix", "verify"],
			"triggers": [
				"upgrade",
				"update",
				"dependency",
				"deps",
				"bump",
				"outdated",
				"npm update",
				"renovate"
			],
			"artifact_dir": ".sf/workflows/upgrades/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"product-audit": {
			"name": "Product Audit",
			"description": "End-of-milestone soft gate comparing declared product intent against code/test/deploy/docs evidence; emits structured gaps and suggested follow-up slices",
			"file": "product-audit.md",
			"phases": ["audit"],
			"triggers": [
				"product audit",
				"completeness audit",
				"milestone audit",
				"product readiness",
				"product gap"
			],
			"artifact_dir": ".sf/active/",
			"estimated_complexity": "low",
			"requires_project": true
		},
		"product-plan": {
			"name": "Product Plan",
			"description": "Model the product, define the target capability, plan implementation slices, and confirm readiness before development starts",
			"file": "product-plan.md",
			"phases": ["model", "scope", "slice", "ready"],
			"triggers": [
				"product plan",
				"plan product",
				"plan the product",
				"product planning",
				"product development",
				"define product",
				"mvp",
				"roadmap",
				"what to build"
			],
			"artifact_dir": ".sf/workflows/product-plan/",
			"estimated_complexity": "medium",
			"requires_project": false,
			"interaction": {
				"guided_default": true,
				"question_gates": ["scope", "ready"]
			}
		},
		"product-tracking": {
			"name": "Product Tracking",
			"description": "Model the product, audit current analytics, design a tracking plan, generate an instrumentation guide, implement tracking, and verify the data contract",
			"file": "product-tracking.md",
			"phases": ["model", "audit", "plan", "instrument", "implement", "verify"],
			"triggers": [
				"product tracking",
				"product analytics",
				"tracking plan",
				"analytics instrumentation",
				"instrument analytics",
				"telemetry",
				"event tracking",
				"implement tracking",
				"data-ready"
			],
			"artifact_dir": ".sf/workflows/product-tracking/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"accessibility-audit": {
			"name": "Accessibility Audit",
			"description": "Scan UI for a11y issues and produce prioritized remediation report — oneshot, no code changes",
			"file": "accessibility-audit.md",
			"phases": ["audit"],
			"triggers": [
				"accessibility",
				"a11y",
				"wcag",
				"screen reader",
				"keyboard navigation"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"api-breaking-change": {
			"name": "API Breaking Change",
			"description": "Survey callers, migrate them, deprecate old surface, schedule removal release",
			"file": "api-breaking-change.md",
			"phases": ["survey", "migrate", "deprecate", "schedule"],
			"triggers": [
				"breaking change",
				"api break",
				"deprecate",
				"remove api",
				"redesign api"
			],
			"artifact_dir": ".sf/workflows/api-breaks/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"changelog-gen": {
			"name": "Changelog Generation",
			"description": "Generate CHANGELOG entry from git commits since last release tag, Keep-a-Changelog format",
			"file": "changelog-gen.md",
			"phases": ["generate"],
			"triggers": [
				"changelog",
				"release notes",
				"what changed",
				"since last release"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"ci-bootstrap": {
			"name": "CI Bootstrap",
			"description": "Set up minimal working CI pipeline — provider choice, lint/test/build/deploy stages added incrementally",
			"file": "ci-bootstrap.md",
			"phases": ["pick", "minimal", "stages", "verify"],
			"triggers": [
				"ci setup",
				"ci bootstrap",
				"github actions",
				"gitlab ci",
				"set up ci",
				"no ci"
			],
			"artifact_dir": ".sf/workflows/ci/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"dead-code": {
			"name": "Dead Code Detection",
			"description": "Find unused functions, files, exports — report with evidence, do NOT delete (human decides)",
			"file": "dead-code.md",
			"phases": ["scan"],
			"triggers": [
				"dead code",
				"unused",
				"unreachable",
				"orphan code",
				"remove unused"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"docs-sync": {
			"name": "Docs Sync",
			"description": "Inventory undocumented public exports, write per-symbol docs, summarize changes — yaml-step iteration",
			"file": "docs-sync.yaml",
			"phases": ["inventory", "document", "summarize"],
			"triggers": [
				"docs sync",
				"document exports",
				"missing docs",
				"tsdoc",
				"jsdoc",
				"doc backfill"
			],
			"artifact_dir": null,
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"env-audit": {
			"name": "Env Variable Audit",
			"description": "Inventory env vars across code/docs/CI and flag drift — referenced but undocumented or vice versa",
			"file": "env-audit.yaml",
			"phases": ["inventory", "audit"],
			"triggers": [
				"env audit",
				"env vars",
				"environment variables",
				".env audit",
				"missing env"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"issue-triage": {
			"name": "Issue Triage",
			"description": "Classify a GitHub issue, recommend labels/priority, propose next concrete action — oneshot",
			"file": "issue-triage.md",
			"phases": ["triage"],
			"triggers": [
				"triage issue",
				"classify issue",
				"what to do with this issue",
				"issue labels"
			],
			"artifact_dir": null,
			"estimated_complexity": "minimal",
			"requires_project": false
		},
		"observability-setup": {
			"name": "Observability Setup",
			"description": "Add structured logging, metrics, tracing — pick stack-appropriate tools, instrument highest-value paths first, verify operator usability",
			"file": "observability-setup.md",
			"phases": ["pick", "instrument", "verify"],
			"triggers": [
				"observability",
				"logging",
				"metrics",
				"tracing",
				"telemetry setup",
				"monitoring"
			],
			"artifact_dir": ".sf/workflows/observability/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"onboarding-check": {
			"name": "Onboarding Check",
			"description": "Walk the README as a brand-new contributor — report every step that fails, is unclear, or missing — oneshot gap report",
			"file": "onboarding-check.md",
			"phases": ["walk"],
			"triggers": [
				"onboarding",
				"readme check",
				"new contributor",
				"setup gaps",
				"first-time setup"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"performance-audit": {
			"name": "Performance Audit",
			"description": "Find and fix real performance problems — measure, fix with evidence, measure again",
			"file": "performance-audit.md",
			"phases": ["measure", "fix", "verify"],
			"triggers": [
				"performance",
				"perf audit",
				"slow",
				"optimize",
				"bottleneck",
				"profiling"
			],
			"artifact_dir": ".sf/workflows/perf/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"pr-review": {
			"name": "PR Review",
			"description": "Read a pull request and produce a structured review — correctness, design, tests, docs — oneshot",
			"file": "pr-review.md",
			"phases": ["review"],
			"triggers": [
				"review pr",
				"pr review",
				"code review",
				"review pull request"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"pr-triage": {
			"name": "PR Triage",
			"description": "Walk open PRs, bucket each (merge/close/nudge), produce triage report — oneshot, no actions",
			"file": "pr-triage.md",
			"phases": ["triage"],
			"triggers": ["pr triage", "open prs", "stale prs", "review queue"],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"release": {
			"name": "Release",
			"description": "Cut a release in four phases with approval gates — version bump, changelog, tag, publish/announce",
			"file": "release.md",
			"phases": ["prepare", "bump", "publish", "announce"],
			"triggers": [
				"release",
				"cut release",
				"ship release",
				"publish release",
				"version bump"
			],
			"artifact_dir": ".sf/workflows/releases/",
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"rename-symbol": {
			"name": "Rename Symbol",
			"description": "Find every reference to a symbol across code/tests/docs and rename it consistently — yaml-step iteration",
			"file": "rename-symbol.yaml",
			"phases": ["inventory", "rename", "verify"],
			"triggers": [
				"rename symbol",
				"rename function",
				"rename variable",
				"global rename"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": false
		},
		"test-backfill": {
			"name": "Test Backfill",
			"description": "Iterate over untested functions, write a focused test for each, verify suite stays green — yaml-step",
			"file": "test-backfill.yaml",
			"phases": ["inventory", "write", "verify"],
			"triggers": [
				"test backfill",
				"missing tests",
				"coverage debt",
				"untested functions",
				"add tests"
			],
			"artifact_dir": null,
			"estimated_complexity": "medium",
			"requires_project": false
		},
		"sf-audit-traces": {
			"name": "SF Audit Traces",
			"description": "Read SF's observability sources (self-feedback, journal, activity, judgments) and file at most 3 recurring-pattern findings via sf_self_report — designed for /schedule daily cadence",
			"file": "sf-audit-traces.md",
			"phases": ["audit"],
			"triggers": [
				"sf audit traces",
				"audit sf",
				"self improve",
				"scan sf logs",
				"improve sf"
			],
			"artifact_dir": null,
			"estimated_complexity": "low",
			"requires_project": true
		}
	}
}
