@okfit/profiles 0.4.0 → 0.6.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 +64 -2
- package/SoftwareProject.js +68 -3
- 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
|
@@ -19,7 +19,7 @@ guidance = "Exactly one Project exists and it lives at the bundle root as the pr
|
|
|
19
19
|
|
|
20
20
|
[types.Module]
|
|
21
21
|
description = "A unit of code with an owner and a boundary."
|
|
22
|
-
guidance = "One per workspace package, plugin, website, action, test harness, or config dependency. Link to the Decisions that shaped it and the Conventions it is bound by."
|
|
22
|
+
guidance = "One per workspace package, plugin, website, action, worker, test harness, or config dependency. Link to the Decisions that shaped it and the Conventions it is bound by."
|
|
23
23
|
required = ["resource", "kind"]
|
|
24
24
|
|
|
25
25
|
[types.Module.fields.kind]
|
|
@@ -29,6 +29,7 @@ values.package = "A publishable npm package under packages/."
|
|
|
29
29
|
values.website = "A docs or marketing site, usually RSPress."
|
|
30
30
|
values.plugin = "A Claude Code or editor plugin distributed outside npm."
|
|
31
31
|
values.action = "A GitHub Action."
|
|
32
|
+
values.worker = "A detached runtime unit, such as a sidecar or worker bundle, spawned by another module with its own lifecycle and not itself a package or action."
|
|
32
33
|
values.harness = "A private test-only package or package group that exercises built artifacts and is never published."
|
|
33
34
|
values.config-dependency = "A package consumed through pnpm configDependencies rather than dependencies, loaded before the workspace resolves."
|
|
34
35
|
|
|
@@ -110,12 +111,55 @@ kind = "path"
|
|
|
110
111
|
|
|
111
112
|
[types.Gotcha]
|
|
112
113
|
description = "A state or result that looks like one thing and is the opposite: breakage that is transient, or success that did nothing."
|
|
113
|
-
guidance = "Describe what a reader sees, what they will wrongly conclude, and what is actually true, and point resource at the code or command that produces the misleading signal. Give it a staleness window, since a trap fixed upstream turns into misinformation."
|
|
114
|
+
guidance = "Describe what a reader sees, what they will wrongly conclude, and what is actually true, and point resource at the code or command that produces the misleading signal, or omit resource and name the outside system when nothing in this repository produces it. Give it a staleness window, since a trap fixed upstream turns into misinformation; a known bug nobody is scheduled to fix is a Gotcha, and becomes a Roadmap once the fix is planned."
|
|
114
115
|
|
|
115
116
|
[types.Gotcha.fields.resource]
|
|
116
117
|
description = "A path relative to this concept file to the code, script, or config that produces the misleading signal."
|
|
117
118
|
kind = "path"
|
|
118
119
|
|
|
120
|
+
[types.Consumer]
|
|
121
|
+
description = "An external application that consumes this repository and thereby scopes it."
|
|
122
|
+
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."
|
|
123
|
+
required = ["repository"]
|
|
124
|
+
|
|
125
|
+
[types.Consumer.fields.repository]
|
|
126
|
+
description = "Where the consumer lives, as a URL or an owner/name pair, since it is outside this repository."
|
|
127
|
+
|
|
128
|
+
[types.Roadmap]
|
|
129
|
+
description = "A gate and the forward-looking work behind it, held as intent rather than as a Decision."
|
|
130
|
+
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; a known bug with nobody queued to fix it is a Gotcha, not a Roadmap."
|
|
131
|
+
|
|
132
|
+
[types.Roadmap.fields.gate]
|
|
133
|
+
description = "The observable condition that closes this roadmap, for example a release shipped or a benchmark met."
|
|
134
|
+
|
|
135
|
+
[types.Measurement]
|
|
136
|
+
description = "A dated empirical result: what was measured, how, and what the numbers ruled in or out."
|
|
137
|
+
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."
|
|
138
|
+
|
|
139
|
+
[types.Measurement.fields.justifies]
|
|
140
|
+
description = "Paths to the Decisions this measurement supports, one entry per Decision."
|
|
141
|
+
kind = "path"
|
|
142
|
+
|
|
143
|
+
[types.Invariant]
|
|
144
|
+
description = "A property the code holds by construction: enforced by the type system or pinned by a test, not followed by people."
|
|
145
|
+
guidance = "State the property, name the mechanism that enforces it, and say what a refactor would have to break for it to stop holding. Distinct from Convention, which a contributor can choose to ignore."
|
|
146
|
+
|
|
147
|
+
[types.Invariant.fields.resource]
|
|
148
|
+
description = "A path relative to this concept file to the type, function, or test that enforces the property."
|
|
149
|
+
kind = "path"
|
|
150
|
+
|
|
151
|
+
[types.Incident]
|
|
152
|
+
description = "A dated production failure: what shipped broken, what it looked like to the consumer, the root cause, and the guard that now stops it."
|
|
153
|
+
guidance = "Keep the whole narrative in one record rather than splitting the misleading signal into a Gotcha and the guard into a Decision, and link both where they exist. Set occurred to the date it happened so a reader can weigh how far the code has moved since."
|
|
154
|
+
required = ["occurred"]
|
|
155
|
+
|
|
156
|
+
[types.Incident.fields.occurred]
|
|
157
|
+
description = "The ISO 8601 date the failure happened or was first observed."
|
|
158
|
+
|
|
159
|
+
[types.Incident.fields.guard]
|
|
160
|
+
description = "A path relative to this concept file to the test, check, or config that now stops the failure recurring."
|
|
161
|
+
kind = "path"
|
|
162
|
+
|
|
119
163
|
[tags.architecture]
|
|
120
164
|
description = "Concerns the shape of the system rather than one module."
|
|
121
165
|
|
|
@@ -139,6 +183,21 @@ description = "Concerns the unattended path: what runs without a human present,
|
|
|
139
183
|
|
|
140
184
|
[tags.compat]
|
|
141
185
|
description = "Concerns compatibility across versions of the runtime, the package manager, or a dependency."
|
|
186
|
+
|
|
187
|
+
[tags.bundle]
|
|
188
|
+
description = "Concerns install weight and reachability: tree-shaking, subpath entrypoints, and dependency edges declined for their cost."
|
|
189
|
+
|
|
190
|
+
[tags.observability]
|
|
191
|
+
description = "Concerns how the system reports on itself: events, metrics, logs, sinks, and artifacts."
|
|
192
|
+
|
|
193
|
+
[tags.deps]
|
|
194
|
+
description = "Concerns how third-party dependencies are declared, pinned, and distributed."
|
|
195
|
+
|
|
196
|
+
[tags.github]
|
|
197
|
+
description = "Concerns the GitHub platform surface: the REST and GraphQL APIs, Apps and installation tokens, Actions, Packages, check runs, and pull request conventions."
|
|
198
|
+
|
|
199
|
+
[tags.docs]
|
|
200
|
+
description = "Concerns the documentation itself: provenance, rot, re-derivation, and what a claim would take to falsify."
|
|
142
201
|
```
|
|
143
202
|
|
|
144
203
|
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 +225,9 @@ directories:
|
|
|
166
225
|
limitations/ -> Limitation
|
|
167
226
|
models/ -> DataModel
|
|
168
227
|
gotchas/ -> Gotcha
|
|
228
|
+
consumers/ -> Consumer
|
|
229
|
+
roadmaps/ -> Roadmap
|
|
230
|
+
measurements/ -> Measurement
|
|
169
231
|
```
|
|
170
232
|
|
|
171
233
|
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
|
@@ -22,7 +22,7 @@ const config = {
|
|
|
22
22
|
},
|
|
23
23
|
Module: {
|
|
24
24
|
description: "A unit of code with an owner and a boundary.",
|
|
25
|
-
guidance: "One per workspace package, plugin, website, action, test harness, or config dependency. Link to the Decisions that shaped it and the Conventions it is bound by.",
|
|
25
|
+
guidance: "One per workspace package, plugin, website, action, worker, test harness, or config dependency. Link to the Decisions that shaped it and the Conventions it is bound by.",
|
|
26
26
|
required: ["resource", "kind"],
|
|
27
27
|
fields: {
|
|
28
28
|
kind: {
|
|
@@ -33,6 +33,7 @@ const config = {
|
|
|
33
33
|
website: "A docs or marketing site, usually RSPress.",
|
|
34
34
|
plugin: "A Claude Code or editor plugin distributed outside npm.",
|
|
35
35
|
action: "A GitHub Action.",
|
|
36
|
+
worker: "A detached runtime unit, such as a sidecar or worker bundle, spawned by another module with its own lifecycle and not itself a package or action.",
|
|
36
37
|
harness: "A private test-only package or package group that exercises built artifacts and is never published.",
|
|
37
38
|
"config-dependency": "A package consumed through pnpm configDependencies rather than dependencies, loaded before the workspace resolves."
|
|
38
39
|
}
|
|
@@ -119,11 +120,50 @@ const config = {
|
|
|
119
120
|
},
|
|
120
121
|
Gotcha: {
|
|
121
122
|
description: "A state or result that looks like one thing and is the opposite: breakage that is transient, or success that did nothing.",
|
|
122
|
-
guidance: "Describe what a reader sees, what they will wrongly conclude, and what is actually true, and point resource at the code or command that produces the misleading signal. Give it a staleness window, since a trap fixed upstream turns into misinformation.",
|
|
123
|
+
guidance: "Describe what a reader sees, what they will wrongly conclude, and what is actually true, and point resource at the code or command that produces the misleading signal, or omit resource and name the outside system when nothing in this repository produces it. Give it a staleness window, since a trap fixed upstream turns into misinformation; a known bug nobody is scheduled to fix is a Gotcha, and becomes a Roadmap once the fix is planned.",
|
|
123
124
|
fields: { resource: {
|
|
124
125
|
description: "A path relative to this concept file to the code, script, or config that produces the misleading signal.",
|
|
125
126
|
kind: "path"
|
|
126
127
|
} }
|
|
128
|
+
},
|
|
129
|
+
Consumer: {
|
|
130
|
+
description: "An external application that consumes this repository and thereby scopes it.",
|
|
131
|
+
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.",
|
|
132
|
+
required: ["repository"],
|
|
133
|
+
fields: { repository: { description: "Where the consumer lives, as a URL or an owner/name pair, since it is outside this repository." } }
|
|
134
|
+
},
|
|
135
|
+
Roadmap: {
|
|
136
|
+
description: "A gate and the forward-looking work behind it, held as intent rather than as a Decision.",
|
|
137
|
+
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; a known bug with nobody queued to fix it is a Gotcha, not a Roadmap.",
|
|
138
|
+
fields: { gate: { description: "The observable condition that closes this roadmap, for example a release shipped or a benchmark met." } }
|
|
139
|
+
},
|
|
140
|
+
Measurement: {
|
|
141
|
+
description: "A dated empirical result: what was measured, how, and what the numbers ruled in or out.",
|
|
142
|
+
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.",
|
|
143
|
+
fields: { justifies: {
|
|
144
|
+
description: "Paths to the Decisions this measurement supports, one entry per Decision.",
|
|
145
|
+
kind: "path"
|
|
146
|
+
} }
|
|
147
|
+
},
|
|
148
|
+
Invariant: {
|
|
149
|
+
description: "A property the code holds by construction: enforced by the type system or pinned by a test, not followed by people.",
|
|
150
|
+
guidance: "State the property, name the mechanism that enforces it, and say what a refactor would have to break for it to stop holding. Distinct from Convention, which a contributor can choose to ignore.",
|
|
151
|
+
fields: { resource: {
|
|
152
|
+
description: "A path relative to this concept file to the type, function, or test that enforces the property.",
|
|
153
|
+
kind: "path"
|
|
154
|
+
} }
|
|
155
|
+
},
|
|
156
|
+
Incident: {
|
|
157
|
+
description: "A dated production failure: what shipped broken, what it looked like to the consumer, the root cause, and the guard that now stops it.",
|
|
158
|
+
guidance: "Keep the whole narrative in one record rather than splitting the misleading signal into a Gotcha and the guard into a Decision, and link both where they exist. Set occurred to the date it happened so a reader can weigh how far the code has moved since.",
|
|
159
|
+
required: ["occurred"],
|
|
160
|
+
fields: {
|
|
161
|
+
occurred: { description: "The ISO 8601 date the failure happened or was first observed." },
|
|
162
|
+
guard: {
|
|
163
|
+
description: "A path relative to this concept file to the test, check, or config that now stops the failure recurring.",
|
|
164
|
+
kind: "path"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
127
167
|
}
|
|
128
168
|
},
|
|
129
169
|
tags: {
|
|
@@ -134,7 +174,12 @@ const config = {
|
|
|
134
174
|
performance: { description: "Concerns speed, memory, or resource cost and the trade-offs made for them." },
|
|
135
175
|
dx: { description: "Concerns the experience of the people and agents who author, build, and debug the code." },
|
|
136
176
|
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." }
|
|
177
|
+
compat: { description: "Concerns compatibility across versions of the runtime, the package manager, or a dependency." },
|
|
178
|
+
bundle: { description: "Concerns install weight and reachability: tree-shaking, subpath entrypoints, and dependency edges declined for their cost." },
|
|
179
|
+
observability: { description: "Concerns how the system reports on itself: events, metrics, logs, sinks, and artifacts." },
|
|
180
|
+
deps: { description: "Concerns how third-party dependencies are declared, pinned, and distributed." },
|
|
181
|
+
github: { description: "Concerns the GitHub platform surface: the REST and GraphQL APIs, Apps and installation tokens, Actions, Packages, check runs, and pull request conventions." },
|
|
182
|
+
docs: { description: "Concerns the documentation itself: provenance, rot, re-derivation, and what a claim would take to falsify." }
|
|
138
183
|
},
|
|
139
184
|
extensions: {}
|
|
140
185
|
};
|
|
@@ -185,6 +230,26 @@ const layout = {
|
|
|
185
230
|
{
|
|
186
231
|
directory: "gotchas",
|
|
187
232
|
type: "Gotcha"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
directory: "consumers",
|
|
236
|
+
type: "Consumer"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
directory: "roadmaps",
|
|
240
|
+
type: "Roadmap"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
directory: "measurements",
|
|
244
|
+
type: "Measurement"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
directory: "invariants",
|
|
248
|
+
type: "Invariant"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
directory: "incidents",
|
|
252
|
+
type: "Incident"
|
|
188
253
|
}
|
|
189
254
|
]
|
|
190
255
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okfit/profiles",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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": {
|