feat(plan-01): Phase 2 — relocate level5/agentops config + init-options to package
Move the harness-config files out of the mixed .specify/level5 and .specify/agentops
dirs (which also hold governance/domain/state) into packages/casan-harness, leaving a
per-file compat symlink at each old path. Runtime state and governance stay in place.
Moved (+ .specify symlink each):
level5: drift-policy.yaml kpi-schema.yaml model-fallback.yaml tool-registry.yaml
harness-package.json project-registry.json provider-usage-sample.json
agentops: alerts.yaml hallucination-tracking.yaml metrics.yaml rate-limits.yaml tracking.yaml
top: init-options.json
Stays in .specify: level5/central-governance (governance), level5/golden-runs (domain,
Phase 3), agentops/alerts.log (state), traceability-map.json (domain, Phase 3).
Full gate: PASS=64 FAIL=0 SKIP=3 (CASAN_CI_STEP_TIMEOUT_SEC=1200).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
664bd1f00c
commit
d54d7f5f4c
@@ -1,20 +0,0 @@
|
||||
version: 1.0
|
||||
description: CASAN Level 5 drift detection policy
|
||||
|
||||
golden_dir: .specify/level5/golden-runs
|
||||
evidence_dir: docs/output/casan/level5-evidence
|
||||
|
||||
thresholds:
|
||||
minimum_similarity: 0.85
|
||||
maximum_length_delta_ratio: 0.30
|
||||
|
||||
actions:
|
||||
pass: allow
|
||||
warn: require_review
|
||||
fail: block_or_fallback
|
||||
|
||||
metrics:
|
||||
- similarity_ratio
|
||||
- length_delta_ratio
|
||||
- golden_hash
|
||||
- candidate_hash
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/drift-policy.yaml
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"package": "fpt-casan-sdd-harness",
|
||||
"version": "1.0.0",
|
||||
"capabilities": [
|
||||
"H4-security",
|
||||
"H5-governance",
|
||||
"H6-agentops",
|
||||
"L5-drift-detection",
|
||||
"L5-model-fallback",
|
||||
"L5-tool-registry",
|
||||
"L5-rollback",
|
||||
"L5-business-feedback"
|
||||
],
|
||||
"compatibility": {
|
||||
"speckit": ">=1.0.0",
|
||||
"shell": "bash",
|
||||
"python": ">=3.9"
|
||||
},
|
||||
"entrypoints": {
|
||||
"wrapper": ".specify/scripts/bash/casan-harness.sh",
|
||||
"test": ".specify/tests/run-casan4-harness-tests.sh",
|
||||
"dashboard": "docs/output/casan/agentops-dashboard.html"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/harness-package.json
|
||||
@@ -1,27 +0,0 @@
|
||||
version: 1.0
|
||||
description: CASAN Level 5 business KPI feedback schema
|
||||
|
||||
kpis:
|
||||
- id: cycle_time_minutes
|
||||
direction: lower_is_better
|
||||
baseline: 180
|
||||
target: 90
|
||||
|
||||
- id: review_rejection_rate
|
||||
direction: lower_is_better
|
||||
baseline: 0.30
|
||||
target: 0.10
|
||||
|
||||
- id: defect_leakage_rate
|
||||
direction: lower_is_better
|
||||
baseline: 0.15
|
||||
target: 0.05
|
||||
|
||||
- id: manual_rework_hours
|
||||
direction: lower_is_better
|
||||
baseline: 12
|
||||
target: 4
|
||||
|
||||
evidence:
|
||||
input: docs/output/casan/level5-evidence/business-kpi-input.json
|
||||
output: docs/output/casan/level5-evidence/business-kpi-report.json
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/kpi-schema.yaml
|
||||
@@ -1,33 +0,0 @@
|
||||
version: 1.0
|
||||
description: CASAN Level 5 model/tool fallback policy
|
||||
|
||||
routes:
|
||||
- step_pattern: "review|test|security"
|
||||
primary: primary-model
|
||||
fallback: verifier-model
|
||||
max_attempts: 2
|
||||
fallback_on:
|
||||
- nonzero_exit
|
||||
- empty_output
|
||||
- timeout
|
||||
|
||||
- step_pattern: "implement|write_code|deploy"
|
||||
primary: primary-model
|
||||
fallback: conservative-model
|
||||
max_attempts: 1
|
||||
fallback_on:
|
||||
- nonzero_exit
|
||||
- policy_reject
|
||||
governance_required: true
|
||||
|
||||
default_route:
|
||||
primary: primary-model
|
||||
fallback: fallback-model
|
||||
max_attempts: 2
|
||||
fallback_on:
|
||||
- nonzero_exit
|
||||
- empty_output
|
||||
|
||||
evidence:
|
||||
trace_dir: .specify/logs/trace
|
||||
fallback_log: .specify/logs/level5/fallback.jsonl
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/model-fallback.yaml
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"registry": "fpt-casan-harness-adoption",
|
||||
"projects": [
|
||||
{
|
||||
"project_id": "AINative_OKR_CASAN4",
|
||||
"domain": "SDD OKR",
|
||||
"harness_package": "fpt-casan-sdd-harness",
|
||||
"harness_version": "1.0.0",
|
||||
"status": "active"
|
||||
},
|
||||
{
|
||||
"project_id": "CASAN_DEMO_PROJECT_A",
|
||||
"domain": "Demo SDLC",
|
||||
"harness_package": "fpt-casan-sdd-harness",
|
||||
"harness_version": "1.0.0",
|
||||
"status": "registered"
|
||||
},
|
||||
{
|
||||
"project_id": "CASAN_DEMO_PROJECT_B",
|
||||
"domain": "Demo QA",
|
||||
"harness_package": "fpt-casan-sdd-harness",
|
||||
"harness_version": "1.0.0",
|
||||
"status": "registered"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/project-registry.json
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"provider": "sample-provider",
|
||||
"model": "sample-model-large",
|
||||
"run_id": "provider-run-001",
|
||||
"step": "speckit.implement",
|
||||
"input_tokens": 1842,
|
||||
"output_tokens": 936,
|
||||
"total_tokens": 2778,
|
||||
"cost_usd": 0.08334,
|
||||
"latency_ms": 4210,
|
||||
"status": "success"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/provider-usage-sample.json
|
||||
@@ -1,90 +0,0 @@
|
||||
version: 1.0
|
||||
description: CASAN Level 5 tool registry with ownership, schema, risk, idempotency, and rollback metadata
|
||||
|
||||
tools:
|
||||
- id: agent_step
|
||||
owner: ai-platform
|
||||
risk_level: low
|
||||
side_effect: false
|
||||
idempotency_required: false
|
||||
timeout_seconds: 600
|
||||
|
||||
- id: write_code
|
||||
owner: engineering
|
||||
risk_level: high
|
||||
side_effect: true
|
||||
idempotency_required: true
|
||||
timeout_seconds: 900
|
||||
allowed_agents: "boss,implement-agent"
|
||||
rollback:
|
||||
strategy: git_patch_reverse
|
||||
script: .specify/scripts/bash/rollback-manager.sh
|
||||
|
||||
- id: migration
|
||||
owner: database-owner
|
||||
risk_level: high
|
||||
side_effect: true
|
||||
idempotency_required: true
|
||||
timeout_seconds: 900
|
||||
allowed_agents: "boss,implement-agent"
|
||||
rollback:
|
||||
strategy: migration_down_or_restore
|
||||
script: .specify/scripts/bash/rollback-manager.sh
|
||||
|
||||
- id: deploy
|
||||
owner: release-manager
|
||||
risk_level: high
|
||||
side_effect: true
|
||||
idempotency_required: true
|
||||
timeout_seconds: 1200
|
||||
rate_limit_per_run: 2
|
||||
allowed_agents: "boss,release-manager"
|
||||
rollback:
|
||||
strategy: previous_release
|
||||
script: .specify/scripts/bash/rollback-manager.sh
|
||||
|
||||
- id: external_api
|
||||
owner: platform-team
|
||||
risk_level: medium
|
||||
side_effect: true
|
||||
idempotency_required: true
|
||||
timeout_seconds: 120
|
||||
allowed_agents: "boss,implement-agent"
|
||||
rollback:
|
||||
strategy: compensating_request
|
||||
script: .specify/scripts/bash/rollback-manager.sh
|
||||
|
||||
- id: db_write
|
||||
owner: database-owner
|
||||
risk_level: high
|
||||
side_effect: true
|
||||
idempotency_required: true
|
||||
timeout_seconds: 300
|
||||
allowed_agents: "boss,implement-agent"
|
||||
rollback:
|
||||
strategy: restore_from_backup
|
||||
script: .specify/scripts/powershell/rollback-manager.ps1
|
||||
|
||||
- id: write_file
|
||||
owner: engineering
|
||||
risk_level: medium
|
||||
side_effect: true
|
||||
idempotency_required: false
|
||||
timeout_seconds: 60
|
||||
allowed_agents: "boss,implement-agent,design-agent"
|
||||
rollback:
|
||||
strategy: delete_or_restore
|
||||
script: .specify/scripts/bash/rollback-manager.sh
|
||||
|
||||
level5_gate:
|
||||
required_fields:
|
||||
- id
|
||||
- owner
|
||||
- risk_level
|
||||
- side_effect
|
||||
- idempotency_required
|
||||
- timeout_seconds
|
||||
side_effecting_tools_require:
|
||||
- idempotency_key
|
||||
- audit_record
|
||||
- rollback_strategy
|
||||
@@ -0,0 +1 @@
|
||||
../../packages/casan-harness/level5/tool-registry.yaml
|
||||
Reference in New Issue
Block a user