現行紀錄只記「被叫用」,沒有成敗也沒有結束碼。跑完整輪的技能與開場就 中止的技能,在紀錄裡長得一模一樣。 start 由技能用量 hook 順手發,不必改技能文件。end 只能由技能自己在收尾 步驟寫——hook 接在技能工具呼叫上,而實際工作發生在之後的模型輪次,它在 原理上看不到成敗。有 start 沒有配對的 end,就是那一輪中止了。 status 五選一,每支技能各自寫明什麼情況選哪一個。找不到回報腳本就安靜 跳過,回報失敗一律不改變技能自己的結論。
6.0 KiB
name, description
| name | description |
|---|---|
| html-style | Set which HTML layout and style a kind of Gitea wiki page or issue gets when jsc-gitea:html-export renders it. Offer all six layouts from tools/html-style.sh layouts and all five styles from tools/html-style.sh styles as decision-tree options per jsc-ask, then write the pair with tools/html-style.sh set - either to the project file .jsc/html-styles or to the global $JSC_HOME/html-styles.conf. Use when a kind of page or issue should come out looking different, or when the export reported source builtin or default; not for rendering a page, which is jsc-gitea:html-export. |
html-style — which template a kind of page gets
One kind of page, one layout, one style. jsc-gitea:html-export reads what this skill writes.
Steps
-
Settle the kind key. Show the current configuration with
tools/html-style.sh listfirst, then ask perjsc-ask:askrules which kind this run sets. The three shapes are fixed:WIKI:{page-name prefix}(WIKI:PLAN,WIKI:ANALYZE,WIKI:LOG…),ISSUE:{label name}(ISSUE:bug), andDEFAULTfor everything that matches nothing else. Every option states its impact scope —DEFAULTchanges every kind that has no row of its own. Completion condition: exactly one key is agreed, and its current value fromtools/html-style.sh get {key}has been read back with its source column. -
Pick the layout — offer all six. Run
tools/html-style.sh layouts; it prints each name with its Traditional Chinese description, taken from the template file itself.list,get,layoutsandstylesexit 2 on a usage error — fix the arguments and call again. An empty listing means the template directory is missing, which stops this skill: report the path rather than offering a name the export cannot use. Present all six as options perjsc-ask:askrules, each with what it does to the content (reportbuilds a table of contents beside the text,slideturns every##into a keyboard-flipped page,dashboardturns them into cards,specfreezes table headers,timelinestrings them along a line,onepagernarrows everything into one printable page). Completion condition: the user has picked one layout name that the script listed. -
Pick the style — offer all five. Run
tools/html-style.sh stylesand present every one it prints (minimal,corporate,dark,print,vivid) with its description. Never trim the list to a shortlist: the point of this skill is that the user sees the whole set. Completion condition: the user has picked one style name that the script listed. -
Pick the scope. Ask per
jsc-ask:askrules:--projectwrites./.jsc/html-styles, which only applies inside this working directory and is committed with the repository;--globalwrites$JSC_HOME/html-styles.conf, which follows the user across every project on this machine. State that the project file wins whenever both hold the same key. Completion condition: the user has picked one scope. -
Write it:
tools/html-style.sh set {key} {layout} {style} [--project|--global]. Route every exit code: 0 → the file it printed now holds the pair; 1 → the settings file's directory could not be created, so report the path and stop, since nothing was written; 2 → a usage error, such as a missing name or a scope flag that is neither--projectnor--global, so fix the arguments and call again; 4 → the layout or style name has no template file, so go back to step 2 or step 3 rather than editing the settings file by hand. Completion condition: the script exits 0 and prints the file it wrote. -
Read it back with
tools/html-style.sh get {key}and report the resolved layout, style and source. Completion condition: the source column showsprojectorglobal, matching the scope chosen in step 4. -
Record how the run ended. This is the last thing this skill does, and it runs on every path out of the skill, the ones that stop at step 2 included. Call
jsc-hooks/tools/report-status.sh skill-end jsc-gitea:html-style {status} {exit code} [detail]{exit code}is the exit code of whatever decided the outcome, and0when nothing failed.{detail}is one short line, no more than 200 characters. If the script is not on this machine, skip this step in silence and finish the run as it stood — missing infrastructure is not a failure, and a reporting call may never change what this skill returns or reports.status When this skill uses it oksetexited 0 and step 6 read the pair back with the source column matching the scope that was chosenblockedThe template directory is missing, so layoutsorstyleslisted nothing. There is no name to offer and no pair to write, so the run stops before any question and the settings file is untouchedfailedThe write itself broke: setreturned 1 because the settings directory could not be created, 2 on a malformed call, or 4 because the layout or style has no template file. Nothing was writtendegradedsetexited 0, but step 6 read back a different source than the scope chosen in step 4 — usually a project file holding the same key and winning over a global write. The pair is on disk, yet the export will still resolve to another oneabortedThe user stopped at one of the four questions — the kind key, the layout, the style or the scope — so nothing was written Completion condition: exactly one
skill-endline was recorded for this run, or the script was absent and the run finished without it.
Rules
- Only names the script listed may be written. A key holding a template that does not exist fails at export time, long after the mistake was made.
- Removing a row is
tools/html-style.sh unset {key} [--project|--global]; after that the kind falls back toDEFAULT, then to the built-inreport/minimal. - New layouts live in
templates/html/layout/{name}.htmland new styles intemplates/html/style/{name}.css, each starting with a one-line Traditional Chinese comment — that comment is what the option list shows.