Commit Graph
100 Commits
Author SHA1 Message Date
thanhnv 6faf589694 docs(devkit): ship Windows adoption guides 2026-07-21 23:51:03 +07:00
thanhnv 7b2ba60a3a feat(devkit): enforce governed prompt adoption 2026-07-21 23:40:26 +07:00
thanhnv 4d5dca9400 feat(control-panel): embed H6 telemetry in goal view 2026-07-21 23:38:59 +07:00
thanhnv 4b6819f578 update report h6 2026-07-20 23:47:09 +07:00
thanhnv f462079435 feat: casan chat optz 2026-07-19 12:14:12 +07:00
thanhnv 709b6cccd6 feat: appove and go 2026-07-19 09:37:16 +07:00
thanhnv 13fae3e6c3 fix template, remove okr, use casan.* 2026-07-18 16:45:31 +07:00
thanhnv 0dfd1742d3 fix(local-idp): prevent oidc token exchange timeout 2026-07-18 14:11:40 +07:00
thanhnv ffff800295 feat(control-panel): add oidc account switching 2026-07-18 14:05:35 +07:00
thanhnv 03ddeb7123 fix(control-panel): sign strict goal approvals via oidc 2026-07-18 13:59:15 +07:00
thanhnv c0a6dbc25f fix: build patches from complete target context 2026-07-18 13:44:20 +07:00
thanhnv 850be145d7 fix: keep h2 patch repair on direct codex 2026-07-18 12:20:22 +07:00
thanhnv 1e5cfb341c fix: complete streamed patch repair responses 2026-07-18 12:14:02 +07:00
thanhnv 659ed09839 fix: make h2 patch repair failures diagnosable 2026-07-18 12:04:32 +07:00
thanhnv 61a8253679 feat: route codex patch repair through responses api 2026-07-18 11:53:24 +07:00
thanhnv 4f8a53bda9 fix: strengthen goal patch repair routing 2026-07-18 11:36:03 +07:00
thanhnv f23fb98953 fix: validate and size governed patch outputs 2026-07-18 11:29:37 +07:00
thanhnv 36b6454b8d fix: include git in goal orchestration runtime 2026-07-18 10:43:20 +07:00
thanhnv e17a373da6 fix: prioritize direct providers for goal patch recovery 2026-07-18 10:32:06 +07:00
thanhnv 049f0c9b04 feat: visualize governed goal progress live 2026-07-18 10:19:26 +07:00
thanhnv efb5a62f29 fix: keep goal failure reasons gate-specific 2026-07-18 10:04:55 +07:00
thanhnv 1ffe5fe3df fix: retry invalid goal patch contract once 2026-07-18 09:57:05 +07:00
thanhnv 9785e13c82 feat: export aggregate Prometheus metrics 2026-07-18 09:25:56 +07:00
thanhnv 083a1de875 docs: add external security review engagement scope 2026-07-18 09:21:42 +07:00
thanhnv 777ce342fd ci: avoid setup-node cache cleanup deadlock 2026-07-18 09:19:34 +07:00
thanhnv 4af81ccf40 ci: bound self-hosted runner gate duration 2026-07-18 09:12:44 +07:00
thanhnv d9ca8df2d6 fix: use named frontend workspace in CI 2026-07-18 09:08:19 +07:00
thanhnv e50714d622 feat: add tenant isolation pre-audit evidence 2026-07-18 09:04:39 +07:00
thanhnv 36158c5e34 docs: add certification and audited operations roadmap 2026-07-18 00:22:52 +07:00
thanhnv 2783a21338 docs: add Japanese production support escalation draft 2026-07-18 00:22:18 +07:00
thanhnv 8a676f0ad4 docs: add APPI data processing assessment template 2026-07-18 00:21:36 +07:00
thanhnv b921f25c57 feat: require rootless production sandbox runners 2026-07-18 00:19:53 +07:00
thanhnv 92c20e304c ci: publish verified evidence packs from Gitea runs 2026-07-18 00:18:36 +07:00
thanhnv 407d373b4e feat: gate upgrades with compatibility matrix 2026-07-18 00:17:45 +07:00
thanhnv d129ba60ef fix: require Vault audit signing in production 2026-07-18 00:15:38 +07:00
thanhnv 00963119f4 feat: add verified state backup and restore drill 2026-07-18 00:14:22 +07:00
thanhnv 881ee01691 feat: prepare CASAN paid PoC release package 2026-07-18 00:07:04 +07:00
thanhnv a2cca645dc feat: apply reviewed goal patches 2026-07-12 00:21:50 +09:00
thanhnv 159022c73f feat: create new project added 2026-07-11 22:42:42 +09:00
thanhnv 193a449829 feat: updade workspace 2026-07-11 15:56:31 +09:00
thanhnv 4fc72332f5 optz: Goal orchestrator 2026-07-11 12:18:59 +09:00
thanhnv b56f7d357e feat: harden control panel authentication 2026-07-10 23:48:12 +09:00
thanhnv 48b1186439 feat: orchestrate goals with local and cloud models 2026-07-10 23:35:30 +09:00
thanhnv 1345d4c930 feat: add live H1-H7 trace explorer 2026-07-10 23:17:23 +09:00
thanhnv 7cb592a32f feat: add local provider account connector 2026-07-10 23:05:24 +09:00
thanhnv adce7717f7 feat: connect chat to managed model providers 2026-07-10 17:40:44 +09:00
thanhnv ef51c90d91 docs: explain how to use CASAN for real projects 2026-07-10 17:20:34 +09:00
thanhnv b0ced79af5 feat: govern chat model selection by policy 2026-07-10 17:09:28 +09:00
thanhnv f8215cd2eb feat: onboard service desk as second CASAN project 2026-07-10 17:00:35 +09:00
thanhnv 040af64191 feat: enforce live supply chain provenance gates 2026-07-10 16:47:45 +09:00
thanhnv aa284e9bd4 feat: add production deployment handoff controls 2026-07-10 16:41:14 +09:00
thanhnv 7cea023dce feat: chat + optmz control panel 2026-07-10 16:26:30 +09:00
thanhnv d882a9dc23 feat: plan 18 2026-07-10 11:28:14 +09:00
thanhnv fafccc47ad feat: complete llm sourcegen plan 2026-07-09 00:59:28 +09:00
thanhnv c800f7edf7 feat: harden chat state by tenant 2026-07-08 23:38:22 +09:00
thanhnv b3b0544ba8 feat: certify codegen chat drafts through loop 2026-07-08 23:20:54 +09:00
thanhnv 780fe86273 feat: escalate chat approvals through inbox 2026-07-08 23:09:43 +09:00
thanhnv a029a51e72 feat: add command center chat loop widget 2026-07-08 22:58:02 +09:00
thanhnv 36af576f15 feat: add chat replay verification 2026-07-08 22:45:12 +09:00
thanhnv 49d0363c6a feat: certify chat operator turns through loop-run 2026-07-08 22:31:03 +09:00
thanhnv 004afa73c9 feat: add governed chat agent selection 2026-07-08 22:19:51 +09:00
thanhnv 06d8d31b16 chore: ignore chat runtime logs 2026-07-08 21:20:49 +09:00
thanhnv 5561bcf864 feat: add governed chat console 2026-07-08 21:14:40 +09:00
thanhnv 3be9970c15 feat: add control panel 2026-07-08 19:07:35 +09:00
thanhnvandClaude Opus 4.8 a07b15e489 docs(plans): Plan-13 Track 1 (read-only Ops Console) marked done in status trackers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 17:28:35 +09:00
thanhnvandClaude Opus 4.8 94a7168362 chore: gitignore tsconfig.tsbuildinfo (build cache, not source)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 17:27:00 +09:00
thanhnvandClaude Opus 4.8 63dd44a11b feat(plan-13): read-only Ops Console (NestJS API + React UI) — Track 1
Real web Control Panel over CASAN harness telemetry (Level-3 casan-platform component).
Read-only ("Đọc ≠ Ghi"): no settings writes, no gate bypass. Management/RBAC/approval are
Track 2/3 (future, Plan-14). Additive — harness gate untouched (64/0/3).

