Commit Graph
45 Commits
Author SHA1 Message Date
thanhnvandClaude Opus 4.8 8450f8ca1a feat(install): Plan-21 hybrid global install + casan init (pin+verify)
Adopt CASAN like a normal tool (codegraph-style): install the harness ONCE
per machine, then `casan init` per project writes CONFIG ONLY — the harness
is no longer copied into every repo.

- install.sh / install.ps1: global bootstrap (curl|sh / irm|iex or local
  source). Installs harness to $CASAN_HOME/versions/<ver>, writes a `casan`
  launcher that resolves the shared harness + the current project's .specify,
  and records a gate-code integrity hash. CASAN_NO_PATH_LINK for tests.
- harness_hash.py: deterministic content hash over gate code (scripts/bash,
  scripts/python, security, level5) — the pin+verify anchor.
- casan-init.py: `casan init` writes .casan/{config,version.lock,agentic.env},
  .specify/ marker, and the Plan-20 client hooks — no harness copy. `verify`
  recomputes the harness hash LIVE and compares to the project pin (drift/
  tamper -> rc 3), preserving the Plan-16 trusted-gates guarantee off-repo.
- bin/casan: new `init` and `verify-harness` commands.
- hybrid-install-tests.sh: 21/21 (install, config-only init, no-copy, pin,
  verify ok, tamper drift, bridge runs against project state via global harness).
- docs: CASAN_INSTALL_HYBRID.md + Plan-21.

The path model (casan-paths.sh) already separated harness/state/domain roots,
so this is installer + init, not a core rewrite. Remote dist tarball, real
Windows run, and signed .harness-hash are the documented next steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 21:26:54 +07:00
thanhnvandClaude Opus 4.8 f6d28a3163 feat(harness): Git Bash + graceful degradation for Windows agentic bridge
Wide-deployment Windows path without WSL2. The agentic bridge already runs
on native Python + PowerShell; the only bash dependency is the H4/H2 gate
scripts, which run under Git Bash (Git for Windows) — much lighter than WSL2.

- h4_scan now returns a status (ok|blocked|timeout|unavailable). Timeout stays
  FAIL-CLOSED (block/deny). "unavailable" (no bash / gate missing) DEGRADES the
  turn to observed_only and does NOT block the developer — never silently
  certifies without a working gate.
- bash interpreter is configurable via CASAN_AGENTIC_BASH; gates use it.
- doctor reports bash_available / gates_runnable + a remediation warning, and
  stays green (degraded, not failed) when bash is absent.
- tests: +4 no-bash cases (degrade to observed_only, tool still allowed,
  non-certified finalize, injection still blocked when bash present). 34/34.
- docs: Windows guide + security guide now point to Git Bash, not WSL2, and
  document the timeout-vs-unavailable distinction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:52:02 +07:00
thanhnvandClaude Opus 4.8 4bb184b935 feat(harness): implement Plan-20 transparent agentic client bridge
Wave 0 + Wave 1 core of the transparent agentic-client integration: a
developer types prompts normally in Claude Code / Codex while every
certified turn still carries a full H1->H7 trace and an H6 record.

- agentic_bridge.py: stdlib-only lifecycle state machine (begin/pre-tool/
  post-tool/telemetry/finalize/abort + report/doctor). Single-model
  invariant (never calls a model), fail-closed at the side-effect point,
  admission TTL + canonical-project/session binding, atomic state under
  .specify/state/agentic-sessions/, secret redaction, null-not-zero H6.
- agentic-lifecycle.schema.json: client-agnostic JSON contract.
- adapters/claude-code + adapters/codex: thin hook renderers + config
  templates that call the core bridge.
- phase-agentic-bridge-tests.sh: C1-C12 acceptance + threat suite (30/30).
- devkit templates/{claude,codex} + windows/install-agentic.ps1
  (install/doctor/uninstall with manifest, path-safe).
- docs/casan Windows + security/bypass guides; plan status -> IMPLEMENTED.
- harden generate-agentops-dashboard.py aggregation against null H6 costs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 20:44:07 +07:00
thanhnv 0cc43d94d3 plan: update plan20 2026-07-22 00:20:12 +07:00
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 4b6819f578 update report h6 2026-07-20 23:47:09 +07:00
thanhnv 13fae3e6c3 fix template, remove okr, use casan.* 2026-07-18 16:45:31 +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 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 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 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 f8215cd2eb feat: onboard service desk as second CASAN project 2026-07-10 17:00:35 +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 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 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 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 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