docs: per-script local specs + spec-first change order (SPEC 6.11, 6.12)

Every script gets a complete spec.md sectionized like SPEC.md
(python/src/<name>/spec.md, <name>.spec.md for shell scripts).
Change order becomes spec -> tests -> code. Specs added for
gpgtools, hello, hello_bash; CHANGELOG under Unreleased.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
nvaldez
2026-11-19 00:54:03 +01:00
parent fef68a84c9
commit 85e8342a74
5 changed files with 308 additions and 5 deletions
+33
View File
@@ -0,0 +1,33 @@
# hello specification
Complete description of `python/src/hello/hello.py`. The sample
Python script of the template: it exercises the registry, the
`test` category, and the run_python_script entry end to end.
Items are cited as `hello spec item N.M`.
## 1. Purpose
- **1.1** Print one line, `hello from daedalus <version>`, and
exit 0. It takes no arguments of its own.
- **1.2** `<version>` comes from `app_version()`: the installed
daedalus metadata (`importlib.metadata.version("daedalus")`),
else the `version` field of the checkout's `pyproject.toml`
(resolved relative to the script file), else the literal
`unknown`.
## 2. Behavior
- **2.1** `daedalus hello` prints the line and exits 0;
`daedalus test hello` does the same through the category
prefix.
- **2.2** The parser opts in to argcomplete (SPEC item 6.9) with
a guarded import; without argcomplete nothing changes.
- **2.3** No files are read besides `pyproject.toml` in the
fallback; nothing is written.
## 3. Testing approach
- **3.1** `python/tests/test_hello.py` covers both version
resolutions (metadata and pyproject fallback, monkeypatched),
the printed line, `--help`, and end-to-end runs through the
CLI.