@sublang/spex 3.0.0 → 4.0.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.
- package/README.md +3 -3
- package/dist/copy-templates.d.ts +5 -2
- package/dist/copy-templates.js +6 -2
- package/dist/pin-header-format.d.ts +26 -0
- package/dist/pin-header-format.js +81 -0
- package/dist/scaffold.js +8 -1
- package/package.json +4 -4
- package/scaffold/.file-history.json +24 -5
- package/scaffold/agent-specs.txt +1 -1
- package/scaffold/i18n/zh/specs/decisions/000-spec-structure-format.md +98 -0
- package/scaffold/i18n/zh/specs/intents/000-spdx-headers.md +31 -0
- package/scaffold/i18n/zh/specs/meta.md +105 -73
- package/scaffold/i18n/zh/specs/packages/git.md +50 -0
- package/scaffold/i18n/zh/specs/packages/licensing.md +78 -0
- package/scaffold/specs/intents/000-spdx-headers.md +6 -15
- package/scaffold/specs/meta.md +7 -0
- package/scaffold/specs/packages/git.md +6 -3
- package/scaffold/specs/packages/licensing.md +21 -0
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ Relationship-metadata lines like `Verifies:` are errors — the citations woven
|
|
|
83
83
|
Directories of previous spec generations (`specs/compositions/`, `specs/user/`, …) are errors pointing to `spex scaffold --update` for the migration prompt (see [Upgrading](#upgrading-from-an-earlier-release)).
|
|
84
84
|
Errors exit non-zero; warnings do not.
|
|
85
85
|
|
|
86
|
-
**Try it:** review the sample intent record `specs/intents/000-spdx-headers.md
|
|
86
|
+
**Try it:** review the sample intent record `specs/intents/000-spdx-headers.md` and the header format the scaffold pinned in `licensing-9` of `specs/packages/licensing.md`, replacing any `<license>` or `<holder>` placeholder it left, then prompt your AI coding agent:
|
|
87
87
|
|
|
88
88
|
```text
|
|
89
89
|
Complete IR-000
|
|
@@ -118,7 +118,7 @@ spex scaffold --update
|
|
|
118
118
|
It runs from within a git repository and requires a clean `specs/` working tree, so every edit stays reviewable.
|
|
119
119
|
|
|
120
120
|
- Spex-authoritative *framework* files (`specs/meta.md` and the spec-format decision record) are refreshed unconditionally, including when they are absent. If you had modified one of these, `--update` warns and names it so you can reapply your changes from git history.
|
|
121
|
-
- Starter *seed* files (`map.md`, the sample intent record, the starter packages) are refreshed when you have not customized them, and written from the bundled template when they are absent. Customized starter files are kept as-is. Remove a starter file *after* `--update` if you do not want it.
|
|
121
|
+
- Starter *seed* files (`map.md`, the sample intent record, the starter packages) are refreshed when you have not customized them, and written from the bundled template when they are absent. `licensing.md`, whose `licensing-9` the scaffold pins to your project, counts as customized and is kept. Customized starter files are kept as-is. Remove a starter file *after* `--update` if you do not want it.
|
|
122
122
|
- Agent instruction files are reconciled with the confirmed or explicit
|
|
123
123
|
selection; a non-interactive run infers existing managed targets and
|
|
124
124
|
defaults to all targets when none exist.
|
|
@@ -183,7 +183,7 @@ Then loop back to the next decision or intent.
|
|
|
183
183
|
|
|
184
184
|
## Requirements
|
|
185
185
|
|
|
186
|
-
- Node.js >=
|
|
186
|
+
- Node.js >= 22
|
|
187
187
|
- Git (optional, used for repo root detection)
|
|
188
188
|
|
|
189
189
|
## Contributing
|
package/dist/copy-templates.d.ts
CHANGED
|
@@ -27,9 +27,12 @@ export declare function copyTemplates(basePath: string, language?: ScaffoldLangu
|
|
|
27
27
|
*
|
|
28
28
|
* SCAF-37: writes scaffold/LICENSE (verbatim Apache-2.0) to
|
|
29
29
|
* <basePath>/LICENSE only when the target is absent, so an existing
|
|
30
|
-
* downstream license is never overwritten. Not localized.
|
|
30
|
+
* downstream license is never overwritten. Not localized. Returns
|
|
31
|
+
* whether the root LICENSE now holds the bundled Apache-2.0 text —
|
|
32
|
+
* written by this run or already there — so the header format pinned
|
|
33
|
+
* in the licensing seed (SCAF-56) can name that license.
|
|
31
34
|
*/
|
|
32
|
-
export declare function copyRootLicense(basePath: string):
|
|
35
|
+
export declare function copyRootLicense(basePath: string): boolean;
|
|
33
36
|
export declare function getFrameworkSpecFiles(): readonly string[];
|
|
34
37
|
export declare function getSeedSpecFiles(): readonly string[];
|
|
35
38
|
export declare function getFileHistory(relPath: string): string[];
|
package/dist/copy-templates.js
CHANGED
|
@@ -93,17 +93,21 @@ export function copyTemplates(basePath, language = "en") {
|
|
|
93
93
|
*
|
|
94
94
|
* SCAF-37: writes scaffold/LICENSE (verbatim Apache-2.0) to
|
|
95
95
|
* <basePath>/LICENSE only when the target is absent, so an existing
|
|
96
|
-
* downstream license is never overwritten. Not localized.
|
|
96
|
+
* downstream license is never overwritten. Not localized. Returns
|
|
97
|
+
* whether the root LICENSE now holds the bundled Apache-2.0 text —
|
|
98
|
+
* written by this run or already there — so the header format pinned
|
|
99
|
+
* in the licensing seed (SCAF-56) can name that license.
|
|
97
100
|
*/
|
|
98
101
|
export function copyRootLicense(basePath) {
|
|
99
102
|
const source = join(getScaffoldDir(), "LICENSE");
|
|
100
103
|
const target = join(basePath, "LICENSE");
|
|
101
104
|
if (existsSync(target)) {
|
|
102
105
|
console.log(` LICENSE (already exists)`);
|
|
103
|
-
return;
|
|
106
|
+
return hashFile(target) === hashFile(source);
|
|
104
107
|
}
|
|
105
108
|
copyFileSync(source, target);
|
|
106
109
|
console.log(` LICENSE`);
|
|
110
|
+
return true;
|
|
107
111
|
}
|
|
108
112
|
// SCAF-13.
|
|
109
113
|
export function getFrameworkSpecFiles() {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const LICENSING_SEED_PATH = "specs/packages/licensing.md";
|
|
2
|
+
export interface PinHeaderFormatOptions {
|
|
3
|
+
/** Whether the target root `LICENSE` is the bundled Apache-2.0 text. */
|
|
4
|
+
apacheLicense: boolean;
|
|
5
|
+
/** Clock override for tests. */
|
|
6
|
+
now?: Date;
|
|
7
|
+
}
|
|
8
|
+
export interface PinnedHeaderFormat {
|
|
9
|
+
/** Placeholders left unresolved, in file order. */
|
|
10
|
+
unresolved: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Derive the project's copyright holder from the git identity the
|
|
14
|
+
* scaffold runs under: `user.name`, with ` <user.email>` appended when
|
|
15
|
+
* an email is configured. Undefined when no name is configured.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveCopyrightHolder(basePath: string): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Pin the project's own header format into the licensing seed just
|
|
20
|
+
* written: the current year, the git identity as the holder, and
|
|
21
|
+
* `Apache-2.0` when the root LICENSE is the bundled text. Whatever
|
|
22
|
+
* cannot be resolved keeps its placeholder and is reported.
|
|
23
|
+
*/
|
|
24
|
+
export declare function pinHeaderFormat(basePath: string, options: PinHeaderFormatOptions): PinnedHeaderFormat;
|
|
25
|
+
/** The stderr warning for each placeholder `pinHeaderFormat` left. */
|
|
26
|
+
export declare function warnUnresolvedHeaderFormat(unresolved: string[]): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
|
+
import { execFileSync } from "node:child_process";
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
export const LICENSING_SEED_PATH = "specs/packages/licensing.md";
|
|
7
|
+
/**
|
|
8
|
+
* The placeholders the bundled licensing seed carries in `licensing-9`.
|
|
9
|
+
* A placeholder the scaffold cannot resolve stays in the file, so an
|
|
10
|
+
* agent reading it sees an unresolved value rather than a holder
|
|
11
|
+
* copied from the template's own upstream SPDX line.
|
|
12
|
+
*/
|
|
13
|
+
const HOLDER_PLACEHOLDER = "<holder>";
|
|
14
|
+
const LICENSE_PLACEHOLDER = "<license>";
|
|
15
|
+
const YEAR_PLACEHOLDER = "<year>";
|
|
16
|
+
function readGitConfig(basePath, key) {
|
|
17
|
+
try {
|
|
18
|
+
const value = execFileSync("git", ["config", "--get", key], {
|
|
19
|
+
cwd: basePath,
|
|
20
|
+
encoding: "utf-8",
|
|
21
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
22
|
+
}).trim();
|
|
23
|
+
return value === "" ? undefined : value;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Derive the project's copyright holder from the git identity the
|
|
31
|
+
* scaffold runs under: `user.name`, with ` <user.email>` appended when
|
|
32
|
+
* an email is configured. Undefined when no name is configured.
|
|
33
|
+
*/
|
|
34
|
+
export function resolveCopyrightHolder(basePath) {
|
|
35
|
+
const name = readGitConfig(basePath, "user.name");
|
|
36
|
+
if (name === undefined)
|
|
37
|
+
return undefined;
|
|
38
|
+
const email = readGitConfig(basePath, "user.email");
|
|
39
|
+
return email === undefined ? name : `${name} <${email}>`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Pin the project's own header format into the licensing seed just
|
|
43
|
+
* written: the current year, the git identity as the holder, and
|
|
44
|
+
* `Apache-2.0` when the root LICENSE is the bundled text. Whatever
|
|
45
|
+
* cannot be resolved keeps its placeholder and is reported.
|
|
46
|
+
*/
|
|
47
|
+
export function pinHeaderFormat(basePath, options) {
|
|
48
|
+
const target = join(basePath, LICENSING_SEED_PATH);
|
|
49
|
+
if (!existsSync(target))
|
|
50
|
+
return { unresolved: [] };
|
|
51
|
+
const year = String((options.now ?? new Date()).getFullYear());
|
|
52
|
+
const holder = resolveCopyrightHolder(basePath);
|
|
53
|
+
const license = options.apacheLicense ? "Apache-2.0" : undefined;
|
|
54
|
+
let content = readFileSync(target, "utf-8").replaceAll(YEAR_PLACEHOLDER, year);
|
|
55
|
+
if (license !== undefined) {
|
|
56
|
+
content = content.replaceAll(LICENSE_PLACEHOLDER, license);
|
|
57
|
+
}
|
|
58
|
+
if (holder !== undefined) {
|
|
59
|
+
content = content.replaceAll(HOLDER_PLACEHOLDER, holder);
|
|
60
|
+
}
|
|
61
|
+
writeFileSync(target, content);
|
|
62
|
+
const unresolved = [];
|
|
63
|
+
if (license === undefined)
|
|
64
|
+
unresolved.push(LICENSE_PLACEHOLDER);
|
|
65
|
+
if (holder === undefined)
|
|
66
|
+
unresolved.push(HOLDER_PLACEHOLDER);
|
|
67
|
+
return { unresolved };
|
|
68
|
+
}
|
|
69
|
+
/** The stderr warning for each placeholder `pinHeaderFormat` left. */
|
|
70
|
+
export function warnUnresolvedHeaderFormat(unresolved) {
|
|
71
|
+
for (const placeholder of unresolved) {
|
|
72
|
+
const reason = placeholder === HOLDER_PLACEHOLDER
|
|
73
|
+
? "no git user.name is configured"
|
|
74
|
+
: "the root LICENSE is not the bundled Apache-2.0 text";
|
|
75
|
+
const value = placeholder === HOLDER_PLACEHOLDER
|
|
76
|
+
? "the project's copyright holder"
|
|
77
|
+
: "the project's SPDX license identifier";
|
|
78
|
+
console.warn(` warning: ${reason}, so licensing-9 in ${LICENSING_SEED_PATH} keeps its ${placeholder} placeholder; replace it with ${value}.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=pin-header-format.js.map
|
package/dist/scaffold.js
CHANGED
|
@@ -7,6 +7,7 @@ import { parseAgentNames, reconcileAgentSpecs, resolveAgentTargets, } from "./ap
|
|
|
7
7
|
import { getScaffoldDir, readBundledMarkdown } from "./bundled-scaffold.js";
|
|
8
8
|
import { canonicalContentHash, copyRootLicense, copyTemplates, formatSupportedLanguages, getFileHistory, SUPPORTED_LANGUAGES, isLegacyPristine, isPristine, isSupportedLanguage, overwriteFrameworkSpecFiles, refreshPristineSeeds, } from "./copy-templates.js";
|
|
9
9
|
import { createSpecsStructure } from "./create-specs-structure.js";
|
|
10
|
+
import { LICENSING_SEED_PATH, pinHeaderFormat, warnUnresolvedHeaderFormat, } from "./pin-header-format.js";
|
|
10
11
|
import { resolveBase } from "./resolve-base.js";
|
|
11
12
|
const AUTHORING_LANGUAGE_RE = /^Authoring language:\s*([A-Za-z0-9-]+)\s*$/m;
|
|
12
13
|
// SCAF-26 / SCAF-52: directories that mark a legacy spec generation.
|
|
@@ -310,9 +311,15 @@ export function scaffold(args = []) {
|
|
|
310
311
|
const language = resolveCreateLanguage(basePath, options.language);
|
|
311
312
|
assertNoLegacyLayout(basePath);
|
|
312
313
|
const agentTargets = resolveAgentTargets(basePath, options.agents);
|
|
314
|
+
// SCAF-56: only a licensing seed this run writes gets the project's
|
|
315
|
+
// header format pinned; an existing one is the project's own.
|
|
316
|
+
const licensingSeedExisted = existsSync(join(basePath, LICENSING_SEED_PATH));
|
|
313
317
|
createSpecsStructure(basePath);
|
|
314
318
|
copyTemplates(basePath, language);
|
|
315
|
-
copyRootLicense(basePath);
|
|
319
|
+
const apacheLicense = copyRootLicense(basePath);
|
|
320
|
+
if (!licensingSeedExisted) {
|
|
321
|
+
warnUnresolvedHeaderFormat(pinHeaderFormat(basePath, { apacheLicense }).unresolved);
|
|
322
|
+
}
|
|
316
323
|
reconcileAgentSpecs(basePath, agentTargets);
|
|
317
324
|
}
|
|
318
325
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sublang/spex",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "The essential spec layer AI agents need to build software reliably",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"test:integration": "node scripts/stage-scaffold.mjs && node scripts/run-tests.cjs \"\\.integration\\.test\\.js$\""
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=22"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/mdast": "^4.0.4",
|
|
42
|
-
"@types/node": "^
|
|
43
|
-
"typescript": "^
|
|
42
|
+
"@types/node": "^26.4.0",
|
|
43
|
+
"typescript": "^7.0.2"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"github-slugger": "^2.0.0",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"sha256-1d8a2507d30ef54b5d935a53b448ec74ea8a8556df5cae24e81dcfbd94f9b648",
|
|
12
12
|
"sha256-3c75823810863849ae302255d477749fc57e8e367a499240cde0dd47c479219a",
|
|
13
13
|
"sha256-b4feb754ffd405050d50efe9da527c9a81e7dec48f58a7ed29db3bd28617bbbb",
|
|
14
|
-
"sha256-78e528aee1d8f5b4946c53e119a81c7548df53bd09f8458152c2c2aaa386cd82"
|
|
14
|
+
"sha256-78e528aee1d8f5b4946c53e119a81c7548df53bd09f8458152c2c2aaa386cd82",
|
|
15
|
+
"sha256-174cb27f6637f1b6ea9b163bd5d9a7f4dfe8b4aa52e4bca889c2da8bdb6862f1"
|
|
15
16
|
],
|
|
16
17
|
"specs/decisions/000-spec-structure-format.md": [
|
|
17
18
|
"sha256-28d0705311a8ede97c487a944efe99bed20863e246da0aa1a33286dd4f8864ca",
|
|
@@ -34,23 +35,41 @@
|
|
|
34
35
|
"sha256-6a23f014ccbbe871e811f2ef9bd39119b50f0ce65a10bd75045d5735cf5b70b3",
|
|
35
36
|
"sha256-ca67a077cfaecb51a85e98ec8f8508ce9d8a43dcb7355b9e16de611c38cdabfc",
|
|
36
37
|
"sha256-ba58b39de3537f06fbe4f13c9b1443a8a64cf090c9ba202a67263dfc054b78c8",
|
|
37
|
-
"sha256-ed90e3e82e18d3893e52d18e80d795406bc9a0b5915416ee73295a4d7c7ff52a"
|
|
38
|
+
"sha256-ed90e3e82e18d3893e52d18e80d795406bc9a0b5915416ee73295a4d7c7ff52a",
|
|
39
|
+
"sha256-d7fb96010dbcdc89fcea56dc1c4cf6db6b6b56d261aedaa7f6ee36fb9dd3c7f5"
|
|
38
40
|
],
|
|
39
41
|
"specs/packages/git.md": [
|
|
40
42
|
"sha256-1b194304866d05580de8b2d0caa3454aa772e876fb3dee1f6c5d637c9e9a42b2",
|
|
41
43
|
"sha256-77625a315ac14eb6fd5f3c0697f121646ba8c0d976a98c3b51f27f3422cd1afb",
|
|
42
|
-
"sha256-648eb12f6dd2dd5b9c9cebc14708de1a6d2184b698dfeacce93102995878e14a"
|
|
44
|
+
"sha256-648eb12f6dd2dd5b9c9cebc14708de1a6d2184b698dfeacce93102995878e14a",
|
|
45
|
+
"sha256-f4bdc7cf1ea7be17575fb189abb9fa3cfbc9eeb8a7bccefbbffdbea3d4210608"
|
|
43
46
|
],
|
|
44
47
|
"specs/packages/licensing.md": [
|
|
45
48
|
"sha256-ff6ce317bf51fb2f4a20dde8790a79f2a1237f6b5835c74e619f6e3d1647ab50",
|
|
46
49
|
"sha256-f0690fbe5613097f3d0d1196fec5323a21a6b62bc3875068c38d09c74c5658c4",
|
|
47
50
|
"sha256-3ea1ba444666c05895c05d7f33056137b5dab8f6cdbdb80eb057a338fdf8eb4b",
|
|
48
|
-
"sha256-7a08e109f0314e9b3297d2d791b635afb183c0815775690690497a9ac720a95b"
|
|
51
|
+
"sha256-7a08e109f0314e9b3297d2d791b635afb183c0815775690690497a9ac720a95b",
|
|
52
|
+
"sha256-0fdea7c594fe52e33c78f30afd2edc3e53414a8ee666a1a4acdaf64ee05487b0",
|
|
53
|
+
"sha256-b059af6fb2ddc8ec81628bab0b14d0deb1974b6ec840d5b9cabdfeebcab0f077"
|
|
49
54
|
],
|
|
50
55
|
"specs/intents/000-spdx-headers.md": [
|
|
51
56
|
"sha256-a5ae7e8e31e4292a9364ba7947b2fbf27836e9f88dc80436557191550fe1bd34",
|
|
52
57
|
"sha256-f9914497c46f9bfa05d12dfa9190c2d53d20cffd1af3eb3e44f0f0a4b20830f2",
|
|
53
58
|
"sha256-4fac8c7fee1fec71297c50ee605f0417c3ae2b27e8aa37b03e409f08db976516",
|
|
54
|
-
"sha256-0bf92bee3c73d1f34da7039480d56b290e6e5a40a1314bc23a4be81507c80d3e"
|
|
59
|
+
"sha256-0bf92bee3c73d1f34da7039480d56b290e6e5a40a1314bc23a4be81507c80d3e",
|
|
60
|
+
"sha256-d2246bb72b8a1be75cf8dd293e80c51e5f5de6f810a8d1fbc71982a52d3fecc3"
|
|
61
|
+
],
|
|
62
|
+
"i18n/zh/specs/decisions/000-spec-structure-format.md": [
|
|
63
|
+
"sha256-061769e9a2a55ec6d1bcddd47c9aaacb0881a011106a34cb13fa78dc0bd099bf"
|
|
64
|
+
],
|
|
65
|
+
"i18n/zh/specs/intents/000-spdx-headers.md": [
|
|
66
|
+
"sha256-f661027e2af391b88458088534a57108ceaa8458bce7eb342702149c5b43c3a8"
|
|
67
|
+
],
|
|
68
|
+
"i18n/zh/specs/packages/git.md": [
|
|
69
|
+
"sha256-a22cc1cc543e0fa56cc42be4a96383b7866235d7b9bd1c27e2d4bb95e67b5667"
|
|
70
|
+
],
|
|
71
|
+
"i18n/zh/specs/packages/licensing.md": [
|
|
72
|
+
"sha256-b8219306bb5f6e33a548430c96301f0fa6b14bad36f3cb5ef72dc5338ea81aba",
|
|
73
|
+
"sha256-661cc3ffb6651021ca417eec0e6555315fdea4bcae7d880aa694772634c37bed"
|
|
55
74
|
]
|
|
56
75
|
}
|
package/scaffold/agent-specs.txt
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
- Whenever your changes involve any spec, or you make a decision worth recording, keep the specs in sync — don't let them drift.
|
|
7
7
|
- Resolve conflicts spec-first, then iterate freely: an intended change that conflicts with existing spec items is resolved in the specs — or dropped — before coding against it; implementing first to explore an approach is fine, and implementation lessons update this intent's specs, but no intent completes until its specs and code agree.
|
|
8
8
|
- Keep specs lawful per @specs/meta.md — the law itself, not this summary: complete and exact (meta-34), minimal (meta-23), one requirement per item (meta-29), cohesive packages for a shared intent (meta-13), sections per meta-30, relationships and test evidence only as inline citations (meta-14, meta-16, meta-20), integration/system tests only (meta-21, meta-32).
|
|
9
|
-
- Run `spex lint` to check structure, item IDs, and citations after editing specs; never add trace lines to satisfy an older checker.
|
|
9
|
+
- Run `npx @sublang/spex lint` (or `spex lint` where the CLI is installed) to check structure, item IDs, and citations after editing specs; never add trace lines to satisfy an older checker.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
|
+
<!-- AI agents: do not edit this file without human approval. -->
|
|
4
|
+
<!-- spex-i18n-source: specs/decisions/000-spec-structure-format.md sha256-4c32ec9e308762026c9ec184a03885f3cd58d1eb1ab97300d6c82600ae71de64 -->
|
|
5
|
+
|
|
6
|
+
# DR-000: 规约结构与格式
|
|
7
|
+
|
|
8
|
+
## 状态
|
|
9
|
+
|
|
10
|
+
已接受
|
|
11
|
+
|
|
12
|
+
## 背景
|
|
13
|
+
|
|
14
|
+
规约(specs)需要规范的格式与结构,以支持迭代开发以及 AI 与人类之间的协作。
|
|
15
|
+
AI 原生软件开发是一系列人类意图的实现过程。
|
|
16
|
+
|
|
17
|
+
## 决策
|
|
18
|
+
|
|
19
|
+
### 要素
|
|
20
|
+
|
|
21
|
+
Spex 围绕软件开发的三个基本要素组织规约:
|
|
22
|
+
|
|
23
|
+
- **决策**。在产品与系统的*设计*中作出的选择。
|
|
24
|
+
- **意图**。开发意图及其*实现*。
|
|
25
|
+
- **要求**。产品与系统所要求的*行为*。
|
|
26
|
+
|
|
27
|
+
### 形式
|
|
28
|
+
|
|
29
|
+
Spex 使用两种规约形式,以平衡规范化与灵活性。
|
|
30
|
+
|
|
31
|
+
- **记录**必须遵循指定格式,可在这些格式内使用自由形式的内容。
|
|
32
|
+
决策和意图以记录形式存储。
|
|
33
|
+
- 决策记录(DRs)遵循 ADR(架构决策记录)格式 [[1]]。
|
|
34
|
+
- 意图记录(IRs)规划某个意图的实现并跟踪其进展 [[meta-5](../meta.md#meta-5)]。
|
|
35
|
+
- **条目**必须遵循 GEARS 模式 [[2]] 来规定行为。
|
|
36
|
+
规约包汇集具有共同意图的规约条目。
|
|
37
|
+
|
|
38
|
+
### 组织方式
|
|
39
|
+
|
|
40
|
+
Spex 在仓库根目录下创建默认的 `specs/` 目录,其中包含以下子目录和文件。
|
|
41
|
+
|
|
42
|
+
| 路径 | 内容 | 文件命名 |
|
|
43
|
+
| --------- | ------- | ------ |
|
|
44
|
+
| `decisions/` | DRs。设计决策及其理由。 | \<NNN\>-\<kebab-case\>.md |
|
|
45
|
+
| `intents/` | IRs。意图实现计划与状态。 | \<NNN\>-\<kebab-case\>.md |
|
|
46
|
+
| `packages/` | 规约包:行为及其测试的集合。 | \<kebab-case\>.md |
|
|
47
|
+
| `map.md` | 用于导航的规约索引 | - |
|
|
48
|
+
| `meta.md` | 规约的规约 | - |
|
|
49
|
+
|
|
50
|
+
### 规约包
|
|
51
|
+
|
|
52
|
+
规约包是具有共同意图的行为集合,位于 `packages/` 下的单个文件中。
|
|
53
|
+
它是规约编写、复用、定制与组合的单位。
|
|
54
|
+
|
|
55
|
+
例如,用于生成短 URL 的规约包可以是 `specs/packages/signing/gen-url.md`,其中 `signing/` 是为方便开发而设置的相关规约包的本地集合。
|
|
56
|
+
|
|
57
|
+
每个规约包文件按以下顺序包含这些章节 [[meta-30](../meta.md#meta-30)]:
|
|
58
|
+
|
|
59
|
+
- `意图`:规约包条目共同的目的。
|
|
60
|
+
- `外部行为`:规约包使用者依赖的结果与保证。
|
|
61
|
+
规约包的使用者可以是人或系统组件。
|
|
62
|
+
- `内部行为`(可选):对规约包使用者隐藏的行为。
|
|
63
|
+
- `验证`:检查规约包自身声明的测试条目。
|
|
64
|
+
- `参考资料`(可选):外部来源。
|
|
65
|
+
|
|
66
|
+
已安装的规约包可通过在其文件中添加、修改或删除规约条目来就地定制;这仅改变已安装的副本,不会形成同级规约包关系。
|
|
67
|
+
|
|
68
|
+
### 规约包关系
|
|
69
|
+
|
|
70
|
+
规约包行为应通过对同级规约包外部行为的绑定引用,表达每个同级规约包关系 [[meta-14](../meta.md#meta-14)]:
|
|
71
|
+
|
|
72
|
+
| 情形 | 形式 |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| 固定绑定 | 规约包定义在被引行为使之具体化的确切短语处,将绑定固定到所要求的行为。 |
|
|
75
|
+
| 多态绑定 | 实例化在被引行为使之具体化的确切短语处,将绑定解析为所选行为。 |
|
|
76
|
+
| 组合 | 行为陈述一个整合后的结果,并在每个参与行为使之具体化的确切短语处引用该行为。 |
|
|
77
|
+
|
|
78
|
+
### 引用
|
|
79
|
+
|
|
80
|
+
DR 和条目长期保留,且可相互引用。
|
|
81
|
+
DR 引用规约条目仅用于支持 DR 自身的陈述,绝不用于承载其未陈述的内容。
|
|
82
|
+
|
|
83
|
+
IR 可引用 DR 和条目,但其他任何规约都不得引用 IR 或提及其名称。
|
|
84
|
+
`map.md` 索引 DR 和规约包,并随这些文件的变化保持同步。
|
|
85
|
+
|
|
86
|
+
## 影响
|
|
87
|
+
|
|
88
|
+
- 各开发周期采用一致的结构与格式
|
|
89
|
+
- 每个规约包一个文件:一次读取即可覆盖规约包的外部行为、内部行为和验证
|
|
90
|
+
- 一种规约包类型支持就地定制;一种绑定引用形式表达所有同级规约包关系
|
|
91
|
+
- 每个同级规约包关系都以引用形式显现在依赖它的短语处
|
|
92
|
+
- 去除引用后,规约包仍可独立成立
|
|
93
|
+
- 灵活表达外部行为、内部行为和组合行为
|
|
94
|
+
|
|
95
|
+
## 参考资料
|
|
96
|
+
|
|
97
|
+
[1]: https://github.com/npryce/adr-tools "ADR 工具"
|
|
98
|
+
[2]: https://sublang.ai/ref/gears-ai-ready-spec-syntax "GEARS:面向 AI 的规约语法"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
|
+
<!-- spex-i18n-source: specs/intents/000-spdx-headers.md sha256-d2246bb72b8a1be75cf8dd293e80c51e5f5de6f810a8d1fbc71982a52d3fecc3 -->
|
|
4
|
+
|
|
5
|
+
# IR-000: SPDX 头
|
|
6
|
+
|
|
7
|
+
## 状态
|
|
8
|
+
|
|
9
|
+
待处理
|
|
10
|
+
|
|
11
|
+
## 意图
|
|
12
|
+
|
|
13
|
+
将 [[licensing-1](../packages/licensing.md#licensing-1)]、[[licensing-2](../packages/licensing.md#licensing-2)]、[[licensing-5](../packages/licensing.md#licensing-5)] 应用于适用范围内的文件,使用项目自己的头部格式 [[licensing-9](../packages/licensing.md#licensing-9)]。
|
|
14
|
+
|
|
15
|
+
## 交付项
|
|
16
|
+
|
|
17
|
+
- [ ] [`packages/licensing.md`](../packages/licensing.md) 的 `licensing-9` 注明项目的许可证和版权持有人,不留任何 `<...>` 占位符
|
|
18
|
+
- [ ] 为适用范围内缺少 SPDX 头的文件添加这些头
|
|
19
|
+
|
|
20
|
+
## 任务
|
|
21
|
+
|
|
22
|
+
1. 确认头部格式:脚手架已根据项目的 `LICENSE` 和 `git config user.name` 固定 `licensing-9`;将其遗留的任何 `<license>` 或 `<holder>` 占位符替换为项目的 SPDX 许可证标识符和版权持有人。
|
|
23
|
+
|
|
24
|
+
2. 确定适用范围:依据 [[licensing-7](../packages/licensing.md#licensing-7)] 检测项目根目录的许可证文件;依据 [[licensing-6](../packages/licensing.md#licensing-6)] 枚举适用范围内的文件。
|
|
25
|
+
|
|
26
|
+
3. 按照 `licensing-9` 所示,使用文件原生的注释语法,在每个文件的第一个注释块(任何 shebang 之后)中插入 SPDX 行。
|
|
27
|
+
|
|
28
|
+
## 验证
|
|
29
|
+
|
|
30
|
+
- `licensing-9` 不含任何 `<...>` 占位符。
|
|
31
|
+
- [[licensing-3](../packages/licensing.md#licensing-3)]、[[licensing-4](../packages/licensing.md#licensing-4)] 在所有适用范围内的文件上通过验证。
|
|
@@ -1,63 +1,77 @@
|
|
|
1
1
|
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
2
|
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
3
|
<!-- AI agents: do not edit this file without human approval. -->
|
|
4
|
-
<!-- spex-i18n-source: meta.md sha256-
|
|
4
|
+
<!-- spex-i18n-source: meta.md sha256-d7fb96010dbcdc89fcea56dc1c4cf6db6b6b56d261aedaa7f6ee36fb9dd3c7f5 -->
|
|
5
5
|
|
|
6
6
|
# meta: 规约定义
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 意图
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
本文件依据 [DR-000](decisions/000-spec-structure-format.md) 定义规约(specs)的结构与组织方式。
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 总体
|
|
13
13
|
|
|
14
|
+
<!-- spex-i18n-source: meta-1 sha256-98f39e3ec8fdc7f1625f5114a862eaee529e56d9a2dfe2d8d5b90c7509d81461 -->
|
|
14
15
|
### meta-1
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
`specs/` 目录应包含以下子目录和文件:
|
|
17
18
|
|
|
18
|
-
|
|
|
19
|
+
| 路径 | 内容 | 文件命名 |
|
|
19
20
|
| --------- | ------- | ------ |
|
|
20
|
-
| `decisions/` |
|
|
21
|
-
| `intents/` |
|
|
22
|
-
| `packages/` |
|
|
23
|
-
| `map.md` |
|
|
24
|
-
| `meta.md` |
|
|
21
|
+
| `decisions/` | 决策记录(DRs) | \<NNN\>-\<kebab-case\>.md |
|
|
22
|
+
| `intents/` | 意图记录(IRs) | \<NNN\>-\<kebab-case\>.md |
|
|
23
|
+
| `packages/` | 规约包 | \<kebab-case\>.md |
|
|
24
|
+
| `map.md` | 规约索引——从此处开始查找上下文 | - |
|
|
25
|
+
| `meta.md` | 规约的规约 | - |
|
|
25
26
|
|
|
27
|
+
<!-- spex-i18n-source: meta-23 sha256-81630fea3117f135538a1f733caed7dab1dc908b08b7550039db26a87d74161c -->
|
|
26
28
|
### meta-23
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
任何形式的规约应以简洁的表达包含执行或审计该规约所需的最少信息,并优先使用项目符号列表、表格或(可渲染的)图示,而非段落式文字:
|
|
29
31
|
|
|
30
|
-
-
|
|
32
|
+
- 例如,`map.md` 的索引仅包含 AI 代理查找正确文件所需的内容。
|
|
31
33
|
|
|
34
|
+
<!-- spex-i18n-source: meta-25 sha256-5cc61079544bb13f32034b8d47ecf64ae4a34503d30156d735a91331fc536ce7 -->
|
|
32
35
|
### meta-25
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
规约文件应每行只写一句话——列表、表格和图示除外。
|
|
35
38
|
|
|
36
|
-
##
|
|
39
|
+
## 记录格式
|
|
37
40
|
|
|
38
41
|
<!-- spex-i18n-source: meta-4 sha256-9094707b5ede14d4e0c104c0ae6aaf0ce2ca1129723a472b329d68e3142e1c48 -->
|
|
39
42
|
### meta-4
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
每份 DR 应遵循 ADR 格式 [[2]],包含`状态`、`背景`、`决策`和`影响`章节,并在引用外部来源时包含`参考资料`章节 [[meta-19](#meta-19)]。
|
|
42
45
|
|
|
43
46
|
<!-- spex-i18n-source: meta-5 sha256-6847734892ace98018676f3430e0a848b0a83541b23f1b4f69aa9b12a1c0aeda -->
|
|
44
47
|
### meta-5
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
每份 IR 应包含`状态`、`意图`、`交付项`(带复选框)、`任务`(编号,每项工作量对应一次提交)和`验证`章节。
|
|
47
50
|
|
|
51
|
+
<!-- spex-i18n-source: meta-22 sha256-58c862ce93e422901613bdcbdb9a24c55af1b7eebe6155db95e872c85860a1ee -->
|
|
48
52
|
### meta-22
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
记录的 ID 应由其类型前缀与文件名开头的编号组成——`decisions/` 下为 `DR-<NNN>`,`intents/` 下为 `IR-<NNN>`——且该编号在每种记录类型内唯一。
|
|
51
55
|
|
|
56
|
+
<!-- spex-i18n-source: meta-24 sha256-48a3ecf9a8bcb8c1d4455aff9a912fd484e529ec15f88e156b2a5d471eebb11f -->
|
|
52
57
|
### meta-24
|
|
53
58
|
|
|
54
|
-
|
|
59
|
+
DR 应记录设计决策与约束,而非实现细节,且内容足以为相应规约条目提供上下文或用于审计这些条目。
|
|
55
60
|
|
|
61
|
+
<!-- spex-i18n-source: meta-35 sha256-306af9215c5a666cd2d28be58c00d92d7c62a2e556d06259902b4f014b17b345 -->
|
|
62
|
+
### meta-35
|
|
63
|
+
|
|
64
|
+
当针对已接受决策的实质性变更被接受,规约应在新的 DR 中记录该变更,保留先前的决策及其理由,并在两份记录的状态章节中相互链接,注明受影响的范围 [[meta-4](#meta-4)] [[meta-16](#meta-16)]:
|
|
65
|
+
|
|
66
|
+
- 完全替换:先前的 DR 被取代。
|
|
67
|
+
- 部分替换:先前的 DR 仍保持已接受状态,并附有注明范围的修订。
|
|
68
|
+
|
|
69
|
+
<!-- spex-i18n-source: meta-28 sha256-138df4b1fcfeb110a252ca26b5174f91513b1167603a322a13682cd4fa9b8a33 -->
|
|
56
70
|
### meta-28
|
|
57
71
|
|
|
58
|
-
|
|
72
|
+
IR 应可删除:它不包含任何应由 DR 或规约条目涵盖的内容,删除它不会丢失任何设计或行为记录。
|
|
59
73
|
|
|
60
|
-
##
|
|
74
|
+
## 条目语法
|
|
61
75
|
|
|
62
76
|
<!-- spex-i18n-source: meta-6 sha256-c6c53324be46702a10d6ca65a71842222518a1a2e32b8ccd334e361b70fbab75 -->
|
|
63
77
|
### meta-6
|
|
@@ -86,136 +100,154 @@ An IR shall be disposable: it contains nothing a DR or a spec item should cover,
|
|
|
86
100
|
| When | 当 |
|
|
87
101
|
| Then | 应 |
|
|
88
102
|
|
|
103
|
+
<!-- spex-i18n-source: meta-8 sha256-724b84c437f45fec7b3158b15b3656268bd0f5599af2f481ad1fc47eb527c873 -->
|
|
89
104
|
### meta-8
|
|
90
105
|
|
|
91
|
-
|
|
106
|
+
每个规约条目应自成一体:对其他条目的每一处依赖均以明确的引用表示 [[meta-16](#meta-16)]。
|
|
92
107
|
|
|
108
|
+
<!-- spex-i18n-source: meta-29 sha256-6b1b4e271a3a21ed2b817b6a133e1bec6827618259ea2d137960a3a69afb4de8 -->
|
|
93
109
|
### meta-29
|
|
94
110
|
|
|
95
|
-
|
|
111
|
+
每个规约条目应在一条 GEARS 语句 [[meta-6](#meta-6)] 中陈述一项要求,附加内容由该语句末尾的冒号引出,且只详述该项要求:
|
|
96
112
|
|
|
97
|
-
|
|
|
113
|
+
| 条目类型 | 附加内容示例 |
|
|
98
114
|
| --- | --- |
|
|
99
|
-
|
|
|
100
|
-
|
|
|
115
|
+
| 行为 | 一次操作或决策的有序步骤,或其各个情形与结果 |
|
|
116
|
+
| 测试 | 一个执行流程或一个明确的用例矩阵中的断言 |
|
|
101
117
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
118
|
+
- 附加内容可采用注释、列表、表格、(可渲染的)图示或示例等形式。
|
|
119
|
+
- 附加内容中的条件是情形标签。
|
|
120
|
+
- 不同的状态前置条件或触发条件表明需要额外的规约条目。
|
|
105
121
|
|
|
106
|
-
##
|
|
122
|
+
## 规约包
|
|
107
123
|
|
|
124
|
+
<!-- spex-i18n-source: meta-13 sha256-d9121e55ea381bd732db89dfbbc5b6ec903b5e2d58ab1be94ef91719c5003c92 -->
|
|
108
125
|
### meta-13
|
|
109
126
|
|
|
110
|
-
|
|
127
|
+
规约包应为一个共同的意图定义一个封闭的主体集合及这些主体的行为要求。
|
|
111
128
|
|
|
129
|
+
<!-- spex-i18n-source: meta-34 sha256-7b950bb56666ce51d75d1adee22102da76fb240cf9fc10f1720a3b2d71e948fc -->
|
|
112
130
|
### meta-34
|
|
113
131
|
|
|
114
|
-
|
|
132
|
+
规约包应完整且准确地涵盖其意图:内容足以重新实现其行为,不陈述超出该意图的要求,不在该意图范围内留下缺口,也不陈述其他规约已经陈述的任何要求。
|
|
115
133
|
|
|
134
|
+
<!-- spex-i18n-source: meta-9 sha256-7332a5da5509864275026467cdd42fdae994e872904b6a3047d0b7c66056792d -->
|
|
116
135
|
### meta-9
|
|
117
136
|
|
|
118
|
-
|
|
137
|
+
规约包应是位于 `specs/packages/` 或其子目录下、包含规约条目的单个文件。
|
|
119
138
|
|
|
120
139
|
<!-- spex-i18n-source: meta-30 sha256-0157482272767b0d31d355728e8b2df551310d4248d380ab886f71e6d0bfe93b -->
|
|
121
140
|
### meta-30
|
|
122
141
|
|
|
123
|
-
|
|
142
|
+
每个规约包文件应仅包含以下章节,并按此顺序排列:
|
|
124
143
|
|
|
125
|
-
|
|
|
144
|
+
| 章节 | 是否必需 | 内容 |
|
|
126
145
|
| ------- | -------- | ------- |
|
|
127
|
-
| `意图` |
|
|
128
|
-
| `外部行为` |
|
|
129
|
-
| `内部行为` |
|
|
130
|
-
| `验证` |
|
|
131
|
-
| `参考资料` |
|
|
146
|
+
| `意图` | 必需 | 规约包的目的 |
|
|
147
|
+
| `外部行为` | 必需 | 规约包使用者可依赖的结果与保证 |
|
|
148
|
+
| `内部行为` | 可选 | 对规约包使用者隐藏的行为 |
|
|
149
|
+
| `验证` | 必需 | 验证本规约包行为的测试条目 |
|
|
150
|
+
| `参考资料` | 可选 | 外部来源 [[meta-19](#meta-19)] |
|
|
132
151
|
|
|
133
|
-
-
|
|
134
|
-
-
|
|
152
|
+
- 规约包的使用者是使用其契约的任何人或系统组件;外部与内部均相对于该规约包而言。
|
|
153
|
+
- 主题子章节和条目标题位于行为章节与验证章节内部。
|
|
135
154
|
|
|
155
|
+
<!-- spex-i18n-source: meta-10 sha256-037882d4330f27da723e4bc9745111b6695408851582918ea2acf136bbf2cbea -->
|
|
136
156
|
### meta-10
|
|
137
157
|
|
|
138
|
-
|
|
158
|
+
包含规约条目的文件应使用在整个规约树中唯一的小写 kebab-case 基名 \<pack\>.md,并以 \<pack\> 作为其标识符。
|
|
139
159
|
|
|
160
|
+
<!-- spex-i18n-source: meta-11 sha256-7f570fb5a98c01c4ccb7b3cd48f8c370fe660d0ffaebc73333010f45e215ae8f -->
|
|
140
161
|
### meta-11
|
|
141
162
|
|
|
142
|
-
|
|
163
|
+
每个规约条目应使用 \<pack\>-\<N\> 作为其小写标题、锚点和引用文本:
|
|
143
164
|
|
|
144
|
-
- \<pack\>
|
|
145
|
-
- \<N\>
|
|
146
|
-
-
|
|
165
|
+
- \<pack\> 是其所在文件的标识符 [[meta-10](#meta-10)];
|
|
166
|
+
- \<N\> 是该文件内唯一的正整数;
|
|
167
|
+
- 新条目采用既未被分配、也未被公开发布保留的最小正整数 \<N\> [[meta-12](#meta-12)]。
|
|
147
168
|
|
|
169
|
+
<!-- spex-i18n-source: meta-12 sha256-ed082a7a193eefe08f9fa15669f23d2b5d4fd5cac90c2dc7e83f6903f52bb2ba -->
|
|
148
170
|
### meta-12
|
|
149
171
|
|
|
150
|
-
|
|
172
|
+
已公开发布的条目 ID 应永久绑定到其条目所指明的事项:
|
|
151
173
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
174
|
+
- 该 ID 永不重新编号或重新分配;
|
|
175
|
+
- 条目内容仅可在保留该事项的前提下演变;
|
|
176
|
+
- 尚未发布的 ID 可重新分配。
|
|
155
177
|
|
|
178
|
+
<!-- spex-i18n-source: meta-14 sha256-bec76a978583747ecf96f671a77e9e3a795ff4bdd69dfd72d51c98779d5d82a8 -->
|
|
156
179
|
### meta-14
|
|
157
180
|
|
|
158
|
-
|
|
181
|
+
行为条目应将每个同级规约包关系表达为绑定引用——在被引行为使之具体化的确切短语处,以行内方式引用该规约包的外部行为 [[meta-16](#meta-16)]:
|
|
159
182
|
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
183
|
+
- 绑定引用绑定的是行为,绝不只绑定规约包的主体或状态;
|
|
184
|
+
- 当多个行为分别使同一短语的不同部分具体化时,该短语可带有多个绑定引用;
|
|
185
|
+
- 不存在未被引用的同级规约包依赖。
|
|
163
186
|
|
|
187
|
+
<!-- spex-i18n-source: meta-15 sha256-2bf03e350e6014f7fe1d8623953c0e9923be83deb692411c2304c80cce52b70a -->
|
|
164
188
|
### meta-15
|
|
165
189
|
|
|
166
|
-
|
|
190
|
+
规约包应独立成立:无需打开任何链接即可完整理解——引用绝不承载规约包自身的含义。
|
|
167
191
|
|
|
192
|
+
<!-- spex-i18n-source: meta-31 sha256-22ec564553bdada3a94a3c2273dcc59b7946bf8c4311c5c245003adb17ea9fc8 -->
|
|
168
193
|
### meta-31
|
|
169
194
|
|
|
170
|
-
|
|
195
|
+
`specs/packages/` 下的小写 kebab-case 子目录应仅用于组织集合:文件的身份由其基名确定 [[meta-10](#meta-10)];在集合之间移动文件会改变相对引用路径,但不会改变任何条目 ID 或锚点。
|
|
171
196
|
|
|
172
|
-
##
|
|
197
|
+
## 测试
|
|
173
198
|
|
|
199
|
+
<!-- spex-i18n-source: meta-21 sha256-3fd36fda3683299fdba6129318987bc429027cde6bbae08485085fd596f9275e -->
|
|
174
200
|
### meta-21
|
|
175
201
|
|
|
176
|
-
|
|
202
|
+
规约测试条目应仅规定集成测试和系统测试:单元测试属于实现,任何规约条目都不规定单元测试。
|
|
177
203
|
|
|
204
|
+
<!-- spex-i18n-source: meta-32 sha256-28f1ce30821d263ee507cf71be045ab431a9d5fe449ea7ea194c2c8f15a683b9 -->
|
|
178
205
|
### meta-32
|
|
179
206
|
|
|
180
|
-
|
|
207
|
+
测试应优先执行其所验证行为绑定的真实行为 [[meta-14](#meta-14)],而非提供这些行为的替代物。
|
|
181
208
|
|
|
209
|
+
<!-- spex-i18n-source: meta-33 sha256-65a82bd4cca5750e8e7b8743c636b2fbd6dff7fe3447b0d04c30cbb70666069a -->
|
|
182
210
|
### meta-33
|
|
183
211
|
|
|
184
|
-
|
|
212
|
+
每个规约包的`验证`章节应以白盒或黑盒方式验证该规约包的每个行为。
|
|
185
213
|
|
|
186
|
-
##
|
|
214
|
+
## 引用
|
|
187
215
|
|
|
216
|
+
<!-- spex-i18n-source: meta-16 sha256-c3a9c2d5a690ea7408db2fbd0a9d1cfdbe7b14ee162cd8d414f3f734f3a86279 -->
|
|
188
217
|
### meta-16
|
|
189
218
|
|
|
190
|
-
|
|
219
|
+
对规约条目或 DR 的引用应是行内相对链接,并以被引 ID 作为链接文本:
|
|
191
220
|
|
|
192
|
-
|
|
|
221
|
+
| 引用对象 | 形式 |
|
|
193
222
|
| --- | --- |
|
|
194
|
-
|
|
|
195
|
-
| DR |
|
|
223
|
+
| 规约条目 | 链接至其标题锚点,外加一对方括号(例如 `[[meta-1](meta.md#meta-1)]`) |
|
|
224
|
+
| DR | 链接至其文件,不加外层方括号(例如 `[DR-000](decisions/000-spec-structure-format.md)`) |
|
|
196
225
|
|
|
226
|
+
<!-- spex-i18n-source: meta-18 sha256-c861847d755a25b07322a9a05bf66295d0477ff89fae684fe1a53d18a7774cdc -->
|
|
197
227
|
### meta-18
|
|
198
228
|
|
|
199
|
-
|
|
229
|
+
除某份 IR 本身外,任何规约均不得引用该 IR 或在正文中提及其名称。
|
|
200
230
|
|
|
231
|
+
<!-- spex-i18n-source: meta-19 sha256-b48c49bc3cdefa532ee254bd7af670a3762fd436aaf0ca9d49560f2f9159f664 -->
|
|
201
232
|
### meta-19
|
|
202
233
|
|
|
203
|
-
|
|
234
|
+
外部引用应通过编号标记(例如 `[[1]]`)引用权威来源(例如官方文档),该标记链接至文件参考资料章节中的具体 URL,且该章节不包含任何未被引用的条目。
|
|
204
235
|
|
|
236
|
+
<!-- spex-i18n-source: meta-20 sha256-e00eba313900b6fad6a87274765cad11a900465997e0f2cacfa9c904ca4587fe -->
|
|
205
237
|
### meta-20
|
|
206
238
|
|
|
207
|
-
|
|
239
|
+
测试条目应在用于验证的断言处,以行内引用标识它所验证的每个行为,且行为引用仅限于其自身规约包。
|
|
208
240
|
|
|
209
|
-
##
|
|
241
|
+
## 编写语言
|
|
210
242
|
|
|
211
243
|
<!-- spex-i18n-source: meta-27 sha256-b19f392d742d307fb0f811892dbb65509b36dc3a9636512604c636b7b0aa5c29 -->
|
|
212
244
|
### meta-27
|
|
213
245
|
|
|
214
|
-
|
|
246
|
+
给定规约树通过本条目的机器可读标记行声明编写语言——该行采用精确格式 `Authoring language: <code>`,其中 `<code>` 仅由 ASCII 字母、数字和连字符组成——为该项目新增的规约内容应使用该语言编写:
|
|
215
247
|
|
|
216
248
|
Authoring language: zh
|
|
217
249
|
|
|
218
|
-
##
|
|
250
|
+
## 参考资料
|
|
219
251
|
|
|
220
252
|
[1]: https://sublang.ai/zh/ref/gears-ai-ready-spec-syntax "GEARS:面向 AI 的规约语法(中文)"
|
|
221
|
-
[2]: https://github.com/npryce/adr-tools "ADR
|
|
253
|
+
[2]: https://github.com/npryce/adr-tools "ADR 工具"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
|
+
<!-- spex-i18n-source: specs/packages/git.md sha256-f4bdc7cf1ea7be17575fb189abb9fa3cfbc9eeb8a7bccefbbffdbea3d4210608 -->
|
|
4
|
+
|
|
5
|
+
# git: Git 工作流程
|
|
6
|
+
|
|
7
|
+
## 意图
|
|
8
|
+
|
|
9
|
+
本规约包使贡献者和维护者能够创建可审计的项目提交,并采用一致的提交信息和 AI 署名。
|
|
10
|
+
它负责提交准备和提交信息约定,不负责分支、审阅或发布策略。
|
|
11
|
+
它仅适用于当前项目。
|
|
12
|
+
|
|
13
|
+
## 外部行为
|
|
14
|
+
|
|
15
|
+
### git-1
|
|
16
|
+
|
|
17
|
+
当贡献者或维护者要求提交工作流程准备一次提交,提交准备过程应报告已配置的 `user.name` 和 `user.email`,或指出每个缺失的值,并在两者均配置前不创建任何提交。
|
|
18
|
+
|
|
19
|
+
### git-2
|
|
20
|
+
|
|
21
|
+
当编写提交信息的主题行,提交信息应采用 `<type>(<scope>)<!>: <subject>` 格式,其中 `<scope>` 可选,破坏性变更包含 `!`,`<type>` 为 `feat|fix|docs|style|refactor|test|ci|build|perf|chore` 中的一种,`<subject>` 使用祈使语气、长度 <=50 字符且不以句点结尾。
|
|
22
|
+
|
|
23
|
+
### git-3
|
|
24
|
+
|
|
25
|
+
给定提交信息包含正文,当编写正文,提交信息正文应解释改了什么以及为什么修改,而非如何修改,以 72 字符为换行上限,并在使用项目符号列表更清晰时采用该形式。
|
|
26
|
+
|
|
27
|
+
### git-4
|
|
28
|
+
|
|
29
|
+
当 AI 协助编码或编写内容,提交信息应在 Git 识别的末尾连续尾注块中包含一个或多个 `Co-authored-by` 尾注,尾注之间无空行,且每个尾注采用 `<model> (<role>) <email>` 格式,其中 `<role>` 为 `coder|reviewer|maintainer` 中的一种,`<email>` 为 `cligent@sublang.ai`:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Co-authored-by: GPT-6 Sol (coder) <cligent@sublang.ai>
|
|
33
|
+
Co-authored-by: Claude Opus 5.5 (reviewer) <cligent@sublang.ai>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### git-5
|
|
37
|
+
|
|
38
|
+
给定提交实现了已记录的意图,提交信息应在主题行或正文中以 `IR-<N>` 形式的纯 ID 引用意图记录。
|
|
39
|
+
|
|
40
|
+
## 验证
|
|
41
|
+
|
|
42
|
+
### git-6
|
|
43
|
+
|
|
44
|
+
当审计已准备的提交,审计应断言该提交遵循本规约包的约定:
|
|
45
|
+
|
|
46
|
+
- 提交记录已配置的 `user.name` 和 `user.email` [[git-1](#git-1)];
|
|
47
|
+
- 主题行遵循 `<type>(<scope>)<!>: <subject>` 格式 [[git-2](#git-2)];
|
|
48
|
+
- 正文如存在,应解释改了什么以及为什么修改,并以 72 字符为换行上限 [[git-3](#git-3)];
|
|
49
|
+
- AI 协助完成的提交所要求的一个或多个 `Co-authored-by` 尾注出现在 Git 解析出的尾注块中,并采用规定格式 [[git-4](#git-4)];
|
|
50
|
+
- 实现已记录意图的提交引用该意图记录的 ID [[git-5](#git-5)]。
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
|
+
<!-- spex-i18n-source: specs/packages/licensing.md sha256-b059af6fb2ddc8ec81628bab0b14d0deb1974b6ec840d5b9cabdfeebcab0f077 -->
|
|
4
|
+
|
|
5
|
+
# licensing: 许可证头
|
|
6
|
+
|
|
7
|
+
## 意图
|
|
8
|
+
|
|
9
|
+
本规约包使贡献者和审阅者能够通过一致的 SPDX 头识别项目中纳入文件的版权和许可证。
|
|
10
|
+
它负责头部的适用范围和内容,不负责项目许可证的选择。
|
|
11
|
+
它仅适用于当前项目。
|
|
12
|
+
|
|
13
|
+
## 外部行为
|
|
14
|
+
|
|
15
|
+
### licensing-6
|
|
16
|
+
|
|
17
|
+
当对项目文件进行许可证头分类,许可证头适用范围应恰好排除以下类别:
|
|
18
|
+
|
|
19
|
+
- 不支持注释语法的文件,例如 JSON 和二进制文件;
|
|
20
|
+
- 配置文件,例如 `.gitignore`、`.editorconfig`、`**/settings.json`、`AGENTS.md`、`.github/workflows/ci.yml`,以及锁文件;
|
|
21
|
+
- 生成内容或第三方供应内容,例如 `dist/`、`node_modules/` 和第三方供应目录;以及
|
|
22
|
+
- 许可证和法律文档。
|
|
23
|
+
|
|
24
|
+
### licensing-7
|
|
25
|
+
|
|
26
|
+
当检查项目根目录以确定其许可证,许可证文件检测器应识别以下模式:
|
|
27
|
+
|
|
28
|
+
- `LICENSE`、`LICENSE.txt`、`LICENSE.md`、`COPYING`
|
|
29
|
+
- `LICENSE-CONTENT`、`LICENSE-APACHE` 等(带名称的变体)
|
|
30
|
+
- `LICENCE`、`LICENCE.txt`(英式拼写)
|
|
31
|
+
- `LICENSES/` 文件夹(REUSE 约定)
|
|
32
|
+
|
|
33
|
+
### licensing-1
|
|
34
|
+
|
|
35
|
+
给定文件支持注释语法且未被许可证头适用范围排除 [[licensing-6](#licensing-6)],如果文件已由 Git 跟踪或可通过 `git add` 添加,当准备将文件纳入仓库,文件应在任何 shebang 之后的第一个注释块中包含 `SPDX-FileCopyrightText`。
|
|
36
|
+
|
|
37
|
+
### licensing-2
|
|
38
|
+
|
|
39
|
+
给定文件支持注释语法、未被许可证头适用范围排除 [[licensing-6](#licensing-6)],且一个或多个项目根目录许可证文件匹配许可证文件检测器的模式 [[licensing-7](#licensing-7)],如果文件已由 Git 跟踪或可通过 `git add` 添加,当准备将文件纳入仓库,文件应在任何 shebang 之后的第一个注释块中包含 `SPDX-License-Identifier`。
|
|
40
|
+
|
|
41
|
+
### licensing-5
|
|
42
|
+
|
|
43
|
+
给定文件的第一个注释块已包含来自上游的 `SPDX-FileCopyrightText` 或 `SPDX-License-Identifier`(例如从其他项目复制的模板或第三方供应文件),当准备将文件纳入仓库,这些已有 SPDX 行应原样保留,即使项目根目录采用不同的许可证——每条保留的上游行分别满足相应的版权头要求 [[licensing-1](#licensing-1)] 或许可证头要求 [[licensing-2](#licensing-2)],任何缺失的必需行均由上游来源补齐,而非采用项目许可证。
|
|
44
|
+
|
|
45
|
+
### licensing-9
|
|
46
|
+
|
|
47
|
+
给定文件不含上游 SPDX 行 [[licensing-5](#licensing-5)],当为版权头要求 [[licensing-1](#licensing-1)] 和许可证头要求 [[licensing-2](#licensing-2)] 编写其 SPDX 行,这些行应使用文件原生的注释语法注明项目自己的许可证和版权持有人:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
<!-- SPDX-License-Identifier: <license> -->
|
|
51
|
+
<!-- SPDX-FileCopyrightText: <year> <holder> -->
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// SPDX-License-Identifier: <license>
|
|
56
|
+
// SPDX-FileCopyrightText: <year> <holder>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- 版权持有人为 `<holder>`,许可证为 `<license>`;年份为文件首次纳入项目的年份。
|
|
60
|
+
- 仍以 `<...>` 占位符形式呈现的值尚未解析:应将其替换为项目自己的值,绝不使用从模板文件复制的持有人。
|
|
61
|
+
|
|
62
|
+
## 验证
|
|
63
|
+
|
|
64
|
+
### licensing-3
|
|
65
|
+
|
|
66
|
+
给定文件支持注释语法且属于许可证头适用范围 [[licensing-6](#licensing-6)],如果文件已由 Git 跟踪或可通过 `git add` 添加,当检查任何 shebang 之后的第一个注释块,验证应通过找到 `SPDX-FileCopyrightText` 来断言版权头要求 [[licensing-1](#licensing-1)]。
|
|
67
|
+
|
|
68
|
+
### licensing-4
|
|
69
|
+
|
|
70
|
+
给定文件支持注释语法、属于许可证头适用范围 [[licensing-6](#licensing-6)],且许可证文件检测器 [[licensing-7](#licensing-7)] 识别出项目根目录的许可证,如果文件已由 Git 跟踪或可通过 `git add` 添加,当检查任何 shebang 之后的第一个注释块,验证应通过找到 `SPDX-License-Identifier` 来断言许可证头要求 [[licensing-2](#licensing-2)]。
|
|
71
|
+
|
|
72
|
+
### licensing-8
|
|
73
|
+
|
|
74
|
+
给定文件已包含上游 SPDX 行且项目许可证不同,当运行纳入准备流程,验证应断言每条上游行均逐字节保留,且任何缺失的必需行均采用上游数据而非项目许可证数据 [[licensing-5](#licensing-5)]。
|
|
75
|
+
|
|
76
|
+
### licensing-10
|
|
77
|
+
|
|
78
|
+
给定项目自编文件需要两种 SPDX 头且不含上游 SPDX 行,当运行仓库纳入准备流程,集成验证应断言这些文件在任何 shebang 之后的第一个注释块使用各文件原生的注释语法,注明项目自己的许可证和版权持有人,采用文件首次纳入项目的年份,且不含未解析的许可证或持有人占位符 [[licensing-9](#licensing-9)]。
|
|
@@ -9,31 +9,22 @@ Pending
|
|
|
9
9
|
|
|
10
10
|
## Intent
|
|
11
11
|
|
|
12
|
-
Apply [[licensing-1](../packages/licensing.md#licensing-1)], [[licensing-2](../packages/licensing.md#licensing-2)], [[licensing-5](../packages/licensing.md#licensing-5)] to in-scope files
|
|
12
|
+
Apply [[licensing-1](../packages/licensing.md#licensing-1)], [[licensing-2](../packages/licensing.md#licensing-2)], [[licensing-5](../packages/licensing.md#licensing-5)] to in-scope files, using the project's own header format [[licensing-9](../packages/licensing.md#licensing-9)].
|
|
13
13
|
|
|
14
14
|
## Deliverables
|
|
15
15
|
|
|
16
|
+
- [ ] `licensing-9` of [`packages/licensing.md`](../packages/licensing.md) names the project's license and copyright holder, with no `<...>` placeholder left
|
|
16
17
|
- [ ] Add SPDX headers to in-scope files missing them
|
|
17
|
-
- [ ] Add `licensing-9` to the External Behavior of [`packages/licensing.md`](../packages/licensing.md) with the project's actual header format, license, and copyright
|
|
18
18
|
|
|
19
19
|
## Tasks
|
|
20
20
|
|
|
21
|
-
1.
|
|
21
|
+
1. Confirm the header format: the scaffold pinned `licensing-9` from the project's `LICENSE` and `git config user.name`; replace any `<license>` or `<holder>` placeholder it left with the project's SPDX license identifier and copyright holder.
|
|
22
22
|
|
|
23
|
-
2.
|
|
23
|
+
2. Resolve scope: detect a project-root license file per [[licensing-7](../packages/licensing.md#licensing-7)]; enumerate in-scope files per [[licensing-6](../packages/licensing.md#licensing-6)].
|
|
24
24
|
|
|
25
|
-
3.
|
|
26
|
-
|
|
27
|
-
```markdown
|
|
28
|
-
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
29
|
-
<!-- SPDX-FileCopyrightText: <year> <holder> -->
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
34
|
-
// SPDX-FileCopyrightText: <year> <holder>
|
|
35
|
-
```
|
|
25
|
+
3. Insert SPDX lines in each file's first comment block (after any shebang), in the file's native comment syntax as `licensing-9` shows.
|
|
36
26
|
|
|
37
27
|
## Verification
|
|
38
28
|
|
|
29
|
+
- `licensing-9` carries no `<...>` placeholder.
|
|
39
30
|
- [[licensing-3](../packages/licensing.md#licensing-3)], [[licensing-4](../packages/licensing.md#licensing-4)] pass on all in-scope files.
|
package/scaffold/specs/meta.md
CHANGED
|
@@ -50,6 +50,13 @@ A record's ID shall join its kind prefix to its filename's leading number — `D
|
|
|
50
50
|
|
|
51
51
|
A DR shall record design decisions and constraints, not implementation details, sufficient to provide context for or to audit the corresponding spec items.
|
|
52
52
|
|
|
53
|
+
### meta-35
|
|
54
|
+
|
|
55
|
+
When a substantive change to an accepted decision is accepted, the specs shall record it in a new DR, preserving the earlier decision and rationale and linking both records' status sections with the affected scope [[meta-4](#meta-4)] [[meta-16](#meta-16)]:
|
|
56
|
+
|
|
57
|
+
- Whole replacement: the earlier DR is superseded.
|
|
58
|
+
- Partial replacement: the earlier DR remains accepted with a scoped amendment.
|
|
59
|
+
|
|
53
60
|
### meta-28
|
|
54
61
|
|
|
55
62
|
An IR shall be disposable: it contains nothing a DR or a spec item should cover, and its deletion loses no design or behavior record.
|
|
@@ -25,9 +25,12 @@ Where a commit message includes a body, when writing the body, the commit body s
|
|
|
25
25
|
|
|
26
26
|
### git-4
|
|
27
27
|
|
|
28
|
-
When AI assists in coding or authoring, the commit message shall include
|
|
28
|
+
When AI assists in coding or authoring, the commit message shall include one or more `Co-authored-by` trailers in the final contiguous trailer block recognized by Git, with no blank lines between trailers and each trailer using the format `<model> (<role>) <email>`, where `<role>` is one of `coder|reviewer|maintainer` and `<email>` is `cligent@sublang.ai`:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
```text
|
|
31
|
+
Co-authored-by: GPT-6 Sol (coder) <cligent@sublang.ai>
|
|
32
|
+
Co-authored-by: Claude Opus 5.5 (reviewer) <cligent@sublang.ai>
|
|
33
|
+
```
|
|
31
34
|
|
|
32
35
|
### git-5
|
|
33
36
|
|
|
@@ -42,5 +45,5 @@ When a prepared commit is audited, the audit shall assert the commit follows thi
|
|
|
42
45
|
- the commit records the configured `user.name` and `user.email` [[git-1](#git-1)];
|
|
43
46
|
- the subject line follows the `<type>(<scope>)<!>: <subject>` format [[git-2](#git-2)];
|
|
44
47
|
- any body explains what and why, wrapped at 72 chars [[git-3](#git-3)];
|
|
45
|
-
- an AI-assisted commit
|
|
48
|
+
- an AI-assisted commit's required `Co-authored-by` trailer or trailers appear in Git's parsed trailer block and use the prescribed format [[git-4](#git-4)];
|
|
46
49
|
- a commit realizing a recorded intent references the intent record's ID [[git-5](#git-5)].
|
|
@@ -41,6 +41,23 @@ Where the file has comment syntax, is not excluded by the licensing scope [[lice
|
|
|
41
41
|
|
|
42
42
|
Where a file's first comment block already contains `SPDX-FileCopyrightText` or `SPDX-License-Identifier` from an upstream source (e.g., a template or vendored file copied from another project), when preparing the file for inclusion in the repo, those existing SPDX lines shall be preserved unmodified, even when the project root carries a different license — each preserved upstream line satisfying its respective copyright-header requirement [[licensing-1](#licensing-1)] or license-header requirement [[licensing-2](#licensing-2)], with any missing required line supplied from upstream, not the project license.
|
|
43
43
|
|
|
44
|
+
### licensing-9
|
|
45
|
+
|
|
46
|
+
Where a file carries no upstream SPDX lines [[licensing-5](#licensing-5)], when its SPDX lines are written for the copyright-header requirement [[licensing-1](#licensing-1)] and the license-header requirement [[licensing-2](#licensing-2)], they shall name the project's own license and copyright holder in the file's native comment syntax:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
<!-- SPDX-License-Identifier: <license> -->
|
|
50
|
+
<!-- SPDX-FileCopyrightText: <year> <holder> -->
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// SPDX-License-Identifier: <license>
|
|
55
|
+
// SPDX-FileCopyrightText: <year> <holder>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- The copyright holder is `<holder>` and the license `<license>`; the year is that of the file's first inclusion.
|
|
59
|
+
- A value still reading as a `<...>` placeholder is unresolved: it is replaced with the project's own, never with a holder copied from a template file.
|
|
60
|
+
|
|
44
61
|
## Verification
|
|
45
62
|
|
|
46
63
|
### licensing-3
|
|
@@ -54,3 +71,7 @@ Where the file has comment syntax, is included by the licensing scope [[licensin
|
|
|
54
71
|
### licensing-8
|
|
55
72
|
|
|
56
73
|
Where a file already contains upstream SPDX lines and the project license differs, when inclusion preparation runs, the verification shall assert byte-for-byte preservation of every upstream line and use of upstream rather than project license data for any missing required line [[licensing-5](#licensing-5)].
|
|
74
|
+
|
|
75
|
+
### licensing-10
|
|
76
|
+
|
|
77
|
+
Where project-authored files require both SPDX headers and carry no upstream SPDX lines, when repository inclusion preparation runs, integration verification shall assert that their first comment block after any shebang uses each file's native comment syntax, names the project's license and copyright holder, uses the year of first inclusion, and contains no unresolved license or holder placeholders [[licensing-9](#licensing-9)].
|