document360-engine 0.1.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/config.d.ts +73 -0
- package/dist/config.js +62 -0
- package/dist/config.js.map +1 -0
- package/dist/d360/client.d.ts +30 -0
- package/dist/d360/client.js +132 -0
- package/dist/d360/client.js.map +1 -0
- package/dist/d360/environments.d.ts +28 -0
- package/dist/d360/environments.js +54 -0
- package/dist/d360/environments.js.map +1 -0
- package/dist/d360/oauth.d.ts +27 -0
- package/dist/d360/oauth.js +162 -0
- package/dist/d360/oauth.js.map +1 -0
- package/dist/d360/profile.d.ts +18 -0
- package/dist/d360/profile.js +31 -0
- package/dist/d360/profile.js.map +1 -0
- package/dist/d360/tokenStore.d.ts +17 -0
- package/dist/d360/tokenStore.js +50 -0
- package/dist/d360/tokenStore.js.map +1 -0
- package/dist/d360/tools.d.ts +14 -0
- package/dist/d360/tools.js +335 -0
- package/dist/d360/tools.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/auth.d.ts +14 -0
- package/dist/lib/auth.js +25 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/messageQueue.d.ts +9 -0
- package/dist/lib/messageQueue.js +40 -0
- package/dist/lib/messageQueue.js.map +1 -0
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.js +35 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/sessionStore.d.ts +24 -0
- package/dist/lib/sessionStore.js +100 -0
- package/dist/lib/sessionStore.js.map +1 -0
- package/dist/lib/titleGen.d.ts +7 -0
- package/dist/lib/titleGen.js +64 -0
- package/dist/lib/titleGen.js.map +1 -0
- package/dist/session.d.ts +47 -0
- package/dist/session.js +190 -0
- package/dist/session.js.map +1 -0
- package/package.json +44 -0
- package/skills/CLAUDE.md +92 -0
- package/skills/analyze-codebase/SKILL.md +35 -0
- package/skills/audit-docs/SKILL.md +48 -0
- package/skills/emit-screenshot-spec/SKILL.md +82 -0
- package/skills/gather-context-from-mcp/SKILL.md +29 -0
- package/skills/propose-structure/SKILL.md +51 -0
- package/skills/publish-to-d360/SKILL.md +49 -0
- package/skills/write-article/SKILL.md +95 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Skill: write-article
|
|
2
|
+
|
|
3
|
+
**Activate when** the user asks to write, draft, or generate a specific article — by topic name, by file path, or by reference to the approved plan.
|
|
4
|
+
|
|
5
|
+
**Goal:** produce one publishable article that follows the system-prompt article structure exactly, grounded in the actual source code, and with screenshot placeholders where the user benefits from seeing the UI.
|
|
6
|
+
|
|
7
|
+
## Before writing — gather
|
|
8
|
+
|
|
9
|
+
1. Read the source files relevant to this article. Don't skip this. The whole point of this tool is that articles are grounded in code.
|
|
10
|
+
2. Read `AGENT-PLAN.md` if present, to confirm the article's purpose matches the approved plan.
|
|
11
|
+
3. Read 1–2 existing articles in the same category, if any, to match voice and structure.
|
|
12
|
+
4. If `gather-context-from-mcp` is appropriate (the user has connected Notion / GitHub / etc. and the article would benefit from external context), invoke it.
|
|
13
|
+
|
|
14
|
+
## Article skeleton (system-prompt-mandated)
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
# <Article title>
|
|
18
|
+
|
|
19
|
+
<one-paragraph intro>
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
- <role/permissions, if any>
|
|
23
|
+
- <required state>
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
1. ...
|
|
27
|
+
2. ...
|
|
28
|
+
|
|
29
|
+
## Tips & notes
|
|
30
|
+
- ...
|
|
31
|
+
|
|
32
|
+
## Related articles
|
|
33
|
+
- ...
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Screenshot placeholders
|
|
37
|
+
|
|
38
|
+
**Screenshots apply only to browser-reachable UIs.** If the product has none (CLI, console app, library, API-only service), emit NO screenshot placeholders and do not invoke `emit-screenshot-spec` — show behavior as fenced code blocks instead: the exact command, then its real terminal output (run it or quote it from source/tests; never invent output). Never fabricate a UI to screenshot.
|
|
39
|
+
|
|
40
|
+
When the article describes a UI flow that benefits from a visual, embed one or more screenshot placeholders. Each placeholder is two parts:
|
|
41
|
+
|
|
42
|
+
1. An HTML comment block with capture instructions (stripped before D360 publish).
|
|
43
|
+
2. A visible `[Screenshot: ...]` line (kept in both local and D360).
|
|
44
|
+
|
|
45
|
+
Example:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
<!-- SCREENSHOT
|
|
49
|
+
id: <kebab-case-stable-id>
|
|
50
|
+
title: "<short title>"
|
|
51
|
+
page-url: <relative path or URL>
|
|
52
|
+
prerequisites:
|
|
53
|
+
- <plain-English state setup>
|
|
54
|
+
steps:
|
|
55
|
+
1. <numbered actions with EXACT button labels>
|
|
56
|
+
capture: <full-page | main-panel | modal-only | panel-left | panel-right | sidebar>
|
|
57
|
+
device: desktop
|
|
58
|
+
viewport: 1440x900
|
|
59
|
+
highlight:
|
|
60
|
+
- <thing to draw attention to>
|
|
61
|
+
annotations:
|
|
62
|
+
- <numbered callouts with short text>
|
|
63
|
+
redact:
|
|
64
|
+
- <regions to hide (emails, real tokens, etc.)>
|
|
65
|
+
save-to: user-docs/_screenshots/<id>.raw.png
|
|
66
|
+
auto-capture-script: user-docs/_capture/<id>.spec.ts
|
|
67
|
+
notes:
|
|
68
|
+
- <edge cases>
|
|
69
|
+
-->
|
|
70
|
+
[Screenshot: <short reader-facing description>]
|
|
71
|
+
> 🤖 Auto-capture: `d360-capture capture <id>`
|
|
72
|
+
> Sign in to Chromium when prompted; the script does the rest.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Every field must be filled. If a field doesn't apply, write "none" or "n/a" — never omit.
|
|
76
|
+
|
|
77
|
+
**The `prerequisites` and `steps` fields must be detailed enough for a junior intern to capture the screenshot without further instruction.** If you can't write them that clearly, you don't understand the screen well enough — read more source code.
|
|
78
|
+
|
|
79
|
+
For every screenshot placeholder you generate, also invoke `emit-screenshot-spec` so the matching `.spec.ts` lands in `<captureDir>/<id>.spec.ts`.
|
|
80
|
+
|
|
81
|
+
## Writing rules (re-emphasis from system prompt)
|
|
82
|
+
|
|
83
|
+
- Second person, imperative. No marketing language. No "simply", "just", "easily".
|
|
84
|
+
- Quote exact UI strings. Read the React/HTML/etc. source.
|
|
85
|
+
- State role-gating in **Prerequisites**, not in Steps.
|
|
86
|
+
- Markdown only. One H1.
|
|
87
|
+
|
|
88
|
+
## Output
|
|
89
|
+
|
|
90
|
+
Write the article directly to its file path. Do not paste the markdown into the chat; the user wants the file on disk so they can review and iterate.
|
|
91
|
+
|
|
92
|
+
After writing, report:
|
|
93
|
+
- File path
|
|
94
|
+
- Number of screenshot placeholders emitted (and a note that matching `.spec.ts` files were generated)
|
|
95
|
+
- Any source files you couldn't find — the user may need to clarify
|