diff --git a/skills/render-spec/SKILL.md b/skills/render-spec/SKILL.md index a4f02bd..977c884 100644 --- a/skills/render-spec/SKILL.md +++ b/skills/render-spec/SKILL.md @@ -4,8 +4,8 @@ description: >- Renders a .plain specification module into working, tested code. Use when asked to render, build, or implement a .plain spec file or module: resolves and renders its required/imported modules in dependency order, producing - implementation code in plain_modules/, conformance tests in conf_tests/, - and the target module's output in dist/. + implementation code in plain_module/code/, conformance tests in + plain_module/tests/, and the target module's output in dist/. metadata: version: "0.2.0" --- @@ -14,6 +14,8 @@ metadata: When starting each step or substep, report with a message "Starting Step : ". +Do every step yourself. Never hand any step to a subagent, Agent/Task tool or workflow. Module count or spec size are not exceptions. + # Step 0: Python interpreter and version check `` is the absolute path of the directory holding this `SKILL.md`. Resolve it now and reuse it everywhere in this skill where `` is used: @@ -44,9 +46,8 @@ Inputs artifacts are: Generated artifacts are: * :RenderPlan: is a table listing all the modules for rendering and current render state. :RenderPlan: lives in `./render-plan.md`. -* :plainImplementationCode: lives under `./plain_modules` and follow `./plain_modules/` folder structure. -* :plainOutputCode: is the :plainImplementationCode: of the . -* :ConformanceTests: are living under `./conf_tests` and follow `./conf_tests/` folder structure. +* :plainImplementationCode: lives under `./plain_module/code`. Every module is rendered into this same folder, each building on top of the previously rendered ones. +* :ConformanceTests: are living under `./plain_module/tests`. ### Available tools and paths @@ -90,17 +91,11 @@ Report with a message showing the `dependencies.md`. ## Step 4: Rendering -Load the :RenderPlan: and for every module follow precisely the steps: - -### Step 4.0: Folder preparation -Report with a message "Step 4.0: Folder preparation of ". - -Create module's conformance tests folder `conf_tests/`. +Render every module yourself - never delegate any module to a subagent, Agent/Task tool or workflow. -Create module's implementation code folder `plain_modules/`. +Before rendering the first module, create the folders `plain_module/code` and `plain_module/tests` (skip any that already exist). -If there's previous rendered module, copy its complete contents to the current module's folder: -` "/scripts/copy_folder.py" plain_modules/ plain_modules/` +Load the :RenderPlan: and for every module follow precisely the steps: ### Step 4.1: Specs, reqs, test scenarios Report with a message "Step 4.1: Loading specs, writing reqs and test scenarios for: + ". @@ -109,66 +104,58 @@ Run the command with helper script, where are the module's spec followed ` "/scripts/plain_sections.py" all ` The output of this command are all the necessary specs for succesfully rendering this module. -Write exhaustive conformance test scenarios for every :plainFunctionality: of the 's spec into `conf_tests//scenarios.md`. +Write exhaustive conformance test scenarios for every :plainFunctionality: of the 's spec into `plain_module/tests/scenarios-.md`. * Scenarios should exhaustively test every :plainFunctionality: and should include :AcceptanceTests:. * Get the 's :AcceptanceTests: with ` "/scripts/plain_sections.py" acc-tests ` and cover every one of them. Write the lists of requirements using the helper script, where are module's spec plus the specs of its imported modules: -* impl. reqs: ` "/scripts/plain_sections.py" impl-reqs --output plain_modules//impl-reqs.md` -* test reqs: ` "/scripts/plain_sections.py" test-reqs --output plain_modules//test-reqs.md` +* impl. reqs: ` "/scripts/plain_sections.py" impl-reqs --output plain_module/tests/impl-reqs.md` +* test reqs: ` "/scripts/plain_sections.py" test-reqs --output plain_module/tests/test-reqs.md` Both lists hold the requirements verbatim - never paraphrase, reorder or drop any of them. ### Step 4.2: Implement code and tests Report with a message "Step 4.2: Implementation of ". -All the implementation code must be put in a self-contained `plain_modules/` folder. NOTHING OUTSIDE OF THIS FOLDER can be touched during this step 4.2. - -When referencing already rendered modules, ALWAYS REFER TO THEM RELATIVE FROM `plain_modules/` folder - never include `plain_modules/` in the import or require path. +All the implementation code must be put in the self-contained `plain_module/code` folder. Nothing outside of `plain_module` folder can be touched during this step. -Implement all :plainFunctionality: of specs while respecting all the requirements in `plain_modules//impl-reqs.md`. +Implement all :plainFunctionality: of specs while respecting all the requirements written in `plain_module/tests/impl-reqs.md`. Implement :UnitTests:. Implement :ConformanceTests: covering all test scenarios: -* Read all test scenarios from `conf_tests//scenarios.md`. -* Read test requirements in `plain_modules//test-reqs.md`. -* Implement the conformance tests covering all test scenarios and respecting test requirements into the `conf_tests/` folder. +* Read all test scenarios from `plain_module/tests/scenarios-.md`. +* Read test requirements in `plain_module/tests/test-reqs.md`. +* Implement the conformance tests covering all test scenarios and respecting test requirements into the `plain_module/tests` folder. ### Step 4.3: Tests verification Report with a message "#Step 4.3: Tests verification of ". If any tests are failing, go back to the implementation step (4.2), debug it and fix implementation code: -* Run and verify 's :ConformanceTests: are passing. -* Run and verify 's :UnitTests: are passing. +* Run and verify all :ConformanceTests: are passing. +* Run and verify all :UnitTests: are passing. ### Step 4.4: Reqs verification Report with a message "Step 4.4: Reqs verification of ". -Read the list `plain_modules//impl-reqs.md` and for every item: +Read the list `plain_module/tests/impl-reqs.md` and for every item: * Review if the implementation respects it. * Add checkbox with checked/unchecked status to the item. -Read the list `plain_modules//test-reqs.md` and for every item: +Read the list `plain_module/tests/test-reqs.md` and for every item: * Review if the conformance tests respect it. * Add checkbox with checked/unchecked status to the item. IMPORTANT: if any requirement list item is not passing, go back to the implementation (step 4.2), debug and fix it in the code. -### Step 4.5: Module folder cleanup -Report with a message "Step 4.5: Module folder cleanup". - -Remove any temporary files inside `plain_modules/` folder: -* `test-reqs.md` and `impl-reqs.md`. -* remove installed dependency artifacts (e.g. `node_modules/`, `.venv/`, `__pycache__/`, vendored packages), but keep the dependency manifests and lock files so dependencies can be reinstalled later. - When all 4.x steps are done, continue with rendering the next module until no more modules are left. ## Step 5: Finalize and report When all modules are rendered do: -- copy all of the files in the `plain_modules/` folder to the `./dist` folder: - ` "/scripts/copy_folder.py" plain_modules/ dist` +- remove installed dependency artifacts (e.g. `node_modules/`, `.venv/`, `__pycache__/`, vendored packages) in `plain_module/code`, but keep the dependency manifests and lock files so dependencies can be reinstalled later. +- copy all of the files in the `plain_module/code` folder to the `./dist` folder: + ` "/scripts/copy_folder.py" plain_module/code dist` - prepare a short report on the :plainImplementationCode: and :ConformanceTests: - present commands to run tests (unit and/or conformance tests) - present the command to run the rendered