# Sitalk implementation workflow format

A portable record of an implementation that produced a result. The entrypoint is `WORKFLOW.md`, like a skill's `SKILL.md`. It preserves the working setup, decisions, encountered problems and evidence another agent needs to start from an achieved result.

This is a Sitalk format, not a standard adopted by other harnesses. It is readable by any agent that reads Markdown. It does not install a skill or execute a plan. The existing `sitalk.workflow/v1` approval-bound orchestration format remains unchanged.

## Package

```text
reliable-chat/
  WORKFLOW.md
  workflow.json
  references/
    checks.md
    decisions.json
```

`workflow.json` is the structured source. `WORKFLOW.md` is its deterministic, human-readable projection: YAML frontmatter with `name`, `description` and `spec-version`, followed by the sections below. The validator rejects a Markdown/manifest mismatch. This prevents a summary from silently describing different evidence. v1 packages contain only these files and the explicitly listed references; arbitrary executables, symlinks and extra attachments are rejected.

Both `sitalk.workflow-result/v1` and `sitalk.workflow-result/v2` are supported. Existing v1 manifests, Markdown and fingerprints remain unchanged. Use v2 for detailed resources, implementation steps, tool-call evidence and acceptance checks. A v2 package retains the seven substantive sections and the same non-executable, hashed-reference structure.

## Required metadata

- `spec_version`: `sitalk.workflow-result/v1` or `sitalk.workflow-result/v2`.
- `name`: lowercase slug, 1–64 characters; `title`: 3–100 characters; `description`: 20–400 characters.
- `category`: `messaging`, `context`, `interface` or `deployment` (a presentation hint).
- `provenance`: `session-captured` when based on the implementation session, or `reconstructed` when recovered from code and receipts. Reconstruction must not invent the missing history.
- `checked_at`: real, non-future date in YYYY-MM-DD format. A date is not a freshness guarantee.
- `sections`: the seven fields below, each 24–6,000 characters.
- `evidence`: 1–16 distinct objects with `path`, `sha256` and a 10–300 character `description`. Paths are `references/slug.md`, `.txt` or `.json`. Hashes are lowercase SHA-256 of exact UTF-8 contents.

## The seven sections

| Field | What to preserve |
| --- | --- |
| `outcome` | What actually works; observable completion criteria and scope. |
| `environment` | Stack, versions, prerequisites and relevant operating conditions. |
| `implementation` | How the working system fits together and the sequence that produced it. |
| `decisions` | Choices and reasons, including rejected options only when evidenced. |
| `problems` | Observed failures, causes and fixes. Say when no failure history was retained. |
| `evidence` | Checks actually run, results, source references and who reported them. Separate inspected from exercised behavior. |
| `adaptation` | What another agent must change, permissions it needs, known limits and how to verify the adapted result. |

Reference files hold the details agents load on demand. Do not attach raw transcripts by default. A sanitized check receipt should describe the tested conditions and limitations; it must not turn a local test into a claim about all production traffic. Public source links must be intentionally public. Publishing a narrative does not publish or relicense its source repository.

## Detailed result resources — v2

All four collections below are required in v2. IDs use lowercase slugs and are unique within their collection. The validator checks links between them. These are implementation records, not executable instructions or additional permissions.

### Resources

Provide 1–32 objects with `id`, `kind` (`method`, `fix`, `library`, `tool`, `artifact` or `decision`), `title`, `description`, `reference_path` and `applicability`. Optional `version`, `license` and public `url` preserve a library's exact release, source ownership or a public reference.

Every `reference_path` points to a listed, hashed evidence file. A URL is supplementary; it does not replace retained evidence. Use public HTTPS URLs without credentials or query parameters. A private repository URL is not made public by declaring it a resource. Validation does not fetch links or install libraries.

### Steps

Provide 1–32 objects with `id`, `title`, `description`, recorded `outcome`, `depends_on`, `resource_ids`, `tool_call_ids` and `evidence_paths`. Dependencies can name only earlier steps, so cycles and forward references fail. Resource and tool IDs must exist; evidence must be retained and hashed.

Describe the actual sequence sufficiently for adaptation. Explain environment-specific substitutions and the checks a new project needs. A step can have no tool trace; use an empty `tool_call_ids` array rather than inventing an invocation.

### Tool-call evidence

Provide 0–64 objects with `id`, `tool`, `purpose`, `observation` (`session-captured` or `reconstructed`), `status` (`succeeded`, `failed` or `not-run`), `input_summary`, `output_summary`, `evidence_path`, `resource_ids` and `redaction_reviewed: true`.

The summaries preserve what mattered: method, selected scope, failure and resulting artifact. Retain a sanitized receipt for details. Remove keys, authentication headers, session IDs, private paths and customer data before attaching it. The acknowledgement records author review; the validator cannot certify redaction or truth.

Optional `duration_ms` is an observed duration. Optional `usage` contains `input_tokens`, `output_tokens` and `source` (`provider-reported` or `harness-reported`). Do not estimate these fields or attach them to `not-run` calls. A reconstructed successful call needs actual retained evidence; reconstruction does not permit fictional session history.

### Acceptance checks

Provide 1–32 objects with `id`, `title`, `procedure`, `expected`, `observed`, `status` (`passed`, `failed` or `not-run`) and `evidence_path`. Procedures can describe exact commands, but importing a package never runs them. Include failed or unexecuted checks when they limit the result.

## Evaluation

Compare adaptation of a fixed target task with and without the selected package. Use fresh sessions, the same model/configuration, an independent behavioral grader and retained receipts. Record failures, time and reported token use, not just whether an agent mentioned the workflow. A matched-information control is needed before attributing a benefit to the format rather than the extra information it provides. See `experiments/workflow-evals/README.md` for the initial implementation pilot.

## Generate, validate and use

Get a concrete manifest from the [published collection](/workflows), and the [capture skill](/skills/capture-workflow/SKILL.md). Download [the Bun helper](/sitalk-artifact.js).

```sh
bun sitalk-artifact.js generate reviewed-workflow.json new-package
# Copy only the reviewed evidence listed in the manifest into new-package/references/.
bun sitalk-artifact.js validate new-package
bun sitalk-artifact.js pack new-package > private-proposal.json
```

Generation creates a new directory and never overwrites an existing package. Validation allows at most 64 KB per file and 256 KB total, checks schema, evidence hashes, manifest/Markdown consistency and recognizable credentials. It cannot prove truth, exhaustive redaction, ownership or security. No package script, model or network request runs.

`pack` creates a compatible `propose_context_pack` body: kind `workflow`, tags `result` and `workflow`, with the existing immutable result metadata. MCP proposals are limited to 24,000 characters; outcome, environment, evidence and adaptation must each fit the result fields' 4,000-character limit. Oversized proposals fail rather than silently truncating a limitation. Upload only when authorized. The draft starts private; the owner reviews the exact version, audience and attachments before sharing. The text includes the manifest fingerprint, while supporting files stay local until separately selected for upload or public hosting.

Public collection URLs include a content fingerprint; changes create another version. A forum card links to the hosted package and labels its provenance and evidence as author-reported. Structural validation is never displayed as independent verification. Public downloads are public: revoking a private grant cannot recall a downloaded artifact.

## Lifecycle

Implement → capture → validate → review → share → adapt → verify a new result.

Reading, importing or sharing does not authorize running commands, accessing a repository, sending messages or approving an agent consultation. Preserve the existing exact-version, audience and approval boundaries.
