@vedprakash-m/tenet 0.1.0 → 0.1.1

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 (137) hide show
  1. package/README.md +106 -52
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.js +70 -19
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/check.js +4 -1
  6. package/dist/commands/check.js.map +1 -1
  7. package/dist/commands/context.d.ts +12 -4
  8. package/dist/commands/context.js +6 -5
  9. package/dist/commands/context.js.map +1 -1
  10. package/dist/commands/init.js +116 -28
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/onboard.js +70 -4
  13. package/dist/commands/onboard.js.map +1 -1
  14. package/dist/commands/upgrade.js +1 -1
  15. package/dist/commands/upgrade.js.map +1 -1
  16. package/dist/commands/verify.d.ts +2 -1
  17. package/dist/commands/verify.js +160 -14
  18. package/dist/commands/verify.js.map +1 -1
  19. package/dist/context/index.d.ts +1 -0
  20. package/dist/context/index.js +130 -27
  21. package/dist/context/index.js.map +1 -1
  22. package/dist/core/messages.d.ts +5 -1
  23. package/dist/core/messages.js +5 -1
  24. package/dist/core/messages.js.map +1 -1
  25. package/dist/core/output.d.ts +1 -0
  26. package/dist/core/output.js.map +1 -1
  27. package/dist/install/hosts.d.ts +2 -2
  28. package/dist/install/hosts.js +4 -2
  29. package/dist/install/hosts.js.map +1 -1
  30. package/dist/install/init.js +1 -0
  31. package/dist/install/init.js.map +1 -1
  32. package/dist/install/integrity.d.ts +4 -1
  33. package/dist/install/integrity.js +32 -8
  34. package/dist/install/integrity.js.map +1 -1
  35. package/dist/install/preflight.js +52 -3
  36. package/dist/install/preflight.js.map +1 -1
  37. package/dist/install/types.d.ts +5 -1
  38. package/dist/install/upgrade.js +163 -19
  39. package/dist/install/upgrade.js.map +1 -1
  40. package/dist/install/writes.d.ts +1 -0
  41. package/dist/install/writes.js +14 -12
  42. package/dist/install/writes.js.map +1 -1
  43. package/dist/onboard/bless.d.ts +10 -4
  44. package/dist/onboard/bless.js +150 -79
  45. package/dist/onboard/bless.js.map +1 -1
  46. package/dist/onboard/card.d.ts +9 -2
  47. package/dist/onboard/card.js +43 -12
  48. package/dist/onboard/card.js.map +1 -1
  49. package/dist/specs/anchors.d.ts +10 -0
  50. package/dist/specs/anchors.js +17 -0
  51. package/dist/specs/anchors.js.map +1 -1
  52. package/dist/specs/check.js +16 -9
  53. package/dist/specs/check.js.map +1 -1
  54. package/dist/specs/parse.d.ts +3 -0
  55. package/dist/specs/parse.js +60 -17
  56. package/dist/specs/parse.js.map +1 -1
  57. package/dist/verify/card.js +2 -1
  58. package/dist/verify/card.js.map +1 -1
  59. package/dist/verify/record.js +25 -4
  60. package/dist/verify/record.js.map +1 -1
  61. package/dist/verify/run-checks.js +8 -2
  62. package/dist/verify/run-checks.js.map +1 -1
  63. package/dist/views/specs-board.js +63 -53
  64. package/dist/views/specs-board.js.map +1 -1
  65. package/kit/CHANGELOG.md +26 -0
  66. package/kit/README.md +1 -1
  67. package/kit/schemas/results/context.json +3 -0
  68. package/kit/skills/draft-specs/SKILL.md +2 -2
  69. package/kit/skills/review-with-findings/SKILL.md +4 -3
  70. package/kit/skills/work-a-change/SKILL.md +2 -2
  71. package/kit/templates/pull-request.md +7 -5
  72. package/package.json +1 -1
  73. package/pkg/conformance/board/n04-over-budget/input.json +1 -1
  74. package/pkg/conformance/board/p07-ux-part-2/expected.md +4 -3
  75. package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.json +4 -0
  76. package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.md +1 -1
  77. package/pkg/conformance/check/n09-ci-budget-crossing/input.json +1 -1
  78. package/pkg/conformance/check/n12-local-budget-warning/input.json +1 -1
  79. package/pkg/conformance/scenarios/README.md +7 -3
  80. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-card.md +5 -2
  81. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-onboard-card.json +1 -1
  82. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-card.md +5 -2
  83. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-onboard-card.json +1 -1
  84. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/04-onboard-inventory.json +9 -9
  85. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-card.md +5 -2
  86. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-onboard-card.json +1 -1
  87. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/README.md +4 -0
  88. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/kit/TENET.md +3 -0
  89. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/src/app.ts +6 -0
  90. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__plan.md/plan.md +2 -0
  91. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__plan.md/plan.md.anchors.json +1 -0
  92. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__tech-spec.md/design.md +2 -0
  93. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__tech-spec.md/design.md.anchors.json +1 -0
  94. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__ux-spec.md/experience.md +2 -0
  95. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/blessed/tenet__specs__ux-spec.md/experience.md.anchors.json +1 -0
  96. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/specs/plan.md +7 -0
  97. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/specs/prd.md +24 -0
  98. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/specs/tech-spec.md +7 -0
  99. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/specs/ux-spec.md +7 -0
  100. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet/vision.md +15 -0
  101. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet.lock +7 -0
  102. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/before/tenet.yaml +20 -0
  103. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/expected/02-board.json +41 -0
  104. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/expected/09-check.json +19 -0
  105. package/pkg/conformance/scenarios/s14-bless-decide-later-and-questions/steps.json +141 -0
  106. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/README.md +3 -0
  107. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/app/core/x.py +2 -0
  108. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/b/two.py +2 -0
  109. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/kit/TENET.md +3 -0
  110. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/pyproject.toml +3 -0
  111. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/app-core.md +2 -0
  112. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/app-core.md.anchors.json +1 -0
  113. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/global-rules.md +2 -0
  114. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/global-rules.md.anchors.json +1 -0
  115. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/secondary-module.md +2 -0
  116. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__prd.md/secondary-module.md.anchors.json +1 -0
  117. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__tech-spec.md/repo-conventions.md +41 -0
  118. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__specs__tech-spec.md/repo-conventions.md.anchors.json +1 -0
  119. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__vision.md/vision.md +2 -0
  120. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +3 -0
  121. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/specs/plan.md +7 -0
  122. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/specs/prd.md +19 -0
  123. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/specs/tech-spec.md +46 -0
  124. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/specs/ux-spec.md +7 -0
  125. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet/vision.md +7 -0
  126. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet.lock +7 -0
  127. package/pkg/conformance/scenarios/s15-context-paths-ranking/before/tenet.yaml +20 -0
  128. package/pkg/conformance/scenarios/s15-context-paths-ranking/expected/01-context-paths.json +27 -0
  129. package/pkg/conformance/scenarios/s15-context-paths-ranking/expected/03-context-multi.json +29 -0
  130. package/pkg/conformance/scenarios/s15-context-paths-ranking/expected/05-context-drafts.json +19 -0
  131. package/pkg/conformance/scenarios/s15-context-paths-ranking/expected/07-mcp-drafts.json +50 -0
  132. package/pkg/conformance/scenarios/s15-context-paths-ranking/steps.json +133 -0
  133. package/pkg/conformance/scenarios/s16-verify-local-preview/before/README.md +3 -0
  134. package/pkg/conformance/scenarios/s16-verify-local-preview/expected/01-init.json +14 -0
  135. package/pkg/conformance/scenarios/s16-verify-local-preview/expected/14-local-preview.json +7 -0
  136. package/pkg/conformance/scenarios/s16-verify-local-preview/expected/18-command-change.json +8 -0
  137. package/pkg/conformance/scenarios/s16-verify-local-preview/steps.json +162 -0
