benjamin-docs 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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +352 -0
  3. package/dist/src/anchors.d.ts +1 -0
  4. package/dist/src/anchors.js +50 -0
  5. package/dist/src/anchors.js.map +1 -0
  6. package/dist/src/cli.d.ts +2 -0
  7. package/dist/src/cli.js +231 -0
  8. package/dist/src/cli.js.map +1 -0
  9. package/dist/src/constants.d.ts +12 -0
  10. package/dist/src/constants.js +13 -0
  11. package/dist/src/constants.js.map +1 -0
  12. package/dist/src/export.d.ts +1 -0
  13. package/dist/src/export.js +70 -0
  14. package/dist/src/export.js.map +1 -0
  15. package/dist/src/frontmatter.d.ts +3 -0
  16. package/dist/src/frontmatter.js +119 -0
  17. package/dist/src/frontmatter.js.map +1 -0
  18. package/dist/src/fsx.d.ts +14 -0
  19. package/dist/src/fsx.js +129 -0
  20. package/dist/src/fsx.js.map +1 -0
  21. package/dist/src/info.d.ts +3 -0
  22. package/dist/src/info.js +65 -0
  23. package/dist/src/info.js.map +1 -0
  24. package/dist/src/init.d.ts +12 -0
  25. package/dist/src/init.js +145 -0
  26. package/dist/src/init.js.map +1 -0
  27. package/dist/src/next.d.ts +2 -0
  28. package/dist/src/next.js +65 -0
  29. package/dist/src/next.js.map +1 -0
  30. package/dist/src/project-config.d.ts +6 -0
  31. package/dist/src/project-config.js +41 -0
  32. package/dist/src/project-config.js.map +1 -0
  33. package/dist/src/scopes.d.ts +1 -0
  34. package/dist/src/scopes.js +52 -0
  35. package/dist/src/scopes.js.map +1 -0
  36. package/dist/src/status.d.ts +1 -0
  37. package/dist/src/status.js +38 -0
  38. package/dist/src/status.js.map +1 -0
  39. package/dist/src/templates.d.ts +19 -0
  40. package/dist/src/templates.js +82 -0
  41. package/dist/src/templates.js.map +1 -0
  42. package/dist/src/types.d.ts +51 -0
  43. package/dist/src/types.js +2 -0
  44. package/dist/src/types.js.map +1 -0
  45. package/dist/src/validate.d.ts +5 -0
  46. package/dist/src/validate.js +542 -0
  47. package/dist/src/validate.js.map +1 -0
  48. package/package.json +45 -0
  49. package/skills/benjamin-docs/SKILL.md +129 -0
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: benjamin-docs
3
+ description: Capture planning and build conversations into repo-local project memory for humans and AI agents.
4
+ ---
5
+
6
+ # benjamin-docs
7
+
8
+ Use this skill when the user asks to capture, document, summarize, hand off, export, preserve a planning or development conversation, or create a project from a chat with `benjamin-docs`.
9
+
10
+ ## Purpose
11
+
12
+ `benjamin-docs` turns long-running project conversations into durable Markdown docs inside a project folder. It is useful when the user only has a chat, before code exists, inside existing codebases, and for individual feature scopes.
13
+
14
+ ## Chat-To-Project Workflow
15
+
16
+ Use this workflow when the user asks to create a project from the current chat, turn this chat into a project, start a new project with `benjamin-docs`, or similar.
17
+
18
+ 1. Infer a human-readable project name from the chat when one is obvious. Preserve normal title casing and spaces for the folder name, for example `Atelier Edits`.
19
+ 2. Suggest `~/Documents/Benjamin Docs/<Project Name>` as the default location unless the user gave a different location. Do not suggest agent-specific or dated session folders such as Codex, Claude, Cursor, or `YYYY-MM-DD` paths unless the user explicitly asks for them.
20
+ 3. Confirm the target project name and local folder before creating files. Ask in plain language and avoid mentioning skill internals.
21
+ Example:
22
+ ```text
23
+ I can create a new local project from this chat.
24
+
25
+ Project name: Atelier Edits
26
+ Suggested folder: ~/Documents/Benjamin Docs/Atelier Edits
27
+
28
+ I will create:
29
+ - README.md
30
+ - benjamin-docs/
31
+ - .benjamin-docs/
32
+
33
+ I will capture:
34
+ - the main project idea
35
+ - important references and constraints
36
+ - decisions and open questions
37
+ - roadmap and next actions
38
+ - human and agent handoff notes
39
+
40
+ Reply "yes" to create it, or send a different path/name.
41
+ ```
42
+ 4. Create the project folder.
43
+ 5. Run the local CLI command inside that folder with `init --mode planning`.
44
+ 6. Read `.benjamin-docs/config.json` and use its `docsRoot` value, usually `benjamin-docs`.
45
+ 7. Create a simple top-level `README.md` for the new project unless one already exists. Keep it plain-language and include:
46
+ - project name
47
+ - one-paragraph summary
48
+ - where to start in `benjamin-docs/`
49
+ - current status
50
+ - next actions
51
+ 8. Populate the starter Benjamin docs from the current chat context:
52
+ - `project/brief.md`
53
+ - `project/roadmap.md`
54
+ - `project/open-questions.md`
55
+ - `handoff/human-brief.md`
56
+ - `handoff/agent-brief.md`
57
+ 9. Do not invent certainty. Mark assumptions and unresolved questions clearly.
58
+ 10. Run the local CLI command with `validate`.
59
+ 11. Report the created project path, changed files, key decisions captured, and unresolved questions.
60
+
61
+ Do not overwrite an existing top-level `README.md` unless the user explicitly asks. If the target folder already contains a project, switch to the normal capture workflow instead of treating it as a brand-new chat-created project.
62
+
63
+ When confirming a chat-created project, keep the message mobile-friendly. Prefer short sections and bullets over dense paragraphs, especially for what will be captured.
64
+
65
+ ## Workflow
66
+
67
+ 1. Choose the local CLI command:
68
+ - Prefer `benjamin-docs` when it is available on `PATH`.
69
+ - In this repo, run `pnpm build` when needed and use `node dist/src/cli.js`.
70
+ - In another repo, use `pnpm exec benjamin-docs` only when this repo's package has been installed or linked locally.
71
+ - If neither command is available, ask the user whether to install/link the CLI or use the source repo directly.
72
+ 2. Check whether `.benjamin-docs/config.json` exists.
73
+ 3. If it does not exist, run the local CLI command with `init`, then run `next` to get the recommended capture prompt.
74
+ 4. Read `.benjamin-docs/config.json` and use its `docsRoot` value as the Benjamin docs workspace. The default is `benjamin-docs`.
75
+ 5. Decide the capture scope:
76
+ - project: whole project, product, app, or business
77
+ - feature: one feature, module, redesign, experiment, or v2 plan
78
+ - handoff: context for another person or future agent
79
+ - release: shipped change notes
80
+ 6. Use CLI-created templates when possible. Use `scope create feature <slug>` for feature scopes only; V1 does not create release or handoff scopes through `scope create`.
81
+ 7. For release and handoff docs, update existing docs created by `init` or `promote --to codebase` when they fit. If no suitable starter doc exists, create manual docs with valid frontmatter until CLI support exists.
82
+ 8. Write durable Benjamin-managed docs only under the configured docs root, usually `benjamin-docs/`.
83
+ 9. Existing `docs/` directories may be read as project context, but do not create or update Benjamin-managed docs there unless `.benjamin-docs/config.json` explicitly sets `docsRoot` to `docs`.
84
+ 10. Update existing docs instead of dumping a transcript.
85
+ 11. Run the local CLI command with `validate`.
86
+ 12. Report changed files, key decisions captured, and unresolved questions.
87
+
88
+ ## Capture Quality
89
+
90
+ Capture:
91
+
92
+ - agreed decisions
93
+ - rejected options
94
+ - open questions
95
+ - current plan
96
+ - audience-specific summaries
97
+ - relevant code references when code exists
98
+ - recommended next actions
99
+
100
+ Do not capture raw transcript unless the user explicitly asks for an archive.
101
+
102
+ ## Doc Format
103
+
104
+ Every Benjamin-managed Markdown file under the configured docs root must validate. Preserve existing frontmatter when updating docs, including fields you are not changing.
105
+
106
+ For new feature docs, prefer files created by `scope create feature <slug>`. For project, release, and handoff docs, prefer existing files created by `init` or `promote --to codebase`. If you must create a Markdown file manually, include all required frontmatter fields:
107
+
108
+ ```yaml
109
+ ---
110
+ title: Booking Capacity Plan
111
+ scope: feature
112
+ scope_id: booking-capacity
113
+ audience: [developer, agent]
114
+ status: draft
115
+ visibility: private
116
+ updated: 2026-06-03
117
+ source: session-capture
118
+ ---
119
+ ```
120
+
121
+ Allowed `scope` values are `project`, `feature`, `release`, and `handoff`. Allowed `audience` values are `developer`, `designer`, `agent`, `business`, `public`, `user`, and `advisor`. Allowed `status` values are `draft`, `review`, `approved`, `stale`, and `archived`. Allowed `visibility` values are `private`, `unlisted`, and `public`. Allowed `source` values are `session-capture`, `manual`, `codebase-scan`, and `release-sync`.
122
+
123
+ Use `source: session-capture` for docs synthesized from the current conversation. Keep `updated` as an ISO date in `YYYY-MM-DD` format.
124
+
125
+ ## Constructive Challenge
126
+
127
+ Do not act as a passive note taker. Preserve the user's intent, but speak up when the plan has weak assumptions, missing decisions, contradictory goals, overbuilt V1 scope, unclear audiences, or risks that future humans and agents need to know.
128
+
129
+ Pushback should be direct, specific, and useful. Offer a better alternative when possible.