%cc-core; %cc-ask; %cc-cache; ]>
Provide the one intake loop every gate-carrying command shares, declared in cc-ask.dtd and explained here so a command author includes %cc-ask; instead of re-describing the tool. The gate_skill root declares the slots, the round shape, the gate rules and the autonomous rules.
The slots are eight: what, who, why, how, when, depth, focus, use. Analyze the argument and the conversation and write one known per filled slot and one gap per open one. Never ask about a known slot. Most commands need only what, how and depth; a research command adds focus and use.
The round_shape is one ask of one to four question elements, each with a header of twelve characters or fewer, a question ending in a question mark, and two to four option elements each with a label and a description. A question that needs several answers sets multiSelect true. A question whose options are code, layouts or configurations may carry a preview per option. The tool always adds an Other free-text option; do not add one yourself.
The gate_rules: after the answers, one AskUserQuestion of two questions: the first with header Gate, the question GATE.question and the four options GATE.start, GATE.more, GATE.add and GATE.impactful; the second with header GATE.cache.header, the question GATE.cache.question and the options GATE.continue and GATE.save, because a question carries at most ASK.max_options options and a choice that rides in Other is not offered. On more: two or three follow-ups from the accumulated answers, then the gate again. On add: receive the input as an answer, then the gate again. On impactful: one to four ranked selections with their provenance, one picked as an answer, then the gate again. On save: write the cache under CACHE.dir as CACHE.file in the CACHE.form form, read it back whole, render the cache element and stop with CACHE.compact as the last line; nothing else runs in that turn, and the next call of the same command resumes from the file (LAW.CACHE.1 to LAW.CACHE.3). On start: execution, opening with a restatement of every known slot and every answer. Round numbers increase by one per gate. A gate is presented again after every more, add or impactful; an intake that closes on one of them is a failed answer (LAW.CACHE.5), which the Adiutor holds at Stop as a finding of kind gate (LAW.ADIUTOR.13), and a command token that arrives mid-run saves first and opens its own intake whole (LAW.CACHE.4).
The autonomous_rules: when the session is non-interactive (a -p run, a scheduled run, a subagent) or the argument contains --no-gate, set intake mode autonomous, ask nothing, fill every gap with the most conservative assumption, write one assumption_made per gap, and list them under Assumptions Made at the end of the answer. An autonomous run never blocks on a question.
Render gate_skill as the four sections above. A command that includes this skill's grammar renders its own intake as: the known and gap slots, each round's questions and answers, the gate choice with its round number, and, when the gate was answered save or the run resumed from a file, the cache line with the file, its bytes and its state.
- No question about a known slot
- Every round ends in a gate
- Autonomous runs list their assumptions
- Every LAW.GATE.* entity holds