@kal-elsam/kairo-runtime 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +937 -0
- package/bin/harness.js +11 -0
- package/bin/kairo-runtime.js +11 -0
- package/bin/kairo.js +11 -0
- package/global-template/components/catalog.json +25 -0
- package/global-template/components/orchestrator/orchestrator.md +55 -0
- package/global-template/components/sdd-core/handoff.md +38 -0
- package/global-template/components/sdd-core/spec-sizing.md +38 -0
- package/global-template/components/sdd-core/workflow.md +31 -0
- package/global-template/core/orchestrator.md +55 -0
- package/package.json +64 -0
- package/prompts/HARNESS_ENFORCEMENT_UPGRADE.md +11 -0
- package/prompts/HARNESS_ENTERPRISE.md +33 -0
- package/prompts/HARNESS_INSTALLER_MASTER.md +853 -0
- package/prompts/HARNESS_MINIMAL.md +30 -0
- package/prompts/HARNESS_SPEC_SIZING_UPGRADE.md +41 -0
- package/prompts/HARNESS_STANDARD.md +35 -0
- package/prompts/HARNESS_UNIVERSAL_PARITY.md +56 -0
- package/repo-template/.claude/agents/adapter-parity-reviewer.md +17 -0
- package/repo-template/.claude/agents/architect.md +17 -0
- package/repo-template/.claude/agents/eval-engineer.md +17 -0
- package/repo-template/.claude/agents/reviewer.md +17 -0
- package/repo-template/.claude/agents/sdd-reviewer.md +17 -0
- package/repo-template/.claude/agents/sdd-spec-writer.md +17 -0
- package/repo-template/.claude/skills/checkpoint/SKILL.md +13 -0
- package/repo-template/.claude/skills/eval-design/SKILL.md +3 -0
- package/repo-template/.claude/skills/evals/SKILL.md +13 -0
- package/repo-template/.claude/skills/loop-engineering/SKILL.md +16 -0
- package/repo-template/.claude/skills/maintainability-review/SKILL.md +3 -0
- package/repo-template/.claude/skills/quality-gate-review/SKILL.md +3 -0
- package/repo-template/.claude/skills/sdd/SKILL.md +13 -0
- package/repo-template/.claude/skills/spec-complexity-classifier/SKILL.md +10 -0
- package/repo-template/.claude/skills/spec-escalation-review/SKILL.md +10 -0
- package/repo-template/.claude/skills/spec-intake/SKILL.md +10 -0
- package/repo-template/.claude/skills/tdd/SKILL.md +13 -0
- package/repo-template/.claude/skills/trust-review/SKILL.md +3 -0
- package/repo-template/.codex/skills/adapter-parity/SKILL.md +29 -0
- package/repo-template/.codex/skills/checkpoint/SKILL.md +36 -0
- package/repo-template/.codex/skills/eval-design/SKILL.md +3 -0
- package/repo-template/.codex/skills/evals/SKILL.md +28 -0
- package/repo-template/.codex/skills/loop-engineering/SKILL.md +24 -0
- package/repo-template/.codex/skills/maintainability-review/SKILL.md +3 -0
- package/repo-template/.codex/skills/quality-gate-review/SKILL.md +3 -0
- package/repo-template/.codex/skills/sdd/SKILL.md +30 -0
- package/repo-template/.codex/skills/spec-complexity-classifier/SKILL.md +10 -0
- package/repo-template/.codex/skills/spec-escalation-review/SKILL.md +10 -0
- package/repo-template/.codex/skills/spec-intake/SKILL.md +10 -0
- package/repo-template/.codex/skills/tdd/SKILL.md +27 -0
- package/repo-template/.codex/skills/trust-review/SKILL.md +3 -0
- package/repo-template/.cursor/agents/adapter-parity-reviewer.md +29 -0
- package/repo-template/.cursor/agents/architect.md +27 -0
- package/repo-template/.cursor/agents/context-engineer.md +27 -0
- package/repo-template/.cursor/agents/debugger.md +27 -0
- package/repo-template/.cursor/agents/eval-engineer.md +27 -0
- package/repo-template/.cursor/agents/harness-orchestrator.md +27 -0
- package/repo-template/.cursor/agents/loop-controller.md +17 -0
- package/repo-template/.cursor/agents/loop-debugger.md +16 -0
- package/repo-template/.cursor/agents/reviewer.md +27 -0
- package/repo-template/.cursor/agents/sdd/sdd-acceptance-reviewer.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-implementation-guardian.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-intake-analyst.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-orchestrator.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-spec-reviewer.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-spec-writer.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-task-breakdown.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-technical-planner.md +31 -0
- package/repo-template/.cursor/agents/sdd/sdd-test-planner.md +31 -0
- package/repo-template/.cursor/agents/spec-intake-analyst.md +14 -0
- package/repo-template/.cursor/agents/test-engineer.md +27 -0
- package/repo-template/.cursor/commands/adapter-parity.md +34 -0
- package/repo-template/.cursor/commands/checkpoint.md +30 -0
- package/repo-template/.cursor/commands/debug.md +13 -0
- package/repo-template/.cursor/commands/init-eval.md +12 -0
- package/repo-template/.cursor/commands/init-feature.md +12 -0
- package/repo-template/.cursor/commands/init-harness.md +13 -0
- package/repo-template/.cursor/commands/loop-debug.md +3 -0
- package/repo-template/.cursor/commands/loop-review.md +3 -0
- package/repo-template/.cursor/commands/loop-run.md +5 -0
- package/repo-template/.cursor/commands/review.md +21 -0
- package/repo-template/.cursor/commands/sdd-intake.md +18 -0
- package/repo-template/.cursor/commands/sdd-plan.md +18 -0
- package/repo-template/.cursor/commands/sdd-spec.md +18 -0
- package/repo-template/.cursor/commands/sdd-tasks.md +18 -0
- package/repo-template/.cursor/commands/sdd-validate.md +18 -0
- package/repo-template/.cursor/commands/spec-escalate.md +9 -0
- package/repo-template/.cursor/commands/spec-intake.md +10 -0
- package/repo-template/.cursor/commands/spec-size.md +21 -0
- package/repo-template/.cursor/rules/adapter-parity.mdc +20 -0
- package/repo-template/.cursor/rules/api.mdc +12 -0
- package/repo-template/.cursor/rules/core.mdc +21 -0
- package/repo-template/.cursor/rules/enforcement.mdc +16 -0
- package/repo-template/.cursor/rules/evals.mdc +10 -0
- package/repo-template/.cursor/rules/git.mdc +19 -0
- package/repo-template/.cursor/rules/harness.mdc +14 -0
- package/repo-template/.cursor/rules/loops.mdc +17 -0
- package/repo-template/.cursor/rules/testing.mdc +13 -0
- package/repo-template/.cursor/rules/ui.mdc +13 -0
- package/repo-template/.cursor/skills/api-design/SKILL.md +23 -0
- package/repo-template/.cursor/skills/architecture/SKILL.md +23 -0
- package/repo-template/.cursor/skills/code-review/SKILL.md +23 -0
- package/repo-template/.cursor/skills/context-graph/SKILL.md +23 -0
- package/repo-template/.cursor/skills/debugging/SKILL.md +23 -0
- package/repo-template/.cursor/skills/evals/SKILL.md +23 -0
- package/repo-template/.cursor/skills/git-workflow/SKILL.md +23 -0
- package/repo-template/.cursor/skills/testing/SKILL.md +23 -0
- package/repo-template/.cursor/skills/ui-design/SKILL.md +23 -0
- package/repo-template/.gentle-ai/README.md +37 -0
- package/repo-template/.gentle-ai/loops/README.md +27 -0
- package/repo-template/.gentle-ai/loops/sdd-tdd-repair.loop.md +27 -0
- package/repo-template/.gentle-ai/model-routing.md +25 -0
- package/repo-template/.github/copilot-instructions.md +37 -0
- package/repo-template/.github/dependabot.yml +11 -0
- package/repo-template/.github/instructions/harness.instructions.md +11 -0
- package/repo-template/.github/workflows/harness-quality-gate.yml +67 -0
- package/repo-template/.github/workflows/harness-security-gate.yml +32 -0
- package/repo-template/.harness/spec-sizing.json +33 -0
- package/repo-template/.opencode/README.md +71 -0
- package/repo-template/.opencode/agents/adapter-parity-reviewer.md +23 -0
- package/repo-template/.opencode/agents/architect.md +38 -0
- package/repo-template/.opencode/agents/checkpoint-reviewer.md +38 -0
- package/repo-template/.opencode/agents/eval-engineer.md +38 -0
- package/repo-template/.opencode/agents/loop-controller.md +38 -0
- package/repo-template/.opencode/agents/loop-debugger.md +38 -0
- package/repo-template/.opencode/agents/model-router.md +38 -0
- package/repo-template/.opencode/agents/sdd-orchestrator.md +38 -0
- package/repo-template/.opencode/agents/sdd-spec-reviewer.md +38 -0
- package/repo-template/.opencode/agents/spec-intake-analyst.md +19 -0
- package/repo-template/.opencode/agents/tdd-engineer.md +38 -0
- package/repo-template/.opencode/commands/checkpoint.md +3 -0
- package/repo-template/.opencode/commands/eval-design.md +3 -0
- package/repo-template/.opencode/commands/maintainability-review.md +3 -0
- package/repo-template/.opencode/commands/quality-gate.md +3 -0
- package/repo-template/.opencode/commands/spec-escalate.md +9 -0
- package/repo-template/.opencode/commands/spec-intake.md +10 -0
- package/repo-template/.opencode/commands/spec-size.md +21 -0
- package/repo-template/.opencode/commands/trust-review.md +3 -0
- package/repo-template/.opencode/loops/ai-behavior-improvement.loop.md +15 -0
- package/repo-template/.opencode/loops/bug-repair.loop.md +16 -0
- package/repo-template/.opencode/loops/documentation-sync.loop.md +13 -0
- package/repo-template/.opencode/loops/feature-development.loop.md +25 -0
- package/repo-template/.opencode/skills/spec-complexity-classifier/SKILL.md +10 -0
- package/repo-template/.opencode/skills/spec-escalation-review/SKILL.md +10 -0
- package/repo-template/.opencode/skills/spec-intake/SKILL.md +10 -0
- package/repo-template/.pi/README.md +21 -0
- package/repo-template/.pi/prompts/checkpoint.md +11 -0
- package/repo-template/.pi/prompts/loop-run.md +10 -0
- package/repo-template/.pi/prompts/sdd-plan.md +11 -0
- package/repo-template/.pi/prompts/sdd-spec.md +13 -0
- package/repo-template/.pi/prompts/spec-escalate.md +9 -0
- package/repo-template/.pi/prompts/spec-intake.md +10 -0
- package/repo-template/.pi/prompts/spec-size.md +21 -0
- package/repo-template/.pi/skills/adapter-parity/SKILL.md +7 -0
- package/repo-template/.pi/skills/checkpoint/SKILL.md +7 -0
- package/repo-template/.pi/skills/eval-design/SKILL.md +3 -0
- package/repo-template/.pi/skills/evals/SKILL.md +7 -0
- package/repo-template/.pi/skills/loop-engineering/SKILL.md +7 -0
- package/repo-template/.pi/skills/maintainability-review/SKILL.md +3 -0
- package/repo-template/.pi/skills/quality-gate-review/SKILL.md +3 -0
- package/repo-template/.pi/skills/sdd/SKILL.md +7 -0
- package/repo-template/.pi/skills/spec-complexity-classifier/SKILL.md +10 -0
- package/repo-template/.pi/skills/spec-escalation-review/SKILL.md +10 -0
- package/repo-template/.pi/skills/spec-intake/SKILL.md +10 -0
- package/repo-template/.pi/skills/tdd/SKILL.md +7 -0
- package/repo-template/.pi/skills/trust-review/SKILL.md +3 -0
- package/repo-template/AGENT.md +8 -0
- package/repo-template/AGENTS.md +165 -0
- package/repo-template/CLAUDE.md +9 -0
- package/repo-template/GEMINI.md +9 -0
- package/repo-template/docs/ai/adapter-parity.md +135 -0
- package/repo-template/docs/ai/agent-workflow.md +45 -0
- package/repo-template/docs/ai/api.md +28 -0
- package/repo-template/docs/ai/architecture.md +53 -0
- package/repo-template/docs/ai/context-budget.md +54 -0
- package/repo-template/docs/ai/context-graph.md +39 -0
- package/repo-template/docs/ai/conventions.md +34 -0
- package/repo-template/docs/ai/decision-log.md +5 -0
- package/repo-template/docs/ai/enforcement.md +63 -0
- package/repo-template/docs/ai/eval-strategy.md +42 -0
- package/repo-template/docs/ai/evals.md +44 -0
- package/repo-template/docs/ai/git-workflow.md +35 -0
- package/repo-template/docs/ai/governance.md +61 -0
- package/repo-template/docs/ai/harness.md +49 -0
- package/repo-template/docs/ai/installer-cli.md +34 -0
- package/repo-template/docs/ai/loop-log.md +5 -0
- package/repo-template/docs/ai/loop-observability.md +57 -0
- package/repo-template/docs/ai/loop-policy.md +86 -0
- package/repo-template/docs/ai/loops.md +95 -0
- package/repo-template/docs/ai/maintainability-gates.md +26 -0
- package/repo-template/docs/ai/memory.md +71 -0
- package/repo-template/docs/ai/model-policy.md +105 -0
- package/repo-template/docs/ai/observability-runtime.md +48 -0
- package/repo-template/docs/ai/provider-routing.md +138 -0
- package/repo-template/docs/ai/quality-gates.md +48 -0
- package/repo-template/docs/ai/rollback-runtime.md +25 -0
- package/repo-template/docs/ai/security.md +12 -0
- package/repo-template/docs/ai/spec-driven-development.md +124 -0
- package/repo-template/docs/ai/spec-escalation.md +44 -0
- package/repo-template/docs/ai/spec-intake.md +46 -0
- package/repo-template/docs/ai/spec-sizing.md +207 -0
- package/repo-template/docs/ai/test-driven-development.md +35 -0
- package/repo-template/docs/ai/testing.md +28 -0
- package/repo-template/docs/ai/tool-adapters.md +186 -0
- package/repo-template/docs/ai/trust-allowlist.md +5 -0
- package/repo-template/docs/ai/trust-policy.md +41 -0
- package/repo-template/docs/ai/ui.md +17 -0
- package/repo-template/docs/skills/adapter-parity-review.md +46 -0
- package/repo-template/docs/skills/api-design.md +37 -0
- package/repo-template/docs/skills/architecture.md +37 -0
- package/repo-template/docs/skills/code-review.md +37 -0
- package/repo-template/docs/skills/context-graph.md +38 -0
- package/repo-template/docs/skills/debugging.md +37 -0
- package/repo-template/docs/skills/eval-design.md +12 -0
- package/repo-template/docs/skills/evals.md +37 -0
- package/repo-template/docs/skills/git-workflow.md +37 -0
- package/repo-template/docs/skills/look-trust-review.md +12 -0
- package/repo-template/docs/skills/loop-debugging.md +16 -0
- package/repo-template/docs/skills/loop-design.md +39 -0
- package/repo-template/docs/skills/loop-retrospective.md +15 -0
- package/repo-template/docs/skills/loop-review.md +16 -0
- package/repo-template/docs/skills/maintainability-review.md +12 -0
- package/repo-template/docs/skills/model-selection.md +36 -0
- package/repo-template/docs/skills/quality-gate-review.md +12 -0
- package/repo-template/docs/skills/spec-complexity-classifier.md +41 -0
- package/repo-template/docs/skills/spec-escalation-review.md +34 -0
- package/repo-template/docs/skills/spec-intake.md +25 -0
- package/repo-template/docs/skills/testing.md +37 -0
- package/repo-template/docs/skills/tool-adapter-sync.md +36 -0
- package/repo-template/docs/skills/ui-design.md +37 -0
- package/repo-template/docs/specs/README.md +9 -0
- package/repo-template/docs/specs/templates/basic-spec.md +41 -0
- package/repo-template/docs/specs/templates/complex-spec.md +145 -0
- package/repo-template/docs/specs/templates/standard-spec.md +58 -0
- package/repo-template/evals/README.md +11 -0
- package/repo-template/evals/golden/sample-golden.json +12 -0
- package/repo-template/evals/loop-regression/README.md +11 -0
- package/repo-template/evals/regression/sample-regression.json +12 -0
- package/repo-template/evals/schema/sample-schema.json +12 -0
- package/repo-template/evals/tool-calls/sample-tool-calls.json +12 -0
- package/repo-template/opencode.json.sample +29 -0
- package/repo-template/scripts/harness/backup.mjs +7 -0
- package/repo-template/scripts/harness/doctor.mjs +20 -0
- package/repo-template/scripts/harness/run-evals.mjs +27 -0
- package/repo-template/setup-agent-links.sh +54 -0
- package/scripts/check-published-release.mjs +127 -0
- package/scripts/check-release-commit.mjs +32 -0
- package/scripts/install.sh +225 -0
- package/scripts/installer-smoke-test.sh +155 -0
- package/scripts/lib/attribution-guard.mjs +59 -0
- package/scripts/registry-smoke-test.sh +149 -0
- package/scripts/smoke-test.sh +197 -0
- package/scripts/ux-smoke-test.sh +140 -0
- package/src/cli.js +625 -0
- package/src/doctor.js +68 -0
- package/src/global/adapter-context.js +27 -0
- package/src/global/adapter-matrix.js +38 -0
- package/src/global/adapters/claude.js +8 -0
- package/src/global/adapters/codex.js +8 -0
- package/src/global/adapters/cursor.js +8 -0
- package/src/global/adapters/opencode.js +8 -0
- package/src/global/agents.js +7 -0
- package/src/global/apply-confirmation.js +62 -0
- package/src/global/backups.js +54 -0
- package/src/global/brand/cli.js +52 -0
- package/src/global/brand/index.js +85 -0
- package/src/global/clack/setup-preview.js +48 -0
- package/src/global/clack/setup-wizard-constants.js +6 -0
- package/src/global/clack/setup-wizard.js +207 -0
- package/src/global/clack/theme.js +145 -0
- package/src/global/component-authoring.js +121 -0
- package/src/global/component-builders.js +43 -0
- package/src/global/component-distribution.js +270 -0
- package/src/global/component-installer.js +106 -0
- package/src/global/component-paths.js +22 -0
- package/src/global/component-registry.js +89 -0
- package/src/global/components/orchestrator.js +14 -0
- package/src/global/components/sdd-core.js +17 -0
- package/src/global/diff.js +233 -0
- package/src/global/drift.js +264 -0
- package/src/global/explain.js +144 -0
- package/src/global/global-cli.js +1145 -0
- package/src/global/global-doctor.js +67 -0
- package/src/global/global-installer.js +284 -0
- package/src/global/history.js +313 -0
- package/src/global/ink/run-setup-ink.js +77 -0
- package/src/global/ink/setup-app.js +278 -0
- package/src/global/ink/setup-routing.js +51 -0
- package/src/global/ink/setup-state.js +180 -0
- package/src/global/ink/terminal.js +13 -0
- package/src/global/json-output.js +22 -0
- package/src/global/load-component-catalog.js +41 -0
- package/src/global/load-workspace-component-catalog.js +123 -0
- package/src/global/managed-body.js +28 -0
- package/src/global/managed-config-adapter.js +134 -0
- package/src/global/managed-section.js +73 -0
- package/src/global/npm-registry.js +25 -0
- package/src/global/paths.js +22 -0
- package/src/global/policy.js +344 -0
- package/src/global/preflight.js +65 -0
- package/src/global/registry.js +79 -0
- package/src/global/report.js +110 -0
- package/src/global/rollback.js +126 -0
- package/src/global/setup.js +284 -0
- package/src/global/state-migration.js +65 -0
- package/src/global/state.js +50 -0
- package/src/global/status.js +94 -0
- package/src/global/sync.js +129 -0
- package/src/global/upgrade.js +145 -0
- package/src/harness-files.js +145 -0
- package/src/harness-updater.js +120 -0
- package/src/hash.js +5 -0
- package/src/manifest.js +36 -0
- package/src/project-detection.js +105 -0
- package/src/template-installer.js +72 -0
- package/src/text-template.js +24 -0
- package/src/workspace-cli.js +115 -0
package/bin/harness.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { runCli } from "../src/cli.js";
|
|
5
|
+
|
|
6
|
+
const cliName = basename(process.argv[1] ?? "harness");
|
|
7
|
+
|
|
8
|
+
runCli(process.argv.slice(2)).catch((error) => {
|
|
9
|
+
console.error(`${cliName}: ${error.message}`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { runCli } from "../src/cli.js";
|
|
5
|
+
|
|
6
|
+
const cliName = basename(process.argv[1] ?? "kairo-runtime");
|
|
7
|
+
|
|
8
|
+
runCli(process.argv.slice(2)).catch((error) => {
|
|
9
|
+
console.error(`${cliName}: ${error.message}`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
});
|
package/bin/kairo.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { runCli } from "../src/cli.js";
|
|
5
|
+
|
|
6
|
+
const cliName = basename(process.argv[1] ?? "kairo");
|
|
7
|
+
|
|
8
|
+
runCli(process.argv.slice(2)).catch((error) => {
|
|
9
|
+
console.error(`${cliName}: ${error.message}`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"id": "orchestrator",
|
|
5
|
+
"label": "Orchestrator",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"defaultEnabled": true,
|
|
8
|
+
"assetFiles": ["orchestrator.md"],
|
|
9
|
+
"adapterHints": {}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "sdd-core",
|
|
13
|
+
"label": "SDD Core",
|
|
14
|
+
"version": "1.0.0",
|
|
15
|
+
"defaultEnabled": true,
|
|
16
|
+
"assetFiles": ["workflow.md", "spec-sizing.md", "handoff.md"],
|
|
17
|
+
"adapterHints": {
|
|
18
|
+
"cursor": "- In repos with workspace harness: also read `.cursor/rules/` and `docs/specs/`.",
|
|
19
|
+
"codex": "- In repos with workspace harness: also read `.codex/skills/sdd/` when present.",
|
|
20
|
+
"claude": "- In repos with workspace harness: repo `AGENTS.md` wins over `CLAUDE.md` pointers.",
|
|
21
|
+
"opencode": "- In repos with workspace harness: also read `.opencode/` SDD assets when present."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Harness Orchestrator Contract
|
|
2
|
+
|
|
3
|
+
> Managed by `@kal-elsam/harness` component `orchestrator`.
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
The Harness Orchestrator (conductor) coordinates work across local coding agents
|
|
8
|
+
(Cursor, Codex, OpenCode, Claude). It does not replace any agent. It defines how
|
|
9
|
+
agents hand off work and which source of truth governs.
|
|
10
|
+
|
|
11
|
+
## Authority order
|
|
12
|
+
|
|
13
|
+
```txt
|
|
14
|
+
1. Current user instruction
|
|
15
|
+
2. Repository AGENTS.md (when working inside a repo)
|
|
16
|
+
3. Repository docs/ai/
|
|
17
|
+
4. This orchestrator contract
|
|
18
|
+
5. Agent-specific config
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
No agent is governance-primary. The repository governs when one exists.
|
|
22
|
+
|
|
23
|
+
## Conductor loop
|
|
24
|
+
|
|
25
|
+
```txt
|
|
26
|
+
Intake → Classify → Spec (if needed) → Plan → Execute → Validate → Review → Human approval
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Rules:
|
|
30
|
+
|
|
31
|
+
- No autonomous loop without boundaries.
|
|
32
|
+
- No repair loop without max attempts.
|
|
33
|
+
- No critical change without human approval.
|
|
34
|
+
- No success claim while the pipeline fails.
|
|
35
|
+
|
|
36
|
+
## Handoff contract
|
|
37
|
+
|
|
38
|
+
Every agent handing off work must state:
|
|
39
|
+
|
|
40
|
+
- context read
|
|
41
|
+
- files analyzed
|
|
42
|
+
- decision taken
|
|
43
|
+
- risks
|
|
44
|
+
- suggested next action
|
|
45
|
+
|
|
46
|
+
## Managed state
|
|
47
|
+
|
|
48
|
+
```txt
|
|
49
|
+
~/.harness/state.json installed agents, components, backups
|
|
50
|
+
~/.harness/components/ component contracts (orchestrator, sdd-core, ...)
|
|
51
|
+
~/.harness/backups/ pre-change snapshots of agent configs
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Run `harness doctor` to verify ecosystem health.
|
|
55
|
+
Run `harness sync` to refresh managed content without touching user-owned sections.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Handoff Expectations
|
|
2
|
+
|
|
3
|
+
> Managed by `@kal-elsam/harness` component `sdd-core`.
|
|
4
|
+
|
|
5
|
+
Every agent handing off work must include:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
context read
|
|
9
|
+
files analyzed
|
|
10
|
+
decision taken
|
|
11
|
+
risks
|
|
12
|
+
suggested next action
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Spec handoff
|
|
16
|
+
|
|
17
|
+
When handing off after spec work, also include:
|
|
18
|
+
|
|
19
|
+
```txt
|
|
20
|
+
spec level (basic | standard | complex)
|
|
21
|
+
spec path or summary
|
|
22
|
+
open questions
|
|
23
|
+
acceptance criteria
|
|
24
|
+
validation plan
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Implementation handoff
|
|
28
|
+
|
|
29
|
+
When handing off after implementation, also include:
|
|
30
|
+
|
|
31
|
+
```txt
|
|
32
|
+
tests run
|
|
33
|
+
pipeline status
|
|
34
|
+
remaining risks
|
|
35
|
+
rollback notes
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Human approval is required for critical or architectural impact.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Spec Sizing Rules
|
|
2
|
+
|
|
3
|
+
> Managed by `@kal-elsam/harness` component `sdd-core`.
|
|
4
|
+
|
|
5
|
+
## Levels
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
basic → low-risk, localized, well-understood work
|
|
9
|
+
standard → normal product/engineering changes
|
|
10
|
+
complex → architecture, security, data, AI behavior, or high blast radius
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Classification heuristics
|
|
14
|
+
|
|
15
|
+
```txt
|
|
16
|
+
0-3 points → basic
|
|
17
|
+
4-7 points → standard
|
|
18
|
+
8+ points → complex
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Score upward when the task touches architecture, API contracts, database schema,
|
|
22
|
+
auth/security, payments, AI behavior, migrations, or multiple modules.
|
|
23
|
+
|
|
24
|
+
## Anti-patterns
|
|
25
|
+
|
|
26
|
+
```txt
|
|
27
|
+
Over-specification: complex SDD for a one-line copy change.
|
|
28
|
+
Under-specification: basic spec for auth, billing, or schema migrations.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Escalation triggers
|
|
32
|
+
|
|
33
|
+
Upgrade the spec level when:
|
|
34
|
+
|
|
35
|
+
- scope grows after planning
|
|
36
|
+
- new integrations appear
|
|
37
|
+
- rollback is non-trivial
|
|
38
|
+
- tests cannot be defined clearly at the current level
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SDD Workflow Contract
|
|
2
|
+
|
|
3
|
+
> Managed by `@kal-elsam/harness` component `sdd-core`.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
Every non-trivial change follows:
|
|
8
|
+
|
|
9
|
+
```txt
|
|
10
|
+
Requirement → Classify → Spec → Plan → Tests failing first → Implement → Validate → Review → Human approval
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
|
|
15
|
+
- No significant feature without a spec.
|
|
16
|
+
- No bug fix without a regression test that fails first.
|
|
17
|
+
- No success claim while the pipeline fails.
|
|
18
|
+
- Escalate spec level when risk, ambiguity, or blast radius increases.
|
|
19
|
+
- Inside a repository, repo `AGENTS.md` and `docs/ai/` govern over this global contract.
|
|
20
|
+
|
|
21
|
+
## Repository override
|
|
22
|
+
|
|
23
|
+
When working inside a project with harness workspace assets, prefer:
|
|
24
|
+
|
|
25
|
+
```txt
|
|
26
|
+
docs/ai/spec-driven-development.md
|
|
27
|
+
docs/ai/spec-sizing.md
|
|
28
|
+
docs/specs/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This global contract is the fallback when no repository harness is present.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Harness Orchestrator Contract
|
|
2
|
+
|
|
3
|
+
> Managed by `@kal-elsam/harness`. Source of truth for cross-agent orchestration.
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
The Harness Orchestrator (conductor) coordinates work across local coding agents
|
|
8
|
+
(Cursor, Codex, OpenCode, Claude). It does not replace any agent. It defines how
|
|
9
|
+
agents hand off work and which source of truth governs.
|
|
10
|
+
|
|
11
|
+
## Authority order
|
|
12
|
+
|
|
13
|
+
```txt
|
|
14
|
+
1. Current user instruction
|
|
15
|
+
2. Repository AGENTS.md (when working inside a repo)
|
|
16
|
+
3. Repository docs/ai/
|
|
17
|
+
4. This orchestrator contract
|
|
18
|
+
5. Agent-specific config
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
No agent is governance-primary. The repository governs when one exists.
|
|
22
|
+
|
|
23
|
+
## Conductor loop
|
|
24
|
+
|
|
25
|
+
```txt
|
|
26
|
+
Intake → Classify → Spec (if needed) → Plan → Execute → Validate → Review → Human approval
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Rules:
|
|
30
|
+
|
|
31
|
+
- No autonomous loop without boundaries.
|
|
32
|
+
- No repair loop without max attempts.
|
|
33
|
+
- No critical change without human approval.
|
|
34
|
+
- No success claim while the pipeline fails.
|
|
35
|
+
|
|
36
|
+
## Handoff contract
|
|
37
|
+
|
|
38
|
+
Every agent handing off work must state:
|
|
39
|
+
|
|
40
|
+
- context read
|
|
41
|
+
- files analyzed
|
|
42
|
+
- decision taken
|
|
43
|
+
- risks
|
|
44
|
+
- suggested next action
|
|
45
|
+
|
|
46
|
+
## Managed state
|
|
47
|
+
|
|
48
|
+
```txt
|
|
49
|
+
~/.harness/state.json installed agents, core files, backups
|
|
50
|
+
~/.harness/core/ orchestrator/core contracts (this file)
|
|
51
|
+
~/.harness/backups/ pre-change snapshots of agent configs
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Run `harness doctor` to verify ecosystem health.
|
|
55
|
+
Run `harness sync` to refresh managed content without touching user-owned sections.
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kal-elsam/kairo-runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Kairo Runtime — local agent operating system for Codex, Cursor, Claude, Gemini, Copilot, Engram, and Graphify.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://github.com/Kal-elSam/harness#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Kal-elSam/harness.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Kal-elSam/harness/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"kairo": "./bin/kairo.js",
|
|
16
|
+
"kairo-runtime": "./bin/kairo-runtime.js",
|
|
17
|
+
"harness": "./bin/harness.js",
|
|
18
|
+
"agentic-harness": "./bin/harness.js",
|
|
19
|
+
"sgs-harness": "./bin/harness.js",
|
|
20
|
+
"harness-sgs": "./bin/harness.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin",
|
|
24
|
+
"src",
|
|
25
|
+
"scripts",
|
|
26
|
+
"repo-template",
|
|
27
|
+
"global-template",
|
|
28
|
+
"prompts",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test": "node --test",
|
|
33
|
+
"doctor": "node ./bin/kairo.js doctor",
|
|
34
|
+
"smoke": "bash scripts/smoke-test.sh",
|
|
35
|
+
"ux:smoke": "bash scripts/ux-smoke-test.sh",
|
|
36
|
+
"smoke:registry": "bash scripts/registry-smoke-test.sh",
|
|
37
|
+
"smoke:installer": "bash scripts/installer-smoke-test.sh",
|
|
38
|
+
"release:check": "node scripts/check-release-commit.mjs",
|
|
39
|
+
"release:published": "node scripts/check-published-release.mjs"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"ai",
|
|
43
|
+
"agents",
|
|
44
|
+
"codex",
|
|
45
|
+
"cursor",
|
|
46
|
+
"kairo",
|
|
47
|
+
"kairo-runtime",
|
|
48
|
+
"harness",
|
|
49
|
+
"sdd",
|
|
50
|
+
"tdd"
|
|
51
|
+
],
|
|
52
|
+
"license": "UNLICENSED",
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=20.12.0"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@clack/prompts": "^1.7.0",
|
|
61
|
+
"ink": "^5.2.1",
|
|
62
|
+
"react": "^18.3.1"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Harness Enforcement Upgrade
|
|
2
|
+
|
|
3
|
+
Use this prompt to upgrade an existing harness from methodology-first to enforcement-first.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Add executable quality controls, trust policy, evals and lifecycle automation.
|
|
8
|
+
|
|
9
|
+
## Rule
|
|
10
|
+
|
|
11
|
+
Do not overwrite existing project-specific CI without merging. Keep adapters as translation layers and `AGENTS.md` as governance-primary.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Harness Installer — Enterprise Mode
|
|
2
|
+
|
|
3
|
+
Instala un harness enterprise para productos serios, IA, agentes, DB, API, auth, colas o integraciones externas.
|
|
4
|
+
|
|
5
|
+
Crea:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
AGENTS.md
|
|
9
|
+
AGENT.md
|
|
10
|
+
docs/ai/
|
|
11
|
+
docs/skills/
|
|
12
|
+
docs/specs/
|
|
13
|
+
evals/
|
|
14
|
+
.cursor/rules/
|
|
15
|
+
.cursor/commands/
|
|
16
|
+
.cursor/agents/
|
|
17
|
+
.cursor/skills/
|
|
18
|
+
setup-agent-links.sh
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Debe incluir SDD, TDD, AI evals, context budget, security, memory, context graph, Gentle AI, Engram y Graphify.
|
|
22
|
+
|
|
23
|
+
Flujo obligatorio:
|
|
24
|
+
|
|
25
|
+
```txt
|
|
26
|
+
INTAKE → SPEC → PLAN → TEST_FIRST → IMPLEMENT → VALIDATE → REVIEW → APPROVAL → CHECKPOINT
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Para sistemas IA:
|
|
30
|
+
|
|
31
|
+
```txt
|
|
32
|
+
Spec + Tests + Evals + Observability
|
|
33
|
+
```
|