Schema revisions per user review 2026-04-22 (all 6 open questions resolved — see §Decision log in SUBSTRATE-SCHEMA.md): - #3 side_effects: string tags → structured { op, domain } objects (user: "лучше сразу с запасом") - #4 capabilities.toml: DROPPED entirely (user: "почему не мд?"). SSoT is atoms/*.md. Crate-level metadata moves to Cargo.toml [package.metadata.keisei] — Cargo-native, no drift, no build.rs, no generated files to commit. kei-sage + kei-runtime walk atoms/*.md directly. - #5 atom template: shipped in this PR (user: "ui же параллельно! создавай все!") so Streams B/C/D can scaffold atoms from day 0 without waiting for Stream A (kei-forge UI). - #1/#2/#6 confirmed as drafted (draft-07, `::` separator, per-atom errors). New files: - _templates/atom/ — 5-file template set with placeholder substitution (__CRATE__, __VERB__, __KIND__, __DESCRIPTION__ etc). Covers atoms/<verb>.md, schemas/<verb>-{input,output}.json, src/atoms/<verb>.rs, tests/<verb>_smoke.rs. Each file is a minimal working skeleton. - scripts/new-atom.sh — POSIX bash generator (bash for $'\n' / readonly / trap). Validates verb is lowercase kebab-case, kind is one of command|query|stream|transform. Refuses to overwrite existing files. Rolls back on any failure (trap ERR deletes all generated files so no half-scaffolded state). Tested: produces 5 files, placeholder substitution correct on smoke-test crate. Stream B (atoms refactor) updated to drop the "generates capabilities.toml via build.rs" wording — now just "writes atoms/*.md + updates Cargo.toml [package.metadata.keisei]". Stream D reads atoms/*.md + Cargo.toml, not capabilities.toml. Schema status: revisions applied, decision log complete. Ready for SCHEMA-LOCKED.md marker commit once user signs off on revised doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
537 B
Text
42 lines
537 B
Text
---
|
|
atom: __CRATE__::__VERB__
|
|
kind: __KIND__
|
|
version: "0.1.0"
|
|
|
|
input:
|
|
schema: schemas/__VERB__-input.json
|
|
required: []
|
|
example: {}
|
|
|
|
output:
|
|
schema: schemas/__VERB__-output.json
|
|
example: {}
|
|
|
|
errors: []
|
|
|
|
side_effects: []
|
|
idempotent: true
|
|
timeout_ms: 5000
|
|
|
|
deprecated: null
|
|
stability: experimental
|
|
|
|
keywords: []
|
|
related: []
|
|
---
|
|
|
|
# __CRATE__::__VERB__
|
|
|
|
__DESCRIPTION__
|
|
|
|
## Example
|
|
|
|
__CRATE__ __VERB__ [args...]
|
|
|
|
## Gotchas
|
|
|
|
_TODO: document non-obvious behaviour_
|
|
|
|
## Related
|
|
|
|
_TODO: add [[atom-id]] wikilinks to related atoms_
|