@ttsc/evidence 0.28.0 → 0.28.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.
Files changed (2) hide show
  1. package/README.md +45 -20
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -4,22 +4,24 @@
4
4
 
5
5
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/ttsc/blob/master/LICENSE) [![NPM Version](https://img.shields.io/npm/v/@ttsc/evidence.svg)](https://www.npmjs.com/package/@ttsc/evidence) [![NPM Downloads](https://img.shields.io/npm/dm/@ttsc/evidence.svg)](https://www.npmjs.com/package/@ttsc/evidence) [![Build Status](https://github.com/samchon/ttsc/actions/workflows/build.yml/badge.svg)](https://github.com/samchon/ttsc/actions/workflows/build.yml) [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://ttsc.dev/docs/evidence) [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
6
6
 
7
- Evidence Graph turns every specification your agent skips into a compile error.
7
+ A coding agent can claim it followed every requirement while silently skipping some. Finding those omissions means rereading the specification, implementation, and tests until another review round finds nothing new.
8
+
9
+ Evidence Graph replaces that loop with compile-time obligations. You declare which artifacts owe which specification units. The agent cites each unit from the code, test, schema, or document that satisfies it and states why. An unanswered unit is a compile error.
10
+
11
+ Evidence Graph can also require the agent to state how each function follows project-wide principles. "No hard coding" and "Fix root causes" then become explicit obligations on every selected function.
8
12
 
9
13
  ```tsx
10
14
  /**
11
- * @evidence docs/discount.md#coupon-stacking
12
- * States the per-issuer stacking limit
13
- * this section defines, in the buyer's words.
14
- * @evidence POST:/orders/{orderId}/coupons
15
- * Explains the rejection this endpoint returns
16
- * for an over-stacked coupon set.
15
+ * @evidence docs/discount.md#coupon-stacking States the per-issuer stacking limit this section defines, in the buyer's words.
16
+ * @evidence POST:/orders/{orderId}/coupons Explains the rejection this endpoint returns for an over-stacked coupon set.
17
17
  * @evidence {@link hooks.useCouponStacking} Renders the limit this hook resolves.
18
+ * @evidence docs/principles.md#no-hard-coding Renders limits from props instead of branching on known issuer names.
19
+ * @evidenceExclude docs/principles.md#fix-root-causes-not-symptoms No failure to fix.
18
20
  */
19
21
  export function CouponStackingNotice(props: IProps): JSX.Element;
20
22
  ```
21
23
 
22
- `@evidence <target> <reason>`: what this code implements, and why.
24
+ `@evidence <target> <reason>` is the agent's explicit claim about what this code implements and why. `@evidenceExclude` records why an obligation does not apply.
23
25
 
24
26
  A target is one of four kinds:
25
27
 
@@ -28,7 +30,7 @@ A target is one of four kinds:
28
30
  - **Swagger**: an operation, method and path together.
29
31
  - **TypeScript**: a type, a function, or a property, written as an inline link.
30
32
 
31
- Leave one uncited and the build stops.
33
+ Leave one obligation unanswered and the build stops.
32
34
 
33
35
  ```bash
34
36
  $ npx ttsc
@@ -41,7 +43,7 @@ error TS16411: [evidence/graph] Missing acknowledgement for 'docs/discount.md#co
41
43
  Found 3 errors.
42
44
  ```
43
45
 
44
- One error per specification, in the same build as the type errors. The error list is the task list.
46
+ Missing obligations appear in the same build as type errors. The error list is the agent's task list.
45
47
 
46
48
  ## Benchmark
47
49
 
@@ -106,16 +108,6 @@ One claim: the components under `src` implement the docs, so every H2 and H3 und
106
108
 
107
109
  [The rule reference](https://ttsc.dev/docs/evidence/rules) has four more rules beside `evidence/graph`, and [the claim reference](https://ttsc.dev/docs/evidence/claims) has every claim option.
108
110
 
109
- ### Checklists
110
-
111
- Coverage asks its question once per unit: has anyone cited this. Where a document is read down a column, such as development rules or a release gate, the question is whether each file answered each item.
112
-
113
- ```ts
114
- { type: "markdown", files: ["docs/rules.md"], symbol: "h2", checklist: true }
115
- ```
116
-
117
- Every selected host then owes every item, and a file carrying no tag owes the whole list.
118
-
119
111
  ### Tags
120
112
 
121
113
  The configuration is written once. The tags are written forever: `@evidence` cites, `@evidenceReview` verifies, and `@evidenceExclude` declines. [The tag reference](https://ttsc.dev/docs/evidence/tags) has the full grammar.
@@ -152,6 +144,39 @@ Even requirements cite their evidence, in comments, so the rendered document sta
152
144
 
153
145
  Backend, frontend, and even novels below are this same shape, drawn in detail.
154
146
 
147
+ ### Start with principles
148
+
149
+ Spec-Driven Development does not require a complete document hierarchy. `docs/principles.md` can be only headings:
150
+
151
+ ```md
152
+ ## No hard coding
153
+ ## No monkey patching
154
+ ## Use the conventional solution
155
+ ## Fix root causes, not symptoms
156
+ ```
157
+
158
+ Make them a checklist:
159
+
160
+ ```ts
161
+ {
162
+ name: "every function answers every engineering principle",
163
+ type: "typescript",
164
+ files: ["src/**/*.ts"],
165
+ symbol: "function",
166
+ reference: {
167
+ type: "markdown",
168
+ files: ["docs/principles.md"],
169
+ symbol: "h2",
170
+ checklist: true,
171
+ requireReview: true,
172
+ },
173
+ }
174
+ ```
175
+
176
+ `checklist` changes the denominator from principles to functions times principles. Every selected function must answer every principle, as `CouponStackingNotice` does above.
177
+
178
+ One missing answer fails the build. Adding a principle creates a new obligation on every selected function, and `requireReview` expires every affected review when that principle changes.
179
+
155
180
  ### Backend
156
181
 
157
182
  <picture><source media="(prefers-color-scheme: dark)" srcset="https://ttsc.dev/evidence/backend-dark.svg"><img alt="Requirements and Specifications grounding DB schema, API operation, API schema and Test" src="https://ttsc.dev/evidence/backend-light.svg" width="100%"></picture>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/evidence",
3
- "version": "0.28.0",
3
+ "version": "0.28.2",
4
4
  "description": "Evidence-graph lint contributor for @ttsc/lint: declare provenance with a JSDoc @evidence tag and fail the build when it is missing or dangling.",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -48,8 +48,8 @@
48
48
  "@types/node": "^25.3.0",
49
49
  "rimraf": "^6.1.2",
50
50
  "typescript": "^7.0.2",
51
- "@ttsc/lint": "0.28.0",
52
- "ttsc": "0.28.0"
51
+ "@ttsc/lint": "0.28.2",
52
+ "ttsc": "0.28.2"
53
53
  },
54
54
  "dependencies": {
55
55
  "@prisma/prisma-schema-wasm": "7.10.0-2.d0368e25c88e68caa4d283b5f2d88d1b76ed9356",