wydcode
A local terminal showing a staged code diff awaiting human promotion
v0.3.4 / local-first / BUSL-1.1

wydcode

Describe a bug at night. Review a hash-pinned diff in the morning. Your source tree stays untouched until you promote it.

AI writes in a staged workspace. Humans control the write gate.

THE PRODUCT IS THE LATCH

Leave the attempt alone. Keep promotion human.

The model may succeed, fail a test, return prose, or produce a plausible bad patch. Every outcome stays behind the same explicit sequence.

01
fix
Runs the local model and stages candidate files under .socra/.
02
review
Presents the exact diff and records its artifact hashes.
03
approve
A separate command binds authorization to the reviewed hash.
04
promote
The only product command allowed to write the real source tree.
05
test
Your repository gate verifies what actually landed.

90-SECOND START

Use a model you can pull and an endpoint you control.

wydcode expects Python 3.11+, Git, Node.js, npm, and an OpenAI-compatible local model endpoint. Hosted fallback is off by default.

install and initialize
# local model
$ ollama pull qwen2.5-coder:14b

# public package
$ npm install -g wydcode

# inside your git repository
$ wydcode init \
    --endpoint http://127.0.0.1:11434/v1 \
    --model qwen2.5-coder:14b
Scope
Name the plugin, function, error surface, or file. If scope is ambiguous, wydcode fails closed.
Endpoint
Ollama works; any OpenAI-compatible local endpoint can be configured.
Writes
Candidate edits live under .socra/ until a reviewed bundle is promoted.
Fallback
No hosted fallback in generated configuration.
delegate and promote
$ wydcode fix \
    "In the updateLocale plugin, partial updates wipe out sibling formats." \
    --declared-file src/plugin/updateLocale/index.js

$ wydcode review
$ wydcode approve
$ wydcode promote

DELEGATE WELL

A useful goal names the code area and the broken behavior. "It breaks" is weak. "processValue turns --timestamp into NaN before applyCoercions" gives the scope engine something deterministic to find.

RECEIPTS, INCLUDING FAILURES

The evidence is public and append-only.

A clean demo proves convenience. A wrong patch held outside the source tree proves the boundary.

RunModelOutcomeWhat it established
Clean Ubuntu VMqwen2.5-coder:14bpassInstall, fix, review, approve, promote, and test completed on a fresh VM.
Overnight Day.jsqwen2.5-coder:14bhuman_rejects_diffA plausible task-green patch mishandled arrays. Review rejected it; the real tree stayed clean.
Cold yargs issueqwen2.5-coder:14bnot_a_patchThe model returned advice instead of source. Static review stopped it before tests or promotion.
Day.js examornith-1.0-35b-Q6_K3/5A larger local model still had a measurable envelope. The gate stayed the constant.

HONEST BOUNDARY

Local-first is not the same as infallible or sandboxed.

What wydcode guarantees

  • Staged candidate writes under .socra/.
  • Separate review and approval with hashes binding the exact diff.
  • Promotion is explicit and is the only product source-write command.
  • Durable event logs for attempts, gates, interruption, and promotion.

What it does not claim

  • It is not a security sandbox. The configured model sees included source.
  • Small models are bounded. Real TypeScript and cross-file work may need a stronger model.
  • A green focused test is not proof. Read the diff before approval.
  • No model is trusted to self-promote. That is the point.

SOURCE-AVAILABLE

Readable source with a commercial hosting boundary.

Current license

Business Source License 1.1 (BUSL-1.1). This is source-available, not OSI open source.

Production grant

Production use is allowed except offering wydcode or Socra Harness to third parties as a commercial hosted service.

Change date

2030-07-09, converting to Apache-2.0 under the terms stated in the repository license.

Let the model attempt the fix. Keep the final write yours.