@forwardimpact/outpost 3.12.0 → 3.13.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/README.md +2 -2
- package/bin/fit-outpost.js +3 -2
- package/package.json +6 -5
- package/src/agent-path.js +10 -6
- package/src/agent-runner.js +28 -24
- package/src/index.js +2 -3
- package/src/kb-manager.js +75 -20
- package/src/kb-validator.js +762 -0
- package/src/outpost.js +108 -39
- package/src/posture.js +3 -3
- package/src/privilege.js +11 -11
- package/src/scheduler.js +14 -12
- package/src/socket-server.js +19 -18
- package/src/spawn-env.js +7 -6
- package/src/state-manager.js +2 -2
- package/templates/.claude/agents/chief-of-staff.md +32 -24
- package/templates/.claude/agents/concierge.md +26 -17
- package/templates/.claude/agents/head-hunter.md +34 -26
- package/templates/.claude/agents/librarian.md +26 -18
- package/templates/.claude/agents/postman.md +26 -18
- package/templates/.claude/agents/recruiter.md +38 -27
- package/templates/.claude/skills/anarlog-follow/SKILL.md +91 -66
- package/templates/.claude/skills/anarlog-follow/references/coaching.md +22 -21
- package/templates/.claude/skills/anarlog-follow/references/sessions.md +52 -0
- package/templates/.claude/skills/anarlog-process/SKILL.md +108 -62
- package/templates/.claude/skills/anarlog-process/references/extraction.md +41 -29
- package/templates/.claude/skills/anarlog-process/references/sessions.md +92 -58
- package/templates/.claude/skills/anarlog-process/scripts/scan.mjs +402 -160
- package/templates/.claude/skills/candidate-report/SKILL.md +41 -36
- package/templates/.claude/skills/candidate-report/references/report-template.html +10 -10
- package/templates/.claude/skills/candidate-report/references/report.css +4 -4
- package/templates/.claude/skills/candidate-report/references/rubric.md +15 -14
- package/templates/.claude/skills/candidate-report/scripts/render-pdf.mjs +2 -2
- package/templates/.claude/skills/changelog/SKILL.md +122 -67
- package/templates/.claude/skills/deck-create/SKILL.md +90 -32
- package/templates/.claude/skills/deck-create/references/slide.css +4 -4
- package/templates/.claude/skills/deck-create/scripts/convert-to-pdf.mjs +6 -6
- package/templates/.claude/skills/deck-review/SKILL.md +63 -58
- package/templates/.claude/skills/deck-review/assets/slide-annotator.js +58 -49
- package/templates/.claude/skills/deck-summarize/SKILL.md +55 -45
- package/templates/.claude/skills/deck-summarize/references/brief-template.md +5 -4
- package/templates/.claude/skills/deck-summarize/scripts/extract-pptx.mjs +8 -7
- package/templates/.claude/skills/doc-collab/SKILL.md +39 -34
- package/templates/.claude/skills/doc-create/SKILL.md +27 -23
- package/templates/.claude/skills/doc-create/scripts/convert-to-pdf.mjs +6 -6
- package/templates/.claude/skills/draft-emails/SKILL.md +63 -53
- package/templates/.claude/skills/draft-emails/references/template.md +2 -2
- package/templates/.claude/skills/draft-emails/scripts/scan-emails.mjs +15 -8
- package/templates/.claude/skills/draft-emails/scripts/send-email.mjs +19 -11
- package/templates/.claude/skills/extract-entities/SKILL.md +76 -75
- package/templates/.claude/skills/extract-entities/references/TEMPLATES.md +6 -5
- package/templates/.claude/skills/extract-entities/references/conditions.md +20 -18
- package/templates/.claude/skills/extract-entities/references/content.md +10 -9
- package/templates/.claude/skills/extract-entities/references/links.md +37 -13
- package/templates/.claude/skills/extract-entities/references/recruitment.md +30 -24
- package/templates/.claude/skills/extract-entities/references/resolution.md +14 -14
- package/templates/.claude/skills/extract-entities/references/sources.md +9 -9
- package/templates/.claude/skills/extract-entities/references/templates-conditions.md +12 -6
- package/templates/.claude/skills/extract-entities/references/templates-people-orgs.md +29 -10
- package/templates/.claude/skills/extract-entities/references/templates-priorities.md +10 -4
- package/templates/.claude/skills/extract-entities/references/templates-projects-topics.md +19 -7
- package/templates/.claude/skills/extract-entities/scripts/state.mjs +9 -8
- package/templates/.claude/skills/meeting-prep/SKILL.md +42 -36
- package/templates/.claude/skills/organize-files/SKILL.md +27 -22
- package/templates/.claude/skills/organize-files/scripts/organize-by-type.mjs +5 -4
- package/templates/.claude/skills/organize-files/scripts/summarize.mjs +4 -4
- package/templates/.claude/skills/person-identify/SKILL.md +77 -27
- package/templates/.claude/skills/person-identify/scripts/identify.sh +125 -26
- package/templates/.claude/skills/person-lookup/SKILL.md +34 -30
- package/templates/.claude/skills/person-lookup/scripts/lookup.sh +46 -17
- package/templates/.claude/skills/req-assess/SKILL.md +44 -36
- package/templates/.claude/skills/req-assess/references/interview-template.md +7 -2
- package/templates/.claude/skills/req-assess/references/panel-template.md +7 -2
- package/templates/.claude/skills/req-assess/references/rubric.md +13 -13
- package/templates/.claude/skills/req-bundle/SKILL.md +164 -0
- package/templates/.claude/skills/req-bundle/references/matching.md +70 -0
- package/templates/.claude/skills/req-bundle/references/pdf-structure.md +74 -0
- package/templates/.claude/skills/req-bundle/scripts/split-bundle.mjs +377 -0
- package/templates/.claude/skills/req-decide/SKILL.md +52 -41
- package/templates/.claude/skills/req-decide/references/rubric.md +11 -10
- package/templates/.claude/skills/req-decide/references/template.md +2 -2
- package/templates/.claude/skills/req-forget/SKILL.md +58 -39
- package/templates/.claude/skills/req-forget/references/classify.md +15 -13
- package/templates/.claude/skills/req-forget/references/locations.md +27 -22
- package/templates/.claude/skills/req-forget/references/report-template.md +24 -16
- package/templates/.claude/skills/req-scan/SKILL.md +27 -25
- package/templates/.claude/skills/req-scan/references/fallbacks.md +9 -9
- package/templates/.claude/skills/req-scan/references/filters.md +13 -13
- package/templates/.claude/skills/req-scan/references/sources.md +7 -7
- package/templates/.claude/skills/req-scan/references/state.md +1 -1
- package/templates/.claude/skills/req-scan/references/template.md +11 -1
- package/templates/.claude/skills/req-scan/scripts/state.mjs +3 -2
- package/templates/.claude/skills/req-screen/SKILL.md +96 -50
- package/templates/.claude/skills/req-screen/references/rubric.md +46 -50
- package/templates/.claude/skills/req-screen/references/scoring.md +79 -0
- package/templates/.claude/skills/req-screen/references/template.md +29 -17
- package/templates/.claude/skills/req-track/SKILL.md +76 -76
- package/templates/.claude/skills/req-track/references/fields.md +31 -27
- package/templates/.claude/skills/req-track/references/overlays.md +42 -0
- package/templates/.claude/skills/req-track/references/signals.md +12 -12
- package/templates/.claude/skills/req-track/references/statuses.md +3 -2
- package/templates/.claude/skills/req-track/references/templates.md +28 -27
- package/templates/.claude/skills/req-workday/SKILL.md +69 -40
- package/templates/.claude/skills/req-workday/references/brief.md +81 -0
- package/templates/.claude/skills/req-workday/references/status-mapping.md +5 -5
- package/templates/.claude/skills/req-workday/references/templates.md +11 -78
- package/templates/.claude/skills/req-workday/references/xlsx-format.md +26 -7
- package/templates/.claude/skills/req-workday/scripts/parse-workday.mjs +113 -35
- package/templates/.claude/skills/send-chat/SKILL.md +58 -54
- package/templates/.claude/skills/sync-apple-calendar/SKILL.md +23 -19
- package/templates/.claude/skills/sync-apple-calendar/references/SCHEMA.md +7 -7
- package/templates/.claude/skills/sync-apple-calendar/scripts/query.mjs +6 -6
- package/templates/.claude/skills/sync-apple-calendar/scripts/sync.mjs +9 -8
- package/templates/.claude/skills/sync-apple-mail/SKILL.md +20 -14
- package/templates/.claude/skills/sync-apple-mail/references/SCHEMA.md +10 -10
- package/templates/.claude/skills/sync-apple-mail/scripts/parse-emlx.mjs +9 -9
- package/templates/.claude/skills/sync-apple-mail/scripts/sync-helpers.mjs +16 -13
- package/templates/.claude/skills/sync-apple-mail/scripts/sync.mjs +3 -3
- package/templates/.claude/skills/sync-teams/SKILL.md +46 -43
- package/templates/.claude/skills/sync-teams/scripts/idb-reader.mjs +22 -21
- package/templates/.claude/skills/sync-teams/scripts/leveldb-reader.mjs +4 -4
- package/templates/.claude/skills/sync-teams/scripts/sync.mjs +4 -4
- package/templates/.claude/skills/upstream-instructions/SKILL.md +43 -41
- package/templates/.claude/skills/upstream-instructions/references/examples.md +5 -5
- package/templates/CLAUDE.md +97 -85
- package/templates/MIGRATION.md +359 -0
- package/templates/registry.yaml +25 -0
- package/templates/.claude/skills/anarlog-follow/scripts/follow.mjs +0 -243
- package/templates/.claude/skills/anarlog-trim/SKILL.md +0 -183
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deck-create
|
|
3
|
-
description: Generate PDF slide decks from user requests
|
|
4
|
-
compatibility: Requires Node.js
|
|
3
|
+
description: Generate PDF slide decks from user requests. Playwright renders the HTML slides to PDF. Use when the user asks to create a presentation, slide deck, or pitch deck. Pulls context from the knowledge base for company info, project details, and people.
|
|
4
|
+
compatibility: Requires Node.js. The skill installs Playwright on first use.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Create Presentations
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Write tier: `0-Draft`
|
|
10
|
+
Frontmatter: none
|
|
11
|
+
|
|
12
|
+
Generate PDF slide decks from user requests. Playwright renders the HTML slides
|
|
13
|
+
to PDF. This skill can pull context from the knowledge base for company info,
|
|
11
14
|
project details, and people.
|
|
12
15
|
|
|
13
16
|
## Trigger
|
|
@@ -17,12 +20,12 @@ Run when the user asks to create a presentation, slide deck, or pitch deck.
|
|
|
17
20
|
## Prerequisites
|
|
18
21
|
|
|
19
22
|
- Node.js installed
|
|
20
|
-
-
|
|
23
|
+
- The skill installs Playwright on first use
|
|
21
24
|
|
|
22
25
|
## Inputs
|
|
23
26
|
|
|
24
27
|
- User's description of the presentation
|
|
25
|
-
- `
|
|
28
|
+
- `3-Team/` — optional context about company, product, team, projects
|
|
26
29
|
|
|
27
30
|
## Outputs
|
|
28
31
|
|
|
@@ -32,9 +35,9 @@ Run when the user asks to create a presentation, slide deck, or pitch deck.
|
|
|
32
35
|
|
|
33
36
|
## Workflow
|
|
34
37
|
|
|
35
|
-
1. Check `
|
|
38
|
+
1. Check `3-Team/` for relevant context about the company, product, team,
|
|
36
39
|
etc.
|
|
37
|
-
2.
|
|
40
|
+
2. Make sure Playwright is installed:
|
|
38
41
|
`bun install playwright && bunx playwright install chromium`
|
|
39
42
|
3. Create an HTML file at `/tmp/outpost-presentation.html` with slides
|
|
40
43
|
(1280x720px each)
|
|
@@ -54,26 +57,79 @@ The conversion script accepts optional arguments:
|
|
|
54
57
|
Defaults: input = `/tmp/outpost-presentation.html`, output =
|
|
55
58
|
`~/Desktop/presentation.pdf`
|
|
56
59
|
|
|
60
|
+
## Source Annotations — REQUIRED
|
|
61
|
+
|
|
62
|
+
Decks are condensed views of source documents (knowledge-base notes, drafts
|
|
63
|
+
under `0-Draft/`, project docs). As a deck is iterated on, improvements get
|
|
64
|
+
**back-ported** to those sources. So every deck must record what maps where.
|
|
65
|
+
Embed the mapping as HTML comments (invisible in the browser and in the PDF).
|
|
66
|
+
A deck with untraceable content is incomplete.
|
|
67
|
+
|
|
68
|
+
### Comment syntax
|
|
69
|
+
|
|
70
|
+
<!-- src: <relative-path>#<heading> -->
|
|
71
|
+
<!-- src-note: <free text> -->
|
|
72
|
+
|
|
73
|
+
- `src:` maps the **next element** (and everything inside it) to a source file
|
|
74
|
+
or section. A nested `src:` overrides its parent for that subtree.
|
|
75
|
+
- The path is **relative to the deck file itself**. The heading is the exact
|
|
76
|
+
markdown heading text without the leading `#`-marks, as in an Obsidian
|
|
77
|
+
`[[file#heading]]` link. Omit `#<heading>` to map to the whole file.
|
|
78
|
+
- `src: #<heading>` (path omitted) inherits the path from the nearest
|
|
79
|
+
**enclosing** `src:`. Use this for repeated sections within one annotated
|
|
80
|
+
slide, so the doc path is stated once per slide.
|
|
81
|
+
- `src-note:` records exceptions and nuances in prose: content synthesized
|
|
82
|
+
from multiple sources, deliberately omitted source fields, or deviations
|
|
83
|
+
from the field conventions.
|
|
84
|
+
|
|
85
|
+
### Placement rules
|
|
86
|
+
|
|
87
|
+
1. **Legend first.** Put one legend comment right after `<body>`. It explains
|
|
88
|
+
the syntax and the deck's field conventions (see below). Never nest a
|
|
89
|
+
literal `<!--` inside it — write the syntax without comment delimiters.
|
|
90
|
+
2. **One `src:` per slide**, mapping it to its primary source document, placed
|
|
91
|
+
immediately before the `<section class="slide">`.
|
|
92
|
+
3. **One `src:` per repeated content block** (a goal, a priority, a feature
|
|
93
|
+
card…), mapping it to the source section heading, placed immediately
|
|
94
|
+
before the block's opening tag.
|
|
95
|
+
4. **Field conventions instead of per-paragraph comments.** When a block's
|
|
96
|
+
inner elements map 1:1 to labelled source fields (e.g. `.card.why p` ↔
|
|
97
|
+
`**Why it matters:**`), declare that mapping **once in the legend**.
|
|
98
|
+
Annotate individual elements only when they deviate — then use `src-note:`.
|
|
99
|
+
5. **Synthesized content** (title pages, summary slides that condense several
|
|
100
|
+
sources) gets a `src-note:` saying what it draws on.
|
|
101
|
+
|
|
102
|
+
### Authoring for back-portability
|
|
103
|
+
|
|
104
|
+
- Keep deck headings **verbatim from the source headings** where possible.
|
|
105
|
+
The anchor then doubles as an integrity check.
|
|
106
|
+
- Keep stable IDs from the sources (A1, B2, goal numbers) visible in the deck
|
|
107
|
+
content, so items self-identify even if comments are stripped.
|
|
108
|
+
- When back-porting: treat the deck text as the edited version of the mapped
|
|
109
|
+
source field. Apply the change to the source file at the given heading.
|
|
110
|
+
Carry the substance back, not the deck's condensed formatting. Find all
|
|
111
|
+
annotations with `rg '<!-- src' <deck>.html`.
|
|
112
|
+
|
|
57
113
|
## PDF Rendering Rules
|
|
58
114
|
|
|
59
|
-
**These prevent
|
|
115
|
+
**These rules prevent problems when the PDF renders:**
|
|
60
116
|
|
|
61
|
-
1. **No layered elements** — Style content elements directly
|
|
62
|
-
background elements
|
|
117
|
+
1. **No layered elements** — Style content elements directly. Do not add
|
|
118
|
+
separate background elements
|
|
63
119
|
2. **No box-shadow** — Use borders instead: `border: 1px solid #e5e7eb`
|
|
64
|
-
3. **Bullets
|
|
65
|
-
4. **Content must fit** — Slides are 1280x720px with 60px padding.
|
|
66
|
-
1160x600px. Use `overflow: hidden`
|
|
120
|
+
3. **Bullets with CSS only** — Use `li::before` pseudo-elements
|
|
121
|
+
4. **Content must fit** — Slides are 1280x720px with 60px padding. The safe area
|
|
122
|
+
is 1160x600px. Use `overflow: hidden`
|
|
67
123
|
5. **No footers or headers** — No fixed/absolute positioned footer/header
|
|
68
124
|
elements
|
|
69
125
|
|
|
70
126
|
## Interactive HTML Decks — Navigation & Event Standards
|
|
71
127
|
|
|
72
|
-
|
|
73
|
-
navigable in the browser)
|
|
74
|
-
deliberately minimal. Rich event
|
|
75
|
-
|
|
76
|
-
`slide-annotator.js` review overlay).
|
|
128
|
+
You can deliver the deck as a **standalone interactive HTML file**
|
|
129
|
+
(animated / navigable in the browser) instead of a static PDF. Then keep the
|
|
130
|
+
input handlers deliberately minimal. Rich event handlers fight with two things
|
|
131
|
+
the user needs: selection and copy of text on a slide, and text entry into
|
|
132
|
+
overlay tools (e.g. the `slide-annotator.js` review overlay).
|
|
77
133
|
|
|
78
134
|
**Required:**
|
|
79
135
|
|
|
@@ -83,13 +139,13 @@ selecting/copying text on a slide, and typing into overlay tools (e.g. the
|
|
|
83
139
|
navigate (e.g. "click left/right third"). They fire on the mouse-up that ends
|
|
84
140
|
a text-selection drag and jump the slide unexpectedly.
|
|
85
141
|
3. **No spacebar, PageUp/PageDown, or other global key bindings.** Space
|
|
86
|
-
conflicts
|
|
87
|
-
surprising.
|
|
142
|
+
conflicts when the user types into an overlay input. The rest are redundant
|
|
143
|
+
and surprising.
|
|
88
144
|
4. **A progress indicator may be clickable**, but it must live in the
|
|
89
145
|
footer/chrome and never overlap slide content.
|
|
90
146
|
5. **Expose `window.deckGoto(index)`** (0-based) right after the slide-show
|
|
91
|
-
function, so review/overlay tools can jump to a slide without
|
|
92
|
-
|
|
147
|
+
function, so review/overlay tools can jump to a slide without a simulated
|
|
148
|
+
click or key:
|
|
93
149
|
|
|
94
150
|
function go(n) { /* ...show slide n... */ }
|
|
95
151
|
window.deckGoto = go;
|
|
@@ -97,20 +153,22 @@ selecting/copying text on a slide, and typing into overlay tools (e.g. the
|
|
|
97
153
|
6. **Keep the hint honest** — the on-screen nav hint should read
|
|
98
154
|
`← → to navigate` (don't advertise click/space).
|
|
99
155
|
7. **Use stable structural hooks.** Make each slide one element with class
|
|
100
|
-
`.slide
|
|
156
|
+
`.slide`. Put the slide-number label (if any) in a `.slide-num` element.
|
|
101
157
|
The review overlay defaults to these selectors to detect and index slides.
|
|
102
158
|
|
|
103
|
-
These rules keep decks compatible with the **`deck-review`** skill
|
|
159
|
+
These rules keep decks compatible with the **`deck-review`** skill. That skill
|
|
104
160
|
installs the `slide-annotator.js` review overlay (highlight text on a slide →
|
|
105
|
-
sidecar JSON of feedback that an agent acts on). After
|
|
106
|
-
HTML deck, you can offer to run `deck-review` to make it reviewable
|
|
107
|
-
skill for the install steps and the sidecar JSON schema.
|
|
161
|
+
sidecar JSON of feedback that an agent acts on). After you produce an
|
|
162
|
+
interactive HTML deck, you can offer to run `deck-review` to make it reviewable.
|
|
163
|
+
See that skill for the install steps and the sidecar JSON schema.
|
|
108
164
|
|
|
109
165
|
## Constraints
|
|
110
166
|
|
|
111
167
|
- Always use the knowledge base for context when available
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
-
|
|
168
|
+
- Always embed source annotations (`src:` / `src-note:` comments + legend)
|
|
169
|
+
that map deck sections to their source documents — see Source Annotations
|
|
170
|
+
- Output to `~/Desktop/presentation.pdf` unless the user specifies otherwise
|
|
171
|
+
- Keep slides clean and readable (max 5-6 bullet points per slide)
|
|
172
|
+
- Use the same styles throughout
|
|
115
173
|
- For interactive HTML decks, follow the navigation & event standards above
|
|
116
|
-
(arrow-keys-only
|
|
174
|
+
(arrow-keys-only, no click-to-advance or spacebar)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* Required CSS for HTML slide decks
|
|
1
|
+
/* Required CSS for HTML slide decks that Playwright renders to PDF.
|
|
2
2
|
*
|
|
3
3
|
* Include this in the <style> block of /tmp/outpost-presentation.html.
|
|
4
|
-
* See scripts/convert-to-pdf.mjs for the
|
|
4
|
+
* See scripts/convert-to-pdf.mjs for the script that renders them.
|
|
5
5
|
*
|
|
6
|
-
* PDF
|
|
6
|
+
* Rules for PDF output:
|
|
7
7
|
* - No layered elements — style content directly, no separate backgrounds
|
|
8
8
|
* - No box-shadow — use borders: border: 1px solid #e5e7eb
|
|
9
|
-
* - Bullets
|
|
9
|
+
* - Bullets with CSS only — use li::before pseudo-elements
|
|
10
10
|
* - Content must fit — safe area is 1160x600px (1280x720 minus 60px padding)
|
|
11
11
|
* - No footers or headers — no fixed/absolute positioned elements
|
|
12
12
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
/**
|
|
3
|
-
* Convert HTML slides to PDF
|
|
3
|
+
* Convert HTML slides to PDF with Playwright.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* PDF document. Each slide
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* This script renders an HTML file that contains slide markup (1280x720px per
|
|
6
|
+
* slide) into a PDF document. Each slide measures exactly 1280x720 pixels. The
|
|
7
|
+
* PDF keeps the background colours and the images. Without arguments, the
|
|
8
|
+
* script reads from /tmp and writes to ~/Desktop.
|
|
9
9
|
*
|
|
10
10
|
* Requires: bun install playwright && bunx playwright install chromium
|
|
11
11
|
*/
|
|
@@ -14,7 +14,7 @@ import { join } from "node:path";
|
|
|
14
14
|
import { resolve } from "node:path";
|
|
15
15
|
import { homedir } from "node:os";
|
|
16
16
|
|
|
17
|
-
const HELP = `convert-to-pdf — render HTML slides to PDF
|
|
17
|
+
const HELP = `convert-to-pdf — render HTML slides to PDF with Playwright
|
|
18
18
|
|
|
19
19
|
Usage: bun scripts/convert-to-pdf.mjs [input.html] [output.pdf] [-h|--help]
|
|
20
20
|
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deck-review
|
|
3
|
-
description: Add a lightweight text-highlight review overlay to an HTML deck. Lets you highlight text on slides and capture feedback as a sidecar JSON
|
|
3
|
+
description: Add a lightweight text-highlight review overlay to an HTML deck. Lets you highlight text on slides and capture feedback as a sidecar JSON. The JSON carries the source line, column, and context, so an agent can act on it in small iterations. Use when the user asks to add review/annotation/highlight/comment capability to a deck, make a deck "reviewable", or wants to mark up slides for revision. Pairs with the deck-create skill.
|
|
4
4
|
compatibility: Standalone HTML deck opened in a Chromium-based browser (Chrome/Edge). No build step, no server, no dependencies.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Add a Review Overlay to a Deck
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Each annotation carries a robust anchor (exact text + surrounding context +
|
|
12
|
-
slide) and, once the folder is connected, the resolved
|
|
13
|
-
**source line, column and context lines** — so an agent can locate and edit the
|
|
14
|
-
exact text in small iterations.
|
|
9
|
+
Write tier: `0-Draft`
|
|
10
|
+
Frontmatter: none
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
Install the self-contained `slide-annotator.js` overlay onto an HTML deck. The
|
|
13
|
+
user can then **highlight text on a slide and save the feedback as a sidecar
|
|
14
|
+
JSON**. Each annotation carries a robust anchor (exact text + the context around
|
|
15
|
+
it + slide). After you connect the folder, the annotation also carries the
|
|
16
|
+
resolved **source line, column and context lines**. An agent can then locate and
|
|
17
|
+
edit the exact text in small iterations.
|
|
18
|
+
|
|
19
|
+
This is the companion to **`deck-create`**. Decks from `deck-create` already
|
|
20
|
+
follow the navigation and structure standards this overlay needs. You drop the
|
|
21
|
+
overlay onto them with one script tag.
|
|
19
22
|
|
|
20
23
|
## Trigger
|
|
21
24
|
|
|
22
25
|
Run when the user asks to add review / annotation / highlight / comment / markup
|
|
23
|
-
capability to a deck
|
|
24
|
-
on slides.
|
|
26
|
+
capability to a deck. Run it also when the user says "make this deck
|
|
27
|
+
reviewable" or asks to set up a feedback loop on slides.
|
|
25
28
|
|
|
26
29
|
## Inputs
|
|
27
30
|
|
|
28
31
|
- Path to the target deck `.html` file (ask, or default to the most recently
|
|
29
|
-
edited `*.html` in `
|
|
30
|
-
- The bundled tool at `assets/slide-annotator.js
|
|
31
|
-
source of truth
|
|
32
|
+
edited `*.html` in `0-Draft/`).
|
|
33
|
+
- The bundled tool at `assets/slide-annotator.js`. This skill's own copy is the
|
|
34
|
+
source of truth. Edit it here, then re-install it to update decks.
|
|
32
35
|
|
|
33
36
|
## Outputs
|
|
34
37
|
|
|
@@ -40,7 +43,8 @@ on slides.
|
|
|
40
43
|
|
|
41
44
|
## Install steps
|
|
42
45
|
|
|
43
|
-
1. **Resolve the deck path** (absolute). Confirm it is an HTML deck
|
|
46
|
+
1. **Resolve the deck path** (absolute). Confirm it is an HTML deck. Confirm it
|
|
47
|
+
is not a PDF.
|
|
44
48
|
|
|
45
49
|
2. **Check compatibility** (see *Compatibility contract* below). The two things
|
|
46
50
|
that matter:
|
|
@@ -48,18 +52,18 @@ on slides.
|
|
|
48
52
|
(default `.slide`). If the deck uses a different class, note it for step 4.
|
|
49
53
|
- **Navigation hook** — the deck exposes `window.deckGoto(index)` (0-based).
|
|
50
54
|
If it has a slideshow function (e.g. `go(n)`) but no hook, add one line
|
|
51
|
-
right after it: `window.deckGoto = go;`. Without it the overlay still
|
|
52
|
-
|
|
53
|
-
to a hidden slide precisely.
|
|
54
|
-
-
|
|
55
|
-
labels in the panel
|
|
55
|
+
right after it: `window.deckGoto = go;`. Without it the overlay still
|
|
56
|
+
works. The panel's *Go* button falls back to `scrollIntoView`. But the
|
|
57
|
+
overlay can't jump to a hidden slide precisely.
|
|
58
|
+
- A slide-number label element (default `.slide-num`) is optional. It gives
|
|
59
|
+
nicer labels in the panel. It is purely cosmetic.
|
|
56
60
|
|
|
57
61
|
3. **Install the tool**: copy this skill's `assets/slide-annotator.js` into the
|
|
58
|
-
**same directory as the deck**. Resolve `~` to `$HOME
|
|
62
|
+
**same directory as the deck**. Resolve `~` to `$HOME`. Pass the Write/copy a
|
|
59
63
|
full path.
|
|
60
64
|
|
|
61
|
-
4. **Inject the script tag** immediately before `</body
|
|
62
|
-
a `slide-annotator` script tag is already present
|
|
65
|
+
4. **Inject the script tag** immediately before `</body>`. The step is
|
|
66
|
+
idempotent. Skip it if a `slide-annotator` script tag is already present:
|
|
63
67
|
|
|
64
68
|
```html
|
|
65
69
|
<!-- Review overlay: highlight text on a slide → sidecar JSON. Self-contained, optional. -->
|
|
@@ -72,8 +76,8 @@ on slides.
|
|
|
72
76
|
differs from the defaults. If there are no slide elements at all, the tool
|
|
73
77
|
treats the whole `<body>` as one container.
|
|
74
78
|
|
|
75
|
-
5. **Tell the user how to use it** (see *
|
|
76
|
-
other dependency or framework
|
|
79
|
+
5. **Tell the user how to use it** (see *Use the overlay*). Do **not** add any
|
|
80
|
+
other dependency or framework. The tool is plain JS and must stay that way.
|
|
77
81
|
|
|
78
82
|
## Compatibility contract (must match `deck-create`)
|
|
79
83
|
|
|
@@ -82,38 +86,38 @@ follow:
|
|
|
82
86
|
|
|
83
87
|
| Convention | Default | Why the overlay needs it |
|
|
84
88
|
|---|---|---|
|
|
85
|
-
| One element per slide with a stable class | `.slide` | locate which slide a highlight is on
|
|
89
|
+
| One element per slide with a stable class | `.slide` | locate which slide a highlight is on, and index the slides |
|
|
86
90
|
| Slide-number label element (optional) | `.slide-num` | human-friendly panel labels |
|
|
87
91
|
| Navigation hook | `window.deckGoto(index)` (0-based) | panel "Go" jumps to the right slide |
|
|
88
|
-
| Arrow-keys-only navigation, **no** click-to-advance / spacebar | — | text selection
|
|
92
|
+
| Arrow-keys-only navigation, **no** click-to-advance / spacebar | — | text selection and typed input in the overlay must not move slides |
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
guard
|
|
92
|
-
gracefully
|
|
94
|
+
A deck can violate the last row and have click-to-advance. The overlay's click
|
|
95
|
+
guard then suppresses only the click that ends a text-selection drag, so it
|
|
96
|
+
degrades gracefully. The correct fix is to make the deck arrow-keys-only, per
|
|
93
97
|
`deck-create`'s *Navigation & Event Standards*.
|
|
94
98
|
|
|
95
|
-
##
|
|
99
|
+
## Use the overlay (tell the user)
|
|
96
100
|
|
|
97
|
-
1. Open the deck in Chrome
|
|
98
|
-
2. **Select text** on a slide
|
|
101
|
+
1. Open the deck in Chrome. Click **✎ Review** (bottom-left).
|
|
102
|
+
2. **Select text** on a slide. A popover lets you add an optional note. Click
|
|
99
103
|
**Add**. The highlight appears and **autosaves to `localStorage`**
|
|
100
104
|
immediately.
|
|
101
105
|
3. Click **Connect folder** once and pick the deck's folder. From then on
|
|
102
|
-
**Save** writes a real `‹deck›.annotations.json` next to the deck
|
|
103
|
-
|
|
104
|
-
**source line / column / context** for each highlight.
|
|
105
|
-
folder access on `file://`, **Save** downloads the JSON instead
|
|
106
|
-
|
|
107
|
-
4. The connected folder
|
|
108
|
-
|
|
109
|
-
silently if the browser still grants access
|
|
110
|
-
**Reconnect folder
|
|
111
|
-
|
|
112
|
-
one click
|
|
113
|
-
5.
|
|
114
|
-
keystrokes never leak to the deck
|
|
115
|
-
|
|
116
|
-
##
|
|
106
|
+
**Save** writes a real `‹deck›.annotations.json` next to the deck. The tool
|
|
107
|
+
also reads the deck's own source to fill in
|
|
108
|
+
**source line / column / context** for each highlight. If the browser blocks
|
|
109
|
+
folder access on `file://`, **Save** downloads the JSON instead. Move it next
|
|
110
|
+
to the deck.
|
|
111
|
+
4. The tool **remembers the connected folder across reloads**. It stores the
|
|
112
|
+
directory handle in IndexedDB, keyed per deck. After a reload the tool
|
|
113
|
+
reconnects silently if the browser still grants access. If not, the button
|
|
114
|
+
reads **Reconnect folder**, and a single click re-grants permission without a
|
|
115
|
+
new folder pick. Browsers require a user gesture to re-grant, so you can't
|
|
116
|
+
avoid the one click. If you clear site data, the tool forgets the folder.
|
|
117
|
+
5. During a review you navigate with the deck's normal **← / →**. The overlay's
|
|
118
|
+
own keystrokes never leak to the deck.
|
|
119
|
+
|
|
120
|
+
## Act on the feedback (the review loop)
|
|
117
121
|
|
|
118
122
|
When the user says "work the annotations":
|
|
119
123
|
|
|
@@ -121,12 +125,13 @@ When the user says "work the annotations":
|
|
|
121
125
|
2. For each `status: "open"` annotation, locate the text in the deck source:
|
|
122
126
|
- Prefer `source.line` / `source.column` when present.
|
|
123
127
|
- Otherwise search the source for `quote` (disambiguate with `prefix` /
|
|
124
|
-
`suffix`, scoped to `slideId`). The quote is the underlying DOM text, so
|
|
125
|
-
matches the source even across inline tags / entities.
|
|
126
|
-
3. Make the edit
|
|
128
|
+
`suffix`, scoped to `slideId`). The quote is the underlying DOM text, so
|
|
129
|
+
it matches the source even across inline tags / entities.
|
|
130
|
+
3. Make the edit. Honor the user's `note`.
|
|
127
131
|
4. Optionally set the annotation's `status` to `"done"` in the JSON so the panel
|
|
128
132
|
shows it resolved.
|
|
129
|
-
5. Re-render
|
|
133
|
+
5. Re-render or re-screenshot to verify. Then report what changed for each
|
|
134
|
+
annotation.
|
|
130
135
|
|
|
131
136
|
### Sidecar JSON schema
|
|
132
137
|
|
|
@@ -150,17 +155,17 @@ When the user says "work the annotations":
|
|
|
150
155
|
}
|
|
151
156
|
```
|
|
152
157
|
|
|
153
|
-
##
|
|
158
|
+
## Remove the overlay (for final delivery)
|
|
154
159
|
|
|
155
160
|
To hand off a clean presentation, delete the injected
|
|
156
161
|
`<script src="slide-annotator.js" …>` line and the `slide-annotator.js` file.
|
|
157
|
-
|
|
162
|
+
The `window.deckGoto = go;` line can stay in the deck. It is harmless.
|
|
158
163
|
|
|
159
164
|
## Constraints
|
|
160
165
|
|
|
161
|
-
- Keep `slide-annotator.js` **dependency-free and host-agnostic
|
|
162
|
-
on any static HTML page
|
|
166
|
+
- Keep `slide-annotator.js` **dependency-free and host-agnostic**. It must work
|
|
167
|
+
on any static HTML page. `deck-create` output is not the only target.
|
|
163
168
|
- Edit the tool **here** (`assets/slide-annotator.js`) as the source of truth,
|
|
164
169
|
then re-install onto decks. Don't fork per-deck copies with divergent
|
|
165
170
|
behavior.
|
|
166
|
-
- Never auto-send or upload annotations anywhere
|
|
171
|
+
- Never auto-send or upload annotations anywhere. The sidecar JSON stays local.
|