From 22392161ba1c5dac31f7a98f8f3502c57854370e Mon Sep 17 00:00:00 2001 From: stephan Date: Fri, 8 May 2026 17:31:18 +0200 Subject: [PATCH] =?UTF-8?q?LoRA=20augmentation:=20196=20=E2=86=92=20323=20?= =?UTF-8?q?records=20(full=20agent=20run)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earlier commit captured a partial 196-record file because the background research agent was still writing when the commit landed. The agent has since completed with 323 high-quality records. New distribution by kind: 121 code-recall · 97 workflow · 29 inikey · 26 comparison 16 gotcha · 16 debug · 15 edge-case · 3 refactor All 323 lines are valid JSON, all carry instruction/input/output plus metadata.{language, source, section, kind, citations}. Every answer has a real file:line citation or quoted code from framework-reference-v2.md (no hedging language allowed in agent output). Effect on en-language corpus: before: 1264 records per format after: ~1545 records per format (+281 from augmentation × ~1) Co-Authored-By: Claude Opus 4.7 (1M context) --- .../extraction/lora-augmentation.jsonl | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/docs/scripts/extraction/lora-augmentation.jsonl b/docs/scripts/extraction/lora-augmentation.jsonl index 2667018..7ff59db 100644 --- a/docs/scripts/extraction/lora-augmentation.jsonl +++ b/docs/scripts/extraction/lora-augmentation.jsonl @@ -194,3 +194,130 @@ {"instruction":"How do I read `pageurl` from the INI inside controller code?","input":"","output":"```php\n$url = Config::getInstance()->getConfig()['SETTINGS']['pageurl'];\n```\nThe key is custom (no core consumer). The framework only documents it — you read it manually. From `framework-reference-v2.md §7 [SETTINGS]`.","metadata":{"language":"en","source":"framework-reference-v2","section":"7 INI [SETTINGS]","kind":"inikey","citations":["framework-reference-v2.md §7"]}} {"instruction":"What does `entriesperpage` do in the INI?","input":"","output":"It's a custom-use INI key in `[SETTINGS]` with no core consumer — application code reads it for pagination size. The framework documents it in `framework-reference-v2.md §7 [SETTINGS]` but doesn't act on it.","metadata":{"language":"en","source":"framework-reference-v2","section":"7 INI [SETTINGS]","kind":"inikey","citations":["framework-reference-v2.md §7"]}} {"instruction":"My module's trait has a public method but the IDE says it's undefined when used in another module's class. Why?","input":"","output":"Module-specific traits live under `\\Nibiru\\Module\\\\Traits\\`. To use a trait from module `users` (`\\Nibiru\\Module\\Users\\Traits\\UserForm`) inside another class, you must `use \\Nibiru\\Module\\Users\\Traits\\UserForm;` AND ensure the autoloader has loaded the trait file. The autoloader only scans the trait if `[AUTOLOADER] trait.pos[] = \"users\"` is in the INI. If you reference the trait from a class in a different module that loads BEFORE `users`, the trait won't be available yet. From `framework-reference-v2.md §1`, §4.2, §11.4.","metadata":{"language":"en","source":"framework-reference-v2","section":"Cross-Section Debug","kind":"debug","citations":["framework-reference-v2.md §1","framework-reference-v2.md §4.2","framework-reference-v2.md §11.4"]}} +{"instruction":"What does the autogenerator's early-bail check at `core/c/model.php:16` look at?","input":"","output":"`Model::__construct()` early-bails if `[DATABASE][is.active]` is not truthy — the connection is disabled. Even if `[GENERATOR][database] = true`, no autogeneration happens for that section. From `framework-reference-v2.md §3.2`.","metadata":{"language":"en","source":"framework-reference-v2","section":"3.2 Autogenerator Pipeline","kind":"code-recall","citations":["core/c/model.php:16","framework-reference-v2.md §3.2"]}} +{"instruction":"What value should I pass for `$argv` when instantiating Model from CLI?","input":"","output":"An array of CLI flag strings, e.g. `['--table=foo', '--config-section=DATABASE_REPORTING', '--folder-out=/path/']`. `Table::__construct($argv)` at `core/c/table.php:48-70` parses argv. The shipped `Dispatcher::run()` always passes `false`, so flags are skipped — but a custom CLI wrapper could write `new Model($argv)` and use the flag mechanism. From `framework-reference-v2.md §3.2`.","metadata":{"language":"en","source":"framework-reference-v2","section":"3.2 Autogenerator Pipeline","kind":"workflow","citations":["core/c/table.php:48-70","framework-reference-v2.md §3.2"]}} +{"instruction":"What CLI flags does `Table` parse?","input":"","output":"From `core/c/table.php:48-70`: `--table=…`, `--config-section=…`, `--folder-out=…`, and `--help`. Parsed only when `is_array($argv)` returns true (line 51). The shipped framework passes `false` from `Dispatcher::run()`, so flags are inert in normal web requests. From `framework-reference-v2.md §3.2`.","metadata":{"language":"en","source":"framework-reference-v2","section":"3.2 Autogenerator Pipeline","kind":"code-recall","citations":["core/c/table.php:48-70","framework-reference-v2.md §3.2"]}} +{"instruction":"What's the relationship between `Model` and `Table` classes?","input":"","output":"`Model extends Table`. `Model::__construct($argv)` at `core/c/model.php:14` calls `parent::__construct($argv)` at line 18, which is `Table::__construct`. `Table` parses CLI flags / INI defaults and gathers metadata; `Model` does the actual file generation via `createOutFolder()` (line 28) and `createClassFiles()` (line 37). From `framework-reference-v2.md §3.2`.","metadata":{"language":"en","source":"framework-reference-v2","section":"3.2 Autogenerator Pipeline","kind":"comparison","citations":["core/c/model.php:14","core/c/model.php:18","core/c/table.php:48","framework-reference-v2.md §3.2"]}} +{"instruction":"What controllers does Nibiru ship in core?","input":"","output":"None. Controllers live in `application/controller/*Controller.php` per the Appendix file index. The framework provides only the base `Controller` singleton at `core/c/controller.php`. Application controllers extend `Controller` and define `*Action()` methods. From `framework-reference-v2.md` Appendix and §6.3.","metadata":{"language":"en","source":"framework-reference-v2","section":"Appendix File Index","kind":"comparison","citations":["framework-reference-v2.md Appendix","framework-reference-v2.md §6.3"]}} +{"instruction":"How does `Display` differ from `View`?","input":"","output":"`View::getInstance()` is the Smarty wrapper at `core/c/view.php:11` — call `View::assign()` and `View::display($page)` to render templates. `Display::getInstance()->display()` is called at the very end of `Dispatcher::run()` to perform the final rendering pass (sending output to the browser). From `framework-reference-v2.md §6.4` and Appendix.","metadata":{"language":"en","source":"framework-reference-v2","section":"6.4 View Rendering","kind":"comparison","citations":["framework-reference-v2.md §6.4","framework-reference-v2.md Appendix"]}} +{"instruction":"What's a TypeRange template good for?","input":"","output":"`TypeRange` (at `core/c/typerange.php`, factory `addTypeRange`) renders an HTML5 `` slider. Use it for numeric ranges with min/max/step. From `framework-reference-v2.md §5.4`.","metadata":{"language":"en","source":"framework-reference-v2","section":"5.4 Type Class Registry","kind":"code-recall","citations":["core/c/typerange.php","framework-reference-v2.md §5.4"]}} +{"instruction":"Explain how the form factory's `$option` static buffer works.","input":"","output":"`self::$option` accumulates option HTML between `addSelectOption()` calls. Each call:\n```php\npublic static function addSelectOption( $attributes ) {\n self::setElement( new TypeOption() );\n self::assembleOptions( self::getElement()->loadElement( $attributes ) );\n}\n```\nappends the rendered `