shadowgraph_record_attempt
Records one attempt with searchable solution and result details, commits a journal revision, and returns the stored record; idempotencyKey prevents duplicate retries.
Instructions
Record one attempt with its result; returns the stored attempt. Use shadowgraph_record_decision for a choice; shadowgraph_record_outcome updates an existing decision and its confidence. An attempt is a separate record. Appends an attempt and journal entry and commits a revision; idempotencyKey prevents duplicate retries. resultClass overrides wording-based failure classification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | Who performed this write, such as an agent or person name. Stored for audit; never used to grant trust. | |
| client | No | Which client software performed this write, such as the host application name. | |
| reason | No | Why it turned out that way. Searchable content. | |
| result | Yes | What happened. Required, non-empty, and searchable content. With no resultClass, wording such as failed, error, or regression is what places the attempt in shadowgraph_context failedAttempts; a captured attempt's wording is never read. | |
| project | No | Owning project; required unless originId is set, else the write is refused. | |
| originId | No | Capture-origin id; with no project the record belongs to it alone. | |
| solution | Yes | What was tried. Required, non-empty, and searchable content. | |
| sessionId | No | Caller-owned identifier that groups related writes in the audit trail. | |
| environment | No | Where it was tried, such as a runtime, OS, or version. Searchable content, so a later attempt can be matched to the same environment. | |
| resultClass | No | Classify the result instead of leaving it to the wording heuristic. Set it when the result text does not say failed, error, or regression, or when it does but the attempt did not fail. | |
| sourceClass | No | Claimed origin, never proof: agent_claimed (the default), tool_observed, human_confirmed, or production_verified. It weights confidence only. An unrecognised label downgrades to agent_claimed, kept verbatim in sourceRaw. | |
| idempotencyKey | No | Retry identity within the project or origin and operation (also scope/type/key for memory). Reuse it to recover the original canonical ID; this key is never an entity ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Stable entity identifier. | |
| kind | Yes | Entity kind: decision, attempt, memory, fact, relation, review, or alternative. | |
| actor | No | Who performed the write. | |
| client | No | Which client performed the write. | |
| reason | No | Why it turned out that way, verbatim as recorded. | |
| result | No | What happened. | |
| project | No | Project namespace; null for an unattributed record or one imported from before projects. | |
| solution | No | What was tried. | |
| createdAt | No | ISO 8601 creation time. | |
| relatedTo | No | Identifiers of related entities. | |
| sessionId | No | Session identifier recorded with the write. | |
| sourceRaw | No | The original origin label when it differed from sourceClass. Audit only; never evidence. | |
| updatedAt | No | ISO 8601 time of the last change. | |
| causalClaim | No | The cause, attributed apart from the attempt: state recorded (the reason, agent_claimed), unknown, not_recorded, or legacy_freetext (a reason stored before causes were, never classed or evidenced). | |
| environment | No | Where it was tried. | |
| resultClass | No | Declared or observed: failed, succeeded, or inconclusive. If absent: not captured (no captureRef or outcomeEvidence), the wording heuristic classifies; captured, the outcome is undetermined. | |
| sourceClass | No | Claimed origin class recorded with the write. A claim, never proof. | |
| reusableWhen | No | Conditions recorded for reusing the attempt. All must hold, and none may be unresolved. | |
| schemaVersion | No | Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded. |