@delete101020/aidlc 4.0.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.
Files changed (93) hide show
  1. package/AUTOMATION.md +148 -0
  2. package/README.md +684 -0
  3. package/dist/assets/annotate-artifact.skill.md +121 -0
  4. package/dist/assets/epic-context.skill.md +55 -0
  5. package/dist/bundle.js +49470 -0
  6. package/dist/templates/ainative/agents/native-engineer.md +66 -0
  7. package/dist/templates/ainative/agents/native-operator.md +71 -0
  8. package/dist/templates/ainative/agents/native-originator.md +56 -0
  9. package/dist/templates/ainative/agents/native-product-owner.md +68 -0
  10. package/dist/templates/ainative/agents/native-reviewer.md +65 -0
  11. package/dist/templates/ainative/agents/native-verifier.md +58 -0
  12. package/dist/templates/ainative/artifacts/build-plan.md +56 -0
  13. package/dist/templates/ainative/artifacts/implement.md +55 -0
  14. package/dist/templates/ainative/artifacts/intent.md +50 -0
  15. package/dist/templates/ainative/artifacts/maintain.md +85 -0
  16. package/dist/templates/ainative/artifacts/review.md +68 -0
  17. package/dist/templates/ainative/artifacts/spec.md +69 -0
  18. package/dist/templates/ainative/artifacts/verify.md +55 -0
  19. package/dist/templates/ainative/skills/native-build-plan.md +74 -0
  20. package/dist/templates/ainative/skills/native-implement.md +62 -0
  21. package/dist/templates/ainative/skills/native-intent.md +50 -0
  22. package/dist/templates/ainative/skills/native-maintain.md +94 -0
  23. package/dist/templates/ainative/skills/native-review.md +82 -0
  24. package/dist/templates/ainative/skills/native-spec.md +83 -0
  25. package/dist/templates/ainative/skills/native-verify.md +60 -0
  26. package/dist/templates/sdlc/agents/designer.md +87 -0
  27. package/dist/templates/sdlc/agents/developer.md +178 -0
  28. package/dist/templates/sdlc/agents/example-with-skills.md +59 -0
  29. package/dist/templates/sdlc/agents/orchestrator.md +186 -0
  30. package/dist/templates/sdlc/agents/po.md +115 -0
  31. package/dist/templates/sdlc/agents/qa.md +141 -0
  32. package/dist/templates/sdlc/agents/tech-lead.md +124 -0
  33. package/dist/templates/sdlc/artifacts/design.md +130 -0
  34. package/dist/templates/sdlc/artifacts/execute-test.md +64 -0
  35. package/dist/templates/sdlc/artifacts/implement.backend.md +96 -0
  36. package/dist/templates/sdlc/artifacts/implement.md +70 -0
  37. package/dist/templates/sdlc/artifacts/implement.web-react.md +109 -0
  38. package/dist/templates/sdlc/artifacts/implement.web.md +99 -0
  39. package/dist/templates/sdlc/artifacts/plan.md +97 -0
  40. package/dist/templates/sdlc/artifacts/prototype.md +141 -0
  41. package/dist/templates/sdlc/artifacts/test-cases.md +47 -0
  42. package/dist/templates/sdlc/artifacts/test-plan.md +100 -0
  43. package/dist/templates/sdlc/artifacts/unit-test.md +32 -0
  44. package/dist/templates/sdlc/profiles/agile-lite.yaml +29 -0
  45. package/dist/templates/sdlc/profiles/hybrid.yaml +43 -0
  46. package/dist/templates/sdlc/profiles/iso-ieee.yaml +67 -0
  47. package/dist/templates/sdlc/profiles/none.yaml +21 -0
  48. package/dist/templates/sdlc/skills/advance-epic.md +77 -0
  49. package/dist/templates/sdlc/skills/analyze-requirements.md +279 -0
  50. package/dist/templates/sdlc/skills/discovery-gate.md +118 -0
  51. package/dist/templates/sdlc/skills/execute-test.md +74 -0
  52. package/dist/templates/sdlc/skills/generate-test-cases.md +77 -0
  53. package/dist/templates/sdlc/skills/implement.md +74 -0
  54. package/dist/templates/sdlc/skills/prd.md +114 -0
  55. package/dist/templates/sdlc/skills/prototype.md +128 -0
  56. package/dist/templates/sdlc/skills/tech-design.md +134 -0
  57. package/dist/templates/sdlc/skills/test-plan.md +115 -0
  58. package/dist/templates/sdlc/skills/test-report.md +38 -0
  59. package/dist/templates/sdlc/skills/unit-test.md +43 -0
  60. package/dist/templates/sdlc/validators/ci.mjs +49 -0
  61. package/dist/templates/sdlc/validators/traceability.mjs +244 -0
  62. package/dist/templates/speckit/agents/analyst.md +42 -0
  63. package/dist/templates/speckit/agents/speckit-developer.md +36 -0
  64. package/dist/templates/speckit/agents/speckit-qa.md +38 -0
  65. package/dist/templates/speckit/agents/speckit-tech-lead.md +40 -0
  66. package/dist/templates/speckit/artifacts/analyze.md +48 -0
  67. package/dist/templates/speckit/artifacts/clarify.md +64 -0
  68. package/dist/templates/speckit/artifacts/plan.md +57 -0
  69. package/dist/templates/speckit/artifacts/specify.md +64 -0
  70. package/dist/templates/speckit/artifacts/tasks.md +33 -0
  71. package/dist/templates/speckit/skills/analyze.md +50 -0
  72. package/dist/templates/speckit/skills/clarify.md +31 -0
  73. package/dist/templates/speckit/skills/plan.md +56 -0
  74. package/dist/templates/speckit/skills/specify.md +52 -0
  75. package/dist/templates/speckit/skills/speckit-implement.md +33 -0
  76. package/dist/templates/speckit/skills/tasks.md +38 -0
  77. package/dist/tools/epic-memory-hook.mjs +78 -0
  78. package/dist/tools/epic-memory.mjs +130 -0
  79. package/dist/tools/md-to-html.mjs +478 -0
  80. package/dist/tools/vendor/marked.esm.mjs +2432 -0
  81. package/dist/vendor/annotron/LICENSE +21 -0
  82. package/dist/vendor/annotron/README.md +213 -0
  83. package/dist/vendor/annotron/bin/annotron +467 -0
  84. package/dist/vendor/annotron/commands/annotron.md +11 -0
  85. package/dist/vendor/annotron/hooks/annotron-hook.sh +38 -0
  86. package/dist/vendor/annotron/hooks/hooks.json +50 -0
  87. package/dist/vendor/annotron/package.json +72 -0
  88. package/dist/vendor/annotron/skills/annotron-review/SKILL.md +86 -0
  89. package/dist/vendor/annotron/src/chrome.html +2029 -0
  90. package/dist/vendor/annotron/src/mdRender.js +208 -0
  91. package/dist/vendor/annotron/src/sdk.js +1042 -0
  92. package/dist/vendor/annotron/src/server.js +780 -0
  93. package/package.json +60 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Meii
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,213 @@
1
+ # annotron
2
+
3
+ Local, browser-based review editor for **agent-generated HTML artifacts** — annotate elements and text, attach images, watch the agent work live, approve tool permissions, send feedback to your AI coding agent, then finalize the result into the file and download it.
4
+
5
+ ## Demo
6
+
7
+ [![annotron in action](docs/annotron-demo.gif)](docs/annotron-demo.mp4)
8
+
9
+ Run `annotron architecture-demo.md` → the Markdown renders to HTML with **merslim** diagrams (flowchart, sequence, class, ER, gitGraph, gantt, C4) and technical tables. Comment on any text or element with an inline composer (comments are labeled with your GitHub identity), hover a highlight to preview its note, edit the Markdown source and **Save** to re-render, send feedback and watch the agent's activity stream in live, then browse **History**. ▶︎ [Watch the full-quality video](docs/annotron-demo.mp4)
10
+
11
+ ## The problem
12
+
13
+ Agents (Claude Code, etc.) produce rich HTML plans, diagrams, reports, and mockups. Giving feedback by describing what you see in text is clumsy. `annotron` gives you a point-and-click annotation layer directly on the rendered artifact, so the agent gets precise, structured feedback (which element, what text, what to change).
14
+
15
+ ## Features
16
+
17
+ ### Review & annotation
18
+ - **Point-and-click annotations** — comment on any element or text selection; feedback carries the CSS selector, the text, and your note.
19
+ - **Annotation threads & history** — per-annotation conversation threads, persisted to a sidecar file, plus a history tab of past rounds.
20
+ - **Image attachments** — paste or upload images into the composer or any annotation reply/note; the agent reads them by path.
21
+
22
+ ### Documents & diagrams
23
+ - **Markdown mode with diagrams** — open a `.md` and annotron renders it to HTML, turning ` ```mermaid ` blocks into inline SVG via [merslim](https://www.npmjs.com/package/merslim) (great for architecture docs / UML). An editable **Markdown pane** + **Save** button (⌘/Ctrl+S) sync your edits back to the `.md` source.
24
+ - **Outline navigation sidebar** — for Markdown files with multiple sections, an auto-generated **outline sidebar** shows h1–h4 headings with visual hierarchy. Click any heading to jump to that section; toggle with the collapse button (`‹`/`›`) or **Ctrl+L** to expand/collapse. State persists across sessions.
25
+
26
+ ### Agent loop & loop engineering
27
+ - **Auto-apply feedback loop** — integrated **agent loop engineering** (`annotron agent <file>` or `--agent` flag) that continuously polls for your annotations, applies changes with Claude Code, and reports back — no manual wiring. Precise feedback in, precise edits out.
28
+ - **Live activity mirror** — a bundled hook streams the agent's tool calls (Read/Edit/Bash/…) into the sidebar like a CLI, so you can follow along in real time.
29
+ - **Turn-status bar** — always know whose turn it is: *Agent working… / Waiting for your feedback / Needs your permission*.
30
+
31
+ ### Control & safety
32
+ - **Cancel anytime** — a Cancel button stops the agent at the next tool boundary (enforced by the bundled hook, no per-project setup).
33
+ - **Remote permission approval** — optionally route Claude Code permission prompts to the browser and click **Allow / Allow-always / Deny**; the decision goes back to the CLI.
34
+
35
+ ## Outline navigation (Markdown files)
36
+
37
+ When reviewing a long Markdown document, an **outline sidebar** on the left shows all section headings extracted from the file.
38
+
39
+ - **Visual hierarchy** — h1–h4 headings with progressive indentation and font sizing
40
+ - **One-click jump** — click any heading to scroll to that section in the document
41
+ - **Collapse/expand** — toggle the sidebar width with the `‹`/`›` button or press **Ctrl+L** (Cmd+L on Mac)
42
+ - **Active highlighting** — as you scroll, the current section is highlighted in the outline
43
+ - **Persistent state** — collapse preference is saved in your browser's localStorage
44
+
45
+ Great for reviewing architecture docs, tech specs, RFCs, and any long structured document.
46
+
47
+ ## The agent loop: loop engineering for artifacts
48
+
49
+ **Loop engineering** is the discipline of building tight feedback cycles between humans and AI agents. annotron automates this for document and artifact review.
50
+
51
+ annotron's core strength is **the agent feedback loop**—a continuous cycle that keeps the agent and reviewer in sync:
52
+
53
+ ```
54
+ agent generates artifact.html (or .md)
55
+ │
56
+ ▼
57
+ annotron <file> --agent → opens review editor + starts agent loop in background
58
+ │
59
+ ▼
60
+ you annotate (click / select text / add notes) → Send feedback
61
+ │
62
+ ▼
63
+ agent receives feedback (JSON: selector, text, note, images)
64
+ │
65
+ ▼
66
+ agent runs: claude -p [your feedback] → edits the file
67
+ │
68
+ ▼
69
+ file changes → editor live-reloads (you see updates instantly)
70
+ │
71
+ ▼
72
+ agent streams activity to sidebar (Read/Edit/Bash calls visible)
73
+ │
74
+ ▼
75
+ repeat until both agree, then:
76
+ │
77
+ ▼
78
+ Finalize → clean result written to file
79
+ Download → clean artifact saved to your machine
80
+ ```
81
+
82
+ **This is loop engineering**: precise feedback → applied edits → live preview → repeat. The agent loop is wired directly into annotron with **zero setup**. Just `--agent` and start annotating. No webhooks, no manual polling, no context switching.
83
+
84
+ ### Loop engineering concepts
85
+
86
+ **Auto-apply feedback loop** — a continuous cycle where:
87
+ - You annotate (click elements, select text, add notes)
88
+ - Annotron sends **structured feedback** (CSS selector, text content, your message, images)
89
+ - Agent receives feedback and applies changes to the source
90
+ - Browser reloads automatically to show edits
91
+ - Repeat until done
92
+
93
+ **Tight feedback cycles** — by removing prose, polling delays, and context switches, annotron keeps you in flow. Comment → applied in seconds → see the result. No "describe what you see" overhead.
94
+
95
+ **Agent-in-the-loop** — never block on async feedback. The agent works in a terminal while you review in the browser. Feedback arrives → agent processes → edits appear live.
96
+
97
+ ### Without `--agent`
98
+
99
+ If you prefer manual control:
100
+
101
+ ```
102
+ annotron <file> → opens editor, no agent
103
+ [you annotate]
104
+ annotron agent <file> → manually start the loop (in a separate terminal)
105
+ [agent applies feedback]
106
+ annotron stop → shut down when done
107
+ ```
108
+
109
+ ## VS Code extension
110
+
111
+ Prefer right‑click over the CLI? The bundled extension in [`editors/vscode/`](editors/vscode/) adds **Open in annotron** to the Explorer / editor context menu for `.md` and `.html` files. It ships annotron and runs it with VS Code's own Node (no global install), opening the review editor in your browser (or a Simple Browser tab — `annotron.openIn`).
112
+
113
+ ```bash
114
+ cd editors/vscode && npm install && npm run package # builds annotron-<version>.vsix
115
+ code --install-extension annotron-*.vsix
116
+ ```
117
+
118
+ ## Install
119
+
120
+ ```bash
121
+ npm install -g annotron
122
+ ```
123
+
124
+ Or run directly from the repo:
125
+
126
+ ```bash
127
+ git clone https://github.com/hueanmy/annotron
128
+ cd annotron
129
+ node bin/annotron artifact.html
130
+ ```
131
+
132
+ ## Usage
133
+
134
+ ```
135
+ annotron <file.html|file.md> Open the editor in browser (.md renders to HTML with diagrams)
136
+ annotron <file.html|file.md> --agent Open editor + start the auto-apply feedback loop (recommended for workflows)
137
+ annotron agent <file.html|file.md> Run the agent loop separately (if server already running)
138
+ annotron poll <file.html> Wait for feedback (run by the agent)
139
+ annotron poll <file.html> --reply "…" Post a reply then wait for feedback
140
+ annotron progress <file.html> "step" Post a live progress step (optional; hooks do this automatically)
141
+ annotron check <file.html> Print {"cancelled":true|false} for the session
142
+ annotron stop Shut down the background server
143
+ annotron help Show help
144
+ ```
145
+
146
+ ### Quick start: auto-apply loop
147
+
148
+ To open a file and automatically apply feedback:
149
+
150
+ ```bash
151
+ annotron architecture-demo.md --agent
152
+ # Browser opens → add annotations → agent applies changes live → repeat until done
153
+ ```
154
+
155
+ The `--agent` flag starts the **loop engineering**: annotron listens for your feedback annotations, passes them to Claude Code (via `claude -p`), and watches the file changes in real-time. No manual polling—just comment, and watch the agent work.
156
+
157
+ ### Environment variables
158
+
159
+ | Variable | Default | Purpose |
160
+ | --- | --- | --- |
161
+ | `ANNOTRON_PORT` | `7321` | Server port |
162
+ | `ANNOTRON_HOST` | `127.0.0.1` | Server bind host |
163
+
164
+ > **Security note:** The server is bound to loopback (`127.0.0.1`) by default. Binding beyond loopback via `ANNOTRON_HOST` exposes an **unauthenticated** server that can read and write any registered file. Only do that on a fully trusted network.
165
+
166
+ ## Agent workflow (Claude Code)
167
+
168
+ ```bash
169
+ # 1. Open the artifact
170
+ annotron plan.html
171
+
172
+ # 2. Wait for human feedback (agent side)
173
+ annotron poll plan.html
174
+
175
+ # 3. Feedback arrives as JSON → apply changes, reply
176
+ annotron poll plan.html --reply "I updated the color scheme and moved the nav to the top."
177
+ ```
178
+
179
+ The poll output looks like:
180
+
181
+ ```json
182
+ {
183
+ "items": [
184
+ { "kind": "element", "selector": "body > header", "text": null, "note": "Make this sticky", "images": [] },
185
+ { "kind": "text", "selector": "body > p", "text": "lorem ipsum", "note": "Match this mockup",
186
+ "images": [{ "name": "mockup.png", "path": "/…/.annotron-uploads/…_mockup.png" }] }
187
+ ],
188
+ "message": "Also please add a footer.",
189
+ "images": []
190
+ }
191
+ ```
192
+
193
+ Each `images[]` entry has a `name` and an absolute `path` — `Read` the path to view the image.
194
+
195
+ ## Claude Code plugin
196
+
197
+ This repo includes a Claude Code plugin that teaches Claude Code *when and how* to drive `annotron`:
198
+
199
+ ```text
200
+ /plugin marketplace add hueanmy/annotron
201
+ /plugin install annotron@meii-marketplace
202
+ ```
203
+
204
+ After install, `/annotron` triggers the review loop automatically.
205
+
206
+ ## How it works
207
+
208
+ - **Zero runtime dependencies** — Node built-ins only (`http`, `fs`, `crypto`, `path`, `url`).
209
+ - **Disk file stays clean** — the SDK is injected only at serve time; it's never written to your file.
210
+ - **Local-only** — server binds to `127.0.0.1`. No cloud, no accounts.
211
+ - **Live reload** — file changes are detected by content-hash polling; the browser reloads with scroll position preserved.
212
+ - **Structured feedback** — each annotation carries a kind (`element` | `text`), a CSS selector, the selected text, a freeform note, and any attached images.
213
+ - **Hook-powered mirror & control** — the plugin ships `PreToolUse`/`PostToolUse`/`Notification`/`Stop` hooks that stream activity, enforce cancellation, and (opt-in) gate tool permissions through the browser. They are no-ops (fail fast) when the server isn't running.