@@ -0,0 +1,133 @@
1
+ {
2
+ "schema": 1,
3
+ "scenario": "s15-context-paths-ranking",
4
+ "spec_refs": [
5
+ "tenet/packets/CP-0066-dogfood-0.1.1/definition.md#b--agents-get-the-right-context-and-can-find-the-skills-track-3"
6
+ ],
7
+ "steps": [
8
+ {
9
+ "id": "01-context-paths-json",
10
+ "kind": "cli",
11
+ "args": [
12
+ "context",
13
+ "--paths",
14
+ "app/core/x.py",
15
+ "--json"
16
+ ],
17
+ "expectExitCode": 0,
18
+ "expectedJsonMatch": "expected/01-context-paths.json"
19
+ },
20
+ {
21
+ "id": "02-context-paths-plain",
22
+ "kind": "cli",
23
+ "args": [
24
+ "context",
25
+ "--paths",
26
+ "app/core/x.py"
27
+ ],
28
+ "expectExitCode": 0,
29
+ "expectedStdoutIncludes": [
30
+ "R-7",
31
+ "Core module must validate config before running."
32
+ ]
33
+ },
34
+ {
35
+ "id": "03-context-paths-comma",
36
+ "kind": "cli",
37
+ "args": [
38
+ "context",
39
+ "--paths",
40
+ "app/core/x.py,b/two.py",
41
+ "--json"
42
+ ],
43
+ "expectExitCode": 0,
44
+ "expectedJsonMatch": "expected/03-context-multi.json"
45
+ },
46
+ {
47
+ "id": "04-context-paths-repeated",
48
+ "kind": "cli",
49
+ "args": [
50
+ "context",
51
+ "--paths",
52
+ "app/core/x.py",
53
+ "--paths",
54
+ "b/two.py",
55
+ "--json"
56
+ ],
57
+ "expectExitCode": 0,
58
+ "expectedJsonMatch": "expected/03-context-multi.json"
59
+ },
60
+ {
61
+ "id": "05-context-include-drafts-ids-json",
62
+ "kind": "cli",
63
+ "args": [
64
+ "context",
65
+ "--include-drafts",
66
+ "--ids",
67
+ "R-9",
68
+ "--json"
69
+ ],
70
+ "expectExitCode": 0,
71
+ "expectedJsonMatch": "expected/05-context-drafts.json"
72
+ },
73
+ {
74
+ "id": "06-context-include-drafts-ids-plain",
75
+ "kind": "cli",
76
+ "args": [
77
+ "context",
78
+ "--include-drafts",
79
+ "--ids",
80
+ "R-9"
81
+ ],
82
+ "expectExitCode": 0,
83
+ "expectedStdoutIncludes": [
84
+ "draft",
85
+ "tenet/specs/prd.md",
86
+ "R-9",
87
+ "Upcoming feature must emit structured events."
88
+ ]
89
+ },
90
+ {
91
+ "id": "07-mcp-include-drafts-ids",
92
+ "kind": "mcp",
93
+ "requests": [
94
+ {
95
+ "jsonrpc": "2.0",
96
+ "id": 1,
97
+ "method": "initialize",
98
+ "params": {
99
+ "protocolVersion": "2025-11-25"
100
+ }
101
+ },
102
+ {
103
+ "jsonrpc": "2.0",
104
+ "id": 2,
105
+ "method": "tools/call",
106
+ "params": {
107
+ "name": "tenet_context",
108
+ "arguments": {
109
+ "include_drafts": true,
110
+ "ids": [
111
+ "R-9"
112
+ ]
113
+ }
114
+ }
115
+ }
116
+ ],
117
+ "expectedJsonMatch": "expected/07-mcp-drafts.json"
118
+ },
119
+ {
120
+ "id": "08-context-include-drafts-query-json",
121
+ "kind": "cli",
122
+ "args": [
123
+ "context",
124
+ "--include-drafts",
125
+ "--query",
126
+ "structured events",
127
+ "--json"
128
+ ],
129
+ "expectExitCode": 0,
130
+ "expectedJsonMatch": "expected/05-context-drafts.json"
131
+ }
132
+ ]
133
+ }
@@ -0,0 +1,3 @@
1
+ # Receipt notes
2
+
3
+ Keep a paper receipt for each registered order.
@@ -0,0 +1,14 @@
1
+ {
2
+ "absentYamlPaths": {
3
+ "tenet.yaml": [
4
+ [
5
+ "checks",
6
+ "test"
7
+ ],
8
+ [
9
+ "checks",
10
+ "tests"
11
+ ]
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "stdoutMatches": [
3
+ "\\bTenet proof\\b",
4
+ "\\blocal preview\\b",
5
+ "\\b(?:1\\s+(?:tagged\\s+)?tests?(?:\\(s\\))?\\s+passed|Tests\\s+1\\s+passed)\\b"
6
+ ]
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "stdoutMatches": [
3
+ "\\bTenet proof\\b",
4
+ "\\blocal preview\\b",
5
+ "\\b(?:1\\s+(?:tagged\\s+)?tests?(?:\\(s\\))?\\s+passed|Tests\\s+1\\s+passed)\\b",
6
+ "\\btakes effect after merge\\b"
7
+ ]
8
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "schema": 1,
3
+ "scenario": "s16-verify-local-preview",
4
+ "spec_refs": [
5
+ "tenet/packets/CP-0066-dogfood-0.1.1/definition.md#c--the-test-check-works-from-day-one-and-locally-track-2"
6
+ ],
7
+ "steps": [
8
+ {
9
+ "id": "01-init-without-a-test-runner",
10
+ "kind": "cli",
11
+ "args": [
12
+ "init",
13
+ "--yes",
14
+ "--offline"
15
+ ],
16
+ "expectExitCode": 0,
17
+ "expectedProjection": "expected/01-init.json"
18
+ },
19
+ {
20
+ "id": "02-disallow-git-network",
21
+ "kind": "git",
22
+ "args": [
23
+ "config",
24
+ "protocol.allow",
25
+ "never"
26
+ ]
27
+ },
28
+ {
29
+ "id": "03-configure-default-branch-check",
30
+ "kind": "write",
31
+ "files": {
32
+ "tenet.yaml": "{\n \"standard\": \"~0.1\",\n \"paths\": {\n \"records\": \"tenet\"\n },\n \"level\": \"observe\",\n \"specs\": {\n \"id_prefix\": \"R\"\n },\n \"owners\": [\n {\n \"id\": \"owner\",\n \"name\": \"Scenario Owner\",\n \"roles\": [\n \"owner\"\n ]\n }\n ],\n \"checks\": {\n \"test\": {\n \"run\": \"node --test --test-reporter=junit test/receipt.test.mjs\",\n \"report\": \"junit\",\n \"report_from\": \"stdout\"\n }\n }\n}\n"
33
+ }
34
+ },
35
+ {
36
+ "id": "04-stage-setup",
37
+ "kind": "git",
38
+ "args": [
39
+ "add",
40
+ "-A"
41
+ ]
42
+ },
43
+ {
44
+ "id": "05-commit-setup",
45
+ "kind": "git",
46
+ "args": [
47
+ "commit",
48
+ "-m",
49
+ "Configure the receipt check"
50
+ ]
51
+ },
52
+ {
53
+ "id": "06-create-feature-branch",
54
+ "kind": "git",
55
+ "args": [
56
+ "switch",
57
+ "-c",
58
+ "receipt-review"
59
+ ]
60
+ },
61
+ {
62
+ "id": "07-switch-to-default-branch",
63
+ "kind": "git",
64
+ "args": [
65
+ "switch",
66
+ "main"
67
+ ]
68
+ },
69
+ {
70
+ "id": "08-advance-default-branch-policy",
71
+ "kind": "write",
72
+ "files": {
73
+ "tenet.yaml": "{\n \"standard\": \"~0.1\",\n \"paths\": {\n \"records\": \"tenet\"\n },\n \"level\": \"observe\",\n \"specs\": {\n \"id_prefix\": \"R\"\n },\n \"owners\": [\n {\n \"id\": \"owner\",\n \"name\": \"Scenario Owner\",\n \"roles\": [\n \"owner\"\n ]\n }\n ],\n \"checks\": {\n \"test\": {\n \"run\": \"node -e \\\"process.exit(8)\\\"\",\n \"report\": \"junit\",\n \"report_from\": \"stdout\"\n }\n }\n}\n"
74
+ }
75
+ },
76
+ {
77
+ "id": "09-commit-default-branch-policy",
78
+ "kind": "git",
79
+ "args": [
80
+ "commit",
81
+ "-am",
82
+ "Advance the default branch policy"
83
+ ]
84
+ },
85
+ {
86
+ "id": "10-return-to-feature-branch",
87
+ "kind": "git",
88
+ "args": [
89
+ "switch",
90
+ "receipt-review"
91
+ ]
92
+ },
93
+ {
94
+ "id": "11-stage-a-failing-version",
95
+ "kind": "write",
96
+ "files": {
97
+ "test/receipt.test.mjs": "import assert from \"node:assert/strict\";\nimport { test } from \"node:test\";\n\ntest(\"[AB-1] [R-1] keeps a paper receipt\", () => {\n const receipt = \"digital\";\n assert.equal(receipt, \"paper\");\n});\n"
98
+ }
99
+ },
100
+ {
101
+ "id": "12-stage-tagged-test",
102
+ "kind": "git",
103
+ "args": [
104
+ "add",
105
+ "test/receipt.test.mjs"
106
+ ]
107
+ },
108
+ {
109
+ "id": "13-fix-the-working-tree-test",
110
+ "kind": "write",
111
+ "files": {
112
+ "test/receipt.test.mjs": "import assert from \"node:assert/strict\";\nimport { test } from \"node:test\";\n\ntest(\"[AB-1] [R-1] keeps a paper receipt\", () => {\n const receipt = \"paper\";\n assert.equal(receipt, \"paper\");\n});\n"
113
+ }
114
+ },
115
+ {
116
+ "id": "14-preview-working-tree",
117
+ "kind": "cli",
118
+ "args": [
119
+ "verify",
120
+ "--local"
121
+ ],
122
+ "expectExitCode": 0,
123
+ "expectedProjection": "expected/14-local-preview.json",
124
+ "withoutCiEvent": true
125
+ },
126
+ {
127
+ "id": "15-change-head-check-command",
128
+ "kind": "write",
129
+ "files": {
130
+ "tenet.yaml": "{\n \"standard\": \"~0.1\",\n \"paths\": {\n \"records\": \"tenet\"\n },\n \"level\": \"observe\",\n \"specs\": {\n \"id_prefix\": \"R\"\n },\n \"owners\": [\n {\n \"id\": \"owner\",\n \"name\": \"Scenario Owner\",\n \"roles\": [\n \"owner\"\n ]\n }\n ],\n \"checks\": {\n \"test\": {\n \"run\": \"node -e \\\"process.exit(9)\\\"\",\n \"report\": \"junit\",\n \"report_from\": \"stdout\"\n }\n }\n}\n"
131
+ }
132
+ },
133
+ {
134
+ "id": "16-stage-feature",
135
+ "kind": "git",
136
+ "args": [
137
+ "add",
138
+ "-A"
139
+ ]
140
+ },
141
+ {
142
+ "id": "17-commit-feature",
143
+ "kind": "git",
144
+ "args": [
145
+ "commit",
146
+ "-m",
147
+ "Change the receipt check"
148
+ ]
149
+ },
150
+ {
151
+ "id": "18-preview-with-head-command-change",
152
+ "kind": "cli",
153
+ "args": [
154
+ "verify",
155
+ "--local"
156
+ ],
157
+ "expectExitCode": 0,
158
+ "expectedProjection": "expected/18-command-change.json",
159
+ "withoutCiEvent": true
160
+ }
161
+ ]
162
+ }