@turri-dev/cli 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/authoring-plain.md
CHANGED
|
@@ -145,7 +145,7 @@ Every skill in `genome/skills/` can be run from a conversation; most are also us
|
|
|
145
145
|
|
|
146
146
|
| to… | skills |
|
|
147
147
|
| --- | --- |
|
|
148
|
-
| start a project | `brood`, `spawn
|
|
148
|
+
| start a project | `brood`, `spawn` |
|
|
149
149
|
| make rough \*\*\*plain build | `mature` |
|
|
150
150
|
| add to \*\*\*plain | `bud`, `add-functional-spec`, `add-functional-specs`, `add-concept`, `add-implementation-requirement`, `add-test-requirement`, `add-acceptance-test`, `add-resource`, `add-template` |
|
|
151
151
|
| check what is written | `analyze-if-func-spec-too-complex`, `analyze-2-func-specs`, `analyze-func-specs`, `resolve-section-ownership` |
|
package/package.json
CHANGED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init-plain-project
|
|
3
|
-
description: >-
|
|
4
|
-
Lightweight initializer for a new ***plain project. Asks about the base
|
|
5
|
-
technology and project kind, asks whether conformance testing is enabled,
|
|
6
|
-
then scaffolds a template import module (with base implementation reqs and
|
|
7
|
-
test reqs), a stub top-level module, the unit testing script, and
|
|
8
|
-
(optionally) the conformance testing script under `test_scripts/`. Does NOT run `validate`. Use when the user wants a
|
|
9
|
-
quick project skeleton to start writing functional specs against, without
|
|
10
|
-
the full `brood` interview.
|
|
11
|
-
allowed-tools: [read, write, edit, bash, ls, grep, find]
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Init Plain Project
|
|
15
|
-
|
|
16
|
-
## Scope
|
|
17
|
-
|
|
18
|
-
This skill is intentionally **minimal**. It produces a runnable project skeleton — not a complete spec. **No `***definitions***` sections are written by this skill — not in the template module, not in the top module.** No functional specs, no concepts, no acceptance tests, no validation. The user will fill those in afterwards with `bud`, `add-concept`, `add-functional-spec`, etc.
|
|
19
|
-
|
|
20
|
-
What this skill writes:
|
|
21
|
-
|
|
22
|
-
- `template/base.plain` — an import module with the project's base `***implementation reqs***` and `***test reqs***`.
|
|
23
|
-
- `<project>.plain` — a top-level module that imports `base`. Frontmatter only — no body sections. The user adds `***functional specs***` later.
|
|
24
|
-
- `test_scripts/run_unittests_<lang>.sh` — always.
|
|
25
|
-
- `test_scripts/run_conformance_tests_<lang>.sh` — only if conformance testing is enabled.
|
|
26
|
-
|
|
27
|
-
turri requires these scripts: a build with no unit testing script (or, with conformance on, no conformance testing script) stops before it starts. The harness runs them with Bash on the person's machine, so they are `.sh` scripts.
|
|
28
|
-
|
|
29
|
-
What this skill does **not** do:
|
|
30
|
-
|
|
31
|
-
- Run `validate`.
|
|
32
|
-
- Author concepts, functional specs, or acceptance tests.
|
|
33
|
-
- Probe the host environment (`check-plain-env` is a separate step the user can run later).
|
|
34
|
-
|
|
35
|
-
## Workflow
|
|
36
|
-
|
|
37
|
-
### 1. Ask the project basics
|
|
38
|
-
|
|
39
|
-
Ask each with `ask_user`, one question per call, in this order:
|
|
40
|
-
|
|
41
|
-
- **Project name** — used as the top module filename and as `:AppName:` later. Free-form (`free_form: true`).
|
|
42
|
-
- **Base technology** — programming language and primary framework (e.g. Python + FastAPI, Node.js + Express, Go + net/http, Java + Spring Boot). Offer the most common stacks as options.
|
|
43
|
-
- **Project kind** — CLI tool, web app, REST API / backend service, library, desktop app, mobile app, other. Offer the common kinds as options.
|
|
44
|
-
|
|
45
|
-
Follow up with one free-form question for anything the options didn't cover (e.g. specific Python version, monorepo layout).
|
|
46
|
-
|
|
47
|
-
### 2. Ask about testing
|
|
48
|
-
|
|
49
|
-
Ask each with `ask_user`, one question per call:
|
|
50
|
-
|
|
51
|
-
- **Unit testing framework** — propose the canonical one for the chosen language (pytest, Jest, Go `testing`, JUnit, ...) and let the user override.
|
|
52
|
-
- **Conformance testing** — enabled or not. If the user is unsure, briefly explain it adds a `run_conformance_tests` script and per-spec acceptance tests later.
|
|
53
|
-
|
|
54
|
-
### 3. Author `template/base.plain`
|
|
55
|
-
|
|
56
|
-
Create the import module with `create-import-module`. It must contain:
|
|
57
|
-
|
|
58
|
-
- `***implementation reqs***` — the base stack as requirements **and everything about `:UnitTests:`**:
|
|
59
|
-
- Programming language and version.
|
|
60
|
-
- Primary framework (if any).
|
|
61
|
-
- Dependency / package manager.
|
|
62
|
-
- Project kind as a constraint (e.g. ":Implementation: should be a REST API service.").
|
|
63
|
-
- `:UnitTests:` framework (pytest / Jest / JUnit / Go's `testing` / …) and the command used to run them — phrased in terms of `:UnitTests:` so the partition is explicit.
|
|
64
|
-
- Anything else the user added in the free-form catch-all.
|
|
65
|
-
- `***test reqs***` — the base **conformance**-testing rules (only added if conformance testing is enabled):
|
|
66
|
-
- ":ConformanceTests: must be implemented and executed - do not skip tests."
|
|
67
|
-
- The `:ConformanceTests:` framework and the command used to run them.
|
|
68
|
-
- **Do NOT** put unit-test framework / command here — that lives in `***implementation reqs***` above.
|
|
69
|
-
|
|
70
|
-
Do **not** add a `***definitions***` section to `template/base.plain`. This skill does not author any concepts. Use only the predefined concepts (`:Implementation:`, `:ConformanceTests:`) in the reqs — no project-specific concepts like `:AppName:` or `:App:`. Do not declare `required_concepts` either.
|
|
71
|
-
|
|
72
|
-
Do **not** add `***functional specs***` to `template/base.plain` — it is an import module.
|
|
73
|
-
|
|
74
|
-
### 4. Author the top module `<project>.plain`
|
|
75
|
-
|
|
76
|
-
Create it at the repo root with frontmatter:
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
---
|
|
80
|
-
import:
|
|
81
|
-
- base
|
|
82
|
-
description: <one-line project description>
|
|
83
|
-
---
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Body: **none**. The file ends after the closing `---` of the frontmatter. Do **not** add `***definitions***`, do **not** add `***functional specs***`, do **not** add any other section. The user will add `***functional specs***` later via `add-functional-spec` / `add-functional-specs`, and any concepts via `add-concept`.
|
|
87
|
-
|
|
88
|
-
The file must still be created on disk — an empty body is fine, but the file itself is required.
|
|
89
|
-
|
|
90
|
-
### 5. Generate the testing scripts
|
|
91
|
-
|
|
92
|
-
Call the corresponding implementation skills in order. Each skill writes a Bash script, which is what the harness runs.
|
|
93
|
-
|
|
94
|
-
- `implement-unit-testing-script` — always. It runs the stack's static checks - formatter, linter, type checker - with the unit tests, and they count as the tests do.
|
|
95
|
-
- `implement-conformance-testing-script` — only if conformance testing was enabled. The script is self-contained: it stages the build, installs dependencies, and runs the module's whole conformance suite.
|
|
96
|
-
|
|
97
|
-
### 6. Check turri finds the scripts
|
|
98
|
-
|
|
99
|
-
turri finds the testing scripts in the project root, not through the specs: first in `config.turri.yaml` (`unittests-script:`, `conformance-tests-script:`, paths relative to the root), then the one `run_unittests*.sh` / `run_conformance_tests*.sh` in the root, then the one of each kind in `test_scripts/`. It puts them into the prompts of the agents that write and run the tests itself, so do not link them from `template/base.plain` (a link to one is ignored). Confirm every generated script is in `test_scripts/` and is the only one of its kind there - or, if the project wants it, that a `config.turri.yaml` at the root names the one to use and the path resolves. A project with parts on different stacks (e.g. a Python backend and a React frontend sharing an imported `base`) keeps one `config.turri.yaml` for what they share and gives each stack its own `config.turri.<stack>.yaml` beside it - `config.turri.backend.yaml`, `config.turri.frontend.yaml` - naming that stack's `unittests-script:` and `conformance-tests-script:`. Name each stack after the module it builds - `config.turri.backend.yaml` for `backend.plain` - and that module is built with it by itself, with nothing to choose; a stack named otherwise is passed as `stack` to `regenerate` in the chat, or `--stack <stack>` on the command line. When the project has only a `config.yaml`, copy it to `config.turri.yaml` first - and each `config.<name>.yaml` to `config.turri.<name>.yaml` - and write the copies; never write `config.yaml`.
|
|
100
|
-
|
|
101
|
-
Do **not** run `validate` here — keeping this skill light is the whole point. The user can run it when they want validation.
|
|
102
|
-
|
|
103
|
-
### 7. Recap
|
|
104
|
-
|
|
105
|
-
Tell the user what was created and what's next:
|
|
106
|
-
|
|
107
|
-
- Files written: `template/base.plain`, `<project>.plain`, the test scripts.
|
|
108
|
-
- Suggested next steps: add concepts with `add-concept`, add functional specs with `add-functional-spec` or `add-functional-specs`, or jump straight into `bud`.
|
|
109
|
-
- Mention that `validate` has not been run on `<project>.plain` yet.
|
|
110
|
-
|
|
111
|
-
## Validation checklist
|
|
112
|
-
|
|
113
|
-
Before the recap, walk `references/checklist.md` and confirm every box is met. It is a self-audit of this workflow — never a substitute for it. A box only counts as met when the file is on disk as described; complete any unmet step before recapping.
|
|
114
|
-
|
|
115
|
-
## Question style
|
|
116
|
-
|
|
117
|
-
Use simple grammatical structures: short direct sentences, one idea per sentence, plain words over jargon. Keep every constraint and edge case the user needs to answer accurately.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Init Plain Project Workflow Checklist
|
|
2
|
-
|
|
3
|
-
Use this to verify the scaffold was produced correctly — never as a substitute for the workflow. Run it once before the recap. This skill is intentionally minimal: it writes a runnable skeleton, not a complete spec. If a box is unmet, go back and complete the step.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Ask the basics
|
|
9
|
-
|
|
10
|
-
- [ ] Asked the project basics with `ask_user`, one question per call (project name, base technology, project kind), plus a free-form catch-all.
|
|
11
|
-
- [ ] Asked testing with `ask_user`, one question per call (unit-test framework, conformance on/off).
|
|
12
|
-
|
|
13
|
-
## Author the modules
|
|
14
|
-
|
|
15
|
-
- [ ] Created `template/base.plain` via `create-import-module` with `***implementation reqs***` (language/version, framework, package manager, project kind, and everything about `:UnitTests:` — framework + run command).
|
|
16
|
-
- [ ] Added `***test reqs***` to `template/base.plain` with the `:ConformanceTests:` rules **only** when conformance testing is enabled — and kept unit-test facts out of it.
|
|
17
|
-
- [ ] No `***definitions***`, no `***functional specs***`, and no project-specific concepts in `template/base.plain`; only predefined concepts (`:Implementation:`, `:ConformanceTests:`) used; no `required_concepts` declared.
|
|
18
|
-
- [ ] Created `<project>.plain` at the repo root with frontmatter only (`import: [base]`, `description`) and **no body sections** — the file exists on disk.
|
|
19
|
-
|
|
20
|
-
## Generate scripts
|
|
21
|
-
|
|
22
|
-
- [ ] Generated `implement-unit-testing-script` (always).
|
|
23
|
-
- [ ] The unit testing script runs the stack's static checks with the tests, exiting `80` when only the checks fail.
|
|
24
|
-
- [ ] Generated `implement-conformance-testing-script` only if conformance was enabled.
|
|
25
|
-
- [ ] Every generated script is in `test_scripts/`, the only one of its kind there - or named in a `config.turri.yaml` at the root (`unittests-script:`, `conformance-tests-script:`) - or, for a part on a stack of its own, in that stack's `config.turri.<stack>.yaml` - whose paths resolve. No script is linked from the specs.
|
|
26
|
-
- [ ] Did **not** run `validate` or `check-plain-env` (out of scope for this skill).
|
|
27
|
-
|
|
28
|
-
## Recap
|
|
29
|
-
|
|
30
|
-
- [ ] Told the user what was written, suggested next steps (`add-concept`, `add-functional-spec(s)`, `bud`), and noted that `validate` has not been run.
|