packages/casan-control-panel/
- backend/ (NestJS, ESM, /api/v1 + ok() envelope): TelemetryReader (jsonl/json, missing→[],
  never fabricates) + TelemetryService (aggregations mirroring generate-agentops-dashboard.py)
  + endpoints overview/runs(+:traceId)/governance/security/incidents/tools/traceability/
  drift/cost, and /healthz (stale-aware 200/503, fail-loud like dashboard-server.py). App
  root + telemetry paths resolve via casan-paths-style marker walk-up (.specify OR
  packages/casan-harness) + honor CASAN_DASHBOARD_* env. Binds 127.0.0.1; refuses
  non-loopback under CASAN_PROFILE=prod. @Inject token so DI works under tsc AND tsx.
  Tests (node native runner) 7/0: reader parse/missing, app-root, overview shape on real
  repo state, freshness/stale fail-loud.
- frontend/ (React+Vite+Tailwind+TanStack, port 5174, proxies to :3010): AppLayout +
  Sidebar + Header (LIVE/STALE badge from /healthz) + pages Overview/Runs/Governance/
  Security/Incidents/Traceability. axios client unwraps ok() envelope. build green.

Wiring: root workspaces + `console:*` scripts. packaging/levels.json + casan-platform
README: platform preview now lists the Ops Console as an implemented component.

