diff --git a/README.md b/README.md index 6a90768..160bafe 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ npx reins-cli@latest audit . ```json { "total_score": 6, - "max_score": 18, - "maturity_level": "L1: Assisted", + "max_score": 22, + "maturity_level": "L1: Inloop", "recommendations": [ "Create ARCHITECTURE.md with domain map and layer rules", "Add linter configuration to enforce architectural constraints", @@ -95,7 +95,7 @@ Most agent rollouts fail for one boring reason: agents can edit code, but the re Reins gives you a repeatable operating system for agent work: - **A map** (`AGENTS.md`, architecture docs, indexed decisions) -- **A score** (0-18 maturity audit with concrete gaps) +- **A score** (0-22 maturity audit with concrete gaps) - **A plan** (next-step evolution path by maturity level) - **A guardrail model** (`risk-policy.json` + CI enforcement signals) @@ -142,7 +142,7 @@ block-beta ```mermaid graph LR - Init["reins init\nScaffold"] --> Audit["reins audit\nScore 0-18"] + Init["reins init\nScaffold"] --> Audit["reins audit\nScore 0-22"] Audit --> Evolve["reins evolve\nLevel up"] Evolve --> Doctor["reins doctor\nHealth check"] Doctor --> Audit @@ -157,7 +157,7 @@ graph LR reins init . # Scaffold the full structure reins init . --pack auto # Adaptive pack selection from project signals reins init . --pack agent-factory # Optional advanced automation pack -reins audit . # Score against harness principles (0-18) +reins audit . # Score against harness principles (0-22) reins evolve . # Roadmap to next maturity level reins doctor . # Health check with prescriptive fixes ``` @@ -168,10 +168,10 @@ Every repo sits on a maturity spectrum. The audit tells you where you are. The e ```mermaid graph LR - L0["L0: Manual\n0-4"] --> L1["L1: Assisted\n5-8"] - L1 --> L2["L2: Steered\n9-13"] - L2 --> L3["L3: Autonomous\n14-16"] - L3 --> L4["L4: Self-Correcting\n17-18"] + L0["L0: Manual\n0-5"] --> L1["L1: Inloop\n6-11"] + L1 --> L2["L2: Guided Outloop\n12-16"] + L2 --> L3["L3: Full Outloop\n17-19"] + L3 --> L4["L4: Zero Touch\n20-22"] style L0 fill:#1e293b,stroke:#475569,color:#94a3b8 style L1 fill:#1e293b,stroke:#3b82f6,color:#93c5fd @@ -182,17 +182,19 @@ graph LR | Score | Level | What it means | |-------|-------|---------------| -| 0-4 | **L0: Manual** | Traditional engineering, no agent infra | -| 5-8 | **L1: Assisted** | Agents help, humans still write code | -| 9-13 | **L2: Steered** | Humans steer, agents execute most code | -| 14-16 | **L3: Autonomous** | Agents handle full lifecycle | -| 17-18 | **L4: Self-Correcting** | System maintains and improves itself | +| 0-5 | **L0: Manual** | Traditional engineering, no agent infra | +| 6-11 | **L1: Inloop** | Agents help, humans still write code | +| 12-16 | **L2: Guided Outloop** | Humans steer, agents execute most code | +| 17-19 | **L3: Full Outloop** | Agents handle full lifecycle | +| 20-22 | **L4: Zero Touch** | System maintains and improves itself | ## What `reins init` scaffolds ``` AGENTS.md # Concise map (~100 lines) for agents ARCHITECTURE.md # Domain map, layer rules, dependency direction +WORKFLOW.md # Agent workflow and orchestration config +SPEC.md # Project specification and constraints risk-policy.json # Risk tiers + docs drift rules (policy-as-code) docs/ golden-principles.md # Mechanical taste rules enforced in CI @@ -230,16 +232,16 @@ reins init . --pack agent-factory ## The six audit dimensions -Each scored 0-3, totaling 0-18: +Scored across six dimensions, totaling 0-22: ```mermaid graph TD - Score["Total Score\n0-18"] - RK["Repository Knowledge\n0-3"] + Score["Total Score\n0-22"] + RK["Repository Knowledge\n0-4"] AE["Architecture Enforcement\n0-3"] - AL["Agent Legibility\n0-3"] + AL["Agent Legibility\n0-4"] GP["Golden Principles\n0-3"] - AW["Agent Workflow\n0-3"] + AW["Agent Workflow\n0-5"] GC["Garbage Collection\n0-3"] RK --> Score @@ -264,18 +266,18 @@ graph TD | **Architecture Enforcement** | ARCHITECTURE.md, dependency rules, linters, policy signals | | **Agent Legibility** | Bootable app, observability (or CLI diagnosability), lean dependencies | | **Golden Principles** | Documented taste rules, CI gate depth, cleanup process | -| **Agent Workflow** | Agent config, risk policy, PR templates, CI enforcement | +| **Agent Workflow** | Agent config, risk policy, PR templates, CI enforcement, orchestration readiness | | **Garbage Collection** | Debt tracking, doc-gardening, quality grades, docs drift rules | -## Self-apply: 18/18 +## Self-audit: 19/22 Reins audits itself in CI. Current score: ```json { - "total_score": 18, - "max_score": 18, - "maturity_level": "L4: Self-Correcting" + "total_score": 19, + "max_score": 22, + "maturity_level": "L3: Full Outloop" } ``` diff --git a/cli/reins/README.md b/cli/reins/README.md index bc95f42..43cb718 100644 --- a/cli/reins/README.md +++ b/cli/reins/README.md @@ -67,26 +67,26 @@ Pack modes: ### `reins audit ` -Score a project against harness engineering principles (0-18): +Score a project against harness engineering principles (0-22): ```bash reins audit . ``` -Scores six dimensions (0-3 each): -1. **Repository Knowledge** — AGENTS.md, docs/, versioned plans -2. **Architecture Enforcement** — ARCHITECTURE.md, dependency rules, linters -3. **Agent Legibility** — Bootable app, observability, lean dependencies -4. **Golden Principles** — Documented rules, CI enforcement, cleanup process -5. **Agent Workflow** — Agent config, PR templates, merge gates -6. **Garbage Collection** — Debt tracking, doc-gardening, quality grades +Scores six dimensions (variable max per dimension, 22 total): +1. **Repository Knowledge** (0-4) — AGENTS.md, docs/, versioned plans +2. **Architecture Enforcement** (0-3) — ARCHITECTURE.md, dependency rules, linters +3. **Agent Legibility** (0-4) — Bootable app, observability, lean dependencies +4. **Golden Principles** (0-3) — Documented rules, CI enforcement, cleanup process +5. **Agent Workflow** (0-5) — Agent config, PR templates, merge gates, orchestration readiness +6. **Garbage Collection** (0-3) — Debt tracking, doc-gardening, quality grades Returns a maturity level: -- **L0: Manual** (0-4) — Traditional engineering -- **L1: Assisted** (5-8) — Agents help, humans still code -- **L2: Steered** (9-13) — Humans steer, agents execute -- **L3: Autonomous** (14-16) — Agents handle full lifecycle -- **L4: Self-Correcting** (17-18) — System maintains itself +- **L0: Manual** (0-5) — Traditional engineering +- **L1: Inloop** (6-11) — Agents help, humans still code +- **L2: Guided Outloop** (12-16) — Humans steer, agents execute +- **L3: Full Outloop** (17-19) — Agents handle full lifecycle +- **L4: Zero Touch** (20-22) — System maintains itself ### `reins evolve ` diff --git a/cli/reins/package.json b/cli/reins/package.json index c468752..58a100e 100644 --- a/cli/reins/package.json +++ b/cli/reins/package.json @@ -1,6 +1,6 @@ { "name": "reins-cli", - "version": "0.1.3", + "version": "0.1.4", "description": "Scaffold, audit, and evolve projects using the Harness Engineering methodology", "type": "module", "license": "MIT", diff --git a/cli/reins/src/index.test.ts b/cli/reins/src/index.test.ts index bb21e41..b0ae518 100644 --- a/cli/reins/src/index.test.ts +++ b/cli/reins/src/index.test.ts @@ -183,7 +183,7 @@ describe("reins audit", () => { const result = JSON.parse(stdout); expect(result.total_score).toBe(0); - expect(result.max_score).toBe(21); + expect(result.max_score).toBe(22); expect(result.maturity_level).toBe("L0: Manual"); expect(result.scores.repository_knowledge.score).toBe(0); expect(result.scores.architecture_enforcement.score).toBe(0); @@ -268,7 +268,7 @@ describe("reins audit", () => { expect(result).toHaveProperty("max_score"); expect(result).toHaveProperty("maturity_level"); expect(result).toHaveProperty("recommendations"); - expect(result.max_score).toBe(21); + expect(result.max_score).toBe(22); }); test("fails on nonexistent directory", async () => { diff --git a/cli/reins/src/lib/audit/context.ts b/cli/reins/src/lib/audit/context.ts index 92f5d1c..c638d78 100644 --- a/cli/reins/src/lib/audit/context.ts +++ b/cli/reins/src/lib/audit/context.ts @@ -1,6 +1,12 @@ import { existsSync, readFileSync, readdirSync } from "node:fs"; import { join } from "node:path"; -import { detectCliProject, detectMonorepoWorkspaces, scanWorkflowsForEnforcement } from "../detection"; +import { + checkWorkflowConfigForPattern, + checkWorkflowsForMergeProtection, + detectCliProject, + detectMonorepoWorkspaces, + scanWorkflowsForEnforcement, +} from "../detection"; import { findFiles } from "../filesystem"; import type { AuditResult } from "../types"; @@ -28,6 +34,13 @@ export interface AuditRuntimeContext { hasGlobBasedRules: boolean; hierarchicalAgentContextCount: number; hasSkillsManifest: boolean; + hasWorkflowConfig: boolean; + hasSkillsDirectory: boolean; + hasIsolationPolicy: boolean; + hasConcurrencyLimits: boolean; + hasMergeProtection: boolean; + hasSpecDocument: boolean; + frameworksDetected: string[]; } export function createAuditResult(projectName: string): AuditResult { @@ -40,13 +53,14 @@ export function createAuditResult(projectName: string): AuditResult { architecture_enforcement: { score: 0, max: 3, findings: [] }, agent_legibility: { score: 0, max: 4, findings: [] }, golden_principles: { score: 0, max: 3, findings: [] }, - agent_workflow: { score: 0, max: 4, findings: [] }, + agent_workflow: { score: 0, max: 5, findings: [] }, garbage_collection: { score: 0, max: 3, findings: [] }, }, total_score: 0, - max_score: 21, + max_score: 22, maturity_level: "L0", recommendations: [], + frameworks_detected: [], }; } @@ -61,6 +75,54 @@ export function readVerifiedDocs(targetDir: string): string[] { }); } +function detectAgentCommands(targetDir: string): boolean { + const commandsDir = join(targetDir, ".claude", "commands"); + if (!existsSync(commandsDir)) return false; + try { + return readdirSync(commandsDir).length > 0; + } catch { + return false; + } +} + +function detectNonEmptySkillsDirectory(targetDir: string): boolean { + const skillsDirPaths = [ + join(targetDir, ".codex", "skills"), + join(targetDir, ".claude", "skills"), + join(targetDir, ".claude", "commands"), + join(targetDir, "skills"), + ]; + return skillsDirPaths.some((d) => { + if (!existsSync(d)) return false; + try { + return readdirSync(d).length > 0; + } catch { + return false; + } + }); +} + +function detectConcurrencyLimits(targetDir: string, hasWorkflowConfig: boolean, hasRiskPolicy: boolean): boolean { + if (hasWorkflowConfig && checkWorkflowConfigForPattern(targetDir, /max_concurrent|concurrency/i)) return true; + if (!hasRiskPolicy) return false; + try { + const content = readFileSync(join(targetDir, "risk-policy.json"), "utf-8"); + return /concurrency|maxConcurrentAgents/i.test(content); + } catch { + return false; + } +} + +function detectFrameworks(targetDir: string): string[] { + const detected: string[] = []; + if (existsSync(join(targetDir, ".codex")) || existsSync(join(targetDir, "WORKFLOW.md"))) detected.push("symphony"); + if (existsSync(join(targetDir, "CLAUDE.md")) || existsSync(join(targetDir, ".claude"))) detected.push("claude-code"); + if (existsSync(join(targetDir, ".cursor"))) detected.push("cursor"); + if (existsSync(join(targetDir, "conductor.json"))) detected.push("conductor"); + if (existsSync(join(targetDir, "CODEX.md"))) detected.push("codex"); + return detected; +} + export function buildAuditRuntimeContext(targetDir: string): AuditRuntimeContext { const pkgJsonPath = join(targetDir, "package.json"); const docsDir = join(targetDir, "docs"); @@ -85,16 +147,7 @@ export function buildAuditRuntimeContext(targetDir: string): AuditRuntimeContext const isCliRepo = detectCliProject(targetDir, pkgJsonPath); const verifiedDocs = readVerifiedDocs(targetDir); const hasCleanupDocs = existsSync(join(targetDir, "docs", "exec-plans", "tech-debt-tracker.md")); - - const commandsDir = join(targetDir, ".claude", "commands"); - let hasAgentCommands = false; - if (existsSync(commandsDir)) { - try { - hasAgentCommands = readdirSync(commandsDir).length > 0; - } catch { - // ignore read errors - } - } + const hasAgentCommands = detectAgentCommands(targetDir); const hasSessionOrchestrator = existsSync(join(targetDir, ".flow")) || @@ -108,13 +161,9 @@ export function buildAuditRuntimeContext(targetDir: string): AuditRuntimeContext existsSync(join(targetDir, "mcp.json")); const hasGlobBasedRules = - existsSync(join(targetDir, ".cursor", "rules")) || - existsSync(join(targetDir, ".claude", "rules")); + existsSync(join(targetDir, ".cursor", "rules")) || existsSync(join(targetDir, ".claude", "rules")); - const agentContextFiles = [ - ...findFiles(targetDir, /^AGENTS\.md$/, 3), - ...findFiles(targetDir, /^CLAUDE\.md$/, 3), - ]; + const agentContextFiles = [...findFiles(targetDir, /^AGENTS\.md$/, 3), ...findFiles(targetDir, /^CLAUDE\.md$/, 3)]; const hierarchicalAgentContextCount = agentContextFiles.length; const hasSkillsManifest = @@ -122,6 +171,27 @@ export function buildAuditRuntimeContext(targetDir: string): AuditRuntimeContext existsSync(join(targetDir, ".claude", "skills")) || existsSync(join(targetDir, ".cursor", "extensions")); + const hasWorkflowConfig = + existsSync(join(targetDir, "WORKFLOW.md")) || + existsSync(join(targetDir, "workflow.yml")) || + existsSync(join(targetDir, ".codex", "WORKFLOW.md")); + + const hasSkillsDirectory = detectNonEmptySkillsDirectory(targetDir); + + const hasIsolationPolicy = + existsSync(join(targetDir, "sandbox.json")) || + existsSync(join(targetDir, ".sandbox")) || + (hasWorkflowConfig && checkWorkflowConfigForPattern(targetDir, /sandbox|isolat|workspace.*root/i)); + + const hasConcurrencyLimits = detectConcurrencyLimits(targetDir, hasWorkflowConfig, hasRiskPolicy); + + const hasMergeProtection = + existsSync(join(targetDir, ".github", "CODEOWNERS")) || + existsSync(join(targetDir, "CODEOWNERS")) || + checkWorkflowsForMergeProtection(workflowDir); + + const hasSpecDocument = existsSync(join(targetDir, "SPEC.md")) || existsSync(join(targetDir, "spec.md")); + return { targetDir, pkgJsonPath, @@ -146,5 +216,12 @@ export function buildAuditRuntimeContext(targetDir: string): AuditRuntimeContext hasGlobBasedRules, hierarchicalAgentContextCount, hasSkillsManifest, + hasWorkflowConfig, + hasSkillsDirectory, + hasIsolationPolicy, + hasConcurrencyLimits, + hasMergeProtection, + hasSpecDocument, + frameworksDetected: detectFrameworks(targetDir), }; } diff --git a/cli/reins/src/lib/audit/scoring.ts b/cli/reins/src/lib/audit/scoring.ts index 5ed785b..2e45234 100644 --- a/cli/reins/src/lib/audit/scoring.ts +++ b/cli/reins/src/lib/audit/scoring.ts @@ -444,8 +444,9 @@ function detectZteSignals(result: AuditResult, ctx: AuditRuntimeContext): void { if (/auto-merge|mergify|kodiak/i.test(content)) { hasAutoMerge = true; } - const hasPushToMain = - /push:[\s\S]*?branches:[\s\S]*?(?:-\s*["']?main["']?|\[\s*["']?main["']?\s*\])/i.test(content); + const hasPushToMain = /push:[\s\S]*?branches:[\s\S]*?(?:-\s*["']?main["']?|\[\s*["']?main["']?\s*\])/i.test( + content, + ); const hasDeploySignal = /\bdeploy(?:ment)?\b/i.test(content); const hasMergeDeploySignal = /merge[\s\S]*deploy|deploy[\s\S]*merge/i.test(content); if ((hasPushToMain && hasDeploySignal) || hasMergeDeploySignal) { @@ -464,12 +465,32 @@ function detectZteSignals(result: AuditResult, ctx: AuditRuntimeContext): void { } } +function scoreAgentWorkflowOrchestration(result: AuditResult, ctx: AuditRuntimeContext): void { + const orchestrationSignals = [ + ctx.hasWorkflowConfig, + ctx.hasSkillsDirectory, + ctx.hasIsolationPolicy, + ctx.hasConcurrencyLimits, + ctx.hasMergeProtection, + ].filter(Boolean).length; + + if (orchestrationSignals >= 3) { + result.scores.agent_workflow.score++; + result.scores.agent_workflow.findings.push(`Orchestration readiness detected (${orchestrationSignals} signals)`); + } else if (orchestrationSignals >= 1) { + result.scores.agent_workflow.findings.push( + `Partial orchestration signals (${orchestrationSignals}/3 needed for point)`, + ); + } +} + function scoreAgentWorkflow(result: AuditResult, ctx: AuditRuntimeContext): void { scoreAgentWorkflowConfig(result, ctx); scoreAgentWorkflowGovernance(result, ctx); scoreAgentWorkflowCi(result, ctx); scoreAgentWorkflowBlueprints(result, ctx); detectZteSignals(result, ctx); + scoreAgentWorkflowOrchestration(result, ctx); } function hasActiveDocGardening(ctx: AuditRuntimeContext): boolean { @@ -548,8 +569,8 @@ export function applyAuditScoring(result: AuditResult, ctx: AuditRuntimeContext) export function resolveMaturityLevel(totalScore: number): string { if (totalScore <= 5) return "L0: Manual"; - if (totalScore <= 10) return "L1: Inloop"; - if (totalScore <= 15) return "L2: Guided Outloop"; - if (totalScore <= 18) return "L3: Full Outloop"; + if (totalScore <= 11) return "L1: Inloop"; + if (totalScore <= 16) return "L2: Guided Outloop"; + if (totalScore <= 19) return "L3: Full Outloop"; return "L4: Zero Touch"; } diff --git a/cli/reins/src/lib/commands/audit.ts b/cli/reins/src/lib/commands/audit.ts index 84b21b7..a384ac1 100644 --- a/cli/reins/src/lib/commands/audit.ts +++ b/cli/reins/src/lib/commands/audit.ts @@ -16,6 +16,7 @@ export function runAudit(targetPath: string): AuditResult { const result = createAuditResult(basename(targetDir)); applyAuditScoring(result, context); + result.frameworks_detected = context.frameworksDetected; result.total_score = Object.values(result.scores).reduce((sum, score) => sum + score.score, 0); result.maturity_level = resolveMaturityLevel(result.total_score); diff --git a/cli/reins/src/lib/commands/doctor.ts b/cli/reins/src/lib/commands/doctor.ts index fa451c4..d7b4671 100644 --- a/cli/reins/src/lib/commands/doctor.ts +++ b/cli/reins/src/lib/commands/doctor.ts @@ -1,7 +1,7 @@ -import { existsSync, readFileSync } from "node:fs"; +import { existsSync, readFileSync, readdirSync } from "node:fs"; import { basename, join, resolve } from "node:path"; import { readVerifiedDocs } from "../audit/context"; -import { scanWorkflowsForEnforcement } from "../detection"; +import { checkWorkflowsForMergeProtection, scanWorkflowsForEnforcement } from "../detection"; import { findFiles } from "../filesystem"; import type { DoctorCheck } from "../types"; @@ -162,6 +162,73 @@ function collectDoctorStructuralLintChecks(targetDir: string): DoctorCheck[] { ]; } +function collectDoctorWorkflowConfigCheck(targetDir: string): DoctorCheck[] { + const workflowConfigs = ["WORKFLOW.md", "workflow.yml", join(".codex", "WORKFLOW.md")].map((f) => join(targetDir, f)); + if (workflowConfigs.some(existsSync)) { + return [{ check: "Workflow configuration found", status: "pass", fix: "" }]; + } + return [ + { + check: "No workflow configuration", + status: "warn", + fix: "Create WORKFLOW.md to define agent behavior as a versioned, reviewable artifact", + }, + ]; +} + +function collectDoctorSkillsDirectoryCheck(targetDir: string): DoctorCheck[] { + const skillsDirs = [".codex/skills", ".claude/commands", ".claude/skills", "skills"].map((d) => join(targetDir, d)); + const hasNonEmptySkillsDir = skillsDirs.some((d) => { + if (!existsSync(d)) return false; + try { + return readdirSync(d).length > 0; + } catch { + return false; + } + }); + if (hasNonEmptySkillsDir) { + return [{ check: "Skills/commands directory found", status: "pass", fix: "" }]; + } + return [ + { + check: "No skills directory", + status: "warn", + fix: "Create a skills directory (.codex/skills/ or .claude/commands/) with composable task definitions", + }, + ]; +} + +function collectDoctorMergeProtectionCheck(targetDir: string): DoctorCheck[] { + const hasPRTemplate = + existsSync(join(targetDir, ".github", "pull_request_template.md")) || + existsSync(join(targetDir, ".github", "PULL_REQUEST_TEMPLATE.md")); + const hasCodeowners = + existsSync(join(targetDir, ".github", "CODEOWNERS")) || existsSync(join(targetDir, "CODEOWNERS")); + const hasWorkflowProtection = checkWorkflowsForMergeProtection(join(targetDir, ".github", "workflows")); + + const protectionSignals = [hasPRTemplate, hasCodeowners, hasWorkflowProtection].filter(Boolean).length; + + if (protectionSignals >= 2) { + return [{ check: "Merge protection artifacts found", status: "pass", fix: "" }]; + } + if (protectionSignals === 1) { + return [ + { + check: "Partial merge protection", + status: "warn", + fix: "Add PR template, CODEOWNERS, or workflow-based branch protection for complete proof-of-work gates", + }, + ]; + } + return [ + { + check: "No merge protection artifacts", + status: "warn", + fix: "Add .github/pull_request_template.md and CODEOWNERS for proof-of-work validation", + }, + ]; +} + export function runDoctor(targetPath: string): void { const targetDir = resolve(targetPath); if (!existsSync(targetDir)) { @@ -179,6 +246,9 @@ export function runDoctor(targetPath: string): void { ...collectDoctorVerificationChecks(targetDir), ...collectDoctorHierarchicalAgentsCheck(targetDir), ...collectDoctorStructuralLintChecks(targetDir), + ...collectDoctorWorkflowConfigCheck(targetDir), + ...collectDoctorSkillsDirectoryCheck(targetDir), + ...collectDoctorMergeProtectionCheck(targetDir), ]; const passed = checks.filter((check) => check.status === "pass").length; diff --git a/cli/reins/src/lib/commands/evolve.test.ts b/cli/reins/src/lib/commands/evolve.test.ts index e2e6b34..0b7f4d9 100644 --- a/cli/reins/src/lib/commands/evolve.test.ts +++ b/cli/reins/src/lib/commands/evolve.test.ts @@ -19,13 +19,14 @@ describe("runEvolve unit behavior", () => { architecture_enforcement: { score: 3, max: 3, findings: [] }, agent_legibility: { score: 3, max: 4, findings: [] }, golden_principles: { score: 3, max: 3, findings: [] }, - agent_workflow: { score: 3, max: 4, findings: [] }, + agent_workflow: { score: 3, max: 5, findings: [] }, garbage_collection: { score: 2, max: 3, findings: [] }, }, total_score: 17, - max_score: 21, + max_score: 22, maturity_level: "L3: Full Outloop", recommendations: [], + frameworks_detected: [], }; let output = ""; diff --git a/cli/reins/src/lib/commands/evolve.ts b/cli/reins/src/lib/commands/evolve.ts index 883566f..8c6432c 100644 --- a/cli/reins/src/lib/commands/evolve.ts +++ b/cli/reins/src/lib/commands/evolve.ts @@ -96,6 +96,13 @@ const EVOLUTION_PATHS: Record = { description: "Describe tasks in natural language. Agents write all code, tests, and docs.", automated: false, }, + { + step: 6, + action: "Define workflow configuration", + description: + "Create WORKFLOW.md with YAML frontmatter (concurrency, sandbox, hooks) and markdown body (agent prompt template). Versions agent behavior alongside code.", + automated: true, + }, ], success_criteria: "Most new code is written by agents, not humans.", }, @@ -120,7 +127,8 @@ const EVOLUTION_PATHS: Record = { { step: 3, action: "Add conditional context engineering", - description: "Create glob-based rule files (.cursor/rules/, .claude/rules/) and per-directory AGENTS.md for targeted agent context.", + description: + "Create glob-based rule files (.cursor/rules/, .claude/rules/) and per-directory AGENTS.md for targeted agent context.", automated: false, }, { @@ -141,6 +149,13 @@ const EVOLUTION_PATHS: Record = { description: "Clear criteria for when to involve humans vs. when agents can proceed autonomously.", automated: false, }, + { + step: 7, + action: "Create composable skills directory", + description: + "Add .codex/skills/ or .claude/commands/ with markdown-defined tasks that compose hierarchically (e.g., 'land' delegates to 'commit', 'push', 'pull').", + automated: false, + }, ], success_criteria: "Agent can end-to-end ship a feature from prompt to merge.", }, @@ -170,7 +185,8 @@ const EVOLUTION_PATHS: Record = { { step: 4, action: "Declare agent tooling registry", - description: "Create MCP config (.claude/mcp.json or mcp.json) and skills manifest declaring available tools for agents.", + description: + "Create MCP config (.claude/mcp.json or mcp.json) and skills manifest declaring available tools for agents.", automated: false, }, { @@ -191,6 +207,13 @@ const EVOLUTION_PATHS: Record = { description: "Link code changes to required doc updates via risk-policy.json watchPaths and docsDriftRules.", automated: false, }, + { + step: 8, + action: "Implement workspace isolation policy", + description: + "Define per-issue sandbox boundaries, concurrency limits, and deterministic workspace creation. Prevents cross-contamination between concurrent agent runs.", + automated: false, + }, ], success_criteria: "Codebase improves in quality without human intervention.", }, @@ -198,9 +221,9 @@ const EVOLUTION_PATHS: Record = { function resolveCurrentLevelKey(totalScore: number): LevelKey { if (totalScore <= 5) return "L0"; - if (totalScore <= 10) return "L1"; - if (totalScore <= 15) return "L2"; - if (totalScore <= 18) return "L3"; + if (totalScore <= 11) return "L1"; + if (totalScore <= 16) return "L2"; + if (totalScore <= 19) return "L3"; return "L4"; } @@ -238,6 +261,8 @@ function hasMissingBaseScaffold(targetDir: string): boolean { const requiredArtifacts = [ "AGENTS.md", "ARCHITECTURE.md", + "WORKFLOW.md", + "SPEC.md", "risk-policy.json", "docs/golden-principles.md", "docs/design-docs/index.md", diff --git a/cli/reins/src/lib/commands/init.ts b/cli/reins/src/lib/commands/init.ts index a016a42..bb25266 100644 --- a/cli/reins/src/lib/commands/init.ts +++ b/cli/reins/src/lib/commands/init.ts @@ -15,7 +15,9 @@ import { goldenPrinciplesTemplate, productSpecsIndexTemplate, riskPolicyTemplate, + specMdTemplate, techDebtTrackerTemplate, + workflowMdTemplate, } from "../templates"; import type { InitOptions } from "../types"; @@ -92,6 +94,8 @@ function createBaseFiles( { path: "docs/design-docs/core-beliefs.md", content: coreBeliefsTemplate() }, { path: "docs/product-specs/index.md", content: productSpecsIndexTemplate() }, { path: "docs/exec-plans/tech-debt-tracker.md", content: techDebtTrackerTemplate() }, + { path: "WORKFLOW.md", content: workflowMdTemplate(projectName) }, + { path: "SPEC.md", content: specMdTemplate(projectName) }, ]; for (const file of files) { @@ -114,6 +118,7 @@ function buildNextSteps( "Review risk-policy.json — set tiers and docs drift rules for your repo", "Edit docs/golden-principles.md — customize rules for your project", "Run 'reins audit .' to see your starting score", + "Review WORKFLOW.md — customize agent behavior and orchestration settings", ]; if (selectedPack === "agent-factory") { diff --git a/cli/reins/src/lib/detection.ts b/cli/reins/src/lib/detection.ts index a316997..2ef55e0 100644 --- a/cli/reins/src/lib/detection.ts +++ b/cli/reins/src/lib/detection.ts @@ -132,6 +132,36 @@ function detectTestSignals(targetDir: string): string[] { return []; } +export function checkWorkflowConfigForPattern(targetDir: string, pattern: RegExp): boolean { + const workflowFiles = ["WORKFLOW.md", join(".codex", "WORKFLOW.md"), "workflow.yml"]; + const safePattern = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, "")); + for (const file of workflowFiles) { + const filePath = join(targetDir, file); + if (!existsSync(filePath)) continue; + try { + const content = readFileSync(filePath, "utf-8"); + if (safePattern.test(content)) return true; + } catch { + // ignore read errors + } + } + return false; +} + +export function checkWorkflowsForMergeProtection(workflowDir: string): boolean { + if (!existsSync(workflowDir)) return false; + try { + const files = readdirSync(workflowDir).filter((f) => f.endsWith(".yml") || f.endsWith(".yaml")); + for (const file of files) { + const content = readFileSync(join(workflowDir, file), "utf-8"); + if (/required.*review|require.*approval|branch.*protect/i.test(content)) return true; + } + } catch { + // no workflows + } + return false; +} + export function detectCliDiagnosabilitySignals(targetDir: string): string[] { const signals = new Set(); const probes = [ diff --git a/cli/reins/src/lib/templates.ts b/cli/reins/src/lib/templates.ts index c1bb501..5c77f3d 100644 --- a/cli/reins/src/lib/templates.ts +++ b/cli/reins/src/lib/templates.ts @@ -295,6 +295,55 @@ export function riskPolicyTemplate(pack: AutomationPack = "none"): string { `; } +export function workflowMdTemplate(projectName: string): string { + return `--- +# Workflow configuration for ${projectName} +# This file defines agent behavior as a versioned, reviewable artifact. +# See: https://github.com/openai/symphony for the WORKFLOW.md pattern. + +workspace: + root: . + # sandbox: true # Enable per-issue workspace isolation + +concurrency: + max_concurrent_agents: 2 + +hooks: {} + # after_create: [] +--- + +# Agent Instructions + + + +## Constraints + +- All changes must pass CI before merge +- Follow golden principles documented in docs/golden-principles.md +- Respect ARCHITECTURE.md dependency direction rules +`; +} + +export function specMdTemplate(projectName: string): string { + return `# ${projectName} Specification + + + + +## Overview + +[Describe the system's purpose and core behavior] + +## Invariants + +[List properties that must always hold true] + +## Interfaces + +[Define the system's external contract] +`; +} + function agentFactoryLintStructureScriptTemplate(): string { return `#!/usr/bin/env node import { readdirSync, readFileSync, statSync } from "node:fs"; diff --git a/cli/reins/src/lib/types.ts b/cli/reins/src/lib/types.ts index fc0187f..79614ee 100644 --- a/cli/reins/src/lib/types.ts +++ b/cli/reins/src/lib/types.ts @@ -17,9 +17,10 @@ export interface AuditResult { garbage_collection: AuditScore; }; total_score: number; - max_score: 21; + max_score: 22; maturity_level: string; recommendations: string[]; + frameworks_detected: string[]; } export interface InitOptions { diff --git a/docs/design-docs/ecosystem-positioning.md b/docs/design-docs/ecosystem-positioning.md index 232f7f9..707c682 100644 --- a/docs/design-docs/ecosystem-positioning.md +++ b/docs/design-docs/ecosystem-positioning.md @@ -14,7 +14,7 @@ Layer 4: AGENT INFRASTRUCTURE Layer 3: SESSION EXECUTION How agents execute work within a single coding session. - Tools: GSD, Flow-Next, custom prompt chains. + Tools: GSD, Flow-Next, Symphony, custom prompt chains. Problem solved: context rot, task decomposition, verification. Layer 2: REPO READINESS @@ -45,7 +45,7 @@ Once installed, the agent can discover the Reins workflows and run the CLI direc **Core operations:** - `reins init` — scaffold the full harness engineering structure -- `reins audit` — score the repo on 6 dimensions (0-18) +- `reins audit` — score the repo on 6 dimensions (0-22) - `reins evolve` — roadmap to the next maturity level - `reins doctor` — health check with prescriptive fixes @@ -87,10 +87,25 @@ Repository: https://github.com/gmickel/flow-next-opencode **Philosophy:** "Plan first, work second." Specifications drive decomposition before implementation begins. +### Symphony (OpenAI) + +Repository: https://github.com/openai/symphony + +**Approach:** Conductor-pattern orchestration built in Elixir on the BEAM VM. Long-running implementation runs with fault-tolerant agent supervision, composable skills, and proof-of-work validation before merge. + +**Key concepts:** +- `WORKFLOW.md` defines agent behavior as a versioned, reviewable artifact +- `.codex/skills/` provides composable, hierarchical task definitions +- Deterministic per-issue workspace isolation prevents cross-contamination +- Proof-of-work gates (CI + review + walkthrough) before any merge +- Erlang/OTP supervision trees auto-restart failed agents with error context + +**Philosophy:** "Workflow-embedded AI with human-led control." Autonomous agents carry out complex end-to-end coding tasks while humans and corporate processes remain central to decision-making. + ## Why They're Complementary -| Concern | Reins | GSD / Flow-Next | -|---------|-------|-----------------| +| Concern | Reins | GSD / Flow-Next / Symphony | +|---------|-------|----------------------------| | Layer | Repository structure | Session execution | | Question answered | Is this repo ready for agents? | How do agents execute work right now? | | When you use it | Once per repo, then evolve | Every coding session | @@ -110,7 +125,7 @@ Stripe's Minions system operates at Layer 3+4 simultaneously — orchestrating a reins init . Scaffold structure reins audit . Measure readiness reins evolve . Level up maturity - + GSD or Flow-Next Execute coding sessions + + GSD or Flow-Next or Symphony Execute coding sessions + Minions / E2B / Modal Agent infrastructure + CI enforcement of golden principles Continuous quality + Background garbage collection agents Continuous cleanup diff --git a/docs/design-docs/index.md b/docs/design-docs/index.md index 213d34a..a7d4cc4 100644 --- a/docs/design-docs/index.md +++ b/docs/design-docs/index.md @@ -8,6 +8,7 @@ Registry of all design documents with verification status. | ci-enforcement-and-risk-policy.md | Current | 2026-02-22 | Team | | ecosystem-positioning.md | Current | 2026-02-22 | Team | | skill-evals-and-shell-boundaries.md | Current | 2026-02-23 | Team | +| symphony-integration.md | Current | 2026-03-08 | Team | ## Verification Schedule diff --git a/docs/design-docs/symphony-integration.md b/docs/design-docs/symphony-integration.md new file mode 100644 index 0000000..a3cd5f4 --- /dev/null +++ b/docs/design-docs/symphony-integration.md @@ -0,0 +1,26 @@ + +# Symphony Integration + +## Decision + +Reins detects orchestration patterns generically rather than coupling to any specific framework. Symphony's patterns (WORKFLOW.md, composable skills directories, workspace isolation, concurrency governance, proof-of-work gates) are detected as universal readiness signals. + +## Context + +OpenAI released Symphony (March 2026), an Elixir-based autonomous coding orchestration framework. Analysis revealed significant conceptual overlap between Reins' harness engineering and Symphony's conductor pattern. Both share the "humans steer, agents execute" philosophy. + +## Changes + +- **Scoring**: `agent_workflow` dimension expanded from max 4 to max 5, adding orchestration readiness (3+ of: workflow config, skills directory, isolation policy, concurrency limits, merge protection) +- **Detection**: New signals in `context.ts` — `hasWorkflowConfig`, `hasSkillsDirectory`, `hasIsolationPolicy`, `hasConcurrencyLimits`, `hasMergeProtection`, `hasSpecDocument`, `frameworksDetected` +- **Doctor**: 3 new health checks for workflow config, skills directory, merge protection +- **Evolve**: New steps at L1->L2 (workflow config), L2->L3 (skills composition), L3->L4 (workspace isolation) +- **Init**: Scaffolds WORKFLOW.md and SPEC.md templates +- **Output**: New `frameworks_detected` informational field in audit output +- **Total max score**: 22 (was 21) + +## Trade-offs + +- **For**: Framework-agnostic detection catches Symphony AND any future framework using the same patterns +- **Against**: Score recalibration required (maturity thresholds adjusted by +1 per level) +- **Mitigated**: Zero runtime dependencies added; all detection is filesystem-only diff --git a/package.json b/package.json index dbb2310..62b526e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reins", - "version": "0.1.3", + "version": "0.1.4", "description": "Harness Engineering CLI — scaffold, audit, evolve, and doctor agent-readiness", "scripts": { "dev": "cd cli/reins && bun --watch src/index.ts", diff --git a/skill/Reins/HarnessMethodology.md b/skill/Reins/HarnessMethodology.md index f50a0ca..92bed0c 100644 --- a/skill/Reins/HarnessMethodology.md +++ b/skill/Reins/HarnessMethodology.md @@ -10,7 +10,7 @@ Build and ship software with **zero manually-written code**. Humans design envir Reins turns the methodology into four operational commands: - `reins init` — scaffold repository knowledge and governance artifacts -- `reins audit` — score maturity across six dimensions (0-18) +- `reins audit` — score maturity across six dimensions (0-22) - `reins doctor` — produce actionable pass/fail/warn health checks - `reins evolve` — generate step-by-step upgrades to the next level diff --git a/skill/Reins/SKILL.md b/skill/Reins/SKILL.md index 7e004e5..7b4e97e 100644 --- a/skill/Reins/SKILL.md +++ b/skill/Reins/SKILL.md @@ -19,7 +19,7 @@ Do not re-implement CLI logic in skill instructions. Always run commands and par Use this skill when the user asks to: - Scaffold repository readiness artifacts (`AGENTS.md`, `ARCHITECTURE.md`, `docs/`, `risk-policy.json`) -- Audit or score agent-readiness/maturity (0-18, maturity levels, weakest dimensions) +- Audit or score agent-readiness/maturity (0-22, maturity levels, weakest dimensions) - Diagnose readiness gaps with `doctor` (pass/fail/warn health checks with prescriptive fixes) - Evolve the repository to the next Reins maturity level - Improve docs-drift/policy-as-code enforcement tied to Reins outputs @@ -56,7 +56,7 @@ All Reins commands output deterministic JSON. **Always parse JSON output** — n # Scaffold harness engineering structure reins init [--name ] [--force] [--pack ] -# Score maturity across 6 dimensions (0-18) +# Score maturity across 6 dimensions (0-22) reins audit # Health check with prescriptive fixes @@ -73,11 +73,11 @@ reins help | Score | Level | Description | |-------|-------|-------------| -| 0-4 | **L0: Manual** | Traditional engineering, no agent infrastructure | -| 5-8 | **L1: Assisted** | Agents help, but humans still write code | -| 9-13 | **L2: Steered** | Humans steer, agents execute most code | -| 14-16 | **L3: Autonomous** | Agents handle full lifecycle with human oversight | -| 17-18 | **L4: Self-Correcting** | Agents maintain, clean, and evolve the system | +| 0-5 | **L0: Manual** | Traditional engineering, no agent infrastructure | +| 6-11 | **L1: Inloop** | Agents help, but humans still write code | +| 12-16 | **L2: Guided Outloop** | Humans steer, agents execute most code | +| 17-19 | **L3: Full Outloop** | Agents handle full lifecycle with human oversight | +| 20-22 | **L4: Zero Touch** | Agents maintain, clean, and evolve the system | ## Core Reins Principles diff --git a/skill/Reins/Workflows/Audit.md b/skill/Reins/Workflows/Audit.md index 2a2115c..daa63b6 100644 --- a/skill/Reins/Workflows/Audit.md +++ b/skill/Reins/Workflows/Audit.md @@ -18,16 +18,17 @@ For remediation detail, pair with doctor: "project": "project-name", "timestamp": "2026-02-23T12:39:57.977Z", "scores": { - "repository_knowledge": { "score": 3, "max": 3, "findings": ["AGENTS.md exists (56 lines)", "..."] }, + "repository_knowledge": { "score": 4, "max": 4, "findings": ["AGENTS.md exists (56 lines)", "..."] }, "architecture_enforcement": { "score": 3, "max": 3, "findings": ["..."] }, - "agent_legibility": { "score": 3, "max": 3, "findings": ["..."] }, + "agent_legibility": { "score": 4, "max": 4, "findings": ["..."] }, "golden_principles": { "score": 3, "max": 3, "findings": ["..."] }, - "agent_workflow": { "score": 3, "max": 3, "findings": ["..."] }, + "agent_workflow": { "score": 5, "max": 5, "findings": ["..."] }, "garbage_collection": { "score": 3, "max": 3, "findings": ["..."] } }, - "total_score": 18, - "max_score": 18, - "maturity_level": "L4: Self-Correcting", + "total_score": 22, + "max_score": 22, + "maturity_level": "L4: Zero Touch", + "frameworks_detected": ["symphony", "claude-code"], "recommendations": ["Project is well-structured. Consider evolving to next maturity level."] } ``` @@ -38,8 +39,8 @@ For remediation detail, pair with doctor: ```bash result=$(cd cli/reins && bun src/index.ts audit ) -# Parse: .total_score (integer 0-18) -# Parse: .maturity_level (string like "L4: Self-Correcting") +# Parse: .total_score (integer 0-22) +# Parse: .maturity_level (string like "L4: Zero Touch") ``` ### Identify Weakest Dimensions @@ -58,19 +59,21 @@ result=$(cd cli/reins && bun src/index.ts audit ) ## Audit Dimensions -Score each dimension 0-3: +Score each dimension from 0 up to its max (dimensions have different maxes: RK 0-4, AE 0-3, AL 0-4, GP 0-3, AW 0-5, GC 0-3): - **0** = Not present - **1** = Minimal/ad-hoc - **2** = Structured but incomplete - **3** = Fully implemented and enforced +- **4-5** = Extended maturity signals (dimensions with higher max only) -### 1. Repository Knowledge (0-3) +### 1. Repository Knowledge (0-4) | Check | Points | |-------|--------| | AGENTS.md exists and under 150 lines (hierarchical: per-package in monorepos) | +1 | | docs/ directory with indexed design docs (counts decisions in design-docs/index.md) | +1 | | Verification headers in docs (``) and execution plans versioned in-repo | +1 | +| Conditional context engineering (glob-based rule files or 3+ hierarchical context files: AGENTS.md and/or CLAUDE.md) | +1 | **Bonus findings:** Hierarchical AGENTS.md detected, verification header count, design decision count. @@ -84,13 +87,14 @@ Score each dimension 0-3: **Bonus findings:** Linter depth details, enforcement signal count. -### 3. Agent Legibility (0-3) +### 3. Agent Legibility (0-4) | Check | Points | |-------|--------| | App bootable per worktree (monorepo-aware: detects workspace packages, checks per-workspace bootability) | +1 | | Observability accessible to agents (services: Sentry/Vercel/Netlify/Docker; CLIs: diagnosability signals like doctor/help commands) | +1 | | Boring tech stack, minimal opaque dependencies (monorepo-aware: per-workspace average, threshold <20 single or <30 avg) | +1 | +| Declared tool registry (MCP config or skills manifest for agent tool discovery) | +1 | **Bonus findings:** Monorepo workspace count, dependency count/average, diagnosability signals. @@ -104,13 +108,15 @@ Score each dimension 0-3: **Bonus findings:** Principle count, anti-patterns detected, CI gate count. -### 5. Agent Workflow (0-3) +### 5. Agent Workflow (0-5) | Check | Points | |-------|--------| | Agent config present (CLAUDE.md, conductor.json, .cursor, AGENTS.md) | +1 | | Workflow signals (risk-policy.json, PR template, issue templates) | +1 | | CI quality: 2+ distinct enforcement steps in workflows | +1 | +| Agent blueprints or persona definitions present | +1 | +| Orchestration readiness: 3+ signals from (workflow config, skills directory, isolation policy, concurrency limits, merge protection) | +1 | **Note:** `actions/checkout` does NOT count as an enforcement gate. @@ -126,17 +132,17 @@ Score each dimension 0-3: | Score | Level | Description | |-------|-------|-------------| -| 0-4 | **L0: Manual** | Traditional engineering, no agent infrastructure | -| 5-8 | **L1: Assisted** | Agents help, but humans still write code | -| 9-13 | **L2: Steered** | Humans steer, agents execute most code | -| 14-16 | **L3: Autonomous** | Agents handle full lifecycle with human oversight | -| 17-18 | **L4: Self-Correcting** | Agents maintain, clean, and evolve the system | +| 0-5 | **L0: Manual** | Traditional engineering, no agent infrastructure | +| 6-11 | **L1: Inloop** | Agents help, but humans still write code | +| 12-16 | **L2: Guided Outloop** | Humans steer, agents execute most code | +| 17-19 | **L3: Full Outloop** | Agents handle full lifecycle with human oversight | +| 20-22 | **L4: Zero Touch** | Agents maintain, clean, and evolve the system | ## Steps 1. Run `reins audit ` and capture JSON output 2. Parse `.total_score` and `.maturity_level` for summary -3. Identify weakest dimensions: any `.scores.*.score < 3` +3. Identify weakest dimensions: any `.scores.*.score < .scores.*.max` 4. Read `.scores.*.findings` arrays for evidence of what was detected 5. Present top 3 actionable recommendations from `.recommendations` 6. If remediation needed, run `reins doctor ` for prescriptive fixes diff --git a/skill/Reins/Workflows/Doctor.md b/skill/Reins/Workflows/Doctor.md index 1058bbe..289df44 100644 --- a/skill/Reins/Workflows/Doctor.md +++ b/skill/Reins/Workflows/Doctor.md @@ -15,7 +15,7 @@ For scoring context, pair with audit: | Tool | Purpose | Output | |------|---------|--------| -| **audit** | Quantitative maturity scoring (0-18) | Scores, findings, maturity level | +| **audit** | Quantitative maturity scoring (0-22) | Scores, findings, maturity level | | **doctor** | Actionable health checks | check/status/fix entries + summary | Use **doctor** for remediation details. Use **audit** for maturity scoring. @@ -58,6 +58,9 @@ Doctor checks include: - Linter and CI signals - Risk policy (`risk-policy.json`) - Verification headers in docs +- Workflow configuration (`WORKFLOW.md` or equivalent) +- Skills/commands directory presence +- Merge protection artifacts (branch rules, CODEOWNERS) - Optional monorepo/structure checks (hierarchical AGENTS, structural lint scripts) Notes: diff --git a/skill/Reins/Workflows/Evolve.md b/skill/Reins/Workflows/Evolve.md index ed0e720..d04c137 100644 --- a/skill/Reins/Workflows/Evolve.md +++ b/skill/Reins/Workflows/Evolve.md @@ -21,9 +21,9 @@ Run audit first (or let evolve run it internally) to determine current level. { "command": "evolve", "project": "project-name", - "current_level": "L1: Assisted", + "current_level": "L1: Inloop", "current_score": 8, - "next_level": "L2: Steered", + "next_level": "L2: Guided Outloop", "goal": "Shift from human-writes-code to human-steers-agent", "steps": [ { @@ -67,9 +67,9 @@ Treat `--apply` as scaffold assist, not full autonomous evolution. ## Evolution Paths - **L0 -> L1**: establish baseline repo map/docs/architecture and first agent loop. -- **L1 -> L2**: enforce golden principles and shift to prompt-first steering. -- **L2 -> L3**: add policy-as-code, stronger enforcement, and autonomous delivery loops. -- **L3 -> L4**: add active drift detection, quality grading, and continuous cleanup. +- **L1 -> L2**: enforce golden principles, shift to prompt-first steering, and add workflow configuration. +- **L2 -> L3**: add policy-as-code, stronger enforcement, autonomous delivery loops, and skills directory. +- **L3 -> L4**: add active drift detection, quality grading, continuous cleanup, and workspace isolation. ## Steps diff --git a/skill/Reins/Workflows/Scaffold.md b/skill/Reins/Workflows/Scaffold.md index 6e0b05a..648d76d 100644 --- a/skill/Reins/Workflows/Scaffold.md +++ b/skill/Reins/Workflows/Scaffold.md @@ -32,13 +32,16 @@ Use Reins before manual scaffolding: "docs/design-docs/index.md", "docs/design-docs/core-beliefs.md", "docs/product-specs/index.md", - "docs/exec-plans/tech-debt-tracker.md" + "docs/exec-plans/tech-debt-tracker.md", + "WORKFLOW.md", + "SPEC.md" ], "next_steps": [ "Edit AGENTS.md — fill in the project description", "Edit ARCHITECTURE.md — define your business domains", "Review risk-policy.json — set tiers and docs drift rules for your repo", "Edit docs/golden-principles.md — customize rules for your project", + "Review WORKFLOW.md — customize agent behavior and orchestration settings", "Run 'reins audit .' to see your starting score" ] }