@mpfrontend/ai-skills 0.1.0 → 1.0.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/dist/index.d.ts +1 -48
- package/dist/index.js +2 -220
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +3 -0
- package/dist/internal.js.map +1 -0
- package/dist/skills.d.ts +47 -0
- package/dist/skills.js +221 -0
- package/dist/skills.js.map +1 -0
- package/package.json +5 -1
- package/skills/mpfrontend-apply-access/SKILL.md +3 -2
- package/skills/mpfrontend-implement-feature/SKILL.md +1 -1
- package/skills/mpfrontend-import-design-system/SKILL.md +1 -1
- package/skills/mpfrontend-integrate-auth/SKILL.md +1 -1
- package/skills/mpfrontend-integrate-openapi/SKILL.md +1 -1
- package/skills/mpfrontend-integrate-realtime/SKILL.md +1 -1
- package/skills/mpfrontend-prepare-release/SKILL.md +4 -3
- package/skills/mpfrontend-reconcile-design-components/SKILL.md +1 -1
- package/skills/mpfrontend-review-design-drift/SKILL.md +1 -1
- package/skills/mpfrontend-scaffold-app/SKILL.md +1 -1
- package/skills/mpfrontend-sync-design-tokens/SKILL.md +1 -1
- package/skills/mpfrontend-upgrade-project/SKILL.md +4 -2
- package/skills/mpfrontend-verify-frontend/SKILL.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1 @@
|
|
|
1
|
-
export declare const SKILLS_VERSION
|
|
2
|
-
export declare class SkillsError extends Error {
|
|
3
|
-
readonly exitCode: number;
|
|
4
|
-
constructor(message: string, exitCode?: number);
|
|
5
|
-
}
|
|
6
|
-
export declare function skillCatalog(): {
|
|
7
|
-
version: string;
|
|
8
|
-
cliVersion: string;
|
|
9
|
-
skills: {
|
|
10
|
-
reason?: string;
|
|
11
|
-
name: string;
|
|
12
|
-
profile: string;
|
|
13
|
-
available: boolean;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
type Options = {
|
|
17
|
-
directory: string;
|
|
18
|
-
profile?: 'base' | 'design';
|
|
19
|
-
agent?: 'codex' | 'claude' | 'both';
|
|
20
|
-
dryRun?: boolean;
|
|
21
|
-
update?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare function installSkills(options: Options): Promise<{
|
|
24
|
-
ok: boolean;
|
|
25
|
-
version: string;
|
|
26
|
-
profile: "base" | "design";
|
|
27
|
-
agents: ("codex" | "claude")[];
|
|
28
|
-
dryRun: boolean;
|
|
29
|
-
changes: {
|
|
30
|
-
path: string;
|
|
31
|
-
beforeHash: string | null;
|
|
32
|
-
afterHash: string;
|
|
33
|
-
}[];
|
|
34
|
-
installed: string[];
|
|
35
|
-
unavailable: {
|
|
36
|
-
reason?: string;
|
|
37
|
-
name: string;
|
|
38
|
-
profile: string;
|
|
39
|
-
available: boolean;
|
|
40
|
-
}[];
|
|
41
|
-
}>;
|
|
42
|
-
export declare function checkSkills(directory: string): Promise<{
|
|
43
|
-
ok: boolean;
|
|
44
|
-
version: string;
|
|
45
|
-
checked: number;
|
|
46
|
-
agents: ("codex" | "claude")[];
|
|
47
|
-
}>;
|
|
48
|
-
export {};
|
|
1
|
+
export declare const SKILLS_VERSION: string, SKILLS_CLI_VERSION: string;
|
package/dist/index.js
CHANGED
|
@@ -1,221 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
-
export const SKILLS_VERSION = '0.1.0', SKILLS_CLI_VERSION = '0.1.0';
|
|
5
|
-
const names = ['scaffold-app', 'implement-feature', 'integrate-openapi', 'form-from-api', 'table-from-api',
|
|
6
|
-
'integrate-auth', 'apply-access', 'use-ui', 'configure-i18n', 'configure-theme', 'integrate-realtime',
|
|
7
|
-
'verify-frontend', 'upgrade-project', 'prepare-release', 'import-design-system', 'sync-design-tokens',
|
|
8
|
-
'reconcile-design-components', 'review-design-drift'];
|
|
9
|
-
const available = new Set(names);
|
|
10
|
-
const hash = (text) => createHash('sha256').update(text).digest('hex');
|
|
11
|
-
export class SkillsError extends Error {
|
|
12
|
-
exitCode;
|
|
13
|
-
constructor(message, exitCode = 4) {
|
|
14
|
-
super(message);
|
|
15
|
-
this.exitCode = exitCode;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export function skillCatalog() {
|
|
19
|
-
return { version: SKILLS_VERSION, cliVersion: SKILLS_CLI_VERSION, skills: names.map((name, index) => ({
|
|
20
|
-
name: 'mpfrontend-' + name, profile: index < 14 ? 'base' : 'design', available: available.has(name),
|
|
21
|
-
...(available.has(name) ? {} : { reason: 'CAPABILITY_AND_BEHAVIORAL_ACCEPTANCE_PENDING' })
|
|
22
|
-
})) };
|
|
23
|
-
}
|
|
24
|
-
const lockPath = '.mpfrontend/skills-lock.json';
|
|
25
|
-
const mutexPath = '.mpfrontend/skills-install.lock';
|
|
26
|
-
async function content(root, path) {
|
|
27
|
-
let current = root;
|
|
28
|
-
for (const part of path.split('/')) {
|
|
29
|
-
current = join(current, part);
|
|
30
|
-
try {
|
|
31
|
-
const info = await lstat(current);
|
|
32
|
-
if (info.isSymbolicLink())
|
|
33
|
-
throw new SkillsError('SKILL_PATH_SYMLINK');
|
|
34
|
-
if (current !== join(root, path) && !info.isDirectory())
|
|
35
|
-
throw new SkillsError('SKILL_PARENT_NOT_DIRECTORY');
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
if (error.code === 'ENOENT')
|
|
39
|
-
return undefined;
|
|
40
|
-
throw error;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
return await readFile(current, 'utf8');
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
if (error.code === 'ENOENT')
|
|
48
|
-
return undefined;
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function parseLock(bytes) {
|
|
53
|
-
if (bytes === undefined)
|
|
54
|
-
return undefined;
|
|
55
|
-
try {
|
|
56
|
-
const value = JSON.parse(bytes);
|
|
57
|
-
if (value.generator !== 'MPFrontendSkills' || value.schemaVersion !== 1 || typeof value.version !== 'string' || typeof value.cliVersion !== 'string' || !['base', 'design'].includes(value.profile) || !Array.isArray(value.agents) || !value.agents.length || value.agents.length > 2 || new Set(value.agents).size !== value.agents.length || value.agents.some(v => !['codex', 'claude'].includes(v)) || !value.files || typeof value.files !== 'object' || Array.isArray(value.files))
|
|
58
|
-
throw new Error();
|
|
59
|
-
for (const [path, digest] of Object.entries(value.files))
|
|
60
|
-
if (!/^\.(?:agents|claude)\/skills\/mpfrontend-[a-z0-9-]+\/SKILL\.md$/.test(path) || !/^([a-f0-9]{64})$/.test(digest))
|
|
61
|
-
throw new Error();
|
|
62
|
-
return value;
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
throw new SkillsError('INVALID_SKILLS_LOCK');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* The `mpfrontend-` prefix is reserved for the catalog. A consumer's own project and domain skills live
|
|
70
|
-
* beside the installed ones under another prefix; the installer never reads, changes or removes them.
|
|
71
|
-
*/
|
|
72
|
-
async function refuseReservedNames(root) {
|
|
73
|
-
const catalog = new Set(names.map(name => 'mpfrontend-' + name));
|
|
74
|
-
for (const base of ['.agents/skills', '.claude/skills']) {
|
|
75
|
-
const parent = join(root, base);
|
|
76
|
-
try {
|
|
77
|
-
if (!(await lstat(parent)).isDirectory())
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
if (error.code === 'ENOENT')
|
|
82
|
-
continue;
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
for (const entry of await readdir(parent))
|
|
86
|
-
if (entry.startsWith('mpfrontend-') && !catalog.has(entry))
|
|
87
|
-
throw new SkillsError('RESERVED_SKILL_NAME:' + base + '/' + entry, 3);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
export async function installSkills(options) {
|
|
91
|
-
const profile = options.profile ?? 'base', agent = options.agent ?? 'both';
|
|
92
|
-
if (!['base', 'design'].includes(profile) || !['codex', 'claude', 'both'].includes(agent))
|
|
93
|
-
throw new SkillsError('INVALID_SKILL_PROFILE_OR_AGENT', 2);
|
|
94
|
-
const root = await realpath(resolve(options.directory)), previousLock = await content(root, lockPath), lock = parseLock(previousLock);
|
|
95
|
-
if (await content(root, mutexPath) !== undefined)
|
|
96
|
-
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
97
|
-
if (options.update && !lock)
|
|
98
|
-
throw new SkillsError('SKILLS_NOT_INSTALLED', 2);
|
|
99
|
-
// Updates preserve the installed selection unless the caller explicitly changes it.
|
|
100
|
-
const selectedProfile = options.profile ?? lock?.profile ?? profile;
|
|
101
|
-
const agents = options.agent ? (agent === 'both' ? ['codex', 'claude'] : [agent]) : lock?.agents ?? ['codex', 'claude'];
|
|
102
|
-
const catalog = skillCatalog(), selected = catalog.skills.filter(s => selectedProfile === 'design' || s.profile === 'base');
|
|
103
|
-
const desired = new Map(), before = new Map();
|
|
104
|
-
const files = { ...lock?.files };
|
|
105
|
-
for (const skill of selected.filter(s => s.available)) {
|
|
106
|
-
const source = await readFile(new URL('../skills/' + skill.name + '/SKILL.md', import.meta.url), 'utf8');
|
|
107
|
-
for (const target of agents) {
|
|
108
|
-
const path = (target === 'codex' ? '.agents' : '.claude') + '/skills/' + skill.name + '/SKILL.md';
|
|
109
|
-
const old = await content(root, path);
|
|
110
|
-
if (old !== undefined && (!lock?.files[path] || hash(old) !== lock.files[path]))
|
|
111
|
-
throw new SkillsError('MODIFIED_OR_UNOWNED_SKILL:' + path);
|
|
112
|
-
before.set(path, old);
|
|
113
|
-
files[path] = hash(source);
|
|
114
|
-
if (old !== source)
|
|
115
|
-
desired.set(path, source);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
await refuseReservedNames(root);
|
|
119
|
-
const next = { generator: 'MPFrontendSkills', schemaVersion: 1, version: SKILLS_VERSION, cliVersion: SKILLS_CLI_VERSION, profile: selectedProfile, agents, files };
|
|
120
|
-
const encoded = JSON.stringify(next, null, 2) + '\n';
|
|
121
|
-
before.set(lockPath, previousLock);
|
|
122
|
-
if (previousLock !== encoded)
|
|
123
|
-
desired.set(lockPath, encoded);
|
|
124
|
-
const changes = [...desired].map(([path, text]) => ({ path, beforeHash: before.get(path) === undefined ? null : hash(before.get(path)), afterHash: hash(text) }));
|
|
125
|
-
if (!options.dryRun) {
|
|
126
|
-
const staged = new Map(), replaced = [];
|
|
127
|
-
const owner = randomUUID();
|
|
128
|
-
let acquired = false;
|
|
129
|
-
try {
|
|
130
|
-
await mkdir(join(root, '.mpfrontend'), { recursive: true });
|
|
131
|
-
await content(root, mutexPath);
|
|
132
|
-
try {
|
|
133
|
-
await writeFile(join(root, mutexPath), owner, { flag: 'wx' });
|
|
134
|
-
acquired = true;
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
if (error.code === 'EEXIST')
|
|
138
|
-
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
139
|
-
throw error;
|
|
140
|
-
}
|
|
141
|
-
for (const [path, text] of desired) {
|
|
142
|
-
if (await content(root, path) !== before.get(path))
|
|
143
|
-
throw new SkillsError('CONCURRENT_SKILL_EDIT:' + path);
|
|
144
|
-
await mkdir(dirname(join(root, path)), { recursive: true });
|
|
145
|
-
const stage = join(dirname(join(root, path)), '.mpfrontend-' + randomUUID());
|
|
146
|
-
await writeFile(stage, text, { flag: 'wx' });
|
|
147
|
-
staged.set(path, stage);
|
|
148
|
-
}
|
|
149
|
-
// Lock is written last. No AGENTS.md, CLAUDE.md or unrelated skill is altered.
|
|
150
|
-
for (const [path, stage] of staged) {
|
|
151
|
-
const current = await content(root, path);
|
|
152
|
-
if (current !== before.get(path))
|
|
153
|
-
throw new SkillsError('CONCURRENT_SKILL_EDIT:' + path);
|
|
154
|
-
await rename(stage, join(root, path));
|
|
155
|
-
staged.delete(path);
|
|
156
|
-
replaced.push(path);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
catch (error) {
|
|
160
|
-
const conflicts = [];
|
|
161
|
-
for (const path of replaced.reverse()) {
|
|
162
|
-
// A second agent's edit is never overwritten by rollback, even on a failed install.
|
|
163
|
-
if (await content(root, path) !== desired.get(path)) {
|
|
164
|
-
conflicts.push(path);
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
const old = before.get(path);
|
|
168
|
-
if (old === undefined)
|
|
169
|
-
await unlink(join(root, path));
|
|
170
|
-
else
|
|
171
|
-
await writeFile(join(root, path), old);
|
|
172
|
-
}
|
|
173
|
-
if (conflicts.length)
|
|
174
|
-
throw new SkillsError('SKILL_ROLLBACK_CONFLICT:' + conflicts.join(','));
|
|
175
|
-
throw error;
|
|
176
|
-
}
|
|
177
|
-
finally {
|
|
178
|
-
for (const path of staged.values())
|
|
179
|
-
await unlink(path).catch(() => undefined);
|
|
180
|
-
if (acquired && await content(root, mutexPath) === owner)
|
|
181
|
-
await unlink(join(root, mutexPath));
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return { ok: true, version: SKILLS_VERSION, profile: selectedProfile, agents, dryRun: options.dryRun ?? false, changes,
|
|
185
|
-
installed: selected.filter(s => s.available).map(s => s.name), unavailable: selected.filter(s => !s.available) };
|
|
186
|
-
}
|
|
187
|
-
export async function checkSkills(directory) {
|
|
188
|
-
const root = await realpath(resolve(directory));
|
|
189
|
-
if (await content(root, mutexPath) !== undefined)
|
|
190
|
-
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
191
|
-
const lock = parseLock(await content(root, lockPath));
|
|
192
|
-
if (!lock)
|
|
193
|
-
throw new SkillsError('SKILLS_NOT_INSTALLED', 2);
|
|
194
|
-
if (lock.version !== SKILLS_VERSION || lock.cliVersion !== SKILLS_CLI_VERSION)
|
|
195
|
-
throw new SkillsError('SKILLS_VERSION_MISMATCH', 3);
|
|
196
|
-
await refuseReservedNames(root);
|
|
197
|
-
const catalog = skillCatalog();
|
|
198
|
-
let checked = 0;
|
|
199
|
-
for (const skill of catalog.skills.filter(s => s.available && (lock.profile === 'design' || s.profile === 'base')))
|
|
200
|
-
for (const agent of lock.agents) {
|
|
201
|
-
const path = (agent === 'codex' ? '.agents' : '.claude') + '/skills/' + skill.name + '/SKILL.md';
|
|
202
|
-
if (!lock.files[path])
|
|
203
|
-
throw new SkillsError('INCOMPLETE_SKILLS_LOCK:' + path, 3);
|
|
204
|
-
}
|
|
205
|
-
for (const [path, digest] of Object.entries(lock.files)) {
|
|
206
|
-
const old = await content(root, path);
|
|
207
|
-
if (old === undefined || hash(old) !== digest)
|
|
208
|
-
throw new SkillsError('INSTALLED_SKILL_DRIFT:' + path, 3);
|
|
209
|
-
const name = path.split('/')[2], skill = catalog.skills.find(s => s.name === name);
|
|
210
|
-
if (!skill?.available)
|
|
211
|
-
throw new SkillsError('UNAVAILABLE_INSTALLED_SKILL:' + name, 3);
|
|
212
|
-
const source = await readFile(new URL('../skills/' + name + '/SKILL.md', import.meta.url), 'utf8');
|
|
213
|
-
if (hash(source) !== digest)
|
|
214
|
-
throw new SkillsError('SKILLS_SOURCE_DRIFT:' + name, 3);
|
|
215
|
-
checked++;
|
|
216
|
-
}
|
|
217
|
-
if (!checked)
|
|
218
|
-
throw new SkillsError('EMPTY_SKILLS_LOCK', 3);
|
|
219
|
-
return { ok: true, version: SKILLS_VERSION, checked, agents: lock.agents };
|
|
220
|
-
}
|
|
1
|
+
// The cohort version that the procedures require. The installer and the catalog are for the cohort's own CLI.
|
|
2
|
+
export const SKILLS_VERSION = '1.0.0', SKILLS_CLI_VERSION = '1.0.0';
|
|
221
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,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MAAM,CAAC,KAAG,MAAM;YAAC,MAAM,IAAI,WAAW,CAAC,sBAAsB,GAAC,IAAI,EAAC,CAAC,CAAC,CAAC;QAAA,OAAO,EAAE,CAAC;IAC1F,CAAC;IACD,IAAG,CAAC,OAAO;QAAC,MAAM,IAAI,WAAW,CAAC,mBAAmB,EAAC,CAAC,CAAC,CAAC;IACzD,OAAO,EAAC,EAAE,EAAC,IAAI,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,CAAC,MAAM,EAAC,CAAC;AACrE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,CAAC,MAAM,cAAc,GAAQ,OAAO,EAAC,kBAAkB,GAAQ,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { checkSkills, installSkills, skillCatalog, SkillsError } from './skills.js';
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAC,WAAW,EAAC,aAAa,EAAC,YAAY,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC"}
|
package/dist/skills.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare class SkillsError extends Error {
|
|
2
|
+
readonly exitCode: number;
|
|
3
|
+
constructor(message: string, exitCode?: number);
|
|
4
|
+
}
|
|
5
|
+
export declare function skillCatalog(): {
|
|
6
|
+
version: string;
|
|
7
|
+
cliVersion: string;
|
|
8
|
+
skills: {
|
|
9
|
+
reason?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
profile: string;
|
|
12
|
+
available: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
type Options = {
|
|
16
|
+
directory: string;
|
|
17
|
+
profile?: 'base' | 'design';
|
|
18
|
+
agent?: 'codex' | 'claude' | 'both';
|
|
19
|
+
dryRun?: boolean;
|
|
20
|
+
update?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function installSkills(options: Options): Promise<{
|
|
23
|
+
ok: boolean;
|
|
24
|
+
version: string;
|
|
25
|
+
profile: "base" | "design";
|
|
26
|
+
agents: ("codex" | "claude")[];
|
|
27
|
+
dryRun: boolean;
|
|
28
|
+
changes: {
|
|
29
|
+
path: string;
|
|
30
|
+
beforeHash: string | null;
|
|
31
|
+
afterHash: string;
|
|
32
|
+
}[];
|
|
33
|
+
installed: string[];
|
|
34
|
+
unavailable: {
|
|
35
|
+
reason?: string;
|
|
36
|
+
name: string;
|
|
37
|
+
profile: string;
|
|
38
|
+
available: boolean;
|
|
39
|
+
}[];
|
|
40
|
+
}>;
|
|
41
|
+
export declare function checkSkills(directory: string): Promise<{
|
|
42
|
+
ok: boolean;
|
|
43
|
+
version: string;
|
|
44
|
+
checked: number;
|
|
45
|
+
agents: ("codex" | "claude")[];
|
|
46
|
+
}>;
|
|
47
|
+
export {};
|
package/dist/skills.js
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { readFile, lstat, realpath, mkdir, writeFile, rename, unlink, readdir } from 'node:fs/promises';
|
|
2
|
+
import { resolve, join, dirname } from 'node:path';
|
|
3
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
+
import { SKILLS_VERSION, SKILLS_CLI_VERSION } from './index.js';
|
|
5
|
+
const names = ['scaffold-app', 'implement-feature', 'integrate-openapi', 'form-from-api', 'table-from-api',
|
|
6
|
+
'integrate-auth', 'apply-access', 'use-ui', 'configure-i18n', 'configure-theme', 'integrate-realtime',
|
|
7
|
+
'verify-frontend', 'upgrade-project', 'prepare-release', 'import-design-system', 'sync-design-tokens',
|
|
8
|
+
'reconcile-design-components', 'review-design-drift'];
|
|
9
|
+
const available = new Set(names);
|
|
10
|
+
const hash = (text) => createHash('sha256').update(text).digest('hex');
|
|
11
|
+
export class SkillsError extends Error {
|
|
12
|
+
exitCode;
|
|
13
|
+
constructor(message, exitCode = 4) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.exitCode = exitCode;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function skillCatalog() {
|
|
19
|
+
return { version: SKILLS_VERSION, cliVersion: SKILLS_CLI_VERSION, skills: names.map((name, index) => ({
|
|
20
|
+
name: 'mpfrontend-' + name, profile: index < 14 ? 'base' : 'design', available: available.has(name),
|
|
21
|
+
...(available.has(name) ? {} : { reason: 'CAPABILITY_AND_BEHAVIORAL_ACCEPTANCE_PENDING' })
|
|
22
|
+
})) };
|
|
23
|
+
}
|
|
24
|
+
const lockPath = '.mpfrontend/skills-lock.json';
|
|
25
|
+
const mutexPath = '.mpfrontend/skills-install.lock';
|
|
26
|
+
async function content(root, path) {
|
|
27
|
+
let current = root;
|
|
28
|
+
for (const part of path.split('/')) {
|
|
29
|
+
current = join(current, part);
|
|
30
|
+
try {
|
|
31
|
+
const info = await lstat(current);
|
|
32
|
+
if (info.isSymbolicLink())
|
|
33
|
+
throw new SkillsError('SKILL_PATH_SYMLINK');
|
|
34
|
+
if (current !== join(root, path) && !info.isDirectory())
|
|
35
|
+
throw new SkillsError('SKILL_PARENT_NOT_DIRECTORY');
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error.code === 'ENOENT')
|
|
39
|
+
return undefined;
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
return await readFile(current, 'utf8');
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (error.code === 'ENOENT')
|
|
48
|
+
return undefined;
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function parseLock(bytes) {
|
|
53
|
+
if (bytes === undefined)
|
|
54
|
+
return undefined;
|
|
55
|
+
try {
|
|
56
|
+
const value = JSON.parse(bytes);
|
|
57
|
+
if (value.generator !== 'MPFrontendSkills' || value.schemaVersion !== 1 || typeof value.version !== 'string' || typeof value.cliVersion !== 'string' || !['base', 'design'].includes(value.profile) || !Array.isArray(value.agents) || !value.agents.length || value.agents.length > 2 || new Set(value.agents).size !== value.agents.length || value.agents.some(v => !['codex', 'claude'].includes(v)) || !value.files || typeof value.files !== 'object' || Array.isArray(value.files))
|
|
58
|
+
throw new Error();
|
|
59
|
+
for (const [path, digest] of Object.entries(value.files))
|
|
60
|
+
if (!/^\.(?:agents|claude)\/skills\/mpfrontend-[a-z0-9-]+\/SKILL\.md$/.test(path) || !/^([a-f0-9]{64})$/.test(digest))
|
|
61
|
+
throw new Error();
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
throw new SkillsError('INVALID_SKILLS_LOCK');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The `mpfrontend-` prefix is reserved for the catalog. A consumer's own project and domain skills live
|
|
70
|
+
* beside the installed ones under another prefix; the installer never reads, changes or removes them.
|
|
71
|
+
*/
|
|
72
|
+
async function refuseReservedNames(root) {
|
|
73
|
+
const catalog = new Set(names.map(name => 'mpfrontend-' + name));
|
|
74
|
+
for (const base of ['.agents/skills', '.claude/skills']) {
|
|
75
|
+
const parent = join(root, base);
|
|
76
|
+
try {
|
|
77
|
+
if (!(await lstat(parent)).isDirectory())
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
if (error.code === 'ENOENT')
|
|
82
|
+
continue;
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
for (const entry of await readdir(parent))
|
|
86
|
+
if (entry.startsWith('mpfrontend-') && !catalog.has(entry))
|
|
87
|
+
throw new SkillsError('RESERVED_SKILL_NAME:' + base + '/' + entry, 3);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export async function installSkills(options) {
|
|
91
|
+
const profile = options.profile ?? 'base', agent = options.agent ?? 'both';
|
|
92
|
+
if (!['base', 'design'].includes(profile) || !['codex', 'claude', 'both'].includes(agent))
|
|
93
|
+
throw new SkillsError('INVALID_SKILL_PROFILE_OR_AGENT', 2);
|
|
94
|
+
const root = await realpath(resolve(options.directory)), previousLock = await content(root, lockPath), lock = parseLock(previousLock);
|
|
95
|
+
if (await content(root, mutexPath) !== undefined)
|
|
96
|
+
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
97
|
+
if (options.update && !lock)
|
|
98
|
+
throw new SkillsError('SKILLS_NOT_INSTALLED', 2);
|
|
99
|
+
// Updates preserve the installed selection unless the caller explicitly changes it.
|
|
100
|
+
const selectedProfile = options.profile ?? lock?.profile ?? profile;
|
|
101
|
+
const agents = options.agent ? (agent === 'both' ? ['codex', 'claude'] : [agent]) : lock?.agents ?? ['codex', 'claude'];
|
|
102
|
+
const catalog = skillCatalog(), selected = catalog.skills.filter(s => selectedProfile === 'design' || s.profile === 'base');
|
|
103
|
+
const desired = new Map(), before = new Map();
|
|
104
|
+
const files = { ...lock?.files };
|
|
105
|
+
for (const skill of selected.filter(s => s.available)) {
|
|
106
|
+
const source = await readFile(new URL('../skills/' + skill.name + '/SKILL.md', import.meta.url), 'utf8');
|
|
107
|
+
for (const target of agents) {
|
|
108
|
+
const path = (target === 'codex' ? '.agents' : '.claude') + '/skills/' + skill.name + '/SKILL.md';
|
|
109
|
+
const old = await content(root, path);
|
|
110
|
+
if (old !== undefined && (!lock?.files[path] || hash(old) !== lock.files[path]))
|
|
111
|
+
throw new SkillsError('MODIFIED_OR_UNOWNED_SKILL:' + path);
|
|
112
|
+
before.set(path, old);
|
|
113
|
+
files[path] = hash(source);
|
|
114
|
+
if (old !== source)
|
|
115
|
+
desired.set(path, source);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
await refuseReservedNames(root);
|
|
119
|
+
const next = { generator: 'MPFrontendSkills', schemaVersion: 1, version: SKILLS_VERSION, cliVersion: SKILLS_CLI_VERSION, profile: selectedProfile, agents, files };
|
|
120
|
+
const encoded = JSON.stringify(next, null, 2) + '\n';
|
|
121
|
+
before.set(lockPath, previousLock);
|
|
122
|
+
if (previousLock !== encoded)
|
|
123
|
+
desired.set(lockPath, encoded);
|
|
124
|
+
const changes = [...desired].map(([path, text]) => ({ path, beforeHash: before.get(path) === undefined ? null : hash(before.get(path)), afterHash: hash(text) }));
|
|
125
|
+
if (!options.dryRun) {
|
|
126
|
+
const staged = new Map(), replaced = [];
|
|
127
|
+
const owner = randomUUID();
|
|
128
|
+
let acquired = false;
|
|
129
|
+
try {
|
|
130
|
+
await mkdir(join(root, '.mpfrontend'), { recursive: true });
|
|
131
|
+
await content(root, mutexPath);
|
|
132
|
+
try {
|
|
133
|
+
await writeFile(join(root, mutexPath), owner, { flag: 'wx' });
|
|
134
|
+
acquired = true;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (error.code === 'EEXIST')
|
|
138
|
+
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
for (const [path, text] of desired) {
|
|
142
|
+
if (await content(root, path) !== before.get(path))
|
|
143
|
+
throw new SkillsError('CONCURRENT_SKILL_EDIT:' + path);
|
|
144
|
+
await mkdir(dirname(join(root, path)), { recursive: true });
|
|
145
|
+
const stage = join(dirname(join(root, path)), '.mpfrontend-' + randomUUID());
|
|
146
|
+
await writeFile(stage, text, { flag: 'wx' });
|
|
147
|
+
staged.set(path, stage);
|
|
148
|
+
}
|
|
149
|
+
// Lock is written last. No AGENTS.md, CLAUDE.md or unrelated skill is altered.
|
|
150
|
+
for (const [path, stage] of staged) {
|
|
151
|
+
const current = await content(root, path);
|
|
152
|
+
if (current !== before.get(path))
|
|
153
|
+
throw new SkillsError('CONCURRENT_SKILL_EDIT:' + path);
|
|
154
|
+
await rename(stage, join(root, path));
|
|
155
|
+
staged.delete(path);
|
|
156
|
+
replaced.push(path);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
const conflicts = [];
|
|
161
|
+
for (const path of replaced.reverse()) {
|
|
162
|
+
// A second agent's edit is never overwritten by rollback, even on a failed install.
|
|
163
|
+
if (await content(root, path) !== desired.get(path)) {
|
|
164
|
+
conflicts.push(path);
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const old = before.get(path);
|
|
168
|
+
if (old === undefined)
|
|
169
|
+
await unlink(join(root, path));
|
|
170
|
+
else
|
|
171
|
+
await writeFile(join(root, path), old);
|
|
172
|
+
}
|
|
173
|
+
if (conflicts.length)
|
|
174
|
+
throw new SkillsError('SKILL_ROLLBACK_CONFLICT:' + conflicts.join(','));
|
|
175
|
+
throw error;
|
|
176
|
+
}
|
|
177
|
+
finally {
|
|
178
|
+
for (const path of staged.values())
|
|
179
|
+
await unlink(path).catch(() => undefined);
|
|
180
|
+
if (acquired && await content(root, mutexPath) === owner)
|
|
181
|
+
await unlink(join(root, mutexPath));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return { ok: true, version: SKILLS_VERSION, profile: selectedProfile, agents, dryRun: options.dryRun ?? false, changes,
|
|
185
|
+
installed: selected.filter(s => s.available).map(s => s.name), unavailable: selected.filter(s => !s.available) };
|
|
186
|
+
}
|
|
187
|
+
export async function checkSkills(directory) {
|
|
188
|
+
const root = await realpath(resolve(directory));
|
|
189
|
+
if (await content(root, mutexPath) !== undefined)
|
|
190
|
+
throw new SkillsError('SKILLS_INSTALL_BUSY');
|
|
191
|
+
const lock = parseLock(await content(root, lockPath));
|
|
192
|
+
if (!lock)
|
|
193
|
+
throw new SkillsError('SKILLS_NOT_INSTALLED', 2);
|
|
194
|
+
if (lock.version !== SKILLS_VERSION || lock.cliVersion !== SKILLS_CLI_VERSION)
|
|
195
|
+
throw new SkillsError('SKILLS_VERSION_MISMATCH', 3);
|
|
196
|
+
await refuseReservedNames(root);
|
|
197
|
+
const catalog = skillCatalog();
|
|
198
|
+
let checked = 0;
|
|
199
|
+
for (const skill of catalog.skills.filter(s => s.available && (lock.profile === 'design' || s.profile === 'base')))
|
|
200
|
+
for (const agent of lock.agents) {
|
|
201
|
+
const path = (agent === 'codex' ? '.agents' : '.claude') + '/skills/' + skill.name + '/SKILL.md';
|
|
202
|
+
if (!lock.files[path])
|
|
203
|
+
throw new SkillsError('INCOMPLETE_SKILLS_LOCK:' + path, 3);
|
|
204
|
+
}
|
|
205
|
+
for (const [path, digest] of Object.entries(lock.files)) {
|
|
206
|
+
const old = await content(root, path);
|
|
207
|
+
if (old === undefined || hash(old) !== digest)
|
|
208
|
+
throw new SkillsError('INSTALLED_SKILL_DRIFT:' + path, 3);
|
|
209
|
+
const name = path.split('/')[2], skill = catalog.skills.find(s => s.name === name);
|
|
210
|
+
if (!skill?.available)
|
|
211
|
+
throw new SkillsError('UNAVAILABLE_INSTALLED_SKILL:' + name, 3);
|
|
212
|
+
const source = await readFile(new URL('../skills/' + name + '/SKILL.md', import.meta.url), 'utf8');
|
|
213
|
+
if (hash(source) !== digest)
|
|
214
|
+
throw new SkillsError('SKILLS_SOURCE_DRIFT:' + name, 3);
|
|
215
|
+
checked++;
|
|
216
|
+
}
|
|
217
|
+
if (!checked)
|
|
218
|
+
throw new SkillsError('EMPTY_SKILLS_LOCK', 3);
|
|
219
|
+
return { ok: true, version: SKILLS_VERSION, checked, agents: lock.agents };
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,UAAU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AAC,MAAM,IAAI,WAAW,CAAC,mBAAmB,EAAC,CAAC,CAAC,CAAC;IACzD,OAAO,EAAC,EAAE,EAAC,IAAI,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,CAAC,MAAM,EAAC,CAAC;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpfrontend/ai-skills",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./internal": {
|
|
19
|
+
"types": "./dist/internal.d.ts",
|
|
20
|
+
"import": "./dist/internal.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"files": [
|
|
@@ -5,7 +5,7 @@ description: Apply an approved capability and field/action visibility matrix to
|
|
|
5
5
|
|
|
6
6
|
# Apply approved access decisions
|
|
7
7
|
|
|
8
|
-
Requires the reviewed MP Frontend CLI `
|
|
8
|
+
Requires the reviewed MP Frontend CLI `1.0.0` cohort, `@mpfrontend/access-core` and
|
|
9
9
|
`@mpfrontend/access-react`. Read the approved capability catalog, persona/tenant matrix and consumer
|
|
10
10
|
instructions. Do not create roles, resources, permissions or grants and do not infer authority from a sample
|
|
11
11
|
identity.
|
|
@@ -24,7 +24,8 @@ snapshot in a server component with `createAccessLoader` of `@mpfrontend/access-
|
|
|
24
24
|
endpoint through the BFF, the request's context reference, `manifestKeys`, an explicit `timeoutMs`) and pass
|
|
25
25
|
`clientSnapshot(result, pageKeys(manifest, page))` to an `AccessProvider`. Present with `AccessGuard`,
|
|
26
26
|
`AccessLink`, `useCapability`, `useFieldState`, `useNavigation` and the `access` property of `ResourceTable` and
|
|
27
|
-
`ResourceForm
|
|
27
|
+
`ResourceForm`; a `ResourceForm` with `access` also needs `original`, the values the person started from (an empty
|
|
28
|
+
object for a new record), which its type requires. Denied is hidden by default; use a guard's `fallback` or `whenDenied="disabled"` only where the
|
|
28
29
|
approved UX says so, never by guessing.
|
|
29
30
|
|
|
30
31
|
Wrap protected asynchronous reads in `AuthorityFence`: inside a provider, capture with `useAccessCapture()` before
|
|
@@ -5,7 +5,7 @@ description: Implement one approved MP Frontend feature slice across an existing
|
|
|
5
5
|
|
|
6
6
|
# Implement an approved feature slice
|
|
7
7
|
|
|
8
|
-
Requires the reviewed MP Frontend CLI `
|
|
8
|
+
Requires the reviewed MP Frontend CLI `1.0.0` cohort. Read repository instructions, the approved
|
|
9
9
|
story and acceptance criteria before editing. Stop when the API contract, permission, tenant rule,
|
|
10
10
|
business transition or DLS behavior is absent or contradictory; never invent it to complete a screen.
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ description: Import a supplied normalized local DLS export as an immutable MP Fr
|
|
|
5
5
|
|
|
6
6
|
# Import a declared design export
|
|
7
7
|
|
|
8
|
-
Requires MP Frontend CLI
|
|
8
|
+
Requires MP Frontend CLI 1.0.0 or the reviewed compatible cohort. Read the consumer instructions,
|
|
9
9
|
installed CLI `DESIGN-SYNC.md`, approved source and its distribution limits. Check the actual
|
|
10
10
|
`mpfrontend --version`. The CLI consumes a finite normalized export; it does not capture Figma.
|
|
11
11
|
Prefer supplied local evidence. If another authorized read connector is available, follow that
|
|
@@ -5,7 +5,7 @@ description: Integrate an existing consumer with the MP Frontend server-side OID
|
|
|
5
5
|
|
|
6
6
|
# Integrate server-side authentication
|
|
7
7
|
|
|
8
|
-
Requires the reviewed MP Frontend CLI `
|
|
8
|
+
Requires the reviewed MP Frontend CLI `1.0.0` cohort and `@mpfrontend/security-bff`. Read the
|
|
9
9
|
consumer instructions and obtain approved issuer, client, callback/logout URLs, audiences, route policy,
|
|
10
10
|
cookie domain and supported UI locales. Missing provider metadata or secret ownership is a prerequisite,
|
|
11
11
|
not permission to create identity data.
|
|
@@ -5,7 +5,7 @@ description: Integrate approved local OpenAPI 3.1 responses or explicitly select
|
|
|
5
5
|
|
|
6
6
|
# Integrate an explicit API contract
|
|
7
7
|
|
|
8
|
-
Requires MP Frontend CLI `
|
|
8
|
+
Requires MP Frontend CLI `1.0.0`. Read the consumer instructions and the named API owner's
|
|
9
9
|
contract before edits. An implementation request permits scoped integration; a review alone does not.
|
|
10
10
|
|
|
11
11
|
Establish the public presentation boundary: browser paths, server operation bindings, auth/roles,
|
|
@@ -5,7 +5,7 @@ description: Integrate an approved realtime event contract with MP Frontend tick
|
|
|
5
5
|
|
|
6
6
|
# Integrate an approved realtime stream
|
|
7
7
|
|
|
8
|
-
Requires the reviewed MP Frontend CLI `
|
|
8
|
+
Requires the reviewed MP Frontend CLI `1.0.0` cohort and `@mpfrontend/realtime-core`. Read the
|
|
9
9
|
consumer instructions plus the approved event/topic schema, ordering/idempotency rules, admission
|
|
10
10
|
policy and snapshot endpoint. Stop rather than inventing event names, replay guarantees or recovery
|
|
11
11
|
semantics.
|
|
@@ -31,9 +31,10 @@ package declare, with every framework pin (the app template, the Nx plugin's coh
|
|
|
31
31
|
`node tools/distribution/release.mjs guard --version <v> --ref <ref>` and its `self-test` prove this offline. A version
|
|
32
32
|
the registry already holds is never built again: a corrected build takes the next version, and a bad version is
|
|
33
33
|
deprecated, never unpublished. Check the API against the policy of README "Versioning" with `pnpm check` (the
|
|
34
|
-
`api-check` of every package's `api-report.json`
|
|
35
|
-
tools/distribution/api-
|
|
36
|
-
|
|
34
|
+
`api-check` of every package's `api-report.json` and of the published archives that
|
|
35
|
+
`tools/distribution/api-baseline.json` names); from 1.0.0 a break needs a new major version and release notes that
|
|
36
|
+
say how to move. After a release, move the baseline to it in a commit of its own with `node
|
|
37
|
+
tools/distribution/api-report.mjs baseline --record <release.json>`. Run `pnpm exec nx run distribution:registry-install` for the scope binding and
|
|
37
38
|
the exact pins against throw-away local registries. The owner then runs the release workflow
|
|
38
39
|
(`.github/workflows/release.yml`) without `publish` as a rehearsal, and with it only on main, as
|
|
39
40
|
docs/RELEASE-GUIDE.md describes.
|
|
@@ -5,7 +5,7 @@ description: Reconcile declared added, changed or removed DLS components with MP
|
|
|
5
5
|
|
|
6
6
|
# Reconcile authored component behavior
|
|
7
7
|
|
|
8
|
-
Requires the reviewed CLI
|
|
8
|
+
Requires the reviewed CLI 1.0.0 cohort, an attached design source and a normalized candidate with explicit interaction evidence.
|
|
9
9
|
Read consumer instructions, installed CLI `DESIGN-SYNC.md`, approved source, adapter bindings and
|
|
10
10
|
the actual public UI types. Use stable IDs for component identity; display renames do not justify
|
|
11
11
|
creating duplicates. Core currently exposes six finite components, not the whole supplied DLS.
|
|
@@ -5,7 +5,7 @@ description: Review an MP Frontend declared design candidate or accepted baselin
|
|
|
5
5
|
|
|
6
6
|
# Review declared design drift
|
|
7
7
|
|
|
8
|
-
Requires the reviewed CLI
|
|
8
|
+
Requires the reviewed CLI 1.0.0 cohort. Read consumer instructions, installed CLI `DESIGN-SYNC.md`,
|
|
9
9
|
accepted source/binding and any supplied candidate's provenance. A review request is read-only:
|
|
10
10
|
do not import, persist a plan, apply tokens, edit Figma, run a live write or accept a baseline.
|
|
11
11
|
If the candidate is not imported, an explicit import implementation request is a prerequisite.
|
|
@@ -5,7 +5,7 @@ description: Create an independent MP Frontend Next.js app with the installed CL
|
|
|
5
5
|
|
|
6
6
|
# Scaffold an app
|
|
7
7
|
|
|
8
|
-
Requires MP Frontend CLI `
|
|
8
|
+
Requires MP Frontend CLI `1.0.0` and the compatible packaged Nx plugin. Read the consumer's
|
|
9
9
|
repository instructions before changing files; this skill grants no release or external-write authority.
|
|
10
10
|
|
|
11
11
|
Obtain the app name, new destination and an approved local OpenAPI projection. Do not choose a
|
|
@@ -5,7 +5,7 @@ description: Plan and apply reviewed light/dark/system token updates from an MP
|
|
|
5
5
|
|
|
6
6
|
# Synchronize declared consumer tokens
|
|
7
7
|
|
|
8
|
-
Requires the reviewed CLI
|
|
8
|
+
Requires the reviewed CLI 1.0.0 cohort, an attached design source and a supplied/imported candidate. Read consumer instructions,
|
|
9
9
|
installed CLI `DESIGN-SYNC.md`, source provenance and the current accepted binding. The installed
|
|
10
10
|
import procedure describes acquisition; no Figma write or automatic watcher is part of this workflow.
|
|
11
11
|
Run `design status` first and stop on pending, disabled or drifted source state; do not bypass source
|
|
@@ -14,8 +14,10 @@ Every `@mpfrontend` package carries one cohort version; pin all of them, and the
|
|
|
14
14
|
workspace configuration, at that exact version, never a range. Keep the scope bound to the public registry in
|
|
15
15
|
`.npmrc` (`@mpfrontend:registry=https://registry.npmjs.org/`), so that no other registry can serve it. After the
|
|
16
16
|
install, compare the lockfile's integrity of each package with the release record (`docs/releases/<version>.md`)
|
|
17
|
-
and run `npm audit signatures` for the registry signatures and provenance. Read the release notes first:
|
|
18
|
-
|
|
17
|
+
and run `npm audit signatures` for the registry signatures and provenance. Read the release notes first: from 1.0.0
|
|
18
|
+
only a major version breaks, and its notes say how to move; a minor version only adds and a patch never breaks.
|
|
19
|
+
Before 1.0.0, while the major version was 0, a minor version could break. Exports of an entry named `internal` are
|
|
20
|
+
outside the compatibility guarantee: never import one in a product. Offline, install
|
|
19
21
|
the release's archives through pnpm overrides and lock the SHA-256 of the release record.
|
|
20
22
|
|
|
21
23
|
Before mutation, record the current working-tree diff and runnable gates. Use `mpfrontend skills update
|
|
@@ -5,7 +5,7 @@ description: Verify a bounded MP Frontend consumer change using existing Nx and
|
|
|
5
5
|
|
|
6
6
|
# Verify a bounded change
|
|
7
7
|
|
|
8
|
-
Requires MP Frontend CLI `
|
|
8
|
+
Requires MP Frontend CLI `1.0.0`. Read the consumer's instructions, changed-file scope and
|
|
9
9
|
acceptance criteria. A review/diagnosis is read-only apart from normal diagnostic build/test artifacts;
|
|
10
10
|
fixes, restarts, business writes and release actions require the corresponding user request.
|
|
11
11
|
|