@driftsys/markspec 0.0.3
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 +110 -0
- package/esm/mod.d.ts +11 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +10 -0
- package/esm/package.json +3 -0
- package/package.json +32 -0
- package/script/mod.d.ts +11 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +13 -0
- package/script/package.json +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 driftsys
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# MarkSpec
|
|
2
|
+
|
|
3
|
+
[](https://github.com/driftsys/markspec/actions/workflows/ci.yaml)
|
|
4
|
+
[](https://jsr.io/@driftsys/markspec)
|
|
5
|
+
[](https://www.npmjs.com/package/@driftsys/markspec)
|
|
6
|
+
[](https://driftsys.github.io/markspec/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
A Markdown flavor for traceable industrial documentation, and a CLI toolchain
|
|
10
|
+
that processes it.
|
|
11
|
+
|
|
12
|
+
> Early development. The [language specification](docs/spec/language.md) is
|
|
13
|
+
> stable. Tooling is not yet functional.
|
|
14
|
+
|
|
15
|
+
## Tools
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
markspec format # stamp ULIDs, normalize attributes
|
|
19
|
+
markspec validate # check broken refs, missing Ids
|
|
20
|
+
markspec compile <paths> # build traceability graph → JSON
|
|
21
|
+
markspec export # JSON → csv, reqif, yaml
|
|
22
|
+
markspec insert # scaffold requirement block
|
|
23
|
+
|
|
24
|
+
markspec doc build # document PDF
|
|
25
|
+
markspec book build # PDF + HTML book
|
|
26
|
+
markspec book dev # live preview
|
|
27
|
+
markspec deck build # presentation PDF
|
|
28
|
+
markspec deck dev # live preview
|
|
29
|
+
|
|
30
|
+
markspec lsp # LSP server
|
|
31
|
+
markspec mcp # MCP server
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Modules
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
core/ ← parser, validator, compiler, reporter, formatter
|
|
38
|
+
render/ ← Typst WASM, Mustache substitution, captions
|
|
39
|
+
book/ ← multi-file PDF + HTML book builder
|
|
40
|
+
deck/ ← Touying-based slide deck builder
|
|
41
|
+
cli/ ← subcommand handlers
|
|
42
|
+
lsp/ ← LSP server
|
|
43
|
+
mcp/ ← MCP server
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
One binary. One install. Three rendering targets (document, book, deck).
|
|
47
|
+
|
|
48
|
+
## Markdown extensions
|
|
49
|
+
|
|
50
|
+
MarkSpec extends CommonMark with constructs that render as plain Markdown on
|
|
51
|
+
GitHub and GitLab — no tooling required to read.
|
|
52
|
+
|
|
53
|
+
**Entry blocks** — a list item with a typed ID and an indented body:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
- [SRS_BRK_0001] Sensor input debouncing
|
|
57
|
+
|
|
58
|
+
The sensor driver shall debounce raw inputs to eliminate electrical noise
|
|
59
|
+
before processing.
|
|
60
|
+
|
|
61
|
+
Id: SRS_01HGW2Q8MNP3\
|
|
62
|
+
Satisfies: SYS_BRK_0042\
|
|
63
|
+
Labels: ASIL-B
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Table captions** — emphasized paragraph above a pipe table:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
_Table: Sensor thresholds_
|
|
70
|
+
|
|
71
|
+
| Sensor | Min | Max |
|
|
72
|
+
| -------- | --- | ---- |
|
|
73
|
+
| Pressure | 0 | 1023 |
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Figure captions** — emphasized paragraph below an image:
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
_Figure: High-level architecture of the braking system_
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**In-code entries** — requirements in doc comments, same format:
|
|
85
|
+
|
|
86
|
+
```rust
|
|
87
|
+
/// [SRS_BRK_0001] Sensor input debouncing
|
|
88
|
+
///
|
|
89
|
+
/// The sensor driver shall reject transient noise shorter
|
|
90
|
+
/// than the configured debounce window.
|
|
91
|
+
///
|
|
92
|
+
/// Id: SRS_01HGW2Q8MNP3 \
|
|
93
|
+
/// Satisfies: SYS_BRK_0042 \
|
|
94
|
+
/// Labels: ASIL-B
|
|
95
|
+
#[test]
|
|
96
|
+
fn swt_brk_0001_debounce_filters_noise() {
|
|
97
|
+
// test implementation
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Mustache variables** — `{{project.name}}` substitution from `project.yaml`,
|
|
102
|
+
resolved at build time.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
[MIT](LICENSE)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
Part of the [DriftSys](https://github.com/driftsys) ecosystem.
|
package/esm/mod.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core
|
|
3
|
+
*
|
|
4
|
+
* Core library for MarkSpec — parser, validator, ID graph,
|
|
5
|
+
* traceability, and all output formats (JSON, ReqIF, CSV, PDF).
|
|
6
|
+
*
|
|
7
|
+
* This is the library boundary. Everything outside core/ imports
|
|
8
|
+
* from core/mod.ts, never from internal paths.
|
|
9
|
+
*/
|
|
10
|
+
export declare const VERSION = "0.0.1";
|
|
11
|
+
//# sourceMappingURL=mod.d.ts.map
|
package/esm/mod.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/esm/mod.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core
|
|
3
|
+
*
|
|
4
|
+
* Core library for MarkSpec — parser, validator, ID graph,
|
|
5
|
+
* traceability, and all output formats (JSON, ReqIF, CSV, PDF).
|
|
6
|
+
*
|
|
7
|
+
* This is the library boundary. Everything outside core/ imports
|
|
8
|
+
* from core/mod.ts, never from internal paths.
|
|
9
|
+
*/
|
|
10
|
+
export const VERSION = "0.0.1";
|
package/esm/package.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@driftsys/markspec",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Markdown flavor and toolchain for traceable industrial documentation",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"markdown",
|
|
7
|
+
"requirements",
|
|
8
|
+
"traceability",
|
|
9
|
+
"iso-26262",
|
|
10
|
+
"aspice",
|
|
11
|
+
"documentation"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://driftsys.github.io/markspec/",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/driftsys/markspec.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/driftsys/markspec/issues"
|
|
21
|
+
},
|
|
22
|
+
"main": "./script/mod.js",
|
|
23
|
+
"module": "./esm/mod.js",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"import": "./esm/mod.js",
|
|
27
|
+
"require": "./script/mod.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"scripts": {},
|
|
31
|
+
"_generatedBy": "dnt@dev"
|
|
32
|
+
}
|
package/script/mod.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core
|
|
3
|
+
*
|
|
4
|
+
* Core library for MarkSpec — parser, validator, ID graph,
|
|
5
|
+
* traceability, and all output formats (JSON, ReqIF, CSV, PDF).
|
|
6
|
+
*
|
|
7
|
+
* This is the library boundary. Everything outside core/ imports
|
|
8
|
+
* from core/mod.ts, never from internal paths.
|
|
9
|
+
*/
|
|
10
|
+
export declare const VERSION = "0.0.1";
|
|
11
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/script/mod.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core
|
|
4
|
+
*
|
|
5
|
+
* Core library for MarkSpec — parser, validator, ID graph,
|
|
6
|
+
* traceability, and all output formats (JSON, ReqIF, CSV, PDF).
|
|
7
|
+
*
|
|
8
|
+
* This is the library boundary. Everything outside core/ imports
|
|
9
|
+
* from core/mod.ts, never from internal paths.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.VERSION = void 0;
|
|
13
|
+
exports.VERSION = "0.0.1";
|