feat: add 4 template bundles (writing, backend, security, quick-fix)
Ready-to-use project templates with team, workflow, domain, and config: - writing-short-story: fiction 5-15k words, custom archetypes, sonnet for prose - backend-feature: standard PDCA, full team, haiku for reviews - security-review: thorough 3-cycle, all reviewers incl. trickster - quick-fix: minimal 1-cycle, creator+maker+guardian only
This commit is contained in:
20
templates/bundles/backend-feature/config.yaml
Normal file
20
templates/bundles/backend-feature/config.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# Config: backend-feature defaults
|
||||
# Cost-optimized for typical backend work. Haiku handles most tasks well
|
||||
# for code — only upgrade to sonnet if review quality needs it.
|
||||
|
||||
budget:
|
||||
max_usd: 5 # Backend features are typically bounded
|
||||
warn_at_pct: 80
|
||||
|
||||
models:
|
||||
default: haiku # Haiku is sufficient for code tasks
|
||||
explorer: haiku # Codebase mapping is analytical
|
||||
creator: haiku # Design proposals are structural
|
||||
maker: haiku # Code generation — haiku handles well
|
||||
guardian: haiku # Security review — pattern matching
|
||||
sage: haiku # Quality review — checklist-driven
|
||||
|
||||
variables:
|
||||
max_cycles: 2
|
||||
test_command: ""
|
||||
lint_command: ""
|
||||
66
templates/bundles/backend-feature/domain.yaml
Normal file
66
templates/bundles/backend-feature/domain.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
# Domain: Code
|
||||
# Standard code domain — software development with ArcheFlow defaults.
|
||||
# No concept remapping needed (code is the default domain).
|
||||
|
||||
name: code
|
||||
description: "Software development — applications, libraries, infrastructure"
|
||||
|
||||
concepts:
|
||||
implementation: "code changes"
|
||||
tests: "automated tests"
|
||||
files_changed: "files changed"
|
||||
test_coverage: "test coverage %"
|
||||
code_review: "code review"
|
||||
build: "build/compile"
|
||||
deploy: "deploy"
|
||||
refactor: "refactor"
|
||||
bug: "bug"
|
||||
feature: "feature"
|
||||
PR: "pull request"
|
||||
|
||||
metrics:
|
||||
- files_changed
|
||||
- lines_added
|
||||
- lines_removed
|
||||
- tests_added
|
||||
- tests_passing
|
||||
- coverage_delta
|
||||
|
||||
review_focus:
|
||||
guardian:
|
||||
- security_vulnerabilities
|
||||
- breaking_changes
|
||||
- dependency_risks
|
||||
- error_handling
|
||||
sage:
|
||||
- code_quality
|
||||
- test_coverage
|
||||
- documentation
|
||||
- pattern_consistency
|
||||
skeptic:
|
||||
- design_assumptions
|
||||
- scalability
|
||||
- alternative_approaches
|
||||
- edge_cases
|
||||
trickster:
|
||||
- malformed_input
|
||||
- concurrency_races
|
||||
- error_path_exploitation
|
||||
- dependency_failures
|
||||
|
||||
context:
|
||||
always:
|
||||
- "README.md"
|
||||
- ".archeflow/config.yaml"
|
||||
plan_phase:
|
||||
- "relevant source files (Explorer identifies)"
|
||||
- "existing tests for affected area"
|
||||
do_phase:
|
||||
- "Creator's proposal"
|
||||
- "test fixtures and helpers"
|
||||
check_phase:
|
||||
- "git diff from Maker"
|
||||
- "proposal risk section"
|
||||
|
||||
# Code domain uses default archetype model assignments
|
||||
model_overrides: {}
|
||||
19
templates/bundles/backend-feature/manifest.yaml
Normal file
19
templates/bundles/backend-feature/manifest.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Bundle: backend-feature
|
||||
# Standard setup for backend feature implementation: API endpoint, DB migration, tests.
|
||||
# Uses the standard PDCA pipeline with 2 review cycles.
|
||||
|
||||
name: backend-feature
|
||||
description: "Backend feature implementation — API, DB migration, tests (standard PDCA)"
|
||||
version: "1.0.0"
|
||||
domain: code
|
||||
includes:
|
||||
team: team.yaml
|
||||
workflow: workflow.yaml
|
||||
domain: domain.yaml
|
||||
config: config.yaml
|
||||
archetypes: []
|
||||
requires: []
|
||||
variables:
|
||||
max_cycles: 2 # PDCA review cycles
|
||||
test_command: "" # Override: pytest, cargo test, npm test, etc.
|
||||
lint_command: "" # Override: ruff, clippy, eslint, etc.
|
||||
28
templates/bundles/backend-feature/team.yaml
Normal file
28
templates/bundles/backend-feature/team.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# Team: Backend Feature
|
||||
# Full team for backend feature development.
|
||||
# Explorer scopes the change, Creator designs the approach, Maker implements,
|
||||
# Guardian + Sage review for security and quality.
|
||||
|
||||
name: backend-feature
|
||||
description: "Backend feature development: scope, design, implement, review"
|
||||
domain: code
|
||||
|
||||
# Plan: explorer maps affected code, creator designs the approach with
|
||||
# API contract, DB schema changes, and test strategy.
|
||||
plan: [explorer, creator]
|
||||
|
||||
# Do: maker implements the feature — code, migration, tests.
|
||||
do: [maker]
|
||||
|
||||
# Check: guardian reviews for security, breaking changes, error handling.
|
||||
# sage reviews for code quality, test coverage, documentation.
|
||||
check: [guardian, sage]
|
||||
|
||||
exit: all_approved
|
||||
max_cycles: ${max_cycles}
|
||||
|
||||
# Notes:
|
||||
# - All archetypes are standard (no custom archetypes needed for code)
|
||||
# - Guardian focuses on security and breaking changes (code domain review_focus)
|
||||
# - Sage focuses on quality and test coverage (code domain review_focus)
|
||||
# - Explorer is critical for scoping — finds affected files, existing tests, dependencies
|
||||
63
templates/bundles/backend-feature/workflow.yaml
Normal file
63
templates/bundles/backend-feature/workflow.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
# Workflow: Backend Feature
|
||||
# Standard PDCA for backend feature implementation.
|
||||
# 2 cycles: first pass implements, second pass addresses review findings.
|
||||
|
||||
name: backend-feature
|
||||
description: "Backend feature — scope, design, implement, review (2 cycles)"
|
||||
team: backend-feature
|
||||
|
||||
phases:
|
||||
plan:
|
||||
archetypes: [explorer, creator]
|
||||
parallel: false
|
||||
description: |
|
||||
1. explorer: Map affected codebase areas. Identify existing patterns, relevant
|
||||
tests, DB schema, API routes, and dependencies. Flag risks.
|
||||
2. creator: Design the implementation approach. Define:
|
||||
- API contract (endpoints, request/response shapes)
|
||||
- DB migration (if needed)
|
||||
- Test strategy (unit, integration, edge cases)
|
||||
- Confidence table for each axis (understanding, completeness, risk)
|
||||
inputs:
|
||||
- "Feature description / ticket"
|
||||
- "Relevant source files (Explorer identifies)"
|
||||
- "Existing tests for affected area"
|
||||
|
||||
do:
|
||||
archetypes: [maker]
|
||||
parallel: false
|
||||
description: |
|
||||
Implement the feature following Creator's design.
|
||||
Order: DB migration -> models -> business logic -> API endpoint -> tests.
|
||||
Commit after each logical unit. Run tests before moving to next unit.
|
||||
Run lint (${lint_command}) and tests (${test_command}) before marking complete.
|
||||
inputs:
|
||||
- "Creator's design proposal"
|
||||
- "Test fixtures and helpers"
|
||||
- "Existing code patterns (from Explorer)"
|
||||
|
||||
check:
|
||||
archetypes: [guardian, sage]
|
||||
parallel: true
|
||||
description: |
|
||||
guardian: Security vulnerabilities, breaking changes, dependency risks, error handling.
|
||||
Pay special attention to input validation, auth checks, and SQL injection.
|
||||
sage: Code quality, test coverage, documentation, pattern consistency.
|
||||
Verify tests actually test the right things (not just passing).
|
||||
inputs:
|
||||
- "git diff from Maker"
|
||||
- "Creator's proposal (risk section)"
|
||||
- "Existing test baseline"
|
||||
|
||||
act:
|
||||
exit_when: all_approved
|
||||
max_cycles: ${max_cycles}
|
||||
on_reject: |
|
||||
Guardian findings: fix in Maker (security/breaking changes are blocking).
|
||||
Sage findings: fix in Maker (quality issues, missing tests).
|
||||
Re-run affected tests after each fix.
|
||||
|
||||
hooks:
|
||||
pre_plan: []
|
||||
post_check: []
|
||||
post_act: []
|
||||
Reference in New Issue
Block a user