@webpieces/rules-config 0.3.238 → 0.3.240
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/rules-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.240",
|
|
4
4
|
"description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Instructions: Authoring responsibilities.md Files
|
|
2
|
+
|
|
3
|
+
Every project in the workspace MUST have a `responsibilities.md` at its project root
|
|
4
|
+
(next to its `project.json` / `package.json`). The architecture generator embeds each
|
|
5
|
+
file's first paragraph into `architecture/dependencies.json` as that project's
|
|
6
|
+
`shortDescription`, and records the file path as `responsibilitiesFile` so AI can read
|
|
7
|
+
the full detail on demand.
|
|
8
|
+
|
|
9
|
+
## Required Format
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# Responsibilities — <project-name>
|
|
13
|
+
|
|
14
|
+
One SHORT paragraph (max 300 characters) summarizing what this module does.
|
|
15
|
+
This paragraph is embedded verbatim into architecture/dependencies.json as
|
|
16
|
+
shortDescription, so keep it tight and information-dense.
|
|
17
|
+
|
|
18
|
+
## In Scope
|
|
19
|
+
|
|
20
|
+
- What kinds of code BELONG in this module
|
|
21
|
+
- The problems this module solves
|
|
22
|
+
|
|
23
|
+
## Out of Scope
|
|
24
|
+
|
|
25
|
+
- What does NOT belong here, and which module it belongs in instead
|
|
26
|
+
|
|
27
|
+
## Notes (optional)
|
|
28
|
+
|
|
29
|
+
Anything else future developers/AI should know: key design decisions,
|
|
30
|
+
invariants, gotchas.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Rules the generator enforces:
|
|
34
|
+
- The file must exist for EVERY project in the dependency graph.
|
|
35
|
+
- The first non-heading paragraph must be non-empty and at most 300 characters
|
|
36
|
+
(newlines are collapsed to spaces before measuring).
|
|
37
|
+
|
|
38
|
+
## How This Is Used
|
|
39
|
+
|
|
40
|
+
`architecture/dependencies.json` is written for AI consumption. Each project entry has:
|
|
41
|
+
- `shortDescription` — the summary paragraph from this file
|
|
42
|
+
- `responsibilitiesFile` — path to this file (read it BEFORE adding code to the module,
|
|
43
|
+
to know what belongs there and what does not)
|
|
44
|
+
- `designFile` — path to the generated DI design.json for the module
|
|
45
|
+
- `framework` — angular | react | express | all-ts (from the `framework:<x>` nx tag in
|
|
46
|
+
project.json, or inferred from package.json dependencies)
|
|
47
|
+
|
|
48
|
+
## Fixing a Validation Failure
|
|
49
|
+
|
|
50
|
+
1. Create or fix the `responsibilities.md` files listed in the error output
|
|
51
|
+
(a HUMAN should review the content — describe real intent, don't restate the code).
|
|
52
|
+
2. Re-run: `nx run architecture:generate`
|
|
53
|
+
3. Commit both the `responsibilities.md` files and the regenerated
|
|
54
|
+
`architecture/dependencies.json`.
|
|
55
|
+
|
|
56
|
+
## Editing an Existing responsibilities.md
|
|
57
|
+
|
|
58
|
+
If you change the FIRST paragraph, the embedded `shortDescription` in
|
|
59
|
+
`architecture/dependencies.json` becomes stale and the build will fail until you re-run
|
|
60
|
+
`nx run architecture:generate` and commit the regenerated file. Detail sections below the
|
|
61
|
+
first paragraph can be edited freely without regenerating.
|