mdkg 0.0.1 → 0.0.2
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 +20 -6
- package/dist/cli.js +667 -11
- package/dist/commands/checkpoint.js +133 -0
- package/dist/commands/format.js +297 -0
- package/dist/commands/guide.js +22 -0
- package/dist/commands/index.js +17 -0
- package/dist/commands/init.js +111 -0
- package/dist/commands/list.js +52 -0
- package/dist/commands/new.js +279 -0
- package/dist/commands/next.js +75 -0
- package/dist/commands/node_card.js +17 -0
- package/dist/commands/pack.js +105 -0
- package/dist/commands/search.js +70 -0
- package/dist/commands/show.js +95 -0
- package/dist/commands/validate.js +229 -0
- package/dist/commands/workspace.js +101 -0
- package/dist/core/config.js +162 -0
- package/dist/core/migrate.js +30 -0
- package/dist/core/paths.js +14 -0
- package/dist/graph/edges.js +64 -0
- package/dist/graph/frontmatter.js +132 -0
- package/dist/graph/index_cache.js +50 -0
- package/dist/graph/indexer.js +144 -0
- package/dist/graph/node.js +225 -0
- package/dist/graph/staleness.js +31 -0
- package/dist/graph/template_schema.js +86 -0
- package/dist/graph/validate_graph.js +115 -0
- package/dist/graph/workspace_files.js +64 -0
- package/dist/init/AGENTS.md +43 -0
- package/dist/init/CLAUDE.md +37 -0
- package/dist/init/config.json +67 -0
- package/dist/init/core/core.md +12 -0
- package/dist/init/core/guide.md +99 -0
- package/dist/init/core/rule-1-mdkg-conventions.md +232 -0
- package/dist/init/core/rule-2-context-pack-rules.md +186 -0
- package/dist/init/core/rule-3-cli-contract.md +177 -0
- package/dist/init/core/rule-4-repo-safety-and-ignores.md +97 -0
- package/dist/init/core/rule-5-release-and-versioning.md +82 -0
- package/dist/init/core/rule-6-templates-and-schemas.md +186 -0
- package/dist/init/templates/default/bug.md +54 -0
- package/dist/init/templates/default/chk.md +55 -0
- package/dist/init/templates/default/dec.md +38 -0
- package/dist/init/templates/default/edd.md +50 -0
- package/dist/init/templates/default/epic.md +46 -0
- package/dist/init/templates/default/feat.md +35 -0
- package/dist/init/templates/default/prd.md +59 -0
- package/dist/init/templates/default/prop.md +45 -0
- package/dist/init/templates/default/rule.md +33 -0
- package/dist/init/templates/default/task.md +53 -0
- package/dist/init/templates/default/test.md +49 -0
- package/dist/pack/export_json.js +38 -0
- package/dist/pack/export_md.js +93 -0
- package/dist/pack/export_toon.js +7 -0
- package/dist/pack/export_xml.js +73 -0
- package/dist/pack/order.js +162 -0
- package/dist/pack/pack.js +181 -0
- package/dist/pack/types.js +2 -0
- package/dist/pack/verbose_core.js +23 -0
- package/dist/templates/loader.js +82 -0
- package/dist/util/argparse.js +154 -0
- package/dist/util/date.js +9 -0
- package/dist/util/errors.js +12 -0
- package/dist/util/filter.js +26 -0
- package/dist/util/output.js +50 -0
- package/dist/util/qid.js +54 -0
- package/dist/util/sort.js +40 -0
- package/package.json +18 -2
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ mdkg is intentionally boring and portable:
|
|
|
10
10
|
- **Node.js 18+**
|
|
11
11
|
- written in **TypeScript**
|
|
12
12
|
- **zero runtime dependencies** (no sqlite, no external indexers)
|
|
13
|
+
- **dev dependencies only**: TypeScript (build-time) and Node 18+ (runtime)
|
|
13
14
|
- works with npm / pnpm / bun
|
|
14
15
|
|
|
15
16
|
---
|
|
@@ -20,7 +21,7 @@ You store project knowledge as Markdown nodes with strict frontmatter (a small,
|
|
|
20
21
|
|
|
21
22
|
1) indexes those nodes into a local JSON cache (`.mdkg/index/global.json`)
|
|
22
23
|
2) provides fast search/list/show tools
|
|
23
|
-
3) generates deterministic **context packs** for agents (Markdown/JSON/TOON exports)
|
|
24
|
+
3) generates deterministic **context packs** for agents (Markdown/JSON/TOON/XML exports)
|
|
24
25
|
|
|
25
26
|
Everything stays in your repo. No servers. No surprises.
|
|
26
27
|
|
|
@@ -32,7 +33,7 @@ mdkg lives in a hidden directory at the repo root:
|
|
|
32
33
|
|
|
33
34
|
- `.mdkg/core/` — rules + “pinned” docs
|
|
34
35
|
- `.mdkg/design/` — decisions + architecture
|
|
35
|
-
- `.mdkg/work/` — epics/tasks/bugs/checkpoints
|
|
36
|
+
- `.mdkg/work/` — epics/tasks/bugs/tests/checkpoints
|
|
36
37
|
- `.mdkg/templates/` — document templates used by `mdkg new`
|
|
37
38
|
- `.mdkg/index/` — generated cache (gitignored)
|
|
38
39
|
|
|
@@ -110,8 +111,8 @@ This is also intended to be a compatible building block for “life git”-style
|
|
|
110
111
|
A node is a Markdown file with strict YAML-like frontmatter fenced by `---`.
|
|
111
112
|
|
|
112
113
|
Each node must include:
|
|
113
|
-
- `id` (unique)
|
|
114
|
-
- `type` (rule, prd, edd, dec, prop, epic, feat, task, bug, checkpoint)
|
|
114
|
+
- `id` (unique per workspace; global uniqueness via qualified IDs)
|
|
115
|
+
- `type` (rule, prd, edd, dec, prop, epic, feat, task, bug, checkpoint, test)
|
|
115
116
|
- `title`
|
|
116
117
|
- `created` / `updated` (`YYYY-MM-DD`)
|
|
117
118
|
|
|
@@ -159,9 +160,21 @@ If you want something searchable, put it in frontmatter:
|
|
|
159
160
|
|
|
160
161
|
### Packs (agent context)
|
|
161
162
|
|
|
162
|
-
- `mdkg pack <id> [--format md|json|toon] [--verbose] [--depth <n>] [--edges <keys>]`
|
|
163
|
+
- `mdkg pack <id> [--format md|json|toon|xml] [--verbose] [--depth <n>] [--edges <keys>]`
|
|
163
164
|
|
|
164
165
|
`--verbose` includes pinned core docs listed in `.mdkg/core/core.md`.
|
|
166
|
+
If `--out` is omitted, packs are written to `.mdkg/pack/pack_<kind>_<id>_<timestamp>.<ext>`.
|
|
167
|
+
|
|
168
|
+
### Quickstart (CLI only)
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
mdkg init --llm
|
|
172
|
+
mdkg index
|
|
173
|
+
mdkg new task "..." --status todo --priority 1
|
|
174
|
+
mdkg list --status todo
|
|
175
|
+
mdkg pack <id> --verbose
|
|
176
|
+
mdkg validate
|
|
177
|
+
```
|
|
165
178
|
|
|
166
179
|
### Workflow helpers
|
|
167
180
|
|
|
@@ -176,6 +189,7 @@ If you want something searchable, put it in frontmatter:
|
|
|
176
189
|
- `mdkg validate`
|
|
177
190
|
- strict frontmatter validation
|
|
178
191
|
- missing required fields, invalid enums, dangling edges, cycles, duplicates
|
|
192
|
+
- supports `--out <path>` and `--quiet` for CI workflows
|
|
179
193
|
|
|
180
194
|
- `mdkg format`
|
|
181
195
|
- conservative frontmatter normalizer (idempotent)
|
|
@@ -207,4 +221,4 @@ Suggested workflow:
|
|
|
207
221
|
|
|
208
222
|
## License
|
|
209
223
|
|
|
210
|
-
MIT (recommended). Add a `LICENSE` file to confirm.
|
|
224
|
+
MIT (recommended). Add a `LICENSE` file to confirm.
|