@xcompiler/cli 0.2.3 → 0.2.4

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.
@@ -0,0 +1,36 @@
1
+ ---
2
+ id: agent.calibration.network-api
3
+ layer: agent
4
+ createdAt: "2026-07-18T00:00:00.000Z"
5
+ updatedAt: "2026-07-18T00:00:00.000Z"
6
+ status: active
7
+ category: network_api_failure
8
+ summary: "Network/API failures are real gates and require endpoint repair or replacement"
9
+ primaryError: "HTTP/API probe failed or returned unusable data"
10
+ debugDemand: "Identify the failed URL/status, reject unusable responses, switch to a suitable API when needed, patch the integration, and verify."
11
+ fingerprints:
12
+ - "cat:network_api_failure"
13
+ - "http:401"
14
+ - "http:403"
15
+ - "http:404"
16
+ - "http:429"
17
+ - "http:500"
18
+ symptoms:
19
+ - "Network API failure detected"
20
+ - "HTTP 401/403/404/429/5xx"
21
+ - "http_fetch loops or empty body"
22
+ resolutionPlan: "Use at most two probes, choose a reachable and schema-compatible API, then patch the real integration and validate with run_program plus tests."
23
+ solution: "Do not hide API failures with static fake data. For 401/403 without user credentials, switch to a no-key public API. For 404/410, replace the endpoint. For 429, add fallback/timeout/caching or use a less constrained API. HTTP 2xx with empty or unparsable body is not a usable API."
24
+ evidence:
25
+ - "Derived from calibrateDebugSuggestions network-api-failure and network-api-probe-loop rules"
26
+ language: python
27
+ stats:
28
+ uses: 0
29
+ successes: 1
30
+ failures: 0
31
+ feedback: []
32
+ ---
33
+
34
+ # Network/API debug calibration
35
+
36
+ API failures are functional failures. The Debugger must repair the integration or switch API and verify the entrypoint.
@@ -0,0 +1,33 @@
1
+ ---
2
+ id: agent.calibration.python-imports
3
+ layer: agent
4
+ createdAt: "2026-07-18T00:00:00.000Z"
5
+ updatedAt: "2026-07-18T00:00:00.000Z"
6
+ status: active
7
+ category: import_error
8
+ summary: "Python import failures require real module/dependency repair"
9
+ primaryError: "ModuleNotFoundError or ImportError"
10
+ debugDemand: "Inspect actual src/tests layout, fix imports or add real dependencies, and never fake missing modules in production code."
11
+ fingerprints:
12
+ - "cat:import_error"
13
+ - "err:modulenotfounderror"
14
+ - "err:importerror"
15
+ symptoms:
16
+ - "ModuleNotFoundError"
17
+ - "cannot import name"
18
+ - "from src.<module> import"
19
+ resolutionPlan: "Read the failing file and target module, compare actual symbols and paths, then patch the import or create the missing output/dependency."
20
+ solution: "Use sibling module imports inside src and tests. If the missing name is a third-party import, add the real package name, not an import alias. Never add try/except ImportError fake modules, fake classes, or production mocks to bypass the error."
21
+ evidence:
22
+ - "Derived from calibration rules ModuleNotFoundError, ImportError-name, src-prefix-import, mock-patch-target-src-prefix"
23
+ language: python
24
+ stats:
25
+ uses: 0
26
+ successes: 1
27
+ failures: 0
28
+ feedback: []
29
+ ---
30
+
31
+ # Python import debug calibration
32
+
33
+ Import errors are contract signals. Fix the import graph or dependency manifest; do not simulate the missing dependency.
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: system.debug.issue-flow
3
+ layer: system
4
+ createdAt: "2026-07-18T00:00:00.000Z"
5
+ updatedAt: "2026-07-18T00:00:00.000Z"
6
+ status: active
7
+ category: unknown
8
+ summary: "Issue-first debug flow with explicit resolution plans"
9
+ primaryError: "Debug attempts must repair recorded issues instead of hiding failures"
10
+ debugDemand: "Record issue evidence, require an explicit issueResolutionPlan, apply a minimal repair, and verify before resolving."
11
+ fingerprints:
12
+ - "cat:unknown"
13
+ - "debug:issue-resolution-plan"
14
+ symptoms:
15
+ - "Debugger receives a routed issue"
16
+ - "Attempt claims done without a reusable repair plan"
17
+ solution: "Treat every Debugger retry with issueId as issue handling. The LLM must output issueResolutionPlan before or while fixing the issue. The plan should state root cause hypothesis, target files/contracts, verification gate, and disconfirming evidence. Resolve only after a successful repair or verification action."
18
+ evidence:
19
+ - "issueResolutionPlan is persisted to the issue and external wiki after success"
20
+ stats:
21
+ uses: 0
22
+ successes: 1
23
+ failures: 0
24
+ feedback: []
25
+ ---
26
+
27
+ # Issue-first debug flow
28
+
29
+ Failures become issues first. Debugger repairs the issue, not the symptom. The repair plan is reusable knowledge and must survive in the external wiki after the issue is resolved.
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: system.debug.no-poisoning
3
+ layer: system
4
+ createdAt: "2026-07-18T00:00:00.000Z"
5
+ updatedAt: "2026-07-18T00:00:00.000Z"
6
+ status: active
7
+ category: tool_loop
8
+ summary: "Do not poison XCompiler with generated project-specific fixes"
9
+ primaryError: "Generated project failures must be fixed through process or agent behavior, not hardcoded into XCompiler."
10
+ debugDemand: "Fix Debugger/Coder workflow, tool contracts, or prompts; never add generated project fixtures or domain-specific hacks to XCompiler core."
11
+ fingerprints:
12
+ - "cat:tool_loop"
13
+ - "policy:no-poisoning"
14
+ symptoms:
15
+ - "A real sample project fails repeatedly"
16
+ - "Proposed fix adds project fixture or generated-project rule into XCompiler"
17
+ solution: "When a generated project exposes a recurring failure, fix the generic agent/tool/debug process. Do not add DBC/news/test-project-specific fixtures, hardcoded APIs, or one-off output rules to XCompiler core. External wiki entries may record the project issue and solution, but system/agent rules must remain general."
18
+ evidence:
19
+ - "Project-specific hardcoding is treated as poisoning"
20
+ stats:
21
+ uses: 0
22
+ successes: 1
23
+ failures: 0
24
+ feedback: []
25
+ ---
26
+
27
+ # No poisoning
28
+
29
+ XCompiler can learn from generated projects, but the learning must be generalized. Specific project artifacts belong to the generated project or the external wiki layer.
@@ -430,11 +430,12 @@ declare class AuditLogger {
430
430
  llmResponse(role: string, model: string, content: string, meta?: Record<string, unknown>): Promise<void>;
431
431
  llmError(role: string, model: string, err: unknown): Promise<void>;
432
432
  /**
433
- * 记录一轮 Executor 思考:thoughts 文本、计划调用的 actions、是否完成。
434
- * 写入 jsonl + markdown 折叠块,交付时可作为"AI 思考过程完整记录"。
433
+ * 记录一轮 Executor 执行摘要:简短 intent、issue 处理方案、计划调用的 actions、是否完成。
434
+ * 写入 jsonl + markdown 折叠块,交付时可追溯每轮决策和动作。
435
435
  */
436
436
  executorTurn(stepId: string, role: string, round: number, payload: {
437
437
  thoughts?: string;
438
+ issueResolutionPlan?: string;
438
439
  actions?: unknown[];
439
440
  done?: boolean;
440
441
  raw?: string;
@@ -498,11 +499,23 @@ interface ExecResult {
498
499
  stderr: string;
499
500
  timedOut: boolean;
500
501
  durationMs: number;
502
+ timeoutReason?: string;
503
+ }
504
+ interface ExecProgressWatch {
505
+ /** Host-side paths whose recursive size indicates install progress. */
506
+ paths: string[];
507
+ /** Kill the child only after this much time without size growth. */
508
+ idleTimeoutMs: number;
509
+ /** Poll interval for recursive size checks. */
510
+ checkIntervalMs?: number;
511
+ /** Human-readable label used in timeout diagnostics. */
512
+ label?: string;
501
513
  }
502
514
  interface ExecExtra {
503
515
  cwd?: string;
504
516
  env?: Record<string, string>;
505
517
  timeoutMs?: number;
518
+ progressWatch?: ExecProgressWatch;
506
519
  }
507
520
  /** 沙盒统一接口。任意 phase / tool 都通过此接口与运行时交互。 */
508
521
  interface Sandbox {
@@ -937,6 +950,8 @@ interface ExecuteOptions {
937
950
  force?: boolean;
938
951
  /** Optional XXX.xc project file to keep in sync with execution progress. */
939
952
  projectFilePath?: string;
953
+ /** Optional debug wiki root directory. Defaults to XCompiler's own .xcompiler/debug-wiki. */
954
+ debugWikiPath?: string;
940
955
  /** Project-file history command label; defaults to run. */
941
956
  projectCommand?: string;
942
957
  /** Whether to append a history row when execution starts; defaults to true. */