Verified: backend build + test 7/0; frontend tsc + vite build; API serves REAL data
(runs=6, provider_tokens=5556, action_blocks=7); /healthz 503 stale → 200 after touch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 16:59:56 +09:00
thanhnvandClaude Opus 4.8 98d699d844 ci(release): auto-publish split bundles to Gitea package registry on version tags
.gitea/workflows/release.yml — on push tag v*: assert tag==VERSION, run the governance
gate (must be green), build core/devkit/platform-preview/all-in-one-demo (enterprise
skipped/refused), then PUT each .tar.gz (+.sha256) to the Gitea generic package registry
using ${{ secrets.GITEA_TOKEN }}. Portable via GITHUB_SERVER_URL/OWNER. Guide updated with
the one-time secret setup + release flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 16:06:28 +09:00
thanhnvandClaude Opus 4.8 6cb96ce249 fix(governance): commit policy-bundle with packages/casan-harness paths (+ re-signed manifest)
The policy bundle listed the 8 governed policy files under .specify/... (pre-restructure).
After the move they live in packages/casan-harness/. Repoint all 8 paths and re-sign the
manifest. This MUST be committed as its own step: phase-sec09/sec29 cleanup runs
`git checkout -- .specify/level5/central-governance/`, which restored the bundle to HEAD on
every gate run — so the fix only sticks once HEAD itself carries the corrected, re-signed
bundle. sign-policy-bundle verify → POLICY_SIGNATURE_VALID.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 15:57:33 +09:00
thanhnvandClaude Opus 4.8 8c20cfde9f feat(packaging): level-based source hub — Core + DevKit packaging, Platform/Enterprise scaffold
Organize CASAN as a reusable source hub with SPLIT releases so downstream adopts only the
level it needs (packaging/levels.json is the single source of truth).

Implemented now:
- Level 1 Core: bin/casan CLI (run/gate/test/verify/reuse/dashboard) + VERSION.
- Level 2 DevKit: packages/casan-devkit (install.sh, Dockerfile.harness, templates:
  project scaffold, domain-pack, gitea-workflow).
- scripts/package-release.sh core|devkit|platform|all-in-one-demo — builds split bundles
  into dist/ (BUNDLE-MANIFEST + SHA256SUMS); platform is stamped PREVIEW/INCOMPLETE;
  enterprise (future) is REFUSED (exit 3, no fake-complete package). Bundles verified:
  extract → bin/casan works, deterministic + domain suites pass, casan reuse VALID.
- docs/packaging: CASAN_PACKAGING_PLAN + ADOPTION + CI + DOMAIN_PACK + GITEA_PACKAGE + DOCKER.

Structure + docs only:
- Level 3 packages/casan-platform (dashboard exists; control-panel/viewers pending).
- Level 4 packages/casan-enterprise (RBAC/tenant/KMS/WORM/approval exist in core; governed
  console pending). No Chat Console/RBAC-console/tenant-console/model-mgmt built in this task.

Harness change (enables extracted bundles to self-resolve): casan-paths.sh + the Python
project_root() walk-ups now accept a second root marker `packages/casan-harness` in addition
to `.specify`, so a freshly-unpacked core/devkit/demo bundle (no `.specify` yet) roots
correctly and creates state on first run. In an adopted repo `.specify` still matches first.
policy-bundle.yaml paths corrected to packages/casan-harness (re-signed). Full gate 64/0/3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 15:55:37 +09:00
thanhnvandClaude Opus 4.8 4918012199 docs(plans): sync roadmap status + paths to post-restructure state
- Plan-01 marked ✅ DONE (INDEX table + P3 tier + BACKLOG row + plan header).
- Plan-06 / Plan-12 dependency on 01 satisfied → 🔓 unblocked (headers + BACKLOG rows).
- Repoint command/path refs in all plans (except Plan-01's migration narrative):
  .specify/{scripts,tests,security,config,templates,governance} -> packages/casan-harness/...;
  golden-runs/traceability-map/docs-input -> apps/okr/domain/...; `cd AINative_OKR_CASAN5`
  -> `cd $(git rev-parse --show-toplevel)`; fix relative links + Plan-13 control-plane location.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:57:01 +09:00
thanhnvandClaude Opus 4.8 09ac4c674d docs: restore FPT_CASAN_Full + harness-assessment into docs/notes
Two reference notes kept (per review); other scattered root notes and optimize-docs
(competition/video material) remain in git history only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:49:31 +09:00
thanhnvandClaude Opus 4.8 fa3dd94c76 docs: restore casan-next-plans roadmap into docs/plans (was wrongly deleted)
The plan set (Plan-00..18, backlog/hardening/QA status, team allocation) is the ONGOING
roadmap, not a finished competition artifact — restored from history into docs/plans/.
Plan-01 (restructure) marked ✅ done; the rest remain to do.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:46:50 +09:00
thanhnvandClaude Opus 4.8 18997caf49 docs: align all documentation with the new repo structure
Update agent protocols (.claude/agents, .github/agents), guides, runbooks and READMEs
to the post-restructure layout: .specify/{scripts,tests,security,config,templates,
governance,memory,level5-config} -> packages/casan-harness/...; docs/input +
golden-runs + traceability-map -> apps/okr/domain/...; drop AINative_OKR_CASAN5/ prefix.
Runtime-state paths (.specify/logs, .specify/agentops, .specify/level5/central-governance)
kept as-is. Historical evidence under docs/output/ left untouched (immutable run records).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:36:27 +09:00
thanhnvandClaude Opus 4.8 36a4812ef3 refactor(structure): promote app to repo root + remove redundant workspace cruft
Standard production layout: the OKR app (was nested under AINative_OKR_CASAN5/) is now
the repository root. No more wrapper directory.

- Promote AINative_OKR_CASAN5/* -> repo root (backend/ frontend/ packages/ apps/
  .specify/ docs/ infra/ nginx/ scripts/ + configs). Merge tool dirs: .gitea (kept the
  active deploy ci.yml, added harness-ci.yml + runbooks), .claude (agents/commands +
  launch.json), .github moved up.
- Remove redundant: 00_SUBMISSION_PACKAGE, scattered root notes (FPT_CASAN_Full.md,
  tu-tuong-casan.md, casan-tu-sinh..., casan_harness_assessment.md, source-review...,
  README_CASAN5_REFINED.md), casan-next-plans/ and optimize-docs/ (competition/planning
  artifacts — roadmap + design history preserved in git log / commit messages).
- Update all references to the old layout:
  - .gitea/workflows/{ci,harness-ci}.yml, .github/workflows/{ci,deploy}.yml:
    working-directory .; drop AINative_OKR_CASAN5/ prefix; .specify/{tests,scripts}
    -> packages/casan-harness/... (.specify/logs state kept)
  - .claude/launch.json, .gitea/*-runbook.md: path prefixes
  - CLAUDE.md, README.md: docs/input -> apps/okr/domain/input
  - policy-bundle.yaml: 8 policy paths -> packages/casan-harness/...; manifest re-signed
- secrets-scan.sh: fixture excludes -> new package/domain paths.

Full gate from the new root: PASS=64 FAIL=0 SKIP=3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 13:26:36 +09:00
thanhnvandClaude Opus 4.8 7101af9fd4 feat(plan-01): Phase 4c — hard cutoff, remove .specify compat facade
Repoint every remaining literal `.specify/...` / `docs/input` reference to the real
package/domain location and delete all compat symlinks. The harness now runs purely via
packages/casan-harness/... with no .specify facade; .specify holds ONLY runtime state
(logs/, agentops/alerts.log, level5/central-governance).

Refs fixed (Phase 0.5 only caught `$VAR/.specify/` — these were bare/`__file__`/literal):
- secrets-scan.sh: scan-target excludes -> packages/casan-harness/... (+ apps/okr/domain/corpus)
- loop_common.py: loop-policy.yaml -> harness config (package-relative)
- evidence-pack-build.py: judge-gate test + traceability-matrix.py -> harness/sibling
- phase10-traceability: REQ -> $CASAN_DOMAIN_ROOT/input
- run-casan-pipeline.mjs: model-fallback/drift-detect/rollback-manager -> HARNESS_BASH,
  golden -> GOLDEN_PLAN (apps/okr/domain), with .specify/logs state kept
- casan-step.mjs: requirement fallback restored to docs/input for hermetic sandboxes
- descriptive config (tool-registry/harness-package/drift-policy/hallucination/risk-registry/
  loop-policy.schema + docstrings) repointed for accuracy
- policy-bundle.yaml: 8 policy paths -> packages/casan-harness/...; manifest regenerated +
  re-signed (POLICY_HASHES_VALID files=8, POLICY_SIGNATURE_VALID)

Removed 22 .specify code/config symlinks + docs/input symlink.
Full gate via packages path, NO facade: PASS=64 FAIL=0 SKIP=3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 12:28:37 +09:00
thanhnvandClaude Opus 4.8 e891981b59 feat(plan-01): Phase 4b — external callers to packages paths + registry (Task 1.7)
Point the canonical entry points at the new package layout; the .specify compat facade
is retained as an intentional backward-compat layer (see below).

- .gitea/workflows/{ci,harness-ci}.yml: invoke packages/casan-harness/scripts/bash|tests
  (state paths .specify/logs kept). CI now runs on the new structure.
- infra/local-prod/docker-compose.yml: dashboard-server.py -> packages path (logs/alerts
  env stay under .specify state).
- scripts/casan-step.mjs + run-casan-pipeline.mjs: resolve the harness under
  packages/casan-harness, falling back to .specify so the adversarial/sourcegen sandboxes
  (which stage a .specify/ tree) keep working; requirement input prefers apps/okr/domain/input.
- project-registry.json: record the new layout (harness_root, state_root, governance_root,
  per-project domain_root) so Plan-06 can register a second app with its own domain.
  verify-harness-reuse.sh already resolves via CASAN_HARNESS_ROOT -> HARNESS_REUSE_VALID (3 projects).

Facade decision: the .specify/{scripts,tests,security,...} symlinks are KEPT as a
documented compat layer. A full hard cutover (removing them) still needs ~15 literal
`.specify/...` refs repointed (loop_common/evidence-pack/secrets-scan config+test paths,
run-casan-pipeline step scripts, and the signed policy-bundle.yaml path list which then
needs manifest regen + re-sign). That is a scoped follow-up; the physical separation
(code in packages/, domain in apps/, packages holds no domain data, single CASAN_* path
indirection) is complete and the full gate is green via BOTH entry paths: PASS=64 FAIL=0 SKIP=3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 11:36:24 +09:00
thanhnvandClaude Opus 4.8 3adc48ed82 feat(plan-01): Phase 4a — make harness location-independent (facade-free capable)
Resolve every root by marker walk-up instead of a fixed depth that only lands on the
app via the .specify compat symlink, so the harness runs correctly when invoked by its
real packages/casan-harness path — proven by a full gate run via that path: 64/0/0.

- 95 scripts/tests: PROJECT_ROOT/ROOT "$SCRIPT_DIR/../.."-style computations -> $CASAN_APP_ROOT.
- 6 leaf scripts (infra-lab, context-validate, secrets-scan, path-guard, toolchain-verify,
  phase2-sourcegen) now source casan-paths + use CASAN_APP_ROOT.
- run-casan4: source casan-paths as a package sibling (facade-independent), PROJECT_ROOT=CASAN_APP_ROOT.
- 8 Python files: project_root()/REPO_ROOT/bundle_root walk UP for the .specify marker
  (control-plane-settings, loop_common, model-call, context-compress, test-integrity,
  bundle-integrity, traceability-matrix; generate-* fixed earlier).
- evidence-pack-build.py + traceability-matrix.py: domain refs -> apps/okr/domain
  (input/, corpus/redteam-vectors.jsonl, traceability-map.json).
- ci-harness-gate.sh: export CASAN_TESTS_DIR/CASAN_TEST_MANIFEST/CASAN_BUNDLE_ROOT so the
  integrity Python resolves via the harness root regardless of invocation path; ROOT=CASAN_APP_ROOT.
- Remove the domain compat symlinks from packages/casan-harness/security (redteam-corpus,
  redteam-vectors, benign-corpus) — packages now holds NO domain data.

Both invocation paths pass (compat facade still present): .specify/... and packages/...

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 10:50:50 +09:00
thanhnvandClaude Opus 4.8 f2ea5590b1 feat(plan-01): Phase 3 — split domain OKR data into apps/okr/domain
Separate per-project domain data from the reusable harness so packages/casan-harness
holds no domain artifacts. Domain data physically relocated to apps/okr/domain, with
compat symlinks at the old paths (Python + app + evidence-log refs keep resolving).

Moved -> apps/okr/domain (+ compat symlink at old path):
  golden-runs/           (was .specify/level5/golden-runs)
  corpus/{redteam-corpus.jsonl,redteam-vectors.jsonl,benign-corpus/}
                         (was packages/casan-harness/security/*)
  traceability-map.json  (was .specify/traceability-map.json)
  input/                 (was docs/input — OKR requirement/architecture)

casan-paths.sh: add CASAN_DOMAIN_ROOT (apps/okr/domain; env-overridable so Plan-06 can
point a second app at its own domain; falls back to .specify pre-split).

Harness bash refs repointed to $CASAN_DOMAIN_ROOT: run-casan4 (golden), phase3-redteam
(corpus), phase-h4-multilingual/split-inject (benign-corpus), phase10-traceability (map),
benign-fp-report (corpus+vectors). Python + app refs still resolve via the compat
symlinks (repointed in Phase 4 when the symlinks are removed).

Full gate: PASS=64 FAIL=0 SKIP=3 (CASAN_CI_STEP_TIMEOUT_SEC=1200). A first gate run
crawled under host load avg ~30 (Ollama + system); re-run at lower load passed clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 10:01:15 +09:00
thanhnvandClaude Opus 4.8 d54d7f5f4c 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>
2026-07-08 00:36:06 +09:00
thanhnvandClaude Opus 4.8 664bd1f00c feat(plan-01): Phase 1 — relocate harness code to packages/casan-harness (symlink facade)
Physically move the pure-code subtrees out of .specify into the package, leaving
compat symlinks at the old .specify/<dir> paths so every existing reference (internal
CASAN_HARNESS_ROOT + external CI/docker/mjs) keeps resolving. Runtime state stays put.

Moved (git mv): scripts/ tests/ security/ templates/ config/ governance/ memory/
  .specify/<dir>  ->  packages/casan-harness/<dir>   (+ .specify/<dir> symlink)
Stays in .specify (state/governance/domain, handled later): logs/ agentops/ level5/
  init-options.json traceability-map.json

Python `.resolve()` self-location followed the compat symlink into packages and lost
the app root; generate-casan-demo-context.py, generate-agentops-dashboard.py and
dashboard-server.py now walk UP for the `.specify` state marker instead of a fixed
parent depth (fixes "missing trace files" in run-casan4).

Full gate: PASS=64 FAIL=0 SKIP=3 (CASAN_CI_STEP_TIMEOUT_SEC=1200 — track-a ~450s runs
close to the 600s default and can tip over under load; this is timing variance, not a
regression — it passed cleanly with headroom). Runtime log/audit artifacts kept unstaged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 00:06:00 +09:00
thanhnvandClaude Opus 4.8 2c765c9a45 feat(plan-01): Phase 0.5 — path indirection via casan-paths.sh (no file moves)
Task 1.2: introduce a single path resolver so no harness script hardcodes
`.specify/...` scattered across the tree. casan-paths.sh resolves four roots
(HARNESS/STATE/GOVERNANCE/APP) by marker-based walk-up from its own location —
never `git rev-parse` (git root is the repo PARENT here, not the app dir).

- 101 bash scripts/tests: 238 hardcoded `$PROJECT_ROOT/.specify/...` refs rewritten
  to CASAN_HARNESS_ROOT (code) / CASAN_STATE_ROOT (logs,state) / CASAN_GOVERNANCE_ROOT.
  Sandbox test vars ($WORK/$TP/$FP/$T1_WORK) left untouched.
- Roots are NOT exported: each script/subprocess self-resolves from its own tree,
  matching the original per-script semantics and preserving hermetic sandbox isolation
  (node casan-step.mjs, copied telemetry/rollback scripts must not inherit real roots).
- Sandbox tests that copy a harness script now also copy casan-paths.sh (its new
  sibling dependency): adversarial (verify-audit-chain/verify-tool-audit/rollback) +
  track-a (security-check/telemetry-integrity).
- control-plane-settings.json reclassified as STATE (untracked runtime store).

Roots all still resolve to `.specify` in this monolithic layout, so behavior is
unchanged. Full gate: PASS=64 FAIL=0 SKIP=3 (adversarial 44/0, track-a 25/0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 22:07:41 +09:00
thanhnvandClaude Opus 4.8 61c3a7c648 feat(plan-01): Phase 0 — skeleton packages/casan-harness + apps/okr/domain
Empty skeleton only (no file moves, no behavior change). Baseline gate
confirmed at PASS=64 FAIL=0 SKIP=3 (backend/frontend/infra off) before branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:35:54 +09:00
thanhnvandClaude Opus 4.8 3e7f76f6f5 feat: plan-01 Phase 0 — restructure skeleton (packages/casan-harness + apps/okr/domain)
Empty package/app skeleton for the harness restructure. No harness files moved yet; full gate baseline stays PASS=64 FAIL=0 SKIP=3. Subdirs materialize via git mv in Phases 1-5.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:16:31 +09:00
thanhnv 5fbc017a2c feat: update plan 17 2026-07-07 18:58:21 +09:00
thanhnv ae4fc7112c feat: update plan 16 sec14-26 2026-07-07 15:46:36 +09:00
thanhnv 0c60ed33e9 doc update 2026-07-06 23:26:19 +09:00
thanhnvandClaude Opus 4.8 d695a598ee feat: plan 16 P2 batch 2 (SEC-12 drift, SEC-29 audit fail-closed, SEC-30 replay, SEC-15 low)
- SEC-12: drift-detect adds semantic invariants — negation-flip detection (a dropped
  "not" now FAILS despite high char-similarity) + env must-keep patterns.
- SEC-29 (X-05): governance-check audit write fails CLOSED — an unwritable audit log
  denies the action and empties the output (no unaudited output).
- SEC-30 (X-06): approval-verify records a one-time-use nonce (sha of token/sig) and
  rejects replays (enforced mode / when a nonce ledger is set); dev unchanged.
- SEC-15 (low): typosquat distance<=2 with the levenshtein length-sentinel bug fixed
  (no false positives); tool-exec fails closed with no timeout backend in enforced
  mode; validate-tool-input now validates nested objects/arrays recursively.

Verify: new SEC suites all green via gate, run-casan4 0-FAIL, adversarial 44/44,
track-c 29/0, h5-approval 12/0, no regressions.

Plan-16 P2 remaining: infra-gated only (SEC-14/22/23/24/25/26).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 22:55:24 +09:00
thanhnvandClaude Opus 4.8 8c06a55aed feat: plan 16 P2 batch 1 (SEC-13 SSRF, SEC-27 log-escape, SEC-28 path-traversal)
- SEC-13 (M-09): SSRF allowlist on provider-usage-fetch (always block non-http(s)
  schemes; enforced mode blocks internal/link-local IPs + non-allowlisted hosts,
  dev keeps loopback mocks); dashboard refuses non-loopback bind in enforced mode.
- SEC-27 (X-02): casan-log strips ESC/CSI + CR/LF (terminal-escape + fake-log-line
  injection) while keeping tab and visible text.
- SEC-28 (X-04): new path-guard.sh — realpath resolve + reject symlink/.. escapes
  outside the allowed root.

Verify: SEC-13 6/0, SEC-27 3/0, SEC-28 4/0, adversarial 44/44, run-casan4 0-FAIL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 22:39:18 +09:00
thanhnvandClaude Opus 4.8 3432ae59e1 feat: plan 16 P1 complete (SEC-07 approval + SEC-10 agent identity)
- SEC-07 (M-08): real approval verification via approval-verify.sh in enforced mode
  (CASAN_PROFILE=prod / CASAN_APPROVAL_STRICT=1) for control-plane `set` (sensitive
  keys), kill-switch `clear`, and self-improve (inherits control-plane). A bare or
  forged approval string is now denied; dev mode stays backward-compatible.
- SEC-10 (M-05): non-spoofable agent identity. tool-registry-gate least-privilege no
  longer trusts CASAN_AGENT env in enforced mode (CASAN_IDENTITY_STRICT=1) — the
  caller must present a signed token (agent-identity-sign.sh) bound to agent id +
  run id, verified against agent-identities.registry. Blocks env spoofing + replay.

Verify: SEC+integrity gate 18/0, run-casan4 0-FAIL, adversarial 44/44 (H2 intact),
control-plane 9/0, h5-approval 12/0, c7-incident 15/0, self-improve 7/0, track-c 29/0.

Plan-16 P0 + P1 now complete; remaining: P2 (SEC-12/13/14/15/22..30).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 22:31:57 +09:00
thanhnvandClaude Opus 4.8 e70f0815ab feat: plan 16 P1 (SEC-08/09/19/20/21) — fail-open/DoS/authz hardening
- SEC-08 pii-mask: fail-closed on missing rules / broken regex (no unmasked leak)
- SEC-09: input-size cap + fail-closed reads (security-check/drift-detect/context-compress); non-UTF8 no longer crashes
- SEC-19: control-plane store POSIX flock + atomic tmp+rename write
- SEC-20: new toolchain-verify.sh (missing/PATH-shadowed/in-workspace binary -> refuse); wired into harness-preflight
- SEC-21: model-call timeout 180->60s configurable + per-run call budget
- SEC-11 realized by SEC-17 prod profile (no code)
- 5 fail-able test suites wired into ci-harness-gate.sh; test-integrity manifest regenerated

Verify: SEC+integrity gate 16/0, run-casan4 0-FAIL, adversarial 44/44, no regressions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 22:21:34 +09:00
thanhnv 8c3c5e8bff feat: plan 16-01 2026-07-06 21:47:38 +09:00
thanhnv 4419cd9eae update doc and optimize 2026-07-06 17:47:12 +09:00
thanhnv ace442da0e Add CASAN CI harness gate 2026-07-06 12:47:18 +09:00
thanhnv c49ab251df Add source generation mode for first artifacts 2026-07-06 12:38:03 +09:00
thanhnv d0bde2a8b3 Complete cloud provider patch MVP 2026-07-06 12:32:54 +09:00
thanhnv c7a1c743cb Update CASAN plan index status 2026-07-06 12:05:42 +09:00
thanhnv fc736aabf1 Add local production infra lab 2026-07-06 12:00:27 +09:00
thanhnv ec261bcbc5 remove video 2026-07-06 11:36:33 +09:00
thanhnv e79d7973fb Complete CASAN backlog tier 1 controls 2026-07-06 11:31:17 +09:00