plain-forge 1.0.22-next.e8a40fd → 1.0.22
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/README.md +17 -26
- package/bin/cli.mjs +7 -4
- package/bin/python-tools.mjs +139 -0
- package/forge/rules/integration-embedded-testing.md +1 -1
- package/forge/rules/linked-resources.md +5 -2
- package/forge/skills/add-feature/SKILL.md +2 -1
- package/forge/skills/add-feature/references/checklist.md +1 -1
- package/forge/skills/add-resource/SKILL.md +5 -3
- package/forge/skills/check-forge-version/SKILL.md +1 -1
- package/forge/skills/check-forge-version/scripts/check-forge-version.mjs +1 -1
- package/forge/skills/check-plain-env/SKILL.md +7 -8
- package/forge/skills/forge-plain/SKILL.md +3 -4
- package/forge/skills/forge-plain/references/checklist.md +2 -2
- package/forge/skills/forge-plain/references/phase-3-testing.md +1 -1
- package/forge/skills/forge-plain/references/phase-4-validate-handoff.md +13 -15
- package/forge/skills/implement-conformance-testing-script/SKILL.md +3 -3
- package/forge/skills/implement-prepare-environment-script/SKILL.md +3 -3
- package/forge/skills/implement-unit-testing-script/SKILL.md +3 -3
- package/forge/skills/init-config-file/SKILL.md +22 -134
- package/forge/skills/init-plain-project/SKILL.md +5 -5
- package/forge/skills/init-plain-project/references/checklist.md +2 -2
- package/forge/skills/load-plain-reference/SKILL.md +3 -4
- package/forge/skills/load-plain-reference/references/project-model.md +1 -1
- package/forge/skills/plain-healthcheck/SKILL.md +42 -33
- package/package.json +2 -2
- package/forge/skills/load-codeplain-reference/SKILL.md +0 -188
- package/forge/skills/run-codeplain/SKILL.md +0 -483
|
@@ -150,7 +150,7 @@ Shared across both shell flavors **and** both variants:
|
|
|
150
150
|
- Any other non-zero code — propagated from the underlying test command.
|
|
151
151
|
- **Working folder naming:** `<temp>/<lang>_<basename>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...) and the **basename** of the *first* argument (the build folder — `$(basename "$1")` / `Split-Path $BuildFolder -Leaf`), never the conformance tests folder and never the raw argument (it may be absolute; concatenating it produces broken doubled paths). All dependency installs, build outputs, caches, test runner artifacts, and the test invocation itself live inside this folder. Nothing the script does should touch `$1` after step 5 (install-inline) / step 4 (activate-only), or `$2` at any point.
|
|
152
152
|
- **Cleanup ownership:** the **install-inline** variant removes its working folder on exit, success and failure alike (`trap 'rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`). The **activate-only** variant **never deletes the working folder** — prepare owns its lifecycle and re-creates it once per render; deleting it here would break every subsequent per-spec invocation.
|
|
153
|
-
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a
|
|
153
|
+
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a render and a green/red conformance result; when it fails, the only forensic evidence anyone has is its stdout/stderr. Treat the script like a production runbook, not a quiet helper. Concretely:
|
|
154
154
|
- **Announce every step before doing it**, with the exact value of every variable involved — the resolved build folder, the resolved conformance-tests folder, the working folder, the language, the toolchain version detected, the isolation root being activated (install-inline) or verified (activate-only), the variant in use, and the test command about to run. "Running tests" alone is useless; "Running `python -m unittest discover -b -s /abs/path/to/tests` from working folder `/tmp/python_build/` with venv activated at `./.venv` (Python 3.11.6)" is triage-ready.
|
|
155
155
|
- **Echo every non-trivial command before executing it.** In Bash, use `set -x` for the body of the script (or `echo "+ <cmd>"` immediately before each call); in PowerShell, set `$VerbosePreference = 'Continue'` and use `Write-Verbose` / `Write-Host` to print each command line with its arguments.
|
|
156
156
|
- **Print clear section banners.** Each pattern step gets a banner like `===== [6/8] Activate prepared environment =====` (activate-only) or `===== [7/8] Install dependencies =====` (install-inline) so a long log can be navigated by eye, **and** the banner names the variant so the operator immediately knows which branch is executing.
|
|
@@ -234,7 +234,7 @@ Notes:
|
|
|
234
234
|
- **Activate-only:** [Activating a prepared environment](#activating-a-prepared-environment-activate-only) table — use the matching verify, activate, and test-command columns in steps 4, 6, and 8.
|
|
235
235
|
6. Add the language-appropriate "no tests discovered" guard from [No tests discovered detection](#no-tests-discovered-detection).
|
|
236
236
|
7. Save the new script. For Bash, `chmod +x` it.
|
|
237
|
-
8. **Update `config.yaml` to reference the new script.** Add or update the `conformance-tests-script:` key with the path to the newly created script (e.g., `conformance-tests-script: test_scripts/run_conformance_tests_<lang>.sh`). This is mandatory — the
|
|
237
|
+
8. **Update `config.yaml` to reference the new script.** Add or update the `conformance-tests-script:` key with the path to the newly created script (e.g., `conformance-tests-script: test_scripts/run_conformance_tests_<lang>.sh`). This is mandatory — the renderer needs this reference to invoke the conformance test script after rendering each functional spec.
|
|
238
238
|
9. **Link the script into the base `.plain` files as a linked resource.** Once the script exists on disk, it must be referenced from the project's base `.plain` module(s) — typically the one carrying `***test reqs***` for the conformance-testing strategy — so the renderer sees the script's contents as ground truth for the conformance contract. Use the `add-resource` skill to add a standard markdown link (e.g. `[conformance test runner](test_scripts/run_conformance_tests_<lang>.sh)`) inside the relevant section of the spec, with the path resolved relative to the `.plain` file. The script is a single text file, so it satisfies the linked-resource contract directly — do not link the `test_scripts/` directory, do not paraphrase the script into the spec, and do not duplicate its commands inline. If multiple base `.plain` modules reference the conformance contract (e.g. a host module and an integration module that inherits from it), link the script from each module that needs it; the linked resource lives next to the spec that owns the test req, not at the top of the chain by default. After linking, read the spec back to confirm the link path resolves to the script you just wrote. If this is the activate-only variant, link the matching `prepare_environment_<lang>` script next to it from the same spec — the two halves of the conformance contract belong together.
|
|
239
239
|
10. **For activate-only scripts only**: smoke-test by running `prepare_environment_<lang>.<sh|ps1> <build> && run_conformance_tests_<lang>.<sh|ps1> <build> <tests>`. If the conformance script errors with "prepared environment missing" right after a successful prepare, the two scripts disagree on either the working-folder path or the isolation location — fix that before declaring done.
|
|
240
240
|
|
|
@@ -255,6 +255,6 @@ Notes:
|
|
|
255
255
|
- **Don't write a cross-shell hybrid** (e.g. a `.sh` that detects PowerShell, or vice versa). Ship one script per shell, named with the appropriate extension.
|
|
256
256
|
- **Don't install dependencies into the user's global location** (`~/.m2`, system-wide `pip`, `~/.cargo`, etc.) in the install-inline variant. Always isolate inside `$WORKING_FOLDER` so concurrent runs and other projects can't interfere.
|
|
257
257
|
- **Don't run the test command without first verifying the install / activation succeeded.** A failed install (or missing prepared env) followed by a "test" run produces misleading errors that look like test failures.
|
|
258
|
-
- **Don't forget to update `config.yaml`.** After creating the conformance test script, always add or update the `conformance-tests-script:` key in `config.yaml` to reference the new script. Without this entry, the
|
|
258
|
+
- **Don't forget to update `config.yaml`.** After creating the conformance test script, always add or update the `conformance-tests-script:` key in `config.yaml` to reference the new script. Without this entry, the renderer won't know where to find the conformance test script.
|
|
259
259
|
- **Don't forget to link the script as a resource in the base `.plain` files.** A script that is referenced only from `config.yaml` is invisible to the spec contract — the renderer treats `conformance-tests-script:` as a build-system pointer, not as part of the test-req contract the model reads. Use the `add-resource` skill to add a markdown link to the script from the `.plain` module that owns the conformance test reqs (see Workflow step 9). Omitting the linked resource means the model authors and reviews conformance-test code without ever seeing the actual runner it has to satisfy — and for activate-only scripts, the model also loses sight of which isolation paths must already be in place by the time tests run.
|
|
260
260
|
- **Don't write a terse script.** Silent steps, `>/dev/null` redirects on the install / activation output, missing `--version` prints, absent variant banners, an un-logged resolved `$2`, and a missing final summary all make the script harder to debug than the tests it is running. Follow the *Logging — be as verbose as possible* rule under [Conventions](#conventions) literally: every step announces itself, every command is echoed, the variant is named in its banner, the resolved `$CONFORMANCE_TESTS_FOLDER` is printed, every failure prints what was about to run and where, and the final summary names the variant, test command, exit code, and working folder.
|
|
@@ -134,7 +134,7 @@ Shared across both shell flavors:
|
|
|
134
134
|
- `0` — success.
|
|
135
135
|
- **Working folder naming:** `<temp>/<lang>_<basename>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...) and the **basename** of the first (and only) argument (`$(basename "$1")` / `Split-Path -Leaf`). Never embed the raw argument in the path — it may be absolute, and concatenating it produces broken doubled paths. All dependency installs, build outputs, caches, and pre-built artifacts live inside this folder. Nothing the script does should touch `$1` after step 4.
|
|
136
136
|
- **No cleanup on exit.** Prepare leaves the working folder populated — that folder is its deliverable. Do not add a `trap … EXIT` / `finally` deletion; the folder is reclaimed the next time prepare wipes-and-recreates it (and the OS eventually reclaims the temp dir).
|
|
137
|
-
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a
|
|
137
|
+
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a render and a green/red conformance result; when prepare fails, the only forensic evidence anyone has is its stdout/stderr. Treat the script like a production runbook, not a quiet helper. Concretely:
|
|
138
138
|
- **Announce every step before doing it**, with the exact value of every variable involved — the resolved source folder, the working folder, the language, the toolchain version detected, the isolation root, the dependency-manifest path, the install / pre-build command about to run. "Installing dependencies" alone is useless; "Installing dependencies from `./requirements.txt` into venv `./.venv` (Python 3.11.6 at `/usr/local/bin/python3`)" is triage-ready.
|
|
139
139
|
- **Echo every non-trivial command before executing it.** In Bash, use `set -x` for the body of the script (or `echo "+ <cmd>"` immediately before each call); in PowerShell, set `$VerbosePreference = 'Continue'` and use `Write-Verbose` / `Write-Host` to print each command line with its arguments.
|
|
140
140
|
- **Print clear section banners.** Each pattern step gets a banner like `===== [4/6] Copy build into working folder =====` so a long log can be navigated by eye.
|
|
@@ -192,7 +192,7 @@ Notes:
|
|
|
192
192
|
4. Translate each of the six pattern steps into the equivalent commands for the target language **and** shell. The toolchain check and dependency install/build are the language-specific parts; the rest is mechanical translation between Bash and PowerShell syntax.
|
|
193
193
|
5. Pick the dependency-isolation mechanism from the [Dependency isolation](#dependency-isolation) table. **Verify it matches the path used by the corresponding `run_conformance_tests_<lang>` script.**
|
|
194
194
|
6. Save the new script to the appropriate `test_scripts/` location (e.g. `test_scripts/prepare_environment_<lang>.sh` / `.ps1`). For Bash, `chmod +x` it.
|
|
195
|
-
7. **Update `config.yaml` to reference the new script.** Add or update the `prepare-environment-script:` key with the path to the newly created script (e.g., `prepare-environment-script: test_scripts/prepare_environment_<lang>.sh`). This is mandatory — the
|
|
195
|
+
7. **Update `config.yaml` to reference the new script.** Add or update the `prepare-environment-script:` key with the path to the newly created script (e.g., `prepare-environment-script: test_scripts/prepare_environment_<lang>.sh`). This is mandatory — the renderer needs this reference to invoke the prepare script before running conformance tests.
|
|
196
196
|
8. **Link the script into the base `.plain` files as a linked resource.** Once the script exists on disk, it must be referenced from the project's base `.plain` module(s) — typically the one carrying `***test reqs***` for the conformance-testing strategy — so the renderer sees the script's contents as ground truth for the prepare contract. Use the `add-resource` skill to add a standard markdown link (e.g. `[prepare environment](test_scripts/prepare_environment_<lang>.sh)`) inside the relevant section of the spec, with the path resolved relative to the `.plain` file. The script is a single text file, so it satisfies the linked-resource contract directly — do not link the `test_scripts/` directory, do not paraphrase the script into the spec, and do not duplicate its commands inline. If multiple base `.plain` modules reference the prepare contract (e.g. a host module and an integration module that inherits from it), link the script from each module that needs it; the linked resource lives next to the spec that owns the test req, not at the top of the chain by default. After linking, read the spec back to confirm the link path resolves to the script you just wrote.
|
|
197
197
|
9. **Reconcile the conformance script (see next section).** This is mandatory whenever a matching `run_conformance_tests_<lang>` already exists in the project.
|
|
198
198
|
10. After both scripts are in place and `config.yaml` is updated, do a paired re-read: open prepare and conformance side by side and confirm they agree on working folder name, isolation path, and toolchain version.
|
|
@@ -242,6 +242,6 @@ Adding a `prepare_environment_<lang>` script changes the contract for the corres
|
|
|
242
242
|
- **Don't forget to time the install.** Without the duration log, there's no way to tell whether prepare is actually saving wall-clock time vs. doing the same work the conformance script would have done inline.
|
|
243
243
|
- **Don't leave an existing `run_conformance_tests_<lang>` script untouched after generating prepare.** If the conformance script still does its own staging and install, prepare's work is wiped (by the `rm -rf`) or duplicated (by re-running install) on every run — defeating the purpose of this skill entirely. Always run the [Reconcile the existing conformance script](#reconcile-the-existing-conformance-script) step.
|
|
244
244
|
- **Don't default to Bash without checking the host OS.** A `.sh` script on native Windows (outside Git Bash / WSL) won't even run, and a `.ps1` script on macOS/Linux is equally useless. Always run the detection in [Pick the Shell First](#pick-the-shell-first) before deciding the file extension. If the project supports both, produce both files — and remember to reconcile the matching conformance script in **both** flavors too.
|
|
245
|
-
- **Don't forget to update `config.yaml`.** After creating the prepare environment script, always add or update the `prepare-environment-script:` key in `config.yaml` to reference the new script. Without this entry, the
|
|
245
|
+
- **Don't forget to update `config.yaml`.** After creating the prepare environment script, always add or update the `prepare-environment-script:` key in `config.yaml` to reference the new script. Without this entry, the renderer won't know to invoke the prepare script before running conformance tests, and the entire optimization will be bypassed.
|
|
246
246
|
- **Don't forget to link the script as a resource in the base `.plain` files.** A script that is referenced only from `config.yaml` is invisible to the spec contract — the renderer treats `prepare-environment-script:` as a build-system pointer, not as part of the test-req contract the model reads. Use the `add-resource` skill to add a markdown link to the script from the `.plain` module that owns the conformance / prepare test reqs (see Workflow step 8). Omitting the linked resource means the model authors and reviews conformance-test code without ever seeing the actual environment-prep contract it has to satisfy — and it cannot reason about which isolation paths conformance must activate.
|
|
247
247
|
- **Don't write a terse script.** Silent steps, `>/dev/null` redirects on the install / pre-build output, missing `--version` prints, absent failure banners, and a missing final summary line all make the script harder to debug than the code it is preparing. Follow the *Logging — be as verbose as possible* rule under [Conventions](#conventions) literally: every step announces itself, every command is echoed, every failure prints what was about to run and where, and the final summary names the language, working folder, isolation root, and duration.
|
|
@@ -62,7 +62,7 @@ Shared across both shell flavors:
|
|
|
62
62
|
- Any other non-zero code — propagated from the underlying test command.
|
|
63
63
|
- **Working folder naming:** `<temp>/<lang>_<basename>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...) and the **basename** of the build-folder argument (`$(basename "$1")` / `Split-Path $BuildFolder -Leaf`). Never embed the raw argument in the path — it may be absolute, and concatenating it produces broken doubled paths. All dependency installs, build outputs, caches, and the test run itself live inside this folder. Nothing the script does should touch the source build folder after step 4.
|
|
64
64
|
- **Cleanup on exit:** the working folder is temporary — remove it when the script exits, on success and failure alike (`trap 'rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`). No leftover build folders may accumulate in the temp directory or the user's project.
|
|
65
|
-
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a
|
|
65
|
+
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a render and a green/red test result; when it fails, the only forensic evidence anyone has is its stdout/stderr. Treat the script like a production runbook, not a quiet helper. Concretely:
|
|
66
66
|
- **Announce every step before doing it**, with the exact value of every variable involved — the resolved source folder, the working folder, the language, the toolchain version detected, the isolation root, the dependency-manifest path, the test command about to run. "Installing dependencies" alone is useless; "Installing dependencies from `./requirements.txt` into venv `./.venv` (Python 3.11.6 at `/usr/local/bin/python3`)" is triage-ready.
|
|
67
67
|
- **Echo every non-trivial command before executing it.** In Bash, use `set -x` for the body of the script (or `echo "+ <cmd>"` immediately before each call); in PowerShell, set `$VerbosePreference = 'Continue'` and use `Write-Verbose` / `Write-Host` to print each command line with its arguments.
|
|
68
68
|
- **Print clear section banners.** Each of the seven steps gets a banner like `===== [3/7] Working directory setup =====` so a long log can be navigated by eye.
|
|
@@ -117,7 +117,7 @@ Notes:
|
|
|
117
117
|
3. Translate each of the seven steps above into the equivalent commands for the target language **and** shell. The toolchain check, dependency install, and test invocation are the language-specific parts; the rest is mechanical translation between Bash and PowerShell syntax.
|
|
118
118
|
4. Pick the dependency-isolation mechanism from the [Dependency isolation](#dependency-isolation) table and use it consistently in both step 6 and step 7.
|
|
119
119
|
5. Save the new script to `assets/run_unittests_<lang>.sh` or `assets/run_unittests_<lang>.ps1`. For Bash, `chmod +x` it.
|
|
120
|
-
6. **Update `config.yaml` to reference the new script.** Add or update the `unit-tests-script:` key with the path to the newly created script (e.g., `unit-tests-script: test_scripts/run_unittests_<lang>.sh`). This is mandatory — the
|
|
120
|
+
6. **Update `config.yaml` to reference the new script.** Add or update the `unit-tests-script:` key with the path to the newly created script (e.g., `unit-tests-script: test_scripts/run_unittests_<lang>.sh`). This is mandatory — the renderer needs this reference to invoke the unit test script during the development workflow.
|
|
121
121
|
7. **Link the script into the base `.plain` files as a linked resource.** Once the script exists on disk, it must be referenced from the project's base `.plain` module(s) into its ***implementation reqs*** section using the `add-resource` skill. After linking, read the spec back to confirm the link path resolves to the script you just wrote.
|
|
122
122
|
|
|
123
123
|
## Anti-Patterns
|
|
@@ -131,6 +131,6 @@ Notes:
|
|
|
131
131
|
- Don't write a cross-shell hybrid (e.g. a `.sh` that detects PowerShell, or vice versa). Ship one script per shell, named with the appropriate extension.
|
|
132
132
|
- Don't install dependencies into the user's global location (`~/.m2`, system-wide `pip`, `~/.cargo`, etc.). Always isolate inside `$WORKING_FOLDER` so concurrent runs and other projects can't interfere.
|
|
133
133
|
- Don't run the test command without first verifying the install step succeeded. A failed install followed by a "test" run produces misleading errors that look like test failures.
|
|
134
|
-
- **Don't forget to update `config.yaml`.** After creating the unit test script, always add or update the `unit-tests-script:` key in `config.yaml` to reference the new script. Without this entry, the
|
|
134
|
+
- **Don't forget to update `config.yaml`.** After creating the unit test script, always add or update the `unit-tests-script:` key in `config.yaml` to reference the new script. Without this entry, the renderer won't know where to find the unit test script.
|
|
135
135
|
- **Don't forget to link the script as a resource in the base `.plain` files.** A script that is referenced only from `config.yaml` is invisible to the spec contract — the renderer treats `unit-tests-script:` as a build-system pointer, not as part of the test-req contract the model reads. Use the `add-resource` skill to add a markdown link to the script from the `.plain` module that owns the unit-testing test reqs (see Workflow step 7). Omitting the linked resource means the model authors and reviews test-related code without ever seeing the actual runner it has to satisfy.
|
|
136
136
|
- **Don't write a terse script.** Silent steps, `>/dev/null` redirects on the install output, missing `--version` prints, and absent failure banners all make the script harder to debug than the code it is testing. Follow the *Logging — be as verbose as possible* rule under [Conventions](#conventions) literally: every step announces itself, every command is echoed, every failure prints what was about to run and where.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init-config-file
|
|
3
3
|
description: >-
|
|
4
|
-
Build / finalize the `config.yaml` file(s) that the
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Build / finalize the `config.yaml` file(s) that the renderer consumes.
|
|
5
|
+
Pulls together every decision made during Phase 3 of `forge-plain` (script
|
|
6
|
+
paths, template directory, build folders) and emits one canonical
|
|
7
|
+
`config.yaml` per part of the project.
|
|
8
8
|
Run this at the **end of `forge-plain`** (just before `plain-healthcheck`),
|
|
9
9
|
at the end of `add-feature` whenever the testing surface or template
|
|
10
10
|
directory changed, and any time the user wants to regenerate / consolidate
|
|
@@ -13,9 +13,7 @@ description: >-
|
|
|
13
13
|
|
|
14
14
|
# Init Config File
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
This skill is the **single authoritative writer** of `config.yaml` for a ***plain project. Anything that ends up in `config.yaml` should go through this skill. The renderer (`codeplain`) reads each key listed below into the same argparse namespace it uses for CLI flags — so a value set in `config.yaml` is exactly equivalent to passing the corresponding `--flag` on the command line.
|
|
16
|
+
This skill is the **single authoritative writer** of `config.yaml` for a ***plain project. Anything that ends up in `config.yaml` should go through this skill. The renderer reads it to find the project's test scripts, templates, and output folders.
|
|
19
17
|
|
|
20
18
|
## When to run
|
|
21
19
|
|
|
@@ -31,139 +29,35 @@ If you only fixed a typo inside a `.plain` file and the testing surface didn't m
|
|
|
31
29
|
1. Determines **how many** `config.yaml` files the project needs (one per part — see [Per-part split](#per-part-split)).
|
|
32
30
|
2. For each config, gathers the decided values from the current project state (existing scripts under `test_scripts/`, the template directory, the build/dest folder choices).
|
|
33
31
|
3. Emits a clean, alphabetically-grouped `config.yaml` containing **only** keys that are actually in use, using the canonical key names from the [Valid keys reference](#valid-keys-reference).
|
|
34
|
-
4. Verifies that every `*-script` value points at a file that exists on disk under `test_scripts/` (or wherever the user placed it)
|
|
32
|
+
4. Verifies that every `*-script` value points at a file that exists on disk under `test_scripts/` (or wherever the user placed it): an absolute path (or a `~` path) is used as-is; a relative path in `config.yaml` resolves against the **config file's directory**. There is no other fallback.
|
|
35
33
|
5. Hands off to `plain-healthcheck` for the full validation pass.
|
|
36
34
|
|
|
37
35
|
## What this skill does NOT do
|
|
38
36
|
|
|
39
37
|
- It does **not** generate testing scripts. Use `implement-unit-testing-script`, `implement-conformance-testing-script`, or `implement-prepare-environment-script` first; this skill only wires them in.
|
|
40
|
-
- It does **not** decide *whether* the user wants conformance tests, a prepare-environment script,
|
|
38
|
+
- It does **not** decide *whether* the user wants conformance tests, a prepare-environment script, etc. Those decisions belong to `forge-plain` Phase 3. This skill only **records** them.
|
|
41
39
|
- It does **not** invent values for keys whose decisions weren't made — it leaves them out (the renderer falls back to its default) rather than guessing.
|
|
42
|
-
- It does **not** write secrets.
|
|
40
|
+
- It does **not** write secrets. API keys and tokens belong in environment variables, never in `config.yaml`.
|
|
43
41
|
|
|
44
42
|
## Valid keys reference
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
YAML keys use the **dashed** form (e.g. `unittests-script`, not `unittests_script`) to mirror the CLI flag spelling. The only exception that has historically appeared with underscores is `template_dir`; prefer `template-dir` for new configs but accept either when reading an existing file.
|
|
44
|
+
Only the keys below are valid.
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
YAML keys use the **dashed** form (e.g. `unittests-script`, not `unittests_script`). The only exception that has historically appeared with underscores is `template_dir`; prefer `template-dir` for new configs but accept either when reading an existing file.
|
|
51
47
|
|
|
52
|
-
These keys reflect choices made in Phase 3 of `forge-plain
|
|
48
|
+
These keys reflect choices made in Phase 3 of `forge-plain`:
|
|
53
49
|
|
|
54
50
|
| Key | Type | Default | When to include |
|
|
55
51
|
|---|---|---|---|
|
|
56
|
-
| `unittests-script` | path (string) | — | **Required.** Every project gets a unit-test runner. A relative path resolves against the config file's directory
|
|
52
|
+
| `unittests-script` | path (string) | — | **Required.** Every project gets a unit-test runner. A relative path resolves against the config file's directory. |
|
|
57
53
|
| `conformance-tests-script` | path (string) | — | Include when the user opted into conformance testing in Phase 3. |
|
|
58
54
|
| `prepare-environment-script` | path (string) | — | Include only when both (a) the user opted into a prepare-environment script and (b) `conformance-tests-script` is also set. Setting prepare without conformance is a hard `plain-healthcheck` failure. |
|
|
59
55
|
| `test-script-timeout` | int (seconds) | `120` | Include only when the user explicitly raised/lowered the default. |
|
|
60
|
-
| `template-dir` | path (string) | — | Include whenever the project has an `import` module or a custom template directory (e.g. `template/`). Required for projects with shared templates. |
|
|
61
|
-
| `logging-config-path` | path (string) | `logging_config.yaml` | Points at a **separate** YAML file consumed by Python's `logging.config.dictConfig`. This is the only knob that lets the user actually change log **levels** for the renderer and its dependencies. See [Logging configuration](#logging-configuration) below. Include the key explicitly whenever the project ships a non-default logging config; leave it out only when the user is happy with the renderer's defaults (`INFO` root, `WARNING` for `git`, `ERROR` for `transitions`). |
|
|
56
|
+
| `template-dir` | path (string) | — | Include whenever the project has an `import` module or a custom template directory (e.g. `template/`). Required for projects with shared templates. `plain-parser check` reads it too, so `plain-healthcheck` finds the templates. |
|
|
62
57
|
| `build-folder` | string | `plain_modules` | Include only when the user picked a non-default folder name. Must differ from `build-dest`. The renderer writes `<build-folder>/<module>/code` (implementation + unit tests) and `<build-folder>/<module>/tests` (conformance tests, one folder per functional spec). |
|
|
63
|
-
| `build-dest` | string | `dist` | **Always include with the value `dist`.** This skill pins the
|
|
64
|
-
| `base-folder` | string | — | Include when the user wants build output rooted somewhere other than the project root. |
|
|
65
|
-
|
|
66
|
-
### Keys you occasionally include
|
|
67
|
-
|
|
68
|
-
These are useful but the defaults are almost always fine. Only include them when the user explicitly changed the default during Phase 3:
|
|
69
|
-
|
|
70
|
-
| Key | Type | Default | Notes |
|
|
71
|
-
|---|---|---|---|
|
|
72
|
-
| `copy-build` | bool | `true` | The renderer copies the rendered code to `build-dest` after a successful render. Set to `false` only when the user doesn't want this. |
|
|
73
|
-
| `copy-conformance-tests` | bool | `false` | Requires `conformance-tests-script` to also be set. |
|
|
74
|
-
| `conformance-tests-dest` | string | `dist_conformance_tests` | Target folder for the post-render copy of `plain_modules/<module>/tests`. Must differ from `build-folder`. |
|
|
75
|
-
| `log-to-file` | bool | `true` | Disable only when the user explicitly does not want a log file. Controls whether logs are mirrored to disk — it does **not** set the log level (that's `logging-config-path`'s job). |
|
|
76
|
-
| `log-file-name` | string | `codeplain.log` | If `log-to-file` is `false`, this key must be left out. A relative value set here resolves against the config file's directory; when the key is left out entirely, the default resolves against the `.plain` file's directory. |
|
|
77
|
-
| `render-machine-graph` | bool | `false` | Include only when the user wants the state-machine graph rendered. |
|
|
78
|
-
| `headless` | bool | `false` | Include only when the project is meant to run in CI / non-interactive mode by default. |
|
|
79
|
-
| `force-render` | bool | `false` | Almost never belongs in `config.yaml`; prefer the CLI flag for one-off forced renders. |
|
|
80
|
-
| `verbose` | bool | `false` | Almost never belongs in `config.yaml`; prefer the CLI flag for one-off verbose runs. |
|
|
81
|
-
| `api` | URL (string) | `https://api.codeplain.ai` | Include only when the user is pointing at a non-default API endpoint. |
|
|
82
|
-
|
|
83
|
-
### Keys you must NEVER include
|
|
84
|
-
|
|
85
|
-
These flags are **per-invocation** or **secret**. Putting them in `config.yaml` is always wrong:
|
|
86
|
-
|
|
87
|
-
| Key | Why it doesn't belong |
|
|
88
|
-
|---|---|
|
|
89
|
-
| `api-key` | Secret. Belongs in the `CODEPLAIN_API_KEY` environment variable. Never in a file the user might commit. |
|
|
90
|
-
| `dry-run` | Per-invocation. `plain-healthcheck` runs the dry-run explicitly; pinning it in the config would make a real render impossible. |
|
|
91
|
-
| `full-plain` | Per-invocation preview. Mutually exclusive with `dry-run`. |
|
|
92
|
-
| `render-range` | Per-invocation. Selects a slice of functionalities to (re)render. |
|
|
93
|
-
| `render-from` | Per-invocation. Mutually exclusive with `render-range`. |
|
|
94
|
-
| `replay-with` | Internal / debugging flag. |
|
|
95
|
-
| `config-name` | Refers to the config file itself — the renderer ignores it when reading the config. |
|
|
96
|
-
| `filename` | The `.plain` file to render is always passed positionally on the CLI. |
|
|
97
|
-
|
|
98
|
-
If the user asks to put any of these in `config.yaml`, refuse and explain why.
|
|
99
|
-
|
|
100
|
-
## Logging configuration
|
|
101
|
-
|
|
102
|
-
Log **levels** are not controlled directly by `config.yaml` — they live in a separate YAML file that the renderer feeds to Python's `logging.config.dictConfig`. The `config.yaml` key `logging-config-path` is the pointer that wires the two together.
|
|
103
|
-
|
|
104
|
-
### How the renderer assembles logging
|
|
105
|
-
|
|
106
|
-
From `setup_logging` in the `codeplain` source:
|
|
107
|
-
|
|
108
|
-
1. The renderer first installs a set of **baseline levels**:
|
|
109
|
-
- root logger → `INFO`
|
|
110
|
-
- `LOGGER_NAME` (the renderer's own logger) → `INFO`
|
|
111
|
-
- `git` → `WARNING`
|
|
112
|
-
- `transitions` → `ERROR`
|
|
113
|
-
- `transitions.extensions.diagrams` → `ERROR`
|
|
114
|
-
2. **If** `args.logging_config_path` resolves to an existing file on disk, the renderer loads that YAML and calls `logging.config.dictConfig(...)` on it. This overlays anything from step 1 — the user can raise, lower, or add levels for any logger they care about, add handlers, change formatters, etc.
|
|
115
|
-
3. The renderer then attaches its own handlers (TUI handler unless `headless`, file handler if `log-to-file`, crash buffer otherwise). Whatever **level** the root logger ended up at after step 2 is the level those handlers respect.
|
|
116
|
-
|
|
117
|
-
In other words: `logging-config-path` is the **only** knob that changes the levels. `log-to-file` and `log-file-name` only control *whether and where* logs are written — not *what* gets written.
|
|
118
|
-
|
|
119
|
-
### Default behavior
|
|
120
|
-
|
|
121
|
-
- The CLI default value for `logging-config-path` is `logging_config.yaml`, resolved against the **`.plain` file's directory** (like every defaulted path parameter). If a file by that name exists next to the plain file, it will be loaded automatically — even without `logging-config-path` being set in `config.yaml`. A value set in `config.yaml` resolves against the config file's directory; a value passed on the CLI resolves against the invocation directory.
|
|
122
|
-
- If the file does not exist, the renderer silently keeps the baseline levels from step 1 above (no warning).
|
|
123
|
-
- If the file exists but fails to parse / apply, the renderer warns (`Failed to load logging configuration from …`) and falls back to the baseline.
|
|
124
|
-
|
|
125
|
-
This means **the mere presence of a `logging_config.yaml` file is itself a config decision.** When you assemble a project's `config.yaml`, you have three cases:
|
|
126
|
-
|
|
127
|
-
| Situation | What to do |
|
|
128
|
-
|---|---|
|
|
129
|
-
| The user is happy with the baseline levels and the project has no `logging_config.yaml` on disk. | Leave `logging-config-path` out of `config.yaml`. |
|
|
130
|
-
| The user wants custom levels and is fine with the file being named `logging_config.yaml` next to the `.plain` file. | Create that file (see [Recommended logging config](#recommended-logging-config) below). Leaving `logging-config-path` out of `config.yaml` is fine — the default points at it already — but explicitly setting `logging-config-path: logging_config.yaml` is also acceptable and makes the dependency visible to anyone reading the config. |
|
|
131
|
-
| The user wants the logging config file to live somewhere non-default (different filename or directory). | Create the file at the chosen path and set `logging-config-path: <that path>` in `config.yaml`. |
|
|
132
|
-
|
|
133
|
-
When in doubt, ask the user: "Do you want to change the default log levels (INFO for the renderer, WARNING for git, ERROR for transitions), or stick with the defaults?" Only generate / pin the file when they say yes.
|
|
134
|
-
|
|
135
|
-
### Recommended logging config
|
|
136
|
-
|
|
137
|
-
When the user does want custom levels, write a minimal `dictConfig`-style YAML file. Example with two common knobs (verbose renderer logs, plus suppression of a chatty third-party logger):
|
|
138
|
-
|
|
139
|
-
```/dev/null/logging_config.yaml.example#L1-15
|
|
140
|
-
version: 1
|
|
141
|
-
disable_existing_loggers: false
|
|
142
|
-
formatters:
|
|
143
|
-
default:
|
|
144
|
-
format: "%(levelname)s:%(name)s:%(message)s"
|
|
145
|
-
handlers:
|
|
146
|
-
console:
|
|
147
|
-
class: logging.StreamHandler
|
|
148
|
-
formatter: default
|
|
149
|
-
level: DEBUG
|
|
150
|
-
loggers:
|
|
151
|
-
codeplain:
|
|
152
|
-
level: DEBUG
|
|
153
|
-
urllib3:
|
|
154
|
-
level: WARNING
|
|
155
|
-
root:
|
|
156
|
-
level: INFO
|
|
157
|
-
handlers: [console]
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Guidelines for what to put in this file:
|
|
58
|
+
| `build-dest` | string | `dist` | **Always include with the value `dist`.** This skill pins the output destination explicitly so every project's `config.yaml` has the same, predictable target folder, visible in the file. Must differ from `build-folder`. |
|
|
161
59
|
|
|
162
|
-
-
|
|
163
|
-
- Set `disable_existing_loggers: false` unless the user explicitly wants to silence loggers that were created before `dictConfig` ran. The renderer creates several before it loads this file, and disabling them by default leads to confusing dead silence.
|
|
164
|
-
- Only override levels the user actually asked about. Don't preemptively add every logger the codebase touches — that creates ongoing maintenance for no benefit.
|
|
165
|
-
- Don't put the `LoggingHandler` / `CrashLogHandler` / `FileHandler` here — the renderer attaches those itself after `dictConfig` runs. Adding them here will cause duplicate log lines.
|
|
166
|
-
- This file is **not** validated by `plain-healthcheck`. If you change it, ask the user to confirm by reading it back to them.
|
|
60
|
+
Never put secrets or per-invocation options in `config.yaml`. If the user asks to, refuse and explain why.
|
|
167
61
|
|
|
168
62
|
## Per-part split
|
|
169
63
|
|
|
@@ -183,7 +77,7 @@ Before emitting anything, state the planned split to the user (e.g. "I'll emit `
|
|
|
183
77
|
2. For each top module, determine which part it belongs to (single-stack → one part; multi-part → one part per top module).
|
|
184
78
|
3. List every script under `test_scripts/` and group them by part (e.g. `*_python.sh` belongs to the backend part, `*_js.sh` belongs to the frontend part).
|
|
185
79
|
4. Identify the template directory (typically `template/`) and any custom resource directories (typically `resources/`).
|
|
186
|
-
5. Read any **existing** `config.yaml` in each part's directory — preserve any user-set fields not listed in [Valid keys reference](#valid-keys-reference) only with the user's explicit approval
|
|
80
|
+
5. Read any **existing** `config.yaml` in each part's directory — preserve any user-set fields not listed in [Valid keys reference](#valid-keys-reference) only with the user's explicit approval.
|
|
187
81
|
|
|
188
82
|
### Step 2 — Assemble per-part values
|
|
189
83
|
|
|
@@ -194,22 +88,19 @@ For each part:
|
|
|
194
88
|
3. If the part has a conformance script on disk → add `conformance-tests-script: …`.
|
|
195
89
|
4. If the part has a prepare-environment script on disk → first verify `conformance-tests-script` is also being added; if not, stop and surface this to the user (offer to either generate the missing conformance script via `implement-conformance-testing-script` or drop the prepare-environment script).
|
|
196
90
|
5. If the project has shared templates → add `template-dir: template` (or whatever path the user used).
|
|
197
|
-
6. **Always add `build-dest: dist`.** This skill pins the
|
|
91
|
+
6. **Always add `build-dest: dist`.** This skill pins the output destination on every config it writes, regardless of what Phase 3 said about it. If Phase 3 explicitly asked for a different `build-dest`, stop and surface the conflict to the user — do not silently honor the override.
|
|
198
92
|
7. For every other key in [Valid keys reference](#valid-keys-reference), include it **only** if Phase 3 produced a non-default decision for that key.
|
|
199
93
|
8. Cross-validate the assembled key set:
|
|
200
94
|
- `build-dest` is set to `dist`.
|
|
201
95
|
- `build-folder` ≠ `build-dest` (in particular, `build-folder` is never `dist`).
|
|
202
|
-
- `
|
|
203
|
-
- `copy-conformance-tests: true` requires `conformance-tests-script`.
|
|
204
|
-
- `log-file-name` is set ⇒ `log-to-file` is not `false`.
|
|
205
|
-
- All `*-script` paths resolve on disk (absolute / `~` paths as-is; relative paths against the config file's directory — no other fallback; the renderer fails fast on a missing script).
|
|
96
|
+
- All `*-script` paths resolve on disk (absolute / `~` paths as-is; relative paths against the config file's directory — no other fallback).
|
|
206
97
|
- No script path crosses stacks (e.g. `backend/config.yaml` must not reference `run_unittests_js.sh`).
|
|
207
98
|
|
|
208
99
|
### Step 3 — Emit `config.yaml`
|
|
209
100
|
|
|
210
101
|
For each part, write a clean YAML file:
|
|
211
102
|
|
|
212
|
-
- One key per line, in the order they appear in [Valid keys reference](#valid-keys-reference) (script paths first, then template/build folders
|
|
103
|
+
- One key per line, in the order they appear in [Valid keys reference](#valid-keys-reference) (script paths first, then template/build folders).
|
|
213
104
|
- Use dashed key names. Quote string values only when YAML requires it.
|
|
214
105
|
- No comments inside the file — keep it machine-parseable. If the user needs a comment, put it in the surrounding spec or README.
|
|
215
106
|
- Idempotent: re-running this skill on an unchanged project produces a byte-for-byte identical file.
|
|
@@ -241,10 +132,9 @@ Tell the caller exactly which file(s) were written and invoke `plain-healthcheck
|
|
|
241
132
|
|
|
242
133
|
- **Inventing values for keys the user never decided on.** Leave them out and let the renderer use its default.
|
|
243
134
|
- **Mixing stacks in one config.** `backend/config.yaml` referencing a JS script is always a bug — split into per-part configs instead.
|
|
244
|
-
- **Putting
|
|
135
|
+
- **Putting secrets or per-invocation options in `config.yaml`.**
|
|
245
136
|
- **Emitting `prepare-environment-script` without `conformance-tests-script`.** A prepare-environment script only makes sense in service of conformance tests; without one, `plain-healthcheck` will fail.
|
|
246
137
|
- **Hand-merging into an existing config.yaml without re-running this skill.** If the user edited the config manually, re-run the skill to re-derive a clean canonical version (after confirming any custom fields with the user).
|
|
247
|
-
- **Reading the renderer's API key from a project file.** Always rely on `CODEPLAIN_API_KEY`.
|
|
248
138
|
|
|
249
139
|
## Validation Checklist
|
|
250
140
|
|
|
@@ -254,9 +144,7 @@ Tell the caller exactly which file(s) were written and invoke `plain-healthcheck
|
|
|
254
144
|
- [ ] No `config.yaml` declares `prepare-environment-script` without also declaring `conformance-tests-script`.
|
|
255
145
|
- [ ] No `config.yaml` mixes stacks (every script in it targets the same language).
|
|
256
146
|
- [ ] `build-dest` is set to `dist` in every emitted `config.yaml`.
|
|
257
|
-
- [ ] `build-folder` ≠ `build-dest
|
|
258
|
-
- [ ]
|
|
259
|
-
- [ ] `log-file-name` only when `log-to-file` is not `false`.
|
|
260
|
-
- [ ] No forbidden keys (`api-key`, `dry-run`, `full-plain`, `render-range`, `render-from`, `replay-with`, `config-name`, `filename`).
|
|
147
|
+
- [ ] `build-folder` ≠ `build-dest`.
|
|
148
|
+
- [ ] No secrets or per-invocation options.
|
|
261
149
|
- [ ] `template-dir` set whenever the project has shared templates or import modules.
|
|
262
150
|
- [ ] `plain-healthcheck` returned `PASS` after the config(s) were written.
|
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
then scaffolds a template import module (with base implementation reqs and
|
|
7
7
|
test reqs), a stub top-level module, the unit testing script, and
|
|
8
8
|
(optionally) the conformance and prepare-environment scripts plus a
|
|
9
|
-
config.yaml. Does NOT run `
|
|
9
|
+
config.yaml. Does NOT run `plain-healthcheck`. Use when the user wants a
|
|
10
10
|
quick project skeleton to start writing functional specs against, without
|
|
11
11
|
the full forge-plain interview.
|
|
12
12
|
---
|
|
@@ -17,7 +17,7 @@ Always use the skill `load-plain-reference` to retrieve the ***plain syntax rule
|
|
|
17
17
|
|
|
18
18
|
## Scope
|
|
19
19
|
|
|
20
|
-
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
|
|
20
|
+
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 `add-feature`, `add-concept`, `add-functional-spec`, etc.
|
|
21
21
|
|
|
22
22
|
What this skill writes:
|
|
23
23
|
|
|
@@ -30,7 +30,7 @@ What this skill writes:
|
|
|
30
30
|
|
|
31
31
|
What this skill does **not** do:
|
|
32
32
|
|
|
33
|
-
- Run `
|
|
33
|
+
- Run `plain-healthcheck`.
|
|
34
34
|
- Author concepts, functional specs, or acceptance tests.
|
|
35
35
|
- Probe the host environment (`check-plain-env` is a separate step the user can run later).
|
|
36
36
|
|
|
@@ -111,7 +111,7 @@ template_dir: template
|
|
|
111
111
|
|
|
112
112
|
Always include `template_dir: template` because the project has a template import module from step 3. Use `.sh` on macOS/Linux and `.ps1` on Windows, matching whatever the implement-* skills produced.
|
|
113
113
|
|
|
114
|
-
Do **not** invoke `init-config-file` or `plain-healthcheck` here — keeping this skill light is the whole point. The user can run them later if they want a strict canonicalization or
|
|
114
|
+
Do **not** invoke `init-config-file` or `plain-healthcheck` here — keeping this skill light is the whole point. The user can run them later if they want a strict canonicalization or validation.
|
|
115
115
|
|
|
116
116
|
### 7. Recap
|
|
117
117
|
|
|
@@ -119,7 +119,7 @@ Tell the user what was created and what's next:
|
|
|
119
119
|
|
|
120
120
|
- Files written: `template/base.plain`, `<project>.plain`, the test scripts, `config.yaml`.
|
|
121
121
|
- Suggested next steps: add concepts with `add-concept`, add functional specs with `add-functional-spec` or `add-functional-specs`, or jump straight into `add-feature`.
|
|
122
|
-
- Mention that
|
|
122
|
+
- Mention that the project has not been validated — they can run `plain-healthcheck` when they want validation.
|
|
123
123
|
|
|
124
124
|
## Validation checklist
|
|
125
125
|
|
|
@@ -24,8 +24,8 @@ Use this to verify the scaffold was produced correctly — never as a substitute
|
|
|
24
24
|
- [ ] Generated `implement-conformance-testing-script` only if conformance was enabled (activate-only variant when a prepare-environment script will also exist, otherwise install-inline).
|
|
25
25
|
- [ ] Generated `implement-prepare-environment-script` only if conformance was enabled **and** the user opted in.
|
|
26
26
|
- [ ] Wrote `config.yaml` at the project root with only the keys for scripts actually generated, plus `template_dir: template`, using the correct `.sh`/`.ps1` extension for the host OS.
|
|
27
|
-
- [ ] Did **not** run `init-config-file`, `plain-healthcheck`, `check-plain-env
|
|
27
|
+
- [ ] Did **not** run `init-config-file`, `plain-healthcheck`, or `check-plain-env` (out of scope for this skill).
|
|
28
28
|
|
|
29
29
|
## Recap
|
|
30
30
|
|
|
31
|
-
- [ ] Told the user what was written, suggested next steps (`add-concept`, `add-functional-spec(s)`, `add-feature`), and noted that
|
|
31
|
+
- [ ] Told the user what was written, suggested next steps (`add-concept`, `add-functional-spec(s)`, `add-feature`), and noted that the project was not validated (they can run `plain-healthcheck` later).
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: load-plain-reference
|
|
3
3
|
description: >-
|
|
4
4
|
Loads the applicable ***plain authoring rules and operational references for the current task.
|
|
5
|
-
Covers section ownership, concepts, modules, resources, integrations, rendering, testing
|
|
6
|
-
|
|
5
|
+
Covers section ownership, concepts, modules, resources, integrations, rendering, and testing
|
|
6
|
+
without loading unrelated guidance. Use when authoring, editing, reviewing,
|
|
7
7
|
or debugging .plain files, or before invoking another skill that reads or writes .plain content.
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ rules, so every routing decision below inherits its verdict.
|
|
|
18
18
|
|
|
19
19
|
If that skill reports a stale or unconfirmed install, tell the user clearly that **authoring on an
|
|
20
20
|
outdated plain-forge is not recommended** and ask them to run `npx plain-forge update` before
|
|
21
|
-
continuing — the rules routed to below may not match what the current
|
|
21
|
+
continuing — the rules routed to below may not match what the current renderer expects.
|
|
22
22
|
Give them the choice rather than blocking: if they decline, continue with the rules on disk and treat
|
|
23
23
|
the stale install as the first suspect for anything that later behaves unexpectedly.
|
|
24
24
|
|
|
@@ -81,7 +81,6 @@ Authoring rules remain authoritative if a reference appears to conflict with the
|
|
|
81
81
|
|---|---|
|
|
82
82
|
| Project layout, source-of-truth model, or template inclusion | `references/project-model.md` |
|
|
83
83
|
| Rendering order, generated artifacts, conformance workflow, or test scripts | `references/rendering-and-testing.md` |
|
|
84
|
-
| `codeplain` path resolution or CLI options | Invoke `load-codeplain-reference` |
|
|
85
84
|
|
|
86
85
|
## 5. Continue with the task
|
|
87
86
|
|
|
@@ -19,7 +19,7 @@ plain_modules/ # Generated output, one directory per module
|
|
|
19
19
|
<module>/code/ # implementation and unit tests
|
|
20
20
|
<module>/tests/ # conformance tests, one folder per functional spec
|
|
21
21
|
test_scripts/ # Unit, environment-preparation, and conformance runners
|
|
22
|
-
config.yaml #
|
|
22
|
+
config.yaml # renderer configuration
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
The exact template directory can be configured. Follow the module and linked-resource rules for
|