Skip to content

Init plan schema

The init plan schema describes what witnyx init prints on standard output in agent mode. files lists each file that init manages, with its purpose and its status: planned, created or kept, and for a kept file the reason. nextActions lists what to do next, in order.

Without --write, nothing is written, and each file that would be created is planned. init never overwrites a file: a path that exists in any form, a symbolic link included, or that lies below a folder that is a symbolic link, is kept. witnyx init shows a plan.

Its ID is https://witnyx.dev/schemas/init/v1.json, and every plan names it in its schema field. witnyx schema init prints the copy bundled with the tool:

Terminal window
$ witnyx schema init
"$id": "https://witnyx.dev/schemas/init/v1.json",
"title": "Witnyx init plan, version 1",
init-v1.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://witnyx.dev/schemas/init/v1.json",
"title": "Witnyx init plan, version 1",
"description": "Printed on standard output by `witnyx init` in agent mode (spec sections 9 and 12.3). Without --write nothing is written, and each file that would be created is planned. init never overwrites a file: a path that exists in any form, a link included, or that lies below a folder that is a link, is kept.",
"type": "object",
"additionalProperties": false,
"required": ["schema", "files", "nextActions"],
"properties": {
"schema": { "const": "https://witnyx.dev/schemas/init/v1.json" },
"files": {
"description": "The three files init manages, always in this order: .witnyx.yml, SECURITY.md, the workflow.",
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": { "$ref": "#/$defs/file" }
},
"nextActions": {
"description": "What to do next, in order.",
"type": "array",
"items": { "type": "string", "minLength": 1 }
}
},
"$defs": {
"file": {
"type": "object",
"additionalProperties": false,
"required": ["path", "purpose", "status"],
"properties": {
"path": {
"description": "Relative to --repo-dir, with / separators.",
"enum": [".witnyx.yml", "SECURITY.md", ".github/workflows/release-security-check.yml"]
},
"purpose": { "type": "string", "minLength": 1 },
"status": {
"description": "planned: would be created; run init again with --write. created: written by this run. kept: left as it is; reason says why.",
"enum": ["planned", "created", "kept"]
},
"reason": { "description": "Why the file was kept.", "type": "string", "minLength": 1 }
},
"if": { "properties": { "status": { "const": "kept" } } },
"then": { "required": ["reason"] },
"else": { "not": { "required": ["reason"] } }
}
}
}

Witnyx is a record-keeping and workflow tool. It does not certify compliance. Nothing on this site is legal advice.