@okfit/profiles 0.4.0 → 0.5.0
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/Derivation.js +14 -1
- package/README.md +35 -0
- package/SoftwareProject.js +35 -1
- package/package.json +2 -2
package/Derivation.js
CHANGED
|
@@ -50,10 +50,23 @@ const localPartOf = (email) => {
|
|
|
50
50
|
const local = at === -1 ? email : email.slice(0, at);
|
|
51
51
|
return local.length > 0 && !/\s/.test(local) ? local : void 0;
|
|
52
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* `value` without leading and trailing `-`. An index walk rather than
|
|
55
|
+
* `/^-+|-+$/`: the `-+$` alternative backtracks from every position of a
|
|
56
|
+
* long dash run (CodeQL js/polynomial-redos, okfit alert #1), and the input
|
|
57
|
+
* here is a git author name nobody vetted.
|
|
58
|
+
*/
|
|
59
|
+
const trimDashes = (value) => {
|
|
60
|
+
let start = 0;
|
|
61
|
+
let end = value.length;
|
|
62
|
+
while (start < end && value.charCodeAt(start) === 45) start++;
|
|
63
|
+
while (end > start && value.charCodeAt(end - 1) === 45) end--;
|
|
64
|
+
return value.slice(start, end);
|
|
65
|
+
};
|
|
53
66
|
/** P-13 step 3: lower-case, runs outside `[a-z0-9._-]` to `-`, leading and trailing `-` trimmed. */
|
|
54
67
|
const slugOf = (name) => {
|
|
55
68
|
if (name === void 0) return void 0;
|
|
56
|
-
const slug = name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-")
|
|
69
|
+
const slug = trimDashes(name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-"));
|
|
57
70
|
return slug.length > 0 ? slug : void 0;
|
|
58
71
|
};
|
|
59
72
|
const humanActorId = (identity, humans) => {
|
package/README.md
CHANGED
|
@@ -116,6 +116,29 @@ guidance = "Describe what a reader sees, what they will wrongly conclude, and wh
|
|
|
116
116
|
description = "A path relative to this concept file to the code, script, or config that produces the misleading signal."
|
|
117
117
|
kind = "path"
|
|
118
118
|
|
|
119
|
+
[types.Consumer]
|
|
120
|
+
description = "An external application that consumes this repository and thereby scopes it."
|
|
121
|
+
guidance = "Name the surfaces it exercises, where the edge between the two repositories sits, and the open questions it raises, so the boundary of this repository is read from its consumers rather than inferred. Deprecate it when the consumer stops consuming."
|
|
122
|
+
required = ["repository"]
|
|
123
|
+
|
|
124
|
+
[types.Consumer.fields.repository]
|
|
125
|
+
description = "Where the consumer lives, as a URL or an owner/name pair, since it is outside this repository."
|
|
126
|
+
|
|
127
|
+
[types.Roadmap]
|
|
128
|
+
description = "A gate and the forward-looking work behind it, held as intent rather than as a Decision."
|
|
129
|
+
guidance = "List the phases and what remains in each, and give it a staleness window so queued work is re-examined instead of read as settled. Deprecate it when the gate holds and write the Decisions the work produced."
|
|
130
|
+
|
|
131
|
+
[types.Roadmap.fields.gate]
|
|
132
|
+
description = "The observable condition that closes this roadmap, for example a release shipped or a benchmark met."
|
|
133
|
+
|
|
134
|
+
[types.Measurement]
|
|
135
|
+
description = "A dated empirical result: what was measured, how, and what the numbers ruled in or out."
|
|
136
|
+
guidance = "Record the inputs, the method, and the numbers so a reader can judge whether they still hold, and give it a staleness window because numbers rot. A Decision links to the Measurement that justified it instead of embedding the result in its body."
|
|
137
|
+
|
|
138
|
+
[types.Measurement.fields.justifies]
|
|
139
|
+
description = "Paths to the Decisions this measurement supports, one entry per Decision."
|
|
140
|
+
kind = "path"
|
|
141
|
+
|
|
119
142
|
[tags.architecture]
|
|
120
143
|
description = "Concerns the shape of the system rather than one module."
|
|
121
144
|
|
|
@@ -139,6 +162,15 @@ description = "Concerns the unattended path: what runs without a human present,
|
|
|
139
162
|
|
|
140
163
|
[tags.compat]
|
|
141
164
|
description = "Concerns compatibility across versions of the runtime, the package manager, or a dependency."
|
|
165
|
+
|
|
166
|
+
[tags.bundle]
|
|
167
|
+
description = "Concerns install weight and reachability: tree-shaking, subpath entrypoints, and dependency edges declined for their cost."
|
|
168
|
+
|
|
169
|
+
[tags.observability]
|
|
170
|
+
description = "Concerns how the system reports on itself: events, metrics, logs, sinks, and artifacts."
|
|
171
|
+
|
|
172
|
+
[tags.deps]
|
|
173
|
+
description = "Concerns how third-party dependencies are declared, pinned, and distributed."
|
|
142
174
|
```
|
|
143
175
|
|
|
144
176
|
Only `concepts`, `types`, and `tags` carry real vocabulary; the literal's `extensions: {}` is `OkfitConfig`'s one required key and never appears on disk, since the codec folds unknown top-level keys into it (P-24: `fields.<k>.kind = "path"` and the `tags` table are vocabulary only — core enforces none of it yet). `Reference.required = ["sources"]` checks presence only: `sources = []` passes, and each entry's shape is core's `family-invalid` (P-23).
|
|
@@ -166,6 +198,9 @@ directories:
|
|
|
166
198
|
limitations/ -> Limitation
|
|
167
199
|
models/ -> DataModel
|
|
168
200
|
gotchas/ -> Gotcha
|
|
201
|
+
consumers/ -> Consumer
|
|
202
|
+
roadmaps/ -> Roadmap
|
|
203
|
+
measurements/ -> Measurement
|
|
169
204
|
```
|
|
170
205
|
|
|
171
206
|
Each directory carries its own `index.md`. What `okfit init` writes into these files is the CLI plan's concern, not this package's.
|
package/SoftwareProject.js
CHANGED
|
@@ -124,6 +124,25 @@ const config = {
|
|
|
124
124
|
description: "A path relative to this concept file to the code, script, or config that produces the misleading signal.",
|
|
125
125
|
kind: "path"
|
|
126
126
|
} }
|
|
127
|
+
},
|
|
128
|
+
Consumer: {
|
|
129
|
+
description: "An external application that consumes this repository and thereby scopes it.",
|
|
130
|
+
guidance: "Name the surfaces it exercises, where the edge between the two repositories sits, and the open questions it raises, so the boundary of this repository is read from its consumers rather than inferred. Deprecate it when the consumer stops consuming.",
|
|
131
|
+
required: ["repository"],
|
|
132
|
+
fields: { repository: { description: "Where the consumer lives, as a URL or an owner/name pair, since it is outside this repository." } }
|
|
133
|
+
},
|
|
134
|
+
Roadmap: {
|
|
135
|
+
description: "A gate and the forward-looking work behind it, held as intent rather than as a Decision.",
|
|
136
|
+
guidance: "List the phases and what remains in each, and give it a staleness window so queued work is re-examined instead of read as settled. Deprecate it when the gate holds and write the Decisions the work produced.",
|
|
137
|
+
fields: { gate: { description: "The observable condition that closes this roadmap, for example a release shipped or a benchmark met." } }
|
|
138
|
+
},
|
|
139
|
+
Measurement: {
|
|
140
|
+
description: "A dated empirical result: what was measured, how, and what the numbers ruled in or out.",
|
|
141
|
+
guidance: "Record the inputs, the method, and the numbers so a reader can judge whether they still hold, and give it a staleness window because numbers rot. A Decision links to the Measurement that justified it instead of embedding the result in its body.",
|
|
142
|
+
fields: { justifies: {
|
|
143
|
+
description: "Paths to the Decisions this measurement supports, one entry per Decision.",
|
|
144
|
+
kind: "path"
|
|
145
|
+
} }
|
|
127
146
|
}
|
|
128
147
|
},
|
|
129
148
|
tags: {
|
|
@@ -134,7 +153,10 @@ const config = {
|
|
|
134
153
|
performance: { description: "Concerns speed, memory, or resource cost and the trade-offs made for them." },
|
|
135
154
|
dx: { description: "Concerns the experience of the people and agents who author, build, and debug the code." },
|
|
136
155
|
ci: { description: "Concerns the unattended path: what runs without a human present, and how it fails." },
|
|
137
|
-
compat: { description: "Concerns compatibility across versions of the runtime, the package manager, or a dependency." }
|
|
156
|
+
compat: { description: "Concerns compatibility across versions of the runtime, the package manager, or a dependency." },
|
|
157
|
+
bundle: { description: "Concerns install weight and reachability: tree-shaking, subpath entrypoints, and dependency edges declined for their cost." },
|
|
158
|
+
observability: { description: "Concerns how the system reports on itself: events, metrics, logs, sinks, and artifacts." },
|
|
159
|
+
deps: { description: "Concerns how third-party dependencies are declared, pinned, and distributed." }
|
|
138
160
|
},
|
|
139
161
|
extensions: {}
|
|
140
162
|
};
|
|
@@ -185,6 +207,18 @@ const layout = {
|
|
|
185
207
|
{
|
|
186
208
|
directory: "gotchas",
|
|
187
209
|
type: "Gotcha"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
directory: "consumers",
|
|
213
|
+
type: "Consumer"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
directory: "roadmaps",
|
|
217
|
+
type: "Roadmap"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
directory: "measurements",
|
|
221
|
+
type: "Measurement"
|
|
188
222
|
}
|
|
189
223
|
]
|
|
190
224
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okfit/profiles",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Named OKF configuration profiles for okfit, starting with the software-project profile.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@effected/git": "^0.15.0",
|
|
39
39
|
"@effected/markdown": "^0.10.0",
|
|
40
|
-
"@okfit/core": "^0.4.
|
|
40
|
+
"@okfit/core": "^0.4.1",
|
|
41
41
|
"effect": "4.0.0-rc.115"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|