claude-dev-env 8.123.0 → 8.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ever-registered-hooks.mjs +2 -0
- package/bin/ever-registered-hooks.test.mjs +5 -0
- package/bin/profile-stop-gate.mjs +5 -7
- package/bin/profile-stop-gate.test.mjs +29 -1
- package/docs/agents-guidance/asks.md +1 -1
- package/docs/rule-guides/question-presentation.md +1 -1
- package/docs/templates/artifact-page/README.md +14 -1
- package/docs/templates/artifact-page/review-rounds.md +1 -1
- package/docs/templates/artifact-page/template.html +26 -18
- package/docs/templates/html-plan/README.md +4 -0
- package/hooks/blocking/artifact_current_page_fixtures/piled_review_page.html +399 -0
- package/hooks/blocking/artifact_current_page_fixtures/rebuilt_review_page.html +403 -0
- package/hooks/blocking/artifact_current_page_gate.py +418 -0
- package/hooks/blocking/artifact_repeated_item_render.cjs +112 -0
- package/hooks/blocking/closing_reply_judge.py +332 -0
- package/hooks/blocking/closing_reply_shapes.py +365 -0
- package/hooks/blocking/conftest.py +84 -0
- package/hooks/blocking/open_tasks_stop_gate.py +259 -11
- package/hooks/blocking/open_tasks_transcript.py +55 -2
- package/hooks/blocking/open_tasks_transcript_records.py +67 -1
- package/hooks/blocking/question_brief_gate.py +6 -4
- package/hooks/blocking/test_artifact_current_page_gate.py +415 -0
- package/hooks/blocking/test_closing_reply_judge.py +246 -0
- package/hooks/blocking/test_closing_reply_shapes.py +247 -0
- package/hooks/blocking/test_open_tasks_stop_gate.py +626 -0
- package/hooks/blocking/test_open_tasks_transcript.py +57 -0
- package/hooks/blocking/test_open_tasks_transcript_records.py +48 -0
- package/hooks/blocking/test_question_brief_gate.py +22 -0
- package/hooks/features/conduct-gates.md +10 -3
- package/hooks/hooks.json +16 -1
- package/hooks/hooks_constants/artifact_current_page_gate_constants.py +91 -0
- package/hooks/hooks_constants/artifact_dark_mode_gate_constants.py +3 -3
- package/hooks/hooks_constants/closing_reply_judge_constants.py +143 -0
- package/hooks/hooks_constants/open_tasks_stop_gate_constants.py +101 -0
- package/hooks/hooks_constants/test_artifact_current_page_gate_constants.py +53 -0
- package/hooks/hooks_constants/test_artifact_dark_mode_gate_constants.py +6 -0
- package/hooks/hooks_constants/test_hook_time_budget.py +7 -0
- package/hooks/once_per_session.py +65 -1
- package/hooks/session/artifact_link_record.py +109 -0
- package/hooks/session/test_artifact_link_record.py +101 -0
- package/hooks/test_context_budget_hooks.py +2 -0
- package/hooks/test_once_per_session.py +35 -0
- package/package.json +1 -1
- package/scripts/policy_lint/adapter_configuration.py +6 -0
- package/scripts/policy_lint/config/constants.py +1 -0
- package/scripts/tests/test_adapter_configuration.py +8 -0
|
@@ -9,6 +9,7 @@ export const EVER_REGISTERED_HOOK_RELATIVE_PATHS = new Set([
|
|
|
9
9
|
'advisory/refactor-guard.py',
|
|
10
10
|
'advisory/refactor_guard.py',
|
|
11
11
|
'blocking/agent-execution-intent-gate.py',
|
|
12
|
+
'blocking/artifact_current_page_gate.py',
|
|
12
13
|
'blocking/artifact_dark_mode_gate.py',
|
|
13
14
|
'blocking/auto_mode_refusal_stop_gate.py',
|
|
14
15
|
'blocking/artifact_look_gate.py',
|
|
@@ -147,6 +148,7 @@ export const EVER_REGISTERED_HOOK_RELATIVE_PATHS = new Set([
|
|
|
147
148
|
'routing/subagent_model_routing.mjs',
|
|
148
149
|
'routing/thread_spawn_pace_hook.py',
|
|
149
150
|
'session/advisor_rules_prompt.py',
|
|
151
|
+
'session/artifact_link_record.py',
|
|
150
152
|
'session/artifact_template_pointer.py',
|
|
151
153
|
'session/background_silence_prompt.py',
|
|
152
154
|
'session/bulk-edit-reminder.py',
|
|
@@ -24,6 +24,11 @@ test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the question brief gate', () =>
|
|
|
24
24
|
assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/question_brief_gate.py'));
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the artifact current page gate and its link record', () => {
|
|
28
|
+
assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/artifact_current_page_gate.py'));
|
|
29
|
+
assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('session/artifact_link_record.py'));
|
|
30
|
+
});
|
|
31
|
+
|
|
27
32
|
test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the retired merge-over-review card gate', () => {
|
|
28
33
|
assert.equal(
|
|
29
34
|
EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/merge_over_review_offer_gate.py'),
|
|
@@ -141,10 +141,8 @@ function stopHooks(settingsPath) {
|
|
|
141
141
|
return stopGroups.flatMap((eachGroup) => (Array.isArray(eachGroup?.hooks) ? eachGroup.hooks : []));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
function
|
|
145
|
-
return stopHooks(settingsPath)
|
|
146
|
-
.filter((eachHook) => isGateHook(eachHook, claudeHome))
|
|
147
|
-
.map((eachHook) => eachHook.command);
|
|
144
|
+
function profileGateHooks(settingsPath, claudeHome) {
|
|
145
|
+
return stopHooks(settingsPath).filter((eachHook) => isGateHook(eachHook, claudeHome));
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
/**
|
|
@@ -170,7 +168,7 @@ export function profileRunsItsOwnGate(settingsPath, claudeHome) {
|
|
|
170
168
|
*
|
|
171
169
|
* A profile keeps its own settings and hooks. The merge adds the one gate
|
|
172
170
|
* entry, in the spelling the main settings use, only where it is missing;
|
|
173
|
-
* an entry left with an older interpreter spelling is replaced. The file as
|
|
171
|
+
* an entry left with an older interpreter spelling or timeout is replaced. The file as
|
|
174
172
|
* it was before either change is copied to a timestamped `.bak`. A profile
|
|
175
173
|
* that already runs its own copy of the gate script is left as it is.
|
|
176
174
|
*
|
|
@@ -187,8 +185,8 @@ export function addOpenTasksGateToProfiles(options) {
|
|
|
187
185
|
(eachPath) => !profileRunsItsOwnGate(eachPath, options.claudeHome),
|
|
188
186
|
);
|
|
189
187
|
const allStalePaths = allTargetPaths.filter(
|
|
190
|
-
(eachPath) =>
|
|
191
|
-
.some((
|
|
188
|
+
(eachPath) => profileGateHooks(eachPath, options.claudeHome)
|
|
189
|
+
.some((eachHook) => eachHook.command !== gateHook.command || eachHook.timeout !== gateHook.timeout),
|
|
192
190
|
);
|
|
193
191
|
const originalTextByStalePath = new Map(allStalePaths.map((eachPath) => [eachPath, readFileSync(eachPath, 'utf8')]));
|
|
194
192
|
removeOpenTasksGateFromProfiles({ claudeHome: options.claudeHome, allProfileSettingsPaths: allStalePaths });
|
|
@@ -2,7 +2,10 @@ import { test } from 'node:test';
|
|
|
2
2
|
import { strict as assert } from 'node:assert';
|
|
3
3
|
import { lstatSync, mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
|
-
import { join } from 'node:path';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
import { mergeHooksIntoSettings } from './install.mjs';
|
|
6
9
|
|
|
7
10
|
import {
|
|
8
11
|
addOpenTasksGateToProfiles,
|
|
@@ -25,6 +28,13 @@ function makeHome(context) {
|
|
|
25
28
|
return { homeDirectory, claudeHome, mainSettingsPath, gateCommand };
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
function gateTimeouts(settingsPath) {
|
|
32
|
+
const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
33
|
+
return (settings.hooks?.Stop ?? []).flatMap((eachGroup) => eachGroup.hooks
|
|
34
|
+
.filter((eachHook) => eachHook.command.includes('open_tasks_stop_gate.py'))
|
|
35
|
+
.map((eachHook) => eachHook.timeout));
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
function writeProfile(homeDirectory, name, settings) {
|
|
29
39
|
const profileDirectory = join(homeDirectory, '.claude-profiles', name);
|
|
30
40
|
mkdirSync(profileDirectory, { recursive: true });
|
|
@@ -183,3 +193,21 @@ test('a settings.json that does not parse may hold the gate when its text names
|
|
|
183
193
|
assert.equal(unparsedSettingsMayHoldGate(noGatePath, claudeHome), false);
|
|
184
194
|
assert.equal(unparsedSettingsMayHoldGate(join(homeDirectory, 'missing', 'settings.json'), claudeHome), true);
|
|
185
195
|
});
|
|
196
|
+
|
|
197
|
+
test('should raise a profile gate timeout of 10 to 45 on install', (context) => {
|
|
198
|
+
const { homeDirectory, claudeHome, mainSettingsPath, gateCommand } = makeHome(context);
|
|
199
|
+
const profilePath = writeProfile(homeDirectory, 'older-install', {
|
|
200
|
+
hooks: { Stop: [{ hooks: [{ type: 'command', command: gateCommand, timeout: 10 }] }] },
|
|
201
|
+
});
|
|
202
|
+
const hooksConfigPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'hooks', 'hooks.json');
|
|
203
|
+
const hooksConfig = JSON.parse(readFileSync(hooksConfigPath, 'utf8'));
|
|
204
|
+
const mainSettings = JSON.parse(readFileSync(mainSettingsPath, 'utf8'));
|
|
205
|
+
|
|
206
|
+
mergeHooksIntoSettings(mainSettings, hooksConfig, claudeHome, 'python3', null, homeDirectory);
|
|
207
|
+
writeFileSync(mainSettingsPath, JSON.stringify(mainSettings, null, 4));
|
|
208
|
+
addOpenTasksGateToProfiles({ mainSettingsPath, claudeHome, allProfileSettingsPaths: [profilePath], homeDirectory });
|
|
209
|
+
|
|
210
|
+
assert.deepEqual(gateTimeouts(mainSettingsPath), [45]);
|
|
211
|
+
assert.deepEqual(gateTimeouts(profilePath), [45]);
|
|
212
|
+
assert.deepEqual(stopCommands(profilePath), [gateCommand]);
|
|
213
|
+
});
|
|
@@ -45,7 +45,7 @@ The gate holds a turn once when all three hold:
|
|
|
45
45
|
- The turn ran a work tool: any tool but a tracker call, the session title tool, `AskUserQuestion`, a hearthbot decision card, Codex `request_user_input`, `ToolSearch`, `TaskList`, or `TaskGet`. A turn that only asks the user a question passes.
|
|
46
46
|
- The turn made no tracker call: TaskCreate, TaskUpdate, TodoWrite, the Codex `update_plan`, or the Claude Code desktop `mcp__ccd_turn__update_plan`.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
It also holds a turn once when the closing reply promises a later report the prompt did not ask for, or lists open decisions in chat when the turn sent no question tool call. In Claude Code one small model call judges the reply, and Codex and Cursor use phrase checks. [Conduct gates](../../hooks/features/conduct-gates.md) describes both. A held turn passes, so the gate adds at most one step to a turn.
|
|
49
49
|
|
|
50
50
|
In Claude Code, `task_subject_outcome_gate.py` denies a task list item named as a procedure step. [Conduct gates](../../hooks/features/conduct-gates.md) lists what it matches.
|
|
51
51
|
|
|
@@ -16,7 +16,7 @@ Remove completed items from the task list before the turn ends, so the list show
|
|
|
16
16
|
|
|
17
17
|
A file or page the user reads can carry the context for a question. The question itself goes through the question tool, where the user answers it. On Claude, the `sent_file_question_gate.py` PreToolUse hook refuses a `SendUserFile` call or an `Artifact` page publish when a Markdown, text, or HTML file it sends asks the user something: a "Questions for you" or "Decisions needed" section, or a sentence that ends with a question mark and names the reader, asks for a go-ahead, or offers a choice. The refusal quotes the question. Ask it through the question tool, remove it from the file, and send the file again. A page that collects the answer itself, such as option cards, declares the `db` or `artifact` capability that saves the answer, and the hook lets it through.
|
|
18
18
|
|
|
19
|
-
The `open_tasks_stop_gate.py` Stop hook holds the turn once when completed items sit beside open ones on the session's own task list. It also holds the turn once when the closing reply, or a Markdown, text, or HTML file the turn sent, says something waits on the user and the turn ran no read call or sent no question tool call.
|
|
19
|
+
The `open_tasks_stop_gate.py` Stop hook holds the turn once when completed items sit beside open ones on the session's own task list. It also holds the turn once when the closing reply, or a Markdown, text, or HTML file the turn sent, says something waits on the user and the turn ran no read call or sent no question tool call. It also holds the turn once when the closing reply lists 3 or more open items, such as a deferred list or next steps, under a lead that names open work, and the turn sent no question tool call. The hold tells the agent to act on each item it can settle and to send each item that needs the user's judgment through the question tool. It holds the turn once, too, when the closing reply promises the user a later report that no typed prompt asked for. A held reply's text counts toward the limits below, so the first question call after such a hold can be refused once; the same call sent again passes.
|
|
20
20
|
|
|
21
21
|
## Several items, one question at a time
|
|
22
22
|
|
|
@@ -24,6 +24,7 @@ Render the page and look at the screenshot before you publish. Headless Chromium
|
|
|
24
24
|
|---|---|
|
|
25
25
|
| One file | The page, its styles, its script and its data live in one HTML file. It opens with no build step and no companion files. |
|
|
26
26
|
| Data block | The sample data sits in `<script type="application/json" id="tracker-data">`. Swap that block for new data. Escape every `</` inside it as `<\/`. |
|
|
27
|
+
| One entry per item | `items` is an object keyed by item id, so each item has one entry. When two entries share a key, the page keeps the last one and drops the first with no error, so update an item's one entry in place. Each card carries its key as `data-item`. An item's status, warnings and links all sit on its one entry. |
|
|
27
28
|
| Board first | A board of colored lanes shows where every item stands. Each lane chip jumps to its card. |
|
|
28
29
|
| Picture cards | Each item is a card with a status band, a four-step progress track, a next-step line, a folded summary, links and a copy button. |
|
|
29
30
|
| Filters | Two tabs, a project filter row and a search box narrow the list. The tab and the filter persist per viewer through `localStorage`, wrapped in `try`. |
|
|
@@ -49,4 +50,16 @@ Ask an agent: "convert <artifact link> to our format."
|
|
|
49
50
|
2. Map each part to its piece in `template.html`: status groups to board lanes, records to picture cards, filters to tabs and chips, and the data to the JSON data block.
|
|
50
51
|
3. Apply the house rules above and the template's color tokens.
|
|
51
52
|
4. Check that text is 16px or larger, text contrast is 7:1 or better, and the page has no horizontal scroll at 390px, in light and dark.
|
|
52
|
-
5. Publish
|
|
53
|
+
5. Publish as [Republish a page](#republish-a-page) says.
|
|
54
|
+
|
|
55
|
+
## Republish a page
|
|
56
|
+
|
|
57
|
+
A page a person reads more than once shows one current state at one link. This holds for every page built from any template here, and for a page built by hand.
|
|
58
|
+
|
|
59
|
+
- **Rebuild on each publish.** Make the page again from the current state on each publish. A new result takes the place of the entry it updates. A section added for one round of feedback, such as a second list of the same screens under a warnings heading, leaves the reader with two entries and no way to tell which is current.
|
|
60
|
+
- **Each item once.** One entry per item, with its status and every warning that names it on that entry. To show several draws of one screen, give each draw its own image and its own entry. Show a baseline once, at the head of the row of its variants. Give a thumbnail's full view a closed `<details>` or `<dialog>`, or zoom the one image with CSS.
|
|
61
|
+
- **Replaced content leaves the page.** Remove a count, a note or a section that a newer result replaced. The page holds no history of what it said before.
|
|
62
|
+
- **State what it shows and when.** A line at the top names the run or source the page shows and the time it was updated.
|
|
63
|
+
- **One link.** Pass the page's link as `url` on every publish after the first. Write the link into the page as `<meta name="artifact-link" content="<link>">`, so it travels with a copy of the file. `session/artifact_link_record.py` also writes it to `<page file>.artifact-link.json` beside the page after each publish.
|
|
64
|
+
|
|
65
|
+
`blocking/artifact_current_page_gate.py` renders each page publish and refuses one that draws an image twice, draws two elements with one `data-item` key, or passes no `url` for a page with a recorded link. The refusal names the item or the link. An image up to 64 pixels on a side is an icon and may repeat. The gate cannot see a repeated item that has no image and no `data-item` key, so give each card of a hand-built page a `data-item` key.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Marking what changed between review rounds
|
|
2
2
|
|
|
3
|
-
A page that a reviewer reads more than once shows what changed since their last look. The template marks only the parts that changed: each one gets a thin bar on its left edge and a small "Changed" label at its start. The card around them stays as it is, and its board chip gets a dot in the same color. There is no diff and no list of changes.
|
|
3
|
+
A page that a reviewer reads more than once shows what changed since their last look. The template marks only the parts that changed: each one gets a thin bar on its left edge and a small "Changed" label at its start. The card around them stays as it is, and its board chip gets a dot in the same color. There is no diff and no list of changes. A mark shows where the page changed; the page itself still holds only the current state, with each item once, as [Republish a page](README.md#republish-a-page) says.
|
|
4
4
|
|
|
5
5
|
## Data
|
|
6
6
|
|
|
@@ -149,8 +149,8 @@ details.what[open] summary::before { content: "▾" }
|
|
|
149
149
|
"icon": "✨"
|
|
150
150
|
}
|
|
151
151
|
],
|
|
152
|
-
"items":
|
|
153
|
-
{
|
|
152
|
+
"items": {
|
|
153
|
+
"pick-a-release-date": {
|
|
154
154
|
"title": "Pick a release date",
|
|
155
155
|
"owner": "web",
|
|
156
156
|
"status": "open",
|
|
@@ -158,7 +158,9 @@ details.what[open] summary::before { content: "▾" }
|
|
|
158
158
|
"card": true,
|
|
159
159
|
"next": "choose between the two dates in the linked plan.",
|
|
160
160
|
"changed_round": 3,
|
|
161
|
-
"changed_parts": [
|
|
161
|
+
"changed_parts": [
|
|
162
|
+
"next"
|
|
163
|
+
],
|
|
162
164
|
"summary": [
|
|
163
165
|
"One release date everyone plans around",
|
|
164
166
|
"The launch checklist dated backward from it",
|
|
@@ -173,14 +175,16 @@ details.what[open] summary::before { content: "▾" }
|
|
|
173
175
|
],
|
|
174
176
|
"starter": "Pick a release date. Read the release plan, list both dates with what each one moves, and ask for the choice."
|
|
175
177
|
},
|
|
176
|
-
{
|
|
178
|
+
"flaky-login-test": {
|
|
177
179
|
"title": "Flaky login test",
|
|
178
180
|
"owner": "web",
|
|
179
181
|
"status": "blocked",
|
|
180
182
|
"card": true,
|
|
181
183
|
"next": "wait for the staging database to come back online.",
|
|
182
184
|
"changed_round": 2,
|
|
183
|
-
"changed_parts": [
|
|
185
|
+
"changed_parts": [
|
|
186
|
+
"next"
|
|
187
|
+
],
|
|
184
188
|
"summary": [
|
|
185
189
|
"The login test passes ten runs in a row",
|
|
186
190
|
"The root cause written in the pull request"
|
|
@@ -194,14 +198,16 @@ details.what[open] summary::before { content: "▾" }
|
|
|
194
198
|
],
|
|
195
199
|
"starter": "Fix the flaky login test. Reproduce it, find the cause, and open a draft pull request with the proof."
|
|
196
200
|
},
|
|
197
|
-
{
|
|
201
|
+
"faster-search-page": {
|
|
198
202
|
"title": "Faster search page",
|
|
199
203
|
"owner": "platform",
|
|
200
204
|
"status": "doing",
|
|
201
205
|
"card": true,
|
|
202
206
|
"next": "finish the index change and rerun the timing check.",
|
|
203
207
|
"changed_round": 3,
|
|
204
|
-
"changed_parts": [
|
|
208
|
+
"changed_parts": [
|
|
209
|
+
"summary"
|
|
210
|
+
],
|
|
205
211
|
"summary": [
|
|
206
212
|
"Search answers in under one second",
|
|
207
213
|
"A timing check that guards it",
|
|
@@ -216,7 +222,7 @@ details.what[open] summary::before { content: "▾" }
|
|
|
216
222
|
],
|
|
217
223
|
"starter": "Make the search page faster. Measure first, change the index, and prove the new time."
|
|
218
224
|
},
|
|
219
|
-
{
|
|
225
|
+
"setup-guide-refresh": {
|
|
220
226
|
"title": "Setup guide refresh",
|
|
221
227
|
"owner": "docs",
|
|
222
228
|
"status": "open",
|
|
@@ -229,7 +235,7 @@ details.what[open] summary::before { content: "▾" }
|
|
|
229
235
|
"added": "2026-01-15T16:45:00Z",
|
|
230
236
|
"starter": "Refresh the setup guide. Run each step on a clean machine and fix every step that fails."
|
|
231
237
|
},
|
|
232
|
-
{
|
|
238
|
+
"status-page": {
|
|
233
239
|
"title": "Status page",
|
|
234
240
|
"owner": "new-project",
|
|
235
241
|
"status": "open",
|
|
@@ -250,7 +256,7 @@ details.what[open] summary::before { content: "▾" }
|
|
|
250
256
|
],
|
|
251
257
|
"starter": "Set up the Status Page project from its brief, then build the first health check."
|
|
252
258
|
},
|
|
253
|
-
{
|
|
259
|
+
"dark-mode-colors": {
|
|
254
260
|
"title": "Dark mode colors",
|
|
255
261
|
"owner": "web",
|
|
256
262
|
"status": "done",
|
|
@@ -269,7 +275,7 @@ details.what[open] summary::before { content: "▾" }
|
|
|
269
275
|
}
|
|
270
276
|
]
|
|
271
277
|
},
|
|
272
|
-
{
|
|
278
|
+
"changelog-automation": {
|
|
273
279
|
"title": "Changelog automation",
|
|
274
280
|
"owner": "platform",
|
|
275
281
|
"status": "done",
|
|
@@ -288,7 +294,7 @@ details.what[open] summary::before { content: "▾" }
|
|
|
288
294
|
}
|
|
289
295
|
]
|
|
290
296
|
}
|
|
291
|
-
|
|
297
|
+
}
|
|
292
298
|
}
|
|
293
299
|
</script>
|
|
294
300
|
<script>
|
|
@@ -306,6 +312,7 @@ const state = { tab: "open", owner: "all", query: "" };
|
|
|
306
312
|
try { const saved = JSON.parse(localStorage.getItem("work-tracker-view") || "{}"); if (saved.tab) state.tab = saved.tab; if (saved.owner) state.owner = saved.owner; } catch (e) {}
|
|
307
313
|
const REVIEW_ROUND = Number(TRACKER.round) || 0;
|
|
308
314
|
const CHANGE_BASELINE = changeBaseline();
|
|
315
|
+
const ITEMS = Object.entries(TRACKER.items).map(([key, it]) => ({ key, ...it }));
|
|
309
316
|
const ownerByKey = Object.fromEntries(TRACKER.owners.map(o => [o.key, o]));
|
|
310
317
|
const isDone = it => it.status === "done";
|
|
311
318
|
function stageOf(it) {
|
|
@@ -315,7 +322,7 @@ function stageOf(it) {
|
|
|
315
322
|
if (it.status === "doing") return "doing";
|
|
316
323
|
return "ready";
|
|
317
324
|
}
|
|
318
|
-
const slug = it => "item-" + it.
|
|
325
|
+
const slug = it => "item-" + it.key;
|
|
319
326
|
const fmt = iso => { if (!iso) return ""; try { return new Date(iso).toLocaleString(undefined, { month: "long", day: "numeric", hour: "numeric", minute: "2-digit" }); } catch (e) { return iso; } };
|
|
320
327
|
const el = (tag, cls, text) => { const n = document.createElement(tag); if (cls) n.className = cls; if (text != null) n.textContent = text; return n; };
|
|
321
328
|
function changeBaseline() {
|
|
@@ -387,7 +394,7 @@ function renderBoard(items) {
|
|
|
387
394
|
}
|
|
388
395
|
function renderFilters() {
|
|
389
396
|
const f = document.getElementById("filters"); f.textContent = "";
|
|
390
|
-
const pool =
|
|
397
|
+
const pool = ITEMS.filter(i => (state.tab === "done") === isDone(i));
|
|
391
398
|
const opts = [{ key: "all", name: "All projects" }].concat(TRACKER.owners.filter(o => pool.some(i => i.owner === o.key)));
|
|
392
399
|
if (!opts.some(o => o.key === state.owner)) state.owner = "all";
|
|
393
400
|
for (const o of opts) {
|
|
@@ -437,6 +444,7 @@ function itemCard(it) {
|
|
|
437
444
|
const key = stageOf(it), s = STAGE_BY_KEY[key], owner = ownerByKey[it.owner] || { name: it.owner };
|
|
438
445
|
const card = el("article", "card " + key);
|
|
439
446
|
card.id = slug(it);
|
|
447
|
+
card.dataset.item = it.key;
|
|
440
448
|
const band = el("div", "band " + key);
|
|
441
449
|
band.append(el("span", null, s.icon), el("span", null, s.label));
|
|
442
450
|
const proj = el("span", "proj");
|
|
@@ -482,16 +490,16 @@ function itemCard(it) {
|
|
|
482
490
|
}
|
|
483
491
|
function render() {
|
|
484
492
|
document.querySelectorAll(".tab").forEach(t => t.setAttribute("aria-pressed", String(t.dataset.tab === state.tab)));
|
|
485
|
-
const open =
|
|
493
|
+
const open = ITEMS.filter(i => !isDone(i));
|
|
486
494
|
document.getElementById("stamp").textContent = "Updated " + fmt(TRACKER.updated);
|
|
487
495
|
document.getElementById("n-open").textContent = open.length;
|
|
488
|
-
document.getElementById("n-done").textContent =
|
|
496
|
+
document.getElementById("n-done").textContent = ITEMS.length - open.length;
|
|
489
497
|
renderFilters();
|
|
490
|
-
const items =
|
|
498
|
+
const items = ITEMS.filter(inView);
|
|
491
499
|
renderBoard(items);
|
|
492
500
|
const list = document.getElementById("list"); list.textContent = "";
|
|
493
501
|
if (!items.length) {
|
|
494
|
-
list.append(el("div", "empty",
|
|
502
|
+
list.append(el("div", "empty", ITEMS.length ? (state.tab === "done" ? "No finished items match." : "No open items match.") : "Nothing tracked yet. Add an item to the data block and it shows up here."));
|
|
495
503
|
return;
|
|
496
504
|
}
|
|
497
505
|
const order = state.tab === "done" ? ["done"] : ["you", "blocked", "doing", "ready"];
|
|
@@ -31,6 +31,10 @@ Codex reads the same `SKILL.md` from the clone in step 2.
|
|
|
31
31
|
|
|
32
32
|
Paste it into a `<style>` block after the plugin stylesheet, or link it beside the page.
|
|
33
33
|
|
|
34
|
+
## Republish a page
|
|
35
|
+
|
|
36
|
+
A page a person reads more than once follows [Republish a page](../artifact-page/README.md#republish-a-page): rebuild it from the current state, show each item once, and publish to the same link. The publish gate refuses a repeated image or a second link.
|
|
37
|
+
|
|
34
38
|
## Check before publishing
|
|
35
39
|
|
|
36
40
|
Render the page at 390px in light and dark. Every text node is 16px or larger and holds 7:1 contrast against its painted background. The page has no console errors and no horizontal scroll.
|