Resources
Examples & templates
Use these copy-ready templates to accelerate team onboarding, policy standardization, and CI automation.
Template: refactor.consti baseline
This template provides secure key interpolation, provider defaults, and constitution guidance suitable for most repositories.
refactor.consti template
# refactor.consti
version: 1
settings:
developer_key: ${REFACTOR_API_KEY}
mode: cloud_managed
provider: cloud
model_id: managed-default
publish_mode: pr_only
gate_mode: strict
max_alerts_per_run: 5
exclude:
- node_modules
- .next
- "*.lock"
---
# Design Constitution
## Architecture
Keep business logic and transport logic separated.
## Testing
Behavior-changing refactors must include or update tests.
## Error Handling
All network calls require explicit timeout and retry strategy.Template: external developer bootstrap
Use this script in onboarding sessions to get new developers authenticated and running quickly against hosted infrastructure.
Hosted platform bootstrap flow
export REFACTOR_PLATFORM_URL=https://reactorai.codes
export REFACTOR_API_KEY=<developer-key-from-dashboard>
refactor login --key "$REFACTOR_API_KEY"
refactor init
refactor review .
refactor code .
refactor statusTemplate: CI guardrail script
Integrate this script into pull request checks to enforce strict secret and configuration policy before merge.
CI quality and secret checks
#!/usr/bin/env bash
set -euo pipefail
python -m pip install --upgrade refactor
export REFACTOR_PLATFORM_URL=https://reactorai.codes
export REFACTOR_API_KEY="$REACTORAI_DEVELOPER_KEY"
refactor whoami
refactor check --strict
refactor review .