Skip to content

claude-code: strengthen structured outcome attribution #60

Description

@SignalLayerLabs

Context

MARGINAL governance evidence is only useful if it accurately represents what Claude Code actually did.

Uncertainty must never be converted into success.

Contribution wanted

Improve and test conservative Claude Code outcome attribution.

Outcome classes

At minimum distinguish:

  • success;
  • failure;
  • unknown;
  • interrupted/cancelled;
  • unresolved/pending when a session terminates.

Rules

  • Prefer engine-declared facts over inference.
  • Never parse arbitrary prose or tool output to manufacture success.
  • Missing completion does not imply failure or success.
  • Unknown remains unknown.
  • Interrupted/cancelled must not be collapsed into failure unless Claude Code explicitly guarantees that semantic.
  • Measured duration/cost must be distinguishable from unavailable values.
  • Do not invent zero values for unavailable metrics.

Contribution scope

Inspect the actual Claude Code lifecycle payloads and exact tested version(s), then map them onto MARGINAL outcome semantics.

Where Claude Code exposes stronger evidence than the current adapter uses, add it conservatively.

Where the platform does not expose enough information, preserve unknown.

Acceptance criteria

  • Exact Claude Code lifecycle → MARGINAL outcome mapping is documented.
  • Characterization tests cover the real tested Claude Code payload shapes.
  • Regression tests cover success, failure, interruption/cancellation, unknown and unresolved actions.
  • Outstanding proposals settle safely at SessionEnd.
  • No arbitrary free-text interpretation is used for outcome classification.
  • Decision Ledger compatibility is preserved.
  • Evidence quality is not overstated when a signal is inferred or unavailable.
  • Existing Codex, OpenCode and PrivacyCode behavior remains unchanged.

Privacy

Raw prompts, source code, command text, error text and tool output must not be persisted merely to improve outcome attribution.

Use structured engine-provided signals and synthetic fixtures only.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeClaude Code integrationenhancementNew feature or requestevidenceEvidence quality, attribution and validationhelp wantedExtra attention is neededintegrationAgent/runtime integration work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions