@mirnoorata/codexa 0.5.1 → 0.7.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 +46 -5
- package/dist/artifacts.js +302 -3
- package/dist/artifacts.js.map +1 -1
- package/dist/cli.js +60 -1
- package/dist/cli.js.map +1 -1
- package/dist/codex-contract.js +1 -1
- package/dist/eval/scoring.js +3 -0
- package/dist/eval/scoring.js.map +1 -1
- package/dist/eval/types.d.ts +1 -0
- package/dist/eval.js +13 -0
- package/dist/eval.js.map +1 -1
- package/dist/graph.js +68 -2
- package/dist/graph.js.map +1 -1
- package/dist/indexer/ranking.js +339 -17
- package/dist/indexer/ranking.js.map +1 -1
- package/dist/indexer.js +2 -2
- package/dist/indexer.js.map +1 -1
- package/dist/init.d.ts +3 -0
- package/dist/init.js +7 -1
- package/dist/init.js.map +1 -1
- package/dist/mcp/compaction.js +65 -0
- package/dist/mcp/compaction.js.map +1 -1
- package/dist/mcp/envelope.js +11 -4
- package/dist/mcp/envelope.js.map +1 -1
- package/dist/mcp/runtime.d.ts +4 -1
- package/dist/mcp/runtime.js +21 -3
- package/dist/mcp/runtime.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts +19 -7
- package/dist/mcp/tool-registry.js +16 -3
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools.d.ts +1 -1
- package/dist/mcp/tools.js +59 -30
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp-repo-root.js +45 -45
- package/dist/mcp-repo-root.js.map +1 -1
- package/dist/mcp.js +7 -6
- package/dist/mcp.js.map +1 -1
- package/dist/policy-pack.d.ts +37 -0
- package/dist/policy-pack.js +274 -0
- package/dist/policy-pack.js.map +1 -0
- package/dist/prove.d.ts +78 -0
- package/dist/prove.js +395 -0
- package/dist/prove.js.map +1 -0
- package/dist/query/post-edit.js +2 -203
- package/dist/query/post-edit.js.map +1 -1
- package/dist/query/required-checks.d.ts +13 -0
- package/dist/query/required-checks.js +61 -0
- package/dist/query/required-checks.js.map +1 -0
- package/dist/query/search.js +39 -0
- package/dist/query/search.js.map +1 -1
- package/dist/query/test-plan.d.ts +1 -0
- package/dist/query/test-plan.js +111 -31
- package/dist/query/test-plan.js.map +1 -1
- package/dist/query/verification-display.d.ts +12 -0
- package/dist/query/verification-display.js +150 -0
- package/dist/query/verification-display.js.map +1 -0
- package/dist/query-data.js +6 -1
- package/dist/query-data.js.map +1 -1
- package/dist/retrieval.d.ts +47 -1
- package/dist/retrieval.js +118 -1
- package/dist/retrieval.js.map +1 -1
- package/dist/session-memory/derivation.js +3 -0
- package/dist/session-memory/derivation.js.map +1 -1
- package/dist/types.d.ts +89 -2
- package/dist/types.js.map +1 -1
- package/integrations/.claude-plugin/marketplace.json +1 -1
- package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
- package/integrations/claude-code/README.md +8 -1
- package/integrations/claude-code/commands/codexa-prove.md +12 -0
- package/integrations/claude-code/scripts/cmd/prove.sh +17 -0
- package/integrations/claude-code/tests/cmd-smoke.sh +21 -0
- package/package.json +1 -1
- package/plugins/codexa/.codex-plugin/plugin.json +1 -1
- package/plugins/codexa/skills/codexa/SKILL.md +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -153,6 +153,17 @@ export interface WorkflowStep {
|
|
|
153
153
|
confidence: Confidence;
|
|
154
154
|
reason: string;
|
|
155
155
|
}
|
|
156
|
+
export type PacketSummarySource = "deterministic" | "external" | "llm-ready";
|
|
157
|
+
export interface PacketEvidenceProfile {
|
|
158
|
+
symbolSources?: Partial<Record<FactSource, number>>;
|
|
159
|
+
edgeSources?: Partial<Record<FactSource, number>>;
|
|
160
|
+
edgeConfidence?: Partial<Record<Confidence, number>>;
|
|
161
|
+
workflowConfidence?: Partial<Record<Confidence, number>>;
|
|
162
|
+
riskConfidence?: Partial<Record<Confidence, number>>;
|
|
163
|
+
staticAnalysisSymbolCount?: number;
|
|
164
|
+
lspSymbolCount?: number;
|
|
165
|
+
deterministicSymbolCount?: number;
|
|
166
|
+
}
|
|
156
167
|
export interface WorkflowTraceFact extends BaseFact {
|
|
157
168
|
type: "WorkflowTrace";
|
|
158
169
|
workflowKind: "route" | "job" | "test" | "manifest" | "module";
|
|
@@ -164,6 +175,29 @@ export interface WorkflowTraceFact extends BaseFact {
|
|
|
164
175
|
steps: WorkflowStep[];
|
|
165
176
|
summary: string;
|
|
166
177
|
rank: number;
|
|
178
|
+
processKind?: "entry-process" | "intra-module-process" | "cross-module-process";
|
|
179
|
+
entryScore?: number;
|
|
180
|
+
terminalFiles?: string[];
|
|
181
|
+
relatedModules?: string[];
|
|
182
|
+
stepCounts?: Partial<Record<WorkflowStep["kind"], number>>;
|
|
183
|
+
evidenceCounts?: Partial<Record<Confidence, number>>;
|
|
184
|
+
evidenceProfile?: PacketEvidenceProfile;
|
|
185
|
+
summarySource?: PacketSummarySource;
|
|
186
|
+
summaryPrompt?: string;
|
|
187
|
+
truncation?: {
|
|
188
|
+
relatedFiles?: {
|
|
189
|
+
total: number;
|
|
190
|
+
returned: number;
|
|
191
|
+
};
|
|
192
|
+
tests?: {
|
|
193
|
+
total: number;
|
|
194
|
+
returned: number;
|
|
195
|
+
};
|
|
196
|
+
steps?: {
|
|
197
|
+
total: number;
|
|
198
|
+
returned: number;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
167
201
|
}
|
|
168
202
|
export interface ModuleClusterFact extends BaseFact {
|
|
169
203
|
type: "ModuleCluster";
|
|
@@ -171,6 +205,42 @@ export interface ModuleClusterFact extends BaseFact {
|
|
|
171
205
|
files: string[];
|
|
172
206
|
summary: string;
|
|
173
207
|
rank: number;
|
|
208
|
+
clusterKind?: "path" | "functional";
|
|
209
|
+
sourceModules?: string[];
|
|
210
|
+
communityScore?: number;
|
|
211
|
+
topFiles?: string[];
|
|
212
|
+
topSymbols?: string[];
|
|
213
|
+
workflows?: string[];
|
|
214
|
+
tests?: string[];
|
|
215
|
+
risks?: string[];
|
|
216
|
+
relationCount?: number;
|
|
217
|
+
crossModuleRelationCount?: number;
|
|
218
|
+
evidenceCounts?: Partial<Record<Confidence, number>>;
|
|
219
|
+
evidenceProfile?: PacketEvidenceProfile;
|
|
220
|
+
summarySource?: PacketSummarySource;
|
|
221
|
+
summaryPrompt?: string;
|
|
222
|
+
truncation?: {
|
|
223
|
+
files?: {
|
|
224
|
+
total: number;
|
|
225
|
+
returned: number;
|
|
226
|
+
};
|
|
227
|
+
symbols?: {
|
|
228
|
+
total: number;
|
|
229
|
+
returned: number;
|
|
230
|
+
};
|
|
231
|
+
workflows?: {
|
|
232
|
+
total: number;
|
|
233
|
+
returned: number;
|
|
234
|
+
};
|
|
235
|
+
tests?: {
|
|
236
|
+
total: number;
|
|
237
|
+
returned: number;
|
|
238
|
+
};
|
|
239
|
+
risks?: {
|
|
240
|
+
total: number;
|
|
241
|
+
returned: number;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
174
244
|
}
|
|
175
245
|
export interface RiskSignalFact extends BaseFact {
|
|
176
246
|
type: "RiskSignal";
|
|
@@ -453,7 +523,7 @@ export interface ComplexityReviewData extends QueryObject {
|
|
|
453
523
|
items: ComplexityReviewItem[];
|
|
454
524
|
invariants: string[];
|
|
455
525
|
}
|
|
456
|
-
export type QueryResultMode = "context_pack" | "task_brief" | "focus_brief" | "session_context" | "change_plan" | "post_edit_review" | "test_plan" | "repo_map" | "search" | "find_context" | "symbol_context" | "impact" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report" | "session_memory" | "freshness";
|
|
526
|
+
export type QueryResultMode = "context_pack" | "task_brief" | "focus_brief" | "session_context" | "change_plan" | "post_edit_review" | "test_plan" | "repo_map" | "search" | "find_context" | "symbol_context" | "impact" | "diff_impact" | "callers" | "callees" | "dependency_path" | "workflow_path" | "placeholder_report" | "session_memory" | "freshness" | "proof_card";
|
|
457
527
|
export interface BaseQueryData {
|
|
458
528
|
mode: QueryResultMode;
|
|
459
529
|
task?: string;
|
|
@@ -585,6 +655,10 @@ export interface PostEditReviewData extends BaseQueryData {
|
|
|
585
655
|
}
|
|
586
656
|
export interface TestPlanData extends BaseQueryData {
|
|
587
657
|
mode: "test_plan";
|
|
658
|
+
actionability?: string;
|
|
659
|
+
targetFiles?: string[];
|
|
660
|
+
unindexedTargetFiles?: string[];
|
|
661
|
+
rejectedTargetFiles?: string[];
|
|
588
662
|
changedFiles?: string[];
|
|
589
663
|
changedEntries?: ChangedFileEntry[];
|
|
590
664
|
changedSymbols?: CompactChangedSymbol[];
|
|
@@ -600,7 +674,20 @@ export interface TestPlanData extends BaseQueryData {
|
|
|
600
674
|
verificationLedger?: VerificationLedgerEntry[];
|
|
601
675
|
testsNotRun?: TestRecommendation[];
|
|
602
676
|
}
|
|
603
|
-
export
|
|
677
|
+
export interface ProofCardData extends BaseQueryData {
|
|
678
|
+
mode: "proof_card";
|
|
679
|
+
actionability?: string;
|
|
680
|
+
repoRoot?: string;
|
|
681
|
+
freshness?: QueryObject;
|
|
682
|
+
readFirst?: QueryObject[];
|
|
683
|
+
snapshot?: QueryObject;
|
|
684
|
+
verification?: QueryObject;
|
|
685
|
+
policies?: QueryObject;
|
|
686
|
+
trustPosture?: string[];
|
|
687
|
+
nextCommands?: string[];
|
|
688
|
+
gaps?: string[];
|
|
689
|
+
}
|
|
690
|
+
export type CodexaQueryData = ContextPacketData | FocusBriefData | ChangePlanData | PostEditReviewData | TestPlanData | ProofCardData;
|
|
604
691
|
export type ChangeType = "style" | "api" | "behavior" | "rename" | "delete" | "unknown";
|
|
605
692
|
export interface ContextPackInput {
|
|
606
693
|
task?: string;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAg8BA,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAU,CAAC;AACjE,MAAM,CAAC,MAAM,gDAAgD,GAAG,qBAAqB,CAAC;AACtF,MAAM,CAAC,MAAM,6CAA6C,GAAG,qBAAqB,CAAC;AACnF,MAAM,CAAC,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAUpE,MAAM,CAAC,MAAM,+BAA+B,GAA2B;IACrE,aAAa,EAAE,sCAAsC;IACrD,yBAAyB,EAAE,yBAAyB;IACpD,gCAAgC,EAAE,gDAAgD;IAClF,6BAA6B,EAAE,6CAA6C;IAC5E,yBAAyB,EAAE,2BAA2B;CACvD,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "codexa",
|
|
9
9
|
"source": "./claude-code",
|
|
10
10
|
"description": "Codexa for Claude Code. MCP server exposes evidence-backed repo context tools; SessionStart injects repo context, PreToolUse saves an implicit pre-edit baseline, Stop runs the post-edit drift review and surfaces blocking drift to the model. Slash commands wrap the codexa CLI.",
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.7.0",
|
|
12
12
|
"category": "development",
|
|
13
13
|
"tags": [
|
|
14
14
|
"codexa",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codexa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Codexa for Claude Code. MCP server exposes evidence-backed repo context tools; SessionStart injects repo context, PreToolUse saves an implicit pre-edit baseline, Stop runs the post-edit drift review and surfaces blocking drift to the model. Slash commands wrap the codexa CLI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Codexa"
|
|
@@ -42,6 +42,7 @@ Slash commands available to Claude:
|
|
|
42
42
|
| ------------------ | ------------------------------------ |
|
|
43
43
|
| `/codexa-status` | `codexa status <repo>` |
|
|
44
44
|
| `/codexa-brief` | `codexa brief <repo> --diff` |
|
|
45
|
+
| `/codexa-prove` | `codexa prove <repo> --diff` |
|
|
45
46
|
| `/codexa-plan` | `codexa change-plan --save-snapshot` |
|
|
46
47
|
| `/codexa-review` | `codexa post-edit-review` |
|
|
47
48
|
| `/codexa-impact` | `codexa impact` / `diff-impact` |
|
|
@@ -60,7 +61,7 @@ They do not maintain a separate index, ranking layer, planner, or source-editing
|
|
|
60
61
|
path. The primary Codexa path stays:
|
|
61
62
|
|
|
62
63
|
```text
|
|
63
|
-
session_context -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan
|
|
64
|
+
session_context -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan -> proof_card
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
Use `symbol_context`, `impact`, `callers`, and `callees` when Claude needs to
|
|
@@ -80,6 +81,12 @@ Treat `codexa/integrations/` as a local Claude Code plugin marketplace. It
|
|
|
80
81
|
ships inside the npm package, so both a git checkout and an npm install work
|
|
81
82
|
as the marketplace source.
|
|
82
83
|
|
|
84
|
+
For a repo that should be ready for both proof cards and Claude hook guidance:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
codexa init <repo> --claude-md --policy-pack
|
|
88
|
+
```
|
|
89
|
+
|
|
83
90
|
### Quick, supported path (persistent)
|
|
84
91
|
|
|
85
92
|
From a Claude Code session:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Print a Codexa proof card for the current repo and task
|
|
3
|
+
argument-hint: "[task description]"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: Bash(bash:*)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Ask Codexa for a compact proof card. It reports freshness, dirty-tree state,
|
|
9
|
+
read-first files, saved change-plan snapshot status, verification commands that
|
|
10
|
+
would earn credit, local policy-pack status, trust posture, and remaining gaps.
|
|
11
|
+
|
|
12
|
+
!`bash "${CLAUDE_PLUGIN_ROOT}/scripts/cmd/prove.sh" "$ARGUMENTS"`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -u
|
|
3
|
+
CMD_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
4
|
+
# shellcheck source=lib.sh
|
|
5
|
+
. "$CMD_DIR/lib.sh"
|
|
6
|
+
|
|
7
|
+
raw_args="${1-}"
|
|
8
|
+
|
|
9
|
+
repo="$(cmd_require_codexa_repo)" || exit 1
|
|
10
|
+
cmd_require_codexa_cli
|
|
11
|
+
|
|
12
|
+
cli_args=(prove "$repo" --diff)
|
|
13
|
+
if [[ -n "$raw_args" ]]; then
|
|
14
|
+
cli_args+=(--task "$raw_args")
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
exec "$NODE_BIN" "$CODEXA_CLI" "${cli_args[@]}"
|
|
@@ -156,6 +156,27 @@ else
|
|
|
156
156
|
fail "brief passes the full task string through --task, preserving spaces" "rc=$LAST_RC stdout='$LAST_STDOUT'"
|
|
157
157
|
fi
|
|
158
158
|
|
|
159
|
+
# ---------- prove ----------
|
|
160
|
+
section "prove.sh"
|
|
161
|
+
|
|
162
|
+
run_cmd "prove.sh" "" "$REPO"
|
|
163
|
+
if [[ $LAST_RC -eq 0 ]] && printf '%s' "$LAST_STDOUT" | grep -Fxq "ARG: prove" \
|
|
164
|
+
&& printf '%s' "$LAST_STDOUT" | grep -Fxq "ARG: --diff"; then
|
|
165
|
+
pass "prove with no arguments prints a repo proof card"
|
|
166
|
+
else
|
|
167
|
+
fail "prove with no arguments prints a repo proof card" "rc=$LAST_RC stdout='$LAST_STDOUT'"
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
PROVE_TASK="fix behavior; rm -rf /"
|
|
171
|
+
run_cmd "prove.sh" "$PROVE_TASK" "$REPO"
|
|
172
|
+
if [[ $LAST_RC -eq 0 ]] && printf '%s' "$LAST_STDOUT" | grep -Fxq "ARG: prove" \
|
|
173
|
+
&& printf '%s' "$LAST_STDOUT" | grep -Fxq "ARG: $PROVE_TASK" \
|
|
174
|
+
&& ! printf '%s' "$LAST_STDOUT" | grep -q "^rm: "; then
|
|
175
|
+
pass "prove treats the full argument string as task text"
|
|
176
|
+
else
|
|
177
|
+
fail "prove treats the full argument string as task text" "rc=$LAST_RC stdout='$LAST_STDOUT'"
|
|
178
|
+
fi
|
|
179
|
+
|
|
159
180
|
# ---------- plan ----------
|
|
160
181
|
section "plan.sh"
|
|
161
182
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ Use this skill when a task involves understanding, editing, reviewing, or verify
|
|
|
10
10
|
## Operating Rules
|
|
11
11
|
|
|
12
12
|
1. Resolve the active repository first. If the repo has `.codex/config.toml`, use the project-local Codexa MCP server. If the MCP server is unavailable, run the equivalent `codexa` CLI command from the repository.
|
|
13
|
-
2. Primary Codexa path: `session_context -> search(if target unclear) -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan`.
|
|
13
|
+
2. Primary Codexa path: `session_context -> search(if target unclear) -> task_brief -> change_plan(saveSnapshot) -> post_edit_review -> test_plan -> proof_card`.
|
|
14
14
|
3. For broad tasks, call `session_context` first. If the target is unclear or `actionability` says `needs_target`, `raw_search_better`, or `raw_search_sufficient`, use first-class `search` or ask for an explicit target before planning edits.
|
|
15
15
|
4. For code edits, debugging, reviews, or non-trivial refactors, call `search` first when the target is unclear; otherwise call `task_brief` before reading or editing source.
|
|
16
16
|
5. For symbol-level changes, call `symbol_context` or `impact` when you need callers, callees, implementations, tests, risks, edge evidence, or the next exact Codexa tool.
|
|
@@ -38,6 +38,7 @@ codexa impact . --symbol "<symbol_or_stable_id>"
|
|
|
38
38
|
codexa change-plan . --task "<task>" --save-snapshot --task-id "<task_id>"
|
|
39
39
|
codexa post-edit-review . --task-id "<task_id>" --ran-command "<command>"
|
|
40
40
|
codexa test-plan .
|
|
41
|
+
codexa prove . --task "<task>" --task-id "<task_id>" --ran-command "<command>"
|
|
41
42
|
codexa serve . --transport http --host 127.0.0.1 --port 8729
|
|
42
43
|
```
|
|
43
44
|
|