@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# UI Design
|
|
2
|
+
|
|
3
|
+
## Cuándo usar
|
|
4
|
+
|
|
5
|
+
Creación o modificación de UI.
|
|
6
|
+
|
|
7
|
+
## Fuente de verdad
|
|
8
|
+
|
|
9
|
+
`docs/ai/ui.md`
|
|
10
|
+
|
|
11
|
+
## Procedimiento
|
|
12
|
+
|
|
13
|
+
1. Leer fuente de verdad.
|
|
14
|
+
2. Identificar alcance.
|
|
15
|
+
3. Crear/actualizar spec si el cambio no es trivial.
|
|
16
|
+
4. Crear test/eval si cambia comportamiento.
|
|
17
|
+
5. Implementar solo el scope necesario.
|
|
18
|
+
6. Validar pipeline.
|
|
19
|
+
7. Reportar riesgos y cambios.
|
|
20
|
+
|
|
21
|
+
## Checklist
|
|
22
|
+
|
|
23
|
+
- [ ] Contexto mínimo leído
|
|
24
|
+
- [ ] Scope claro
|
|
25
|
+
- [ ] Tests/evals aplican o se justifica omisión
|
|
26
|
+
- [ ] Pipeline validado
|
|
27
|
+
- [ ] Riesgos reportados
|
|
28
|
+
|
|
29
|
+
## Output esperado
|
|
30
|
+
|
|
31
|
+
```txt
|
|
32
|
+
Contexto leído:
|
|
33
|
+
Cambios realizados:
|
|
34
|
+
Validación:
|
|
35
|
+
Riesgos:
|
|
36
|
+
Siguiente acción:
|
|
37
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Basic Spec: [Feature or Task Name]
|
|
2
|
+
|
|
3
|
+
## Spec level
|
|
4
|
+
|
|
5
|
+
```txt
|
|
6
|
+
basic
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
[What needs to change?]
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
[What is included?]
|
|
16
|
+
|
|
17
|
+
## Non-scope
|
|
18
|
+
|
|
19
|
+
[What should not change?]
|
|
20
|
+
|
|
21
|
+
## Files likely affected
|
|
22
|
+
|
|
23
|
+
```txt
|
|
24
|
+
- [file/module]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Acceptance criteria
|
|
28
|
+
|
|
29
|
+
- [ ] [Expected behavior]
|
|
30
|
+
- [ ] [No regression]
|
|
31
|
+
|
|
32
|
+
## Validation
|
|
33
|
+
|
|
34
|
+
```txt
|
|
35
|
+
Command(s):
|
|
36
|
+
Manual check:
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
|
|
41
|
+
[Any relevant context]
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Complex Spec: [Initiative Name]
|
|
2
|
+
|
|
3
|
+
## Spec level
|
|
4
|
+
|
|
5
|
+
```txt
|
|
6
|
+
complex
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
[Background and current state.]
|
|
12
|
+
|
|
13
|
+
## Problem
|
|
14
|
+
|
|
15
|
+
[What problem are we solving and why now?]
|
|
16
|
+
|
|
17
|
+
## Goals
|
|
18
|
+
|
|
19
|
+
- [Goal]
|
|
20
|
+
|
|
21
|
+
## Non-goals
|
|
22
|
+
|
|
23
|
+
- [Non-goal]
|
|
24
|
+
|
|
25
|
+
## Stakeholders
|
|
26
|
+
|
|
27
|
+
- User/customer:
|
|
28
|
+
- Engineering:
|
|
29
|
+
- Product:
|
|
30
|
+
- Security/privacy:
|
|
31
|
+
- Operations:
|
|
32
|
+
|
|
33
|
+
## System boundaries
|
|
34
|
+
|
|
35
|
+
```txt
|
|
36
|
+
In scope:
|
|
37
|
+
Out of scope:
|
|
38
|
+
Affected systems:
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Current architecture
|
|
42
|
+
|
|
43
|
+
[Describe current design.]
|
|
44
|
+
|
|
45
|
+
## Proposed architecture
|
|
46
|
+
|
|
47
|
+
[Describe proposed design.]
|
|
48
|
+
|
|
49
|
+
## Alternatives considered
|
|
50
|
+
|
|
51
|
+
| Option | Pros | Cons | Decision |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| [A] | | | |
|
|
54
|
+
|
|
55
|
+
## ADR
|
|
56
|
+
|
|
57
|
+
```txt
|
|
58
|
+
ADR required: yes/no
|
|
59
|
+
ADR path:
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Data model / contracts
|
|
63
|
+
|
|
64
|
+
[DB schema, API contracts, events, external integrations.]
|
|
65
|
+
|
|
66
|
+
## Failure modes
|
|
67
|
+
|
|
68
|
+
| Failure mode | Detection | Mitigation |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| [failure] | [signal] | [action] |
|
|
71
|
+
|
|
72
|
+
## Security and privacy review
|
|
73
|
+
|
|
74
|
+
- [ ] Auth/authz impact reviewed
|
|
75
|
+
- [ ] Secrets impact reviewed
|
|
76
|
+
- [ ] PII/privacy impact reviewed
|
|
77
|
+
- [ ] Tool/MCP permissions reviewed
|
|
78
|
+
- [ ] Dependency trust reviewed
|
|
79
|
+
|
|
80
|
+
## Test strategy
|
|
81
|
+
|
|
82
|
+
- Unit:
|
|
83
|
+
- Integration:
|
|
84
|
+
- Contract:
|
|
85
|
+
- E2E:
|
|
86
|
+
- Load/performance if applicable:
|
|
87
|
+
|
|
88
|
+
## Eval strategy
|
|
89
|
+
|
|
90
|
+
Required if AI behavior, prompts, agents, tool calls or RAG are affected.
|
|
91
|
+
|
|
92
|
+
```txt
|
|
93
|
+
Eval set:
|
|
94
|
+
Critical cases:
|
|
95
|
+
Regression cases:
|
|
96
|
+
Pass threshold:
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Migration plan
|
|
100
|
+
|
|
101
|
+
[Steps, backwards compatibility, data safety.]
|
|
102
|
+
|
|
103
|
+
## Observability
|
|
104
|
+
|
|
105
|
+
[Logs, metrics, traces, dashboards, alerts.]
|
|
106
|
+
|
|
107
|
+
## Rollout plan
|
|
108
|
+
|
|
109
|
+
[Feature flag/canary/phased release.]
|
|
110
|
+
|
|
111
|
+
## Rollback plan
|
|
112
|
+
|
|
113
|
+
[Exact rollback steps.]
|
|
114
|
+
|
|
115
|
+
## Risk register
|
|
116
|
+
|
|
117
|
+
| Risk | Severity | Mitigation | Owner |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| [risk] | [low/med/high] | [mitigation] | [owner] |
|
|
120
|
+
|
|
121
|
+
## Human approvals
|
|
122
|
+
|
|
123
|
+
- [ ] Architecture
|
|
124
|
+
- [ ] Security
|
|
125
|
+
- [ ] Data
|
|
126
|
+
- [ ] Product
|
|
127
|
+
- [ ] Operations
|
|
128
|
+
|
|
129
|
+
## Acceptance criteria
|
|
130
|
+
|
|
131
|
+
- [ ] [Criterion]
|
|
132
|
+
|
|
133
|
+
## Implementation phases
|
|
134
|
+
|
|
135
|
+
### Phase 1
|
|
136
|
+
|
|
137
|
+
- [ ] [Task]
|
|
138
|
+
|
|
139
|
+
### Phase 2
|
|
140
|
+
|
|
141
|
+
- [ ] [Task]
|
|
142
|
+
|
|
143
|
+
### Phase 3
|
|
144
|
+
|
|
145
|
+
- [ ] [Task]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Standard Spec: [Feature Name]
|
|
2
|
+
|
|
3
|
+
## Spec level
|
|
4
|
+
|
|
5
|
+
```txt
|
|
6
|
+
standard
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
[What problem are we solving?]
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
[What should be true after this is done?]
|
|
16
|
+
|
|
17
|
+
## Non-goals
|
|
18
|
+
|
|
19
|
+
[What is explicitly out of scope?]
|
|
20
|
+
|
|
21
|
+
## User flow / system flow
|
|
22
|
+
|
|
23
|
+
[Describe the expected flow.]
|
|
24
|
+
|
|
25
|
+
## Scope
|
|
26
|
+
|
|
27
|
+
[What modules/components/endpoints are included?]
|
|
28
|
+
|
|
29
|
+
## Technical plan
|
|
30
|
+
|
|
31
|
+
1. [Step]
|
|
32
|
+
2. [Step]
|
|
33
|
+
3. [Step]
|
|
34
|
+
|
|
35
|
+
## Acceptance criteria
|
|
36
|
+
|
|
37
|
+
- [ ] [Criterion]
|
|
38
|
+
- [ ] [Criterion]
|
|
39
|
+
|
|
40
|
+
## Test plan
|
|
41
|
+
|
|
42
|
+
- Unit:
|
|
43
|
+
- Integration:
|
|
44
|
+
- E2E/manual:
|
|
45
|
+
|
|
46
|
+
## Risks
|
|
47
|
+
|
|
48
|
+
| Risk | Mitigation |
|
|
49
|
+
|---|---|
|
|
50
|
+
| [risk] | [mitigation] |
|
|
51
|
+
|
|
52
|
+
## Rollback
|
|
53
|
+
|
|
54
|
+
[How can this be reverted safely?]
|
|
55
|
+
|
|
56
|
+
## Open questions
|
|
57
|
+
|
|
58
|
+
- [Question]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Loop Regression Evals
|
|
2
|
+
|
|
3
|
+
Use this folder to test whether loops converge safely.
|
|
4
|
+
|
|
5
|
+
Recommended cases:
|
|
6
|
+
|
|
7
|
+
- repair loop stops after max attempts
|
|
8
|
+
- loop escalates when architecture is affected
|
|
9
|
+
- loop does not modify DB/auth/infra without approval
|
|
10
|
+
- AI behavior loop reverts when evals degrade
|
|
11
|
+
- documentation loop detects stale docs
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"agent": {
|
|
4
|
+
"plan": {
|
|
5
|
+
"mode": "primary",
|
|
6
|
+
"permission": {
|
|
7
|
+
"edit": "deny",
|
|
8
|
+
"bash": "deny"
|
|
9
|
+
},
|
|
10
|
+
"steps": 8
|
|
11
|
+
},
|
|
12
|
+
"build": {
|
|
13
|
+
"mode": "primary",
|
|
14
|
+
"permission": {
|
|
15
|
+
"edit": "ask",
|
|
16
|
+
"bash": {
|
|
17
|
+
"*": "ask",
|
|
18
|
+
"git status *": "allow",
|
|
19
|
+
"git diff *": "allow",
|
|
20
|
+
"npm test*": "allow",
|
|
21
|
+
"pnpm test*": "allow",
|
|
22
|
+
"npm run test*": "allow",
|
|
23
|
+
"pnpm run test*": "allow"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"steps": 12
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
const snapshotDir = path.join('.harness', 'snapshots', new Date().toISOString().replace(/[:.]/g, '-'));
|
|
4
|
+
fs.mkdirSync(snapshotDir, { recursive: true });
|
|
5
|
+
const targets = ['AGENTS.md','docs','.cursor','.codex','.claude','.opencode','.github','.gentle-ai','.pi'].filter((t) => fs.existsSync(t));
|
|
6
|
+
for (const target of targets) fs.cpSync(target, path.join(snapshotDir, target), { recursive: true });
|
|
7
|
+
console.log(`Harness snapshot created: ${snapshotDir}`);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
const required = [
|
|
3
|
+
'AGENTS.md',
|
|
4
|
+
'docs/ai/governance.md',
|
|
5
|
+
'docs/ai/adapter-parity.md',
|
|
6
|
+
'docs/ai/enforcement.md',
|
|
7
|
+
'docs/ai/quality-gates.md',
|
|
8
|
+
'docs/ai/trust-policy.md',
|
|
9
|
+
'docs/ai/eval-strategy.md',
|
|
10
|
+
'docs/skills',
|
|
11
|
+
'docs/specs',
|
|
12
|
+
'evals'
|
|
13
|
+
];
|
|
14
|
+
const missing = required.filter((path) => !fs.existsSync(path));
|
|
15
|
+
if (missing.length) {
|
|
16
|
+
console.error('Harness doctor failed. Missing:');
|
|
17
|
+
for (const item of missing) console.error(`- ${item}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.log('Harness doctor passed.');
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
const roots = ['evals/golden','evals/tool-calls','evals/schema','evals/regression','evals/loop-regression'];
|
|
4
|
+
let total = 0;
|
|
5
|
+
let failed = 0;
|
|
6
|
+
for (const root of roots) {
|
|
7
|
+
if (!fs.existsSync(root)) continue;
|
|
8
|
+
for (const file of fs.readdirSync(root).filter((f) => f.endsWith('.json'))) {
|
|
9
|
+
total++;
|
|
10
|
+
const full = path.join(root, file);
|
|
11
|
+
try {
|
|
12
|
+
const data = JSON.parse(fs.readFileSync(full, 'utf8'));
|
|
13
|
+
if (!data.id || !data.type || !data.severity) {
|
|
14
|
+
console.error(`Invalid eval schema: ${full}`);
|
|
15
|
+
failed++;
|
|
16
|
+
}
|
|
17
|
+
} catch {
|
|
18
|
+
console.error(`Failed to parse eval file: ${full}`);
|
|
19
|
+
failed++;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (failed > 0) {
|
|
24
|
+
console.error(`Eval validation failed: ${failed}/${total}`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
console.log(`Eval validation passed: ${total} eval files checked.`);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
echo "Creating agent compatibility links..."
|
|
5
|
+
|
|
6
|
+
mkdir -p .claude
|
|
7
|
+
if [ ! -e CLAUDE.md ]; then
|
|
8
|
+
ln -s AGENTS.md CLAUDE.md
|
|
9
|
+
echo "✓ CLAUDE.md -> AGENTS.md"
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
if [ ! -e .claude/CLAUDE.md ]; then
|
|
13
|
+
ln -s ../AGENTS.md .claude/CLAUDE.md
|
|
14
|
+
echo "✓ .claude/CLAUDE.md -> ../AGENTS.md"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
if [ ! -e .windsurfrules ]; then
|
|
18
|
+
ln -s AGENTS.md .windsurfrules
|
|
19
|
+
echo "✓ .windsurfrules -> AGENTS.md"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
mkdir -p .agent
|
|
23
|
+
if [ ! -e .agent/AGENTS.md ]; then
|
|
24
|
+
ln -s ../AGENTS.md .agent/AGENTS.md
|
|
25
|
+
echo "✓ .agent/AGENTS.md -> ../AGENTS.md"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
mkdir -p .github
|
|
29
|
+
if [ ! -e .github/copilot-instructions.md ]; then
|
|
30
|
+
cat > .github/copilot-instructions.md <<'EOF'
|
|
31
|
+
Este archivo es un puntero de compatibilidad.
|
|
32
|
+
Fuente universal: `../AGENTS.md`.
|
|
33
|
+
Fuente técnica: `../docs/ai/`.
|
|
34
|
+
Skills operativos: `../docs/skills/`.
|
|
35
|
+
EOF
|
|
36
|
+
echo "✓ .github/copilot-instructions.md"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo "Done. AGENTS.md is the universal source of truth."
|
|
40
|
+
|
|
41
|
+
# Gemini
|
|
42
|
+
if [ ! -e GEMINI.md ]; then
|
|
43
|
+
ln -s AGENTS.md GEMINI.md
|
|
44
|
+
echo "✓ GEMINI.md -> AGENTS.md"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Codex folder
|
|
48
|
+
mkdir -p .codex
|
|
49
|
+
|
|
50
|
+
# Gentle AI folder
|
|
51
|
+
mkdir -p .gentle-ai
|
|
52
|
+
|
|
53
|
+
# Universal parity note
|
|
54
|
+
echo "Adapter parity: AGENTS.md is governance-primary. Adapters are translation layers."
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
|
|
4
|
+
function defaultRunGit(command) {
|
|
5
|
+
return execSync(command, { encoding: "utf8" });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
async function defaultFetchJson(url) {
|
|
9
|
+
const response = await fetch(url);
|
|
10
|
+
|
|
11
|
+
if (!response.ok) {
|
|
12
|
+
throw new Error(`Failed to fetch ${url}: HTTP ${response.status}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return response.json();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function parsePublishedReleaseArgs(argv) {
|
|
19
|
+
const args = [...argv];
|
|
20
|
+
let version = null;
|
|
21
|
+
let packageName = "@kal-elsam/kairo-runtime";
|
|
22
|
+
|
|
23
|
+
for (let index = 2; index < args.length; index += 1) {
|
|
24
|
+
const arg = args[index];
|
|
25
|
+
|
|
26
|
+
if (arg === "--version") {
|
|
27
|
+
version = args[++index];
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (arg.startsWith("--version=")) {
|
|
32
|
+
version = arg.slice("--version=".length);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (arg === "--package") {
|
|
37
|
+
packageName = args[++index];
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (arg.startsWith("--package=")) {
|
|
42
|
+
packageName = arg.slice("--package=".length);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
throw new Error(`Unknown option "${arg}".`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!version) {
|
|
50
|
+
throw new Error("Missing required --version <x.y.z>.");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return { version, packageName };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function verifyPublishedRelease({
|
|
57
|
+
version,
|
|
58
|
+
packageName = "@kal-elsam/kairo-runtime",
|
|
59
|
+
runGit = defaultRunGit,
|
|
60
|
+
fetchJson = defaultFetchJson
|
|
61
|
+
}) {
|
|
62
|
+
const tag = `v${version}`;
|
|
63
|
+
const encodedPackage = encodeURIComponent(packageName);
|
|
64
|
+
const meta = await fetchJson(`https://registry.npmjs.org/${encodedPackage}/${version}`);
|
|
65
|
+
|
|
66
|
+
if (meta.version !== version) {
|
|
67
|
+
throw new Error(`npm version mismatch: expected ${version}, got ${meta.version ?? "none"}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (!meta.gitHead) {
|
|
71
|
+
throw new Error(`npm package ${packageName}@${version} has no gitHead`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const gitHead = meta.gitHead.trim();
|
|
75
|
+
const tagSha = runGit(`git rev-parse ${tag}^{commit}`).trim();
|
|
76
|
+
|
|
77
|
+
if (tagSha !== gitHead) {
|
|
78
|
+
throw new Error(`Local tag ${tag} (${tagSha}) does not match npm gitHead (${gitHead})`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const mainSha = runGit("git rev-parse origin/main").trim();
|
|
82
|
+
|
|
83
|
+
if (mainSha !== gitHead) {
|
|
84
|
+
try {
|
|
85
|
+
runGit(`git merge-base --is-ancestor ${gitHead} origin/main`);
|
|
86
|
+
} catch {
|
|
87
|
+
throw new Error(
|
|
88
|
+
`origin/main (${mainSha}) does not contain npm gitHead (${gitHead})`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const remoteTagLine = runGit(`git ls-remote --tags origin refs/tags/${tag}`).trim();
|
|
94
|
+
|
|
95
|
+
if (!remoteTagLine.startsWith(gitHead)) {
|
|
96
|
+
throw new Error(`Remote tag ${tag} on origin does not point to npm gitHead (${gitHead})`);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
version,
|
|
101
|
+
packageName,
|
|
102
|
+
gitHead,
|
|
103
|
+
tag,
|
|
104
|
+
mainSha,
|
|
105
|
+
tagSha,
|
|
106
|
+
mainAhead: mainSha !== gitHead
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function isMainModule() {
|
|
111
|
+
const entry = process.argv[1];
|
|
112
|
+
if (!entry) return false;
|
|
113
|
+
return fileURLToPath(import.meta.url) === entry;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (isMainModule()) {
|
|
117
|
+
const { version, packageName } = parsePublishedReleaseArgs(process.argv);
|
|
118
|
+
const result = await verifyPublishedRelease({ version, packageName });
|
|
119
|
+
|
|
120
|
+
console.log("Published release provenance OK");
|
|
121
|
+
console.log(`Package: ${result.packageName}@${result.version}`);
|
|
122
|
+
console.log(`npm gitHead: ${result.gitHead}`);
|
|
123
|
+
console.log(`Tag: ${result.tag}`);
|
|
124
|
+
console.log(
|
|
125
|
+
`origin/main: ${result.mainSha}${result.mainAhead ? " (contains release)" : ""}`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import {
|
|
4
|
+
parseAttributionGuardArgs,
|
|
5
|
+
runAttributionGuard
|
|
6
|
+
} from "./lib/attribution-guard.mjs";
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
assertCleanReleaseMessage,
|
|
10
|
+
assertCleanReleaseMessages,
|
|
11
|
+
parseAttributionGuardArgs,
|
|
12
|
+
readCommitMessages,
|
|
13
|
+
runAttributionGuard
|
|
14
|
+
} from "./lib/attribution-guard.mjs";
|
|
15
|
+
|
|
16
|
+
function defaultRunGit(command) {
|
|
17
|
+
return execSync(command, { encoding: "utf8" });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isMainModule() {
|
|
21
|
+
const entry = process.argv[1];
|
|
22
|
+
if (!entry) return false;
|
|
23
|
+
return fileURLToPath(import.meta.url) === entry;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (isMainModule()) {
|
|
27
|
+
const { range } = parseAttributionGuardArgs(process.argv);
|
|
28
|
+
const result = runAttributionGuard({ range, runGit: defaultRunGit });
|
|
29
|
+
const scope = range ?? "HEAD";
|
|
30
|
+
|
|
31
|
+
console.log(`Release attribution guard OK (${result.checked} commit(s), range: ${scope})`);
|
|
32
|
+
}
|