Skip to content

Add Claude Code skills for KDB-X modules and TorQ extraction - #142

Merged
alowrydi merged 3 commits into
mainfrom
add-claude-skills
Oct 29, 2026
Merged

alowrydi merged 3 commits into
mainfrom
add-claude-skills

Conversation

@eohara-di

Copy link
Copy Markdown
Contributor
  • kdbx-modules: KDB-X module framework reference (export, use, .z.m/.z.M, search paths, hierarchy, :: paths, legacy/binary conversion), from the KX quickstart; defers to style.md and consistency.md in this repo.
  • torq-module-extraction: workflow for extracting TorQ code into a di.* module, following consistency.md/style.md where they differ from the extraction exercise brief (required deps, / comments, k4unit header).

- kdbx-modules: KDB-X module framework reference (export, use, .z.m/.z.M,
  search paths, hierarchy, :: paths, legacy/binary conversion), from the
  KX quickstart; defers to style.md and consistency.md in this repo.
- torq-module-extraction: workflow for extracting TorQ code into a di.*
  module, following consistency.md/style.md where they differ from the
  extraction exercise brief (required deps, / comments, k4unit header).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eohara-di eohara-di self-assigned this Oct 8, 2026
@eohara-di

Copy link
Copy Markdown
Contributor Author

Claude-generated, review needed

@eohara-di
eohara-di marked this pull request as ready for review October 9, 2026 16:18
DI-Dexter added a commit that referenced this pull request Oct 12, 2026
…142

Audited the module against the definition-of-done checklist in the
torq-module-extraction skill (PR #142, still open). Three items did not hold.

Line length: style.md caps lines at 150 characters. Twelve lines were over,
eleven of them introduced by this branch. All are long log messages or chained
calls, now split. No behaviour change; the suite is unchanged at 79 green
before the new test below.

init idempotency: the checklist asks that init be idempotent where it
registers anything. It registers a timer job, and di.timer raises on an id
that already exists (init.q:31), so a second init threw. Fixed with the
delete-then-add the end of day path already uses for sortflushend, rather than
introducing a registered flag - same outcome, consistent with the surrounding
code, no extra state.

This needed a test to be worth anything. The fixture's timer mock is a pair of
no-op lambdas and never detected a duplicate, so initidempotent[] installs a
mock that mirrors di.timer and calls init twice. Removing the guard makes it
fail.

deps validation: a non-dict deps reached `key deps` and raised a bare 'type
rather than saying what was wrong. init now checks the type first and names
what it wants, which is the pattern the skill gives and what di.email already
did.

Left alone deliberately: the two direct .z.* assignments, .z.zd for
compression and .z.pd for the sort workers. That rule is about event handlers
going through the injected handlers dependency; neither of these is an event
handler and no contract covers them.

Suite is 80 checks, green, and clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
eohara-di pushed a commit that referenced this pull request Oct 12, 2026
* di.torq.proc.wdb 0.3.0: port legacy wdb, with sort and sortworker modes; idb writedown-mode port

wdb:
- all four writedown modes (default, partbyattr, partbyenum, partbyfirstchar) and the
  end-of-day merge (part, col, hybrid) via di.merge
- modes saveandsort, save and sort; proctypes sort and sortworker run this module with
  settings/sort.q and settings/sortworker.q, as legacy loads wdb.q for both
- end-of-day sort, move to hdb, reloads and sortworker peach ported from legacy wdb.q;
  workers setting stands in for -s -N
- legacy upd (insert, configurable), movetohdb, clearwdbdata, manipulate, reloadproc helpers;
  filesystem calls through di.os; sort.csv defaults to $TORQXAPPCONFIG/sort.csv
- publishes .wdb.writedownmode for the idb

idb: mounts savedir or savedir/<partition> by writedown mode, as legacy; loadsym/loadidb/
loaddb, partitioncounthaschanged, clearrowcountcache, maptoint/mapfctoint at root.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* di.torq.proc.wdb: fixes from review

- astimespan reads a string of digits as seconds, like a number ("N"$ read it as hours)
- sortparams: an empty sort config table when none is loaded, so the partitioned-mode
  sort.csv checks log instead of throwing 'type
- movetohdb creates the hdb root before the move
- setroot defines .u.end with set, not as a root key named `.u.end
- flushend flushes the reloaded processes' handles, not the keyed table's rows

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Merge branch 'main' into feature/wdb-module

Resolve the builtin process-type registry conflict as a union: keep the
branch's sort/sortworker entries and main's discovery entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: init subscriptions only on the save path, and fix the suite

di.subscriptions now requires a handlers dep, so wdb's init failed for every
caller that did not pass one. A sort-mode wdb never subscribes - .z.m.subs is
only read on the save path - so move the init below the sort-mode early return
rather than widen wdb's required deps.

Test fixture:
- add a handlers mock to test.csv and test.q, needed on the save path
- eodok/feedok took the sym column with `value`, which resolves symbols as
  variable names. select resolves the on-disk enum once the sym domain is
  loaded, so with sortworker peers the column arrives as plain symbols and the
  check threw 'aapl. Take the column as-is; distinct/differ handle both types.

Suite goes from 7 failures to 71/71.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: address the review findings

tabsizes (wdb.q:62, wdb.q:122): tablelist[] orders by bytes from tabsizes, but
only savetables populated it - savetablesbypart tracked partsizes instead. In a
partitioned writedown every table therefore ordered on zero bytes and the
largest was not flushed first. Track it in savetablesbypart too, and clear it at
end of day in every mode, not just the default one.

informgateway (wdb.q:229): an absent gateway is a normal deployment, and
informgateway runs on every end-of-day reload, so it logged an error each time.
Log it at info.

movetohdb (wdb.q:381): the per-table branch logged each failed move and carried
on, leaving tables split across the wdb and the hdb with no rollback and no
signal. A multi-table move cannot be made atomic, so fail on the first error the
way savetables does, and report a source directory left non-empty.

Tests: tabsizestracked, tabsizescleared and nogatewayquiet - each verified to
fail without the corresponding fix. Suite 74/74.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: close two gaps against legacy wdb

Checked the module against TorQ 5.2.19 code/processes/wdb.q, code/wdb/{origstartup,
writedown}.q, code/common/merge.q and config/settings/{wdb,sort,sortworker}.q.

endofperiod: legacy defined a log-only stub in code/wdb/writedown.q and the port
dropped it as STP-only. di.torq.proc.segmentedtp now exists and broadcasts end of
period through di.pubsub.callendofperiod, which sends the (current;next;data)
triple as ONE argument, so a subscriber without the callback fails the publish.
Define it at root, monadic.

getpartition: legacy exposed it as an overridable setting so a deployment could
decide its own partition value; the port hard-coded it. Read it from config,
defaulting to the built-in - the same pattern upd and savedownmanipulation use.

Tests: getpartitionoverride and endofperiodcallback, both verified to fail
without the fix. Suite 76/76.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.subscriptions: install the default endofperiod callback there, not in the wdb

The callback has to exist in the process that RECEIVES the publish. di.pubsub is the
publisher half - it runs in the tickerplant and the wdb never loads it - so the default
belongs with the subscriber half, which already owns root upd and the root table schemas.
One place covers di.torq.proc.wdb, di.torq.proc.rdb and di.torq.proc.chainedtp; rdb had
the same latent failure.

Installed only when root endofperiod is not already defined, the rule chainedtp uses for
upd, so a subscriber that forwards the roll downstream keeps its own.

Tests: endofperioddefault (verified to fail without the install) and
endofperiodnotclobbered. The wdb's endofperiodcallback now covers the same path through
di.subscriptions. Suites 47/47 and 76/76.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Revert the endofperiod work - feature-segmentedtp owns it

Dropped from this PR entirely: di/subscriptions is back to main, and the wdb
keeps the stub stripped as the original port had it.

upstream/feature-segmentedtp already defines endofperiod in both the rdb and the
wdb, and that branch is where the segmented tickerplant work belongs. Two PRs
editing di/subscriptions at once would only collide.

getpartition and the review fixes are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Drop the stray email file; strip the hsym colon from idb path logging

di/email/manual_tests.q was swept in by a `git add -A` and has nothing to do
with this PR. Removed from the branch; it stays on disk for the email work.

idb: the port changed the sym-load error from `1_string` to `string`, so the
path printed with its leading colon. Restored, and applied to the other three
path log lines in the file so they agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: stop the sort fixture's table leaking into a re-run

testsort.q creates a root table `scalls` to record mock server calls, and it is
still there when the suite finishes. tablelist[] returns every root table except
the ignorelist, so a second moduletest in the same process tried to write down
`scalls` - which has no sym column - and the partitioned writedown tests threw
'length.

`calls` was already in the ignorelist for exactly this reason; add `scalls`.

Reported by Eoghan: a second run in the same q session failed ~19 checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: silence the shell for the deliberately failing move

emptypartition[] asks for a partition that was never written, so the mv fails -
that is the point of the check. mv writes to stderr, which q does not capture,
so the suite printed "mv: cannot stat ..." on every run and read as a problem.

Run that one call with di.os's swappable syscall wrapped to drop stderr, and
restore it afterwards. The module's own error log still fires, which is what the
check asserts, and a real shell error anywhere else is still printed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: quietshell must not swallow a throw

The first version trapped f and returned the error as a value, so a genuine
failure inside the silenced call no longer reached the suite - the bare call it
replaced would have raised it. Restore the syscall, then re-signal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: restore legacy reload, endofperiod stub and numtab default

From Eoghan's port-parity review on PR #137. All three narrowings confirmed
against TorQ 5.2.19 before changing anything.

reloadorder: TorQ's reloadfunc called root `reload` on whatever proctype was
listed (code/processes/wdb.q, `. `reload x). reloadexpr only recognised
hdbtypes, rdbtypes and idbtypes and returned (::) for anything else, which
getprocs skipped with a warning, so a custom proctype in reloadorder was never
reloaded. The default branch is now legacy's root `reload` - which is exactly
what the rdb branch already did, so that branch collapses into it - and the
dead (::) guard is gone. customreload[] proves it with a real connected peer of
a custom proctype; it fails without this change.

endofperiod: legacy shipped a logging stub in code/wdb/writedown.q.
di.pubsub.callendofperiod broadcasts (`endofperiod;(current;next;data)) to every
subscriber on each period roll, so without the stub a wdb pointed at a segmented
tickerplant raises 'endofperiod every period. Restored and published at root.
Note it is monadic, matching callendofperiod, which sends the triple as one
argument - legacy's three-parameter stub would have been applied to one argument
and silently become a projection.

numtab: legacy defaults to `quote`trade!10000 50000 (writedown.q), the module
defaulted to an empty dict, so quote and trade flushed at numrows instead of
10k/50k. mergenumtab had kept the legacy default, so the two disagreed. Restored.
The test fixture now pins numtab/replaynumtab empty, since those tests want
numrows to govern, and numtabdefault[] covers the shipped default.

Also from the same review: partlimit is now passed through to di.merge init when
configured (omitted, di.merge keeps its own default of 1000), and wdb.md gains a
migration section for the TorQ settings that were renamed or dropped
(subtabs, subsyms, replay, tpconnsleepintv/tpcheckcycles, schema) plus the
settimer seconds-not-timespan change, which were silently ignored before.

Suite is 79 checks, green, and clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: document the numtab upgrade, stop restating di.merge's default

From the second DIReview pass on PR #137.

The numtab point is fair: main ships wdb 0.2.0, which defaults numtab to an
empty dictionary, so merging this changes flush thresholds for quote and trade
on any config without a numtab key. wdb.md now carries an explicit
"Upgrading from 0.2.0" note with the way to keep the old behaviour. The
accompanying claim that the test fixture diverging from production is a footgun
does not hold - pinning a config value is what makes those tests deterministic,
and numtabdefault[] asserts the shipped default directly.

On partlimit the review suggested resolving the default in the wdb and always
passing it. That is the thing that drifts: it would put the number 1000 in two
modules. Fixed the other way instead - di.merge owns the default, wdb.md no
longer restates it, and the test asserts the fallback against
di.merge's own partlimitdefault rather than a literal.

Suite is 79 checks, green, clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* di.torq.proc.wdb: close three gaps against the module standards in PR #142

Audited the module against the definition-of-done checklist in the
torq-module-extraction skill (PR #142, still open). Three items did not hold.

Line length: style.md caps lines at 150 characters. Twelve lines were over,
eleven of them introduced by this branch. All are long log messages or chained
calls, now split. No behaviour change; the suite is unchanged at 79 green
before the new test below.

init idempotency: the checklist asks that init be idempotent where it
registers anything. It registers a timer job, and di.timer raises on an id
that already exists (init.q:31), so a second init threw. Fixed with the
delete-then-add the end of day path already uses for sortflushend, rather than
introducing a registered flag - same outcome, consistent with the surrounding
code, no extra state.

This needed a test to be worth anything. The fixture's timer mock is a pair of
no-op lambdas and never detected a duplicate, so initidempotent[] installs a
mock that mirrors di.timer and calls init twice. Removing the guard makes it
fail.

deps validation: a non-dict deps reached `key deps` and raised a bare 'type
rather than saying what was wrong. init now checks the type first and names
what it wants, which is the pattern the skill gives and what di.email already
did.

Left alone deliberately: the two direct .z.* assignments, .z.zd for
compression and .z.pd for the sort workers. That rule is about event handlers
going through the injected handlers dependency; neither of these is an event
handler and no contract covers them.

Suite is 80 checks, green, and clean on a second run in the same process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Dexter <dexter.lee@dataintellect.com>
@eohara-di
eohara-di requested review from DI-Dexter, alowrydi, hehirs and jonathonmcmurray and removed request for hehirs and jonathonmcmurray October 12, 2026 13:35

@DI-Dexter DI-Dexter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me, i checked the skills files using claude against the info found in the confluence pages below as well as the current kdbx-modules repo
https://data-intellect.atlassian.net/wiki/spaces/TK/pages/2375450629/TorQ+Modularisation+Plan+Moving+to+kdb-x+Modules
https://data-intellect.atlassian.net/wiki/spaces/TK/pages/2375581703/TorQ+Module+Extraction+Exercise+Building+with+Claude
https://data-intellect.atlassian.net/wiki/spaces/TK/pages/2646409222/TorqX+Design+Developer+Handover

Four suggested additions.

  1. Step 7 — one moduletest per q process. KUltf appends to KUT (k4unit.q:54) and KUrt[] runs all of it, so a second moduletest in the same session re-runs the first module's suite and the pass/fail summary covers both. Measured: moduletestdi.tzthen di.api leaves 26 rows for di.tz's 13 tests, plus 33 for di.api.

Why it belongs here: Step 7 is the only instruction an agent gets on how to verify, and it shows a single moduletest without saying that must be the only one. Follow it literally, test a second module, and you get a green that means nothing. It also matters for re-runs — several suites mutate process state, which is what made a second moduletest fail ~19 checks on #137 with nothing wrong in the module.

Suggested, after the code block:

One moduletest per q process. KUT/KUTR accumulate, so a second call in the same session re-runs the first module's suite and the pass/fail summary covers both. Test several modules with one process each — for m in di.mymod di.other; do q runner.q -q $m; done, where runner.q does one moduletest and exits. A failure seen in a combined run is unverified until it reproduces in a fresh process.

  1. Step 2 — settings sections don't deep-merge. cascade joins tiers with , (config.q:83) and di.util.toml nests one level of [section], so a section arrives as a single top-level key holding a dict. A more specific tier that sets one key of a section replaces the whole section. Reproduced: [housekeeping] runnow = true in the app tier silently dropped enabled and interval from the builtin tier, while a flat key alongside it overrode correctly.

Why it belongs here: Step 2 tells the agent config arrives as a dict and to read it with a presence check, but nothing says how that dict was assembled, and there's no warning in config.q either. Nothing in the repo triggers it today — the shipped tiers in di/torq/settings/ are flat .q files — so it will first be hit by an app author, which is exactly the reader this skill has.

Suggested, as a bullet after the presence-check line:

Settings sections don't deep-merge. cascade joins tiers with ,, and a [section] is one key holding a dict — so a proctype or procname tier that sets one key of a section replaces the whole section. Give every section key a code-side default (opt[k;default], as di.torq's initquerylog` does) rather than relying on defaults that live in a lower-tier file.
3. Step 3 — VERSION is publishable two ways, and depcheck reads both. Pre-load checkversiongraph → readversion reads the file without loading the module (depcheck.q:344-366); post-load checkdepversion reads the version export and falls back to the file (depcheck.q:225-235).

Why it belongs here: Step 3's template shows only the export form, but three merged modules can't use it — di.torq.config, di.torq.servers and di.util.toml each have a getapimeta row asserting the export set exactly, so adding version breaks that test. An agent hitting it has no way to know the file alone satisfies depcheck, and will either break the test or conclude the module can't be versioned.

Suggested, after the init.q template:

version can be published as the VERSION file alone, without the export entry — di.torq.depcheck reads the file pre-load and falls back to it post-load. Do that when a getapimeta contract test asserts the exact export set (di.torq.config, di.torq.servers, di.util.toml). The VERSION file is required either way.

  1. Line 17 — swap di/timer for di/subscriptions in the authority order. di/timer ships no VERSION file (nor do 14 other flat modules — 15 of 43), and the definition of done requires one. di/subscriptions satisfies every DoD item and is the only candidate with a deps.toml, which none of the three currently cited modules has.

Why it belongs here: the skill's own examples should demonstrate its own checklist — an agent told to copy di/timer's layout finds two required files missing, and has no example of a deps.toml to copy at all. Fixing the example is cheaper than caveating the rule. Line 113's di/timer nextstart citation is about the mode-dictionary pattern and should stay.

1 and 4 probably seems more important since it'll affect every agent

@alowrydi alowrydi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through both skill files against consistency.md, style.md, and live probes on our q build. Inline comments cover the blocking issues (the module read/write behaviour and the \d contradiction between the two files) plus some factual corrections and gaps worth fixing before merge. Otherwise, on top of Dexter's comments, looks good.

Comment thread .claude/skills/kdbx-modules/SKILL.md Outdated
## Converting a legacy q library

1. Convert external dependencies to modules first, then replace their imports with `use`.
2. Remove absolute namespace prefixes (`.lib.func` → `func`) in assignments **and** in global references inside functions. Remove a `\d` that spans the whole file; change any other `\d` to a `.z.m`-based namespace.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 2 here says: “change any other \d to a .z.m-based namespace.” But torq-module-extraction/SKILL.md Step 4 rule 1 says the opposite for the same situation: “No \d... write bare names. Use .z.m.x/.z.M only for reserved-word clashes, functions called from q-sql, or names passed as symbols to legacy APIs.” Two files in this PR give opposite instructions for the same conversion step.

Comment thread .claude/skills/kdbx-modules/SKILL.md Outdated
- **A q-sql statement calls a module function**: `select .z.m.f a from t`. A bare `f` there resolves in the *caller's* namespace.
- **A legacy API needs a global name as a symbol**: `.timer.addTimer[.z.M.cleanup;01:00]`. To replace a member: `.z.M.log set(::)`.
- **A local and a global share a name**: refer to the global as `.z.M.name`. Renaming one of them is often clearer.
- **You need a child namespace inside the module**: `\d .z.m.foo`. This is the only acceptable form of `\d` in a module.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Established \d is a certified no-no. Drop the \d form entirely and prefix each definition explicitly instead:

You need a child namespace inside the module: prefix each definition explicitly rather than switching context - .z.m.foo.a:1, .z.m.foo.f:{...} - never \d .z.m.foo. There is no acceptable form of \d in a module.

Same grouping, no namespace switch - each name is written out in full at the point of definition instead of relying on \d to set the context for everything that follows.

set[`.hdb.reload;reloadfn];
```

A subscriber `upd` written any other way silently drops rows into the module namespace.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite what happens. If upd only exists in the module namespace, nothing lands there: the call fails because root has no upd. On the live feed the tickerplant publishes async, so it never sees the error. The subscriber logs 'upd and the rows are lost. -11! replay signals 'upd and replays nothing. Suggest: "A subscriber upd that isn't published at root is never found: live updates are dropped with only an 'upd in the subscriber's log, and -11! replay fails with 'upd.

Always call injected functions through `.z.m` (`.z.m.loginfo[`<name>;"msg"]`). You can store each function separately or the whole dict (`.z.m.log[`info][...]`), but pick one per module.
5. **Make `init` idempotent** if it registers anything (handlers, timer jobs): guard the registration with a `registered` flag.
6. **Handlers:** never assign `.z.*` directly. Go through the injected `handlers` dependency.
7. **Root state and root IPC entry points:** writes inside a module land in its private namespace, while reads fall through to root. To maintain a root table or publish a root function (`upd`, a `reload` peers call by name):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What decides where it goes is whether you use a bare name or a symbol, not whether you read or write. Bare names never reach root: {count trade} / {select from trade} signal 'trade, and a bare write like trade,:x or x::v quietly creates a module-private copy and leaves root untouched. Symbols do reach root: gettrade, exec … from trade, t insert x / t upsert x / x set v with a symbol, and @[.;…]. Suggest: "Bare names inside module functions refer only to the module: reading a root-only name signals, and writing one creates a private copy. To read or write root state, go through a symbol (gett, t insert x, @[.;t;…]).


1. **No `\d`.** Module code runs in its own private namespace, so write bare names. Use `.z.m.x` / `.z.M` only for reserved-word clashes, functions called from q-sql, or names passed as symbols to legacy APIs.
2. **Strip every absolute `.oldns.` prefix,** in definitions *and* inside function bodies.
3. **Assigning a module global inside a function:** use `.z.m.x:value` (the existing modules' idiom). Avoid `::` (style.md).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kdbx-modules/SKILL.md uses :: to assign a module global from inside a function (line 51’s MULT::x, and the “Converting a legacy q library” step that says to change : to ::). torq-module-extraction/SKILL.md rule 3 says the opposite — use .z.m.x: and avoid ::, matching style.md. Both work mechanically, but an agent following one skill then the other will flip conventions depending on which it read last. Suggest fixing kdbx-modules to use .z.m.x: throughout, matching style.md and the other skill, and adding a one-line note here that .z.m.x: is the house convention.

- [ ] `<name>.md` written; `VERSION` present; `deps.toml` if it `use`s versioned modules
- [ ] Follows style.md (`/ ` comments, lowercase, `;` line ends, no loops, ≤150 chars)
- [ ] Behaviour matches the TorQ original, with suggested extras listed separately for the user
- [ ] Loads standalone in a fresh q session

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True for library modules but wrong for proc modules, which depend on root .servers./.sub. names published by other modules. Scope the check to library modules only.

DI-Dexter and others added 2 commits October 16, 2026 14:32
Applies the five correct points from alowrydi's review of #142.

- kdbx-modules: drop the `\d .z.m.foo` recommendation. The conventional
  `\d .` that follows returns to root, not to the module, so `export`
  lands at root and `use` fails with `no export`. Verified: a module
  using that form does not load; explicit `.z.m.foo.x:` prefixes do.
- kdbx-modules: remove the "change any other \d to a .z.m-based
  namespace" step, which contradicted torq-module-extraction rule 1 and
  consistency.md:34.
- kdbx-modules: use `.z.m.x:` rather than `::` for module globals, in
  both the example and the legacy-conversion steps, matching style.md:120
  and torq-module-extraction rule 3. Verified equivalent.
- torq-module-extraction rule 7: resolution is bare-vs-symbol, not
  read-vs-write. Verified: a bare read of a root-only name signals,
  a bare write creates a private copy, and symbols reach root.
- torq-module-extraction rule 7: a subscriber `upd` not published at root
  is never found - live updates are dropped with an `'upd` and `-11!`
  replay signals `'upd` - rather than "silently dropping rows into the
  module namespace". Verified on both paths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Four points from DI-Dexter's review of #142.

- Step 7: one `moduletest` per q process. KUltf appends to KUT and KUrt
  runs all of it, so a second call re-runs the first module's suite and
  the summary covers both (measured: 26 result rows for di.tz's 13
  tests). Several suites also spawn children and mutate process state.
- Step 2: settings sections do not deep-merge. cascade joins tiers with
  `,` and a [section] is one key holding a dict, so a more specific tier
  that sets one key replaces the whole section. Reproduced.
- Step 3: `version` may be published as the VERSION file alone.
  di.torq.depcheck reads the file pre-load and falls back to it
  post-load; di.torq.config, di.torq.servers and di.util.toml all have
  to withhold it because a getapimeta test asserts the exact export set.
- Authority order: cite di/subscriptions rather than di/timer. di/timer
  ships neither VERSION nor deps.toml, both of which the definition of
  done requires, and no other cited module has a deps.toml to copy.
  The di/timer `nextstart` citation in rule 12 is unaffected and stays.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alowrydi
alowrydi self-requested a review October 29, 2026 11:07

@alowrydi alowrydi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@alowrydi
alowrydi merged commit 48e978d into main Oct 29, 2026
@alowrydi
alowrydi deleted the add-claude-skills branch October 29, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants