Skip to content
This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b451ceb
fix(code-intel): preserve equal store migration rows
paudley Aug 28, 2026
6a397eb
Merge remote-tracking branch 'origin/main' into fix/store-migration-i…
paudley Aug 28, 2026
dec5a77
fix(code-intel): materialize lifecycle outcomes
paudley Aug 28, 2026
6fad090
feat(code-intel): measure token economy
paudley Aug 29, 2026
5de4e26
fix(run): allow managed git to replace policy files
paudley Aug 29, 2026
e8f2e42
fix(run): recognize managed git worktree rewrites
paudley Aug 29, 2026
a5c77a1
Merge branch 'fix/main-ci-failures' into feat/token-economy-measurement
paudley Aug 29, 2026
24e966f
fix(runtime): keep unattended lane gates moving
paudley Aug 29, 2026
04ca340
Merge commit '6a397eb' into fix/pre-push-new-branch-scope
paudley Aug 29, 2026
63afe50
Merge remediation outcome materialization
paudley Aug 29, 2026
5c60c76
Merge token economy measurement
paudley Aug 29, 2026
9091ab5
feat(code-intel): add PurRDF semantic extractor
paudley Aug 29, 2026
a5304d3
Merge pinned PurRDF code-intel extractor
paudley Aug 29, 2026
06f3b0d
feat(code-intel): add exact source generations
paudley Aug 29, 2026
b2140bb
Merge code-intel v2 with pinned PurRDF extraction
paudley Aug 29, 2026
05e7aaa
fix(build): fetch public PurRDF dependency over HTTPS
paudley Aug 29, 2026
2706a3b
test(coverage): exercise integrated feature paths
paudley Aug 29, 2026
f8b1521
fix(agent-hooks): accept native supervisor block contracts
paudley Aug 29, 2026
78e2b41
fix(code-intel): centralize external extractor contracts
paudley Aug 29, 2026
9b7e2fe
Merge native supervisor block contract fixes
paudley Aug 29, 2026
3851aa4
fix(token-economy): enforce benchmark isolation
paudley Aug 29, 2026
0200f03
fix(review): close integration correctness gaps
paudley Aug 29, 2026
56fae7b
fix(review): enforce integration edge contracts
paudley Aug 29, 2026
fd78c93
refactor(token-economy): isolate override validation
paudley Aug 29, 2026
a7e2b94
fix(agent-hooks): reject malformed Kimi hook output
paudley Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dmypy.json
.cache/
.worktrees/
.coding-ethos/cache/
.coding-ethos/code-intel-v2/
.coding-ethos/code-intel.db
.coding-ethos/code-intel.db-shm
.coding-ethos/code-intel.db-wal
Expand All @@ -70,6 +71,7 @@ dmypy.json
.coding-ethos/ci-artifact-*/
.coding-ethos/tmp-ci-audit/
**/.coding-ethos/cache/
**/.coding-ethos/code-intel-v2/
**/.coding-ethos/code-intel.db
**/.coding-ethos/code-intel.db-shm
**/.coding-ethos/code-intel.db-wal
Expand Down
39 changes: 37 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ MANAGED_PREFIX_DIR := $(TOOLCHAIN_DIR)/prefix
MANAGED_GITHUB_BIN_DIR := $(TOOLCHAIN_DIR)/github-bin
MANAGED_TOOLCHAIN_SOURCE := $(PRECOMMIT_DIR)hooks/managed-toolchain.tsv
MANAGED_TOOLCHAIN_MANIFEST := $(TOOLCHAIN_DIR)/manifest.tsv
PURRDF_EXTRACTOR_DIR := $(LOCAL_REPO_ROOT)/rust/purrdf-code-intel-extractor
PURRDF_EXTRACTOR_MANIFEST := $(PURRDF_EXTRACTOR_DIR)/Cargo.toml
PURRDF_EXTRACTOR_BINARY := coding-ethos-purrdf-extractor

GIT ?= /usr/bin/git
UV ?= uv
PYTHON ?= python
GO ?= go
GOFMT ?= gofmt
CARGO ?= cargo
GO_BUILD_FLAGS ?= -trimpath -buildvcs=false
GO_BUILD_CACHE_DIR ?= $(LOCAL_REPO_ROOT)/.coding-ethos/cache/go-build
UV_CACHE_DIR ?= $(LOCAL_REPO_ROOT)/.coding-ethos/cache/uv
Expand Down Expand Up @@ -245,6 +249,8 @@ endef
go-hook-runner-install \
policy-bundle-install \
go-tools-smoke \
purrdf-extractor-check \
purrdf-extractor-install \
go-tools-clean \
clean-cache \
sync-tool-configs \
Expand Down Expand Up @@ -446,7 +452,7 @@ python-coverage: ensure-uv ## Run Python tests with coverage enforcement.
@$(UV) run coverage report --fail-under="$(PYTHON_COVERAGE_MIN)"
@$(UV) run coverage xml -o "$(GO_COVERAGE_DIR)/coverage-python.xml"

check: check-local-artifacts test check-tool-configs check-gemini-prompts check-agent-skills check-provider-matrix go-test go-e2e-test ## Run the repo's current verification gate.
check: check-local-artifacts test check-tool-configs check-gemini-prompts check-agent-skills check-provider-matrix go-test go-e2e-test purrdf-extractor-check ## Run the repo's current verification gate.

check-local-artifacts: ## Fail if local build artifacts escaped managed output dirs.
@$(call print_step,Checking for unmanaged local build artifacts)
Expand Down Expand Up @@ -588,7 +594,36 @@ check-provider-matrix: ensure-go go-tools-install ## Fail if the provider capabi
@"$(GO_TOOLS_BIN_DIR)/coding-ethos-agent-hooks" \
check-provider-matrix --root "$(LOCAL_REPO_ROOT)"

build: sync-tool-configs sync-consumer-tool-configs sync-gemini-prompts _sync-agent-skills _sync-consumer-agent-skills sync-provider-matrix go-tools-install repair-repo-ignores _sync-git-hooks _sync-agent-hooks _sync-consumer-agent-hooks managed-toolchain-install go-hook-runner-install policy-bundle-install _sync-parent-hook-runtime ## Build checkout-local hook runtime artifacts.
build: sync-tool-configs sync-consumer-tool-configs sync-gemini-prompts _sync-agent-skills _sync-consumer-agent-skills sync-provider-matrix go-tools-install purrdf-extractor-install repair-repo-ignores _sync-git-hooks _sync-agent-hooks _sync-consumer-agent-hooks managed-toolchain-install go-hook-runner-install policy-bundle-install _sync-parent-hook-runtime ## Build checkout-local hook runtime artifacts.

purrdf-extractor-check: ## Test the optional PurRDF code-intel extractor when present.
@if [ -f "$(PURRDF_EXTRACTOR_MANIFEST)" ]; then \
command -v "$(CARGO)" >/dev/null 2>&1 || { \
printf '$(COLOR_WARN)cargo is required for the PurRDF extractor.$(COLOR_RESET)\n' >&2; \
exit 1; \
}; \
$(call print_step,Testing PurRDF code-intel extractor); \
"$(CARGO)" test --locked --manifest-path "$(PURRDF_EXTRACTOR_MANIFEST)"; \
else \
$(call print_info,PurRDF extractor subtree not present in this checkout); \
fi

purrdf-extractor-install: ## Build and install the optional PurRDF extractor when present.
@if [ -f "$(PURRDF_EXTRACTOR_MANIFEST)" ]; then \
command -v "$(CARGO)" >/dev/null 2>&1 || { \
printf '$(COLOR_WARN)cargo is required for the PurRDF extractor.$(COLOR_RESET)\n' >&2; \
exit 1; \
}; \
$(call print_step,Building PurRDF code-intel extractor); \
"$(CARGO)" build --locked --release --manifest-path "$(PURRDF_EXTRACTOR_MANIFEST)"; \
mkdir -p "$(GO_TOOLS_BIN_DIR)"; \
install -m 0755 \
"$(PURRDF_EXTRACTOR_DIR)/target/release/$(PURRDF_EXTRACTOR_BINARY)" \
"$(GO_TOOLS_BIN_DIR)/$(PURRDF_EXTRACTOR_BINARY)"; \
$(call print_info,installed: $(GO_TOOLS_BIN_DIR)/$(PURRDF_EXTRACTOR_BINARY)); \
else \
$(call print_info,PurRDF extractor subtree not present in this checkout); \
fi

sandbox-runtime-validate: ensure-go go-tools-install ## Validate required sandbox runtime.
@$(call print_step,Validating native sandbox runtime)
Expand Down
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ bin/coding-ethos-run code-intel decisions add --title 'Use explicit startup' --r
bin/coding-ethos-run code-intel decisions import docs/decisions
bin/coding-ethos-run code-intel decisions list --path pkg/app.py --query startup
bin/coding-ethos-run code-intel decisions health --path pkg/app.py
bin/coding-ethos-run code-intel rebuild-index
bin/coding-ethos-run code-intel sync --root .
bin/coding-ethos-run code-intel status --root .
bin/coding-ethos-run code-intel rebuild-derived
bin/coding-ethos-run code-intel hook-usage --risk-category bypass
bin/coding-ethos-run code-intel record-hook-review --trace-id hook-1 --disposition false_positive
bin/coding-ethos-run code-intel hook-reviews --disposition false_positive
Expand All @@ -474,6 +476,10 @@ bin/coding-ethos-run code-intel proxy-sessions --provider codex
bin/coding-ethos-run code-intel proxy-events --session-id sess-1
bin/coding-ethos-run code-intel session-snapshot --session-id sess-1 --format toon
bin/coding-ethos-run code-intel context-advice --session-id sess-1 --format toon
bin/coding-ethos-run code-intel token-economy ledger --provider codex --path /absolute/path/to/rollout.jsonl
bin/coding-ethos-run code-intel token-economy benchmark validate --manifest /private/protocol/frozen.yaml
bin/coding-ethos-run code-intel token-economy benchmark run --manifest /private/protocol/frozen.yaml --state-root /private/evidence --approved-max-runs 30
bin/coding-ethos-run code-intel token-economy report --historical --db /private/lane-1/code-intel.duckdb --db /private/lane-2/code-intel.duckdb --from 2026-08-01T00:00:00Z --to 2026-09-01T00:00:00Z --output-prefix /private/reports/history
bin/coding-ethos-run code-intel repeated-edits --path pkg/app.py
bin/coding-ethos-run code-intel remediation-outcomes --outcome repeated
bin/coding-ethos-run code-intel remediation-effectiveness --policy-id python.unused_imports
Expand Down Expand Up @@ -572,8 +578,12 @@ Use `--format json|toon|human` to choose between the stable automation payload,
compact TOON handoff, or a short operator-readable summary. The compact output
puts blocking friction, affected command families, repeated remediation loops,
storage repair commands, and evidence gaps ahead of high-volume allowed events.
`rebuild-index` refreshes the DuckDB analytical index from append-only events
and retained event logs, then removes obsolete store files after rebuild.
`sync` creates the exact immutable source generation for the current worktree.
`status` compares that generation to current source bytes and reports source
readiness independently from vector readiness. `rebuild-derived` refreshes the
DuckDB analytical index from append-only events and retained event logs, then
removes obsolete store files after rebuild. The old `rebuild-index` spelling is
a deprecated compatibility alias.

Inspect the repo-local disk output surface before pruning or deeper analysis:

Expand Down Expand Up @@ -683,8 +693,10 @@ detected repo paths, likely symbols, direct graph edges, repeated-failure
evidence, risk flags, and exact MCP follow-up calls such as
`code_intel_context_card {"path":"pkg/app.py"}`. Missing or stale code-intel
does not block the tool result; the hook emits a concise refresh hint with
`coding-ethos-code-intel rebuild-index`. Repositories can disable or cap this
context with `proxy.code_intel_enrichment` in `repo_config.yaml`.
`coding-ethos-code-intel sync --root .`. Hook and MCP metadata carry the
additive exact-source receipt under `coding-ethos.code-intel/v2`.
Repositories can disable or cap this context with `proxy.code_intel_enrichment`
in `repo_config.yaml`.

PreToolUse hooks also perform narrow semantic policy injection. Mutating Git
intents such as `policy-git commit` inject the `safe-git-workflow` skill pointer
Expand Down Expand Up @@ -1586,6 +1598,11 @@ bin/coding-ethos-run agent-hooks verify
bin/coding-ethos-run agent-hooks capabilities
```

The versioned capability report includes an optional `code_intel` object with
contract `coding-ethos.code-intel/v2` and the exact `sync` and `status` command
templates. Orchestrators can feature-detect that object without changing the
existing agent-hooks v1 discovery envelope.

Agent hook generation is all-or-nothing. `sync` writes every supported
repo-local surface. Provider support levels, native settings files, hook events,
MCP setup, generated targets, memory behavior, response shapes, and unsupported
Expand Down
Loading
Loading