@caiqueoak/flow 0.7.0 → 0.8.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/README.md +65 -43
- package/dist/artifacts/backlog.d.mts +16 -0
- package/dist/artifacts/backlog.d.mts.map +1 -0
- package/dist/artifacts/backlog.mjs +193 -0
- package/dist/artifacts/backlog.mjs.map +1 -0
- package/dist/artifacts/document.d.mts +6 -0
- package/dist/artifacts/document.d.mts.map +1 -0
- package/dist/artifacts/document.mjs +39 -0
- package/dist/artifacts/document.mjs.map +1 -0
- package/dist/artifacts/engineering.d.mts +5 -0
- package/dist/artifacts/engineering.d.mts.map +1 -0
- package/dist/artifacts/engineering.mjs +27 -0
- package/dist/artifacts/engineering.mjs.map +1 -0
- package/dist/artifacts/gates.d.mts +7 -0
- package/dist/artifacts/gates.d.mts.map +1 -0
- package/dist/artifacts/gates.mjs +42 -0
- package/dist/artifacts/gates.mjs.map +1 -0
- package/dist/artifacts/implementation-plan.d.mts +11 -0
- package/dist/artifacts/implementation-plan.d.mts.map +1 -0
- package/dist/artifacts/implementation-plan.mjs +30 -0
- package/dist/artifacts/implementation-plan.mjs.map +1 -0
- package/dist/artifacts/prd.d.mts +4 -0
- package/dist/artifacts/prd.d.mts.map +1 -0
- package/dist/artifacts/prd.mjs +13 -0
- package/dist/artifacts/prd.mjs.map +1 -0
- package/dist/artifacts/review.d.mts +11 -0
- package/dist/artifacts/review.d.mts.map +1 -0
- package/dist/artifacts/review.mjs +27 -0
- package/dist/artifacts/review.mjs.map +1 -0
- package/dist/artifacts/spec.d.mts +14 -0
- package/dist/artifacts/spec.d.mts.map +1 -0
- package/dist/artifacts/spec.mjs +50 -0
- package/dist/artifacts/spec.mjs.map +1 -0
- package/dist/artifacts/state.d.mts +44 -0
- package/dist/artifacts/state.d.mts.map +1 -0
- package/dist/artifacts/state.mjs +60 -0
- package/dist/artifacts/state.mjs.map +1 -0
- package/dist/artifacts/tasks.d.mts +10 -0
- package/dist/artifacts/tasks.d.mts.map +1 -0
- package/dist/artifacts/tasks.mjs +107 -0
- package/dist/artifacts/tasks.mjs.map +1 -0
- package/dist/artifacts/work-items.d.mts +21 -0
- package/dist/artifacts/work-items.d.mts.map +1 -0
- package/dist/artifacts/work-items.mjs +81 -0
- package/dist/artifacts/work-items.mjs.map +1 -0
- package/dist/cli/command-registry.d.mts +498 -0
- package/dist/cli/command-registry.d.mts.map +1 -0
- package/dist/cli/command-registry.mjs +230 -0
- package/dist/cli/command-registry.mjs.map +1 -0
- package/dist/cli.d.mts +3 -0
- package/dist/cli.d.mts.map +1 -0
- package/dist/cli.mjs +48 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/commands/doctor.d.mts +21 -0
- package/dist/commands/doctor.d.mts.map +1 -0
- package/dist/commands/doctor.mjs +79 -0
- package/dist/commands/doctor.mjs.map +1 -0
- package/dist/commands/gates.d.mts +14 -0
- package/dist/commands/gates.d.mts.map +1 -0
- package/dist/commands/gates.mjs +136 -0
- package/dist/commands/gates.mjs.map +1 -0
- package/dist/commands/graph.d.mts +11 -0
- package/dist/commands/graph.d.mts.map +1 -0
- package/dist/commands/graph.mjs +78 -0
- package/dist/commands/graph.mjs.map +1 -0
- package/dist/commands/init.d.mts +6 -0
- package/dist/commands/init.d.mts.map +1 -0
- package/dist/commands/init.mjs +126 -0
- package/dist/commands/init.mjs.map +1 -0
- package/dist/commands/migrate.d.mts +27 -0
- package/dist/commands/migrate.d.mts.map +1 -0
- package/dist/commands/migrate.mjs +379 -0
- package/dist/commands/migrate.mjs.map +1 -0
- package/dist/commands/operations.d.mts +13 -0
- package/dist/commands/operations.d.mts.map +1 -0
- package/dist/commands/operations.mjs +340 -0
- package/dist/commands/operations.mjs.map +1 -0
- package/dist/commands/route.d.mts +12 -0
- package/dist/commands/route.d.mts.map +1 -0
- package/dist/commands/route.mjs +45 -0
- package/dist/commands/route.mjs.map +1 -0
- package/dist/commands/schemas.d.mts +5 -0
- package/dist/commands/schemas.d.mts.map +1 -0
- package/dist/commands/schemas.mjs +14 -0
- package/dist/commands/schemas.mjs.map +1 -0
- package/dist/commands/status.d.mts +4 -0
- package/dist/commands/status.d.mts.map +1 -0
- package/dist/commands/status.mjs +18 -0
- package/dist/commands/status.mjs.map +1 -0
- package/dist/commands/sync.d.mts +18 -0
- package/dist/commands/sync.d.mts.map +1 -0
- package/dist/commands/sync.mjs +29 -0
- package/dist/commands/sync.mjs.map +1 -0
- package/dist/commands/trace.d.mts +30 -0
- package/dist/commands/trace.d.mts.map +1 -0
- package/dist/commands/trace.mjs +111 -0
- package/dist/commands/trace.mjs.map +1 -0
- package/dist/commands/validate.d.mts +8 -0
- package/dist/commands/validate.d.mts.map +1 -0
- package/dist/commands/validate.mjs +82 -0
- package/dist/commands/validate.mjs.map +1 -0
- package/dist/domain/contracts.d.mts +203 -0
- package/dist/domain/contracts.d.mts.map +1 -0
- package/dist/domain/contracts.mjs +126 -0
- package/dist/domain/contracts.mjs.map +1 -0
- package/dist/domain/types.d.ts +45 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +2 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/entry.d.ts +3 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +4 -0
- package/dist/entry.js.map +1 -0
- package/dist/shared/cli-io.d.mts +15 -0
- package/dist/shared/cli-io.d.mts.map +1 -0
- package/dist/shared/cli-io.mjs +83 -0
- package/dist/shared/cli-io.mjs.map +1 -0
- package/dist/shared/profiles.d.mts +17 -0
- package/dist/shared/profiles.d.mts.map +1 -0
- package/dist/shared/profiles.mjs +25 -0
- package/dist/shared/profiles.mjs.map +1 -0
- package/dist/shared/project-config.d.mts +21 -0
- package/dist/shared/project-config.d.mts.map +1 -0
- package/dist/shared/project-config.mjs +41 -0
- package/dist/shared/project-config.mjs.map +1 -0
- package/dist/shared/project-path.d.mts +3 -0
- package/dist/shared/project-path.d.mts.map +1 -0
- package/dist/shared/project-path.mjs +9 -0
- package/dist/shared/project-path.mjs.map +1 -0
- package/dist/shared/skill-installer.d.mts +2 -0
- package/dist/shared/skill-installer.d.mts.map +1 -0
- package/dist/shared/skill-installer.mjs +33 -0
- package/dist/shared/skill-installer.mjs.map +1 -0
- package/package.json +16 -8
- package/schemas/backlog.schema.json +85 -0
- package/schemas/config.schema.json +29 -0
- package/schemas/gates.schema.json +17 -0
- package/schemas/review.schema.json +28 -0
- package/schemas/tasks.schema.json +66 -0
- package/skills/flow/SKILL.md +10 -11
- package/skills/flow/build/step-01-execute-task.md +2 -2
- package/skills/flow/discovery/bmad-comparison.md +5 -0
- package/skills/flow/discovery/step-01-project.md +8 -3
- package/skills/flow/engineering/profiles/readability-first.md +1 -0
- package/skills/flow/engineering/step-02-synthesize.md +1 -1
- package/skills/flow/invariants.md +4 -4
- package/skills/flow/planning/step-01-create-tasks.md +3 -0
- package/skills/flow/planning/step-01-plan-work-item.md +2 -2
- package/skills/flow/review/step-01-review-work-item.md +1 -1
- package/skills/flow/specification/step-01-deepen-spec.md +7 -0
- package/src/artifacts/backlog.mjs +0 -157
- package/src/artifacts/document.mjs +0 -30
- package/src/artifacts/engineering.mjs +0 -26
- package/src/artifacts/gates.mjs +0 -28
- package/src/artifacts/implementation-plan.mjs +0 -27
- package/src/artifacts/prd.mjs +0 -12
- package/src/artifacts/state.mjs +0 -63
- package/src/artifacts/tasks.mjs +0 -90
- package/src/cli.mjs +0 -62
- package/src/commands/gates.mjs +0 -71
- package/src/commands/graph.mjs +0 -92
- package/src/commands/init.mjs +0 -111
- package/src/commands/migrate.mjs +0 -224
- package/src/commands/route.mjs +0 -140
- package/src/commands/status.mjs +0 -35
- package/src/commands/trace.mjs +0 -58
- package/src/commands/validate.mjs +0 -197
- package/src/shared/cli-io.mjs +0 -86
- package/src/shared/profiles.mjs +0 -27
- package/src/shared/project-config.mjs +0 -39
- package/src/shared/project-path.mjs +0 -10
- package/src/shared/skill-installer.mjs +0 -34
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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AM,CAAC;IACvB,SAAS,EAAE;QAAE,KAAK,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD,MAAM,EAAE;QAAE,SAAS,EAAE,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,IAAI,MAAM,KAAK,MAAM,EAAE,GAAG,IAAI,CAAA;KAAE,CAAC;IACjF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE;QAAE,MAAM,EAAE,cAAc,GAAG,wBAAwB,GAAG,WAAW,CAAA;KAAE,CAAC;CAChF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/domain/types.ts"],"names":[],"mappings":""}
|
package/dist/entry.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":""}
|
package/dist/entry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class CliError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export declare function fail(message: any, code?: number): void;
|
|
4
|
+
export declare function info(message?: string): void;
|
|
5
|
+
export declare function promptText(message: any, defaultValue?: string): Promise<any>;
|
|
6
|
+
export declare function promptSelect({ title, options, defaultIndex }: {
|
|
7
|
+
defaultIndex?: number | undefined;
|
|
8
|
+
options: any;
|
|
9
|
+
title: any;
|
|
10
|
+
}): Promise<any>;
|
|
11
|
+
export declare function promptMultiSelect({ title, options }: {
|
|
12
|
+
options: any;
|
|
13
|
+
title: any;
|
|
14
|
+
}): Promise<any[]>;
|
|
15
|
+
//# sourceMappingURL=cli-io.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-io.d.mts","sourceRoot":"","sources":["../../src/shared/cli-io.mjs"],"names":[],"mappings":"AAGA,qBAAa,QAAS,SAAQ,KAAK;CAAG;AACtC,wBAAgB,IAAI,CAAC,OAAO,KAAA,EAAE,IAAI,SAAI,QAIrC;AACD,wBAAgB,IAAI,CAAC,OAAO,SAAK,QAEhC;AAuBD,wBAAsB,UAAU,CAAC,OAAO,KAAA,EAAE,YAAY,SAAK,gBAQ1D;AACD,wBAAsB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAgB,EAAE;;;;CAAA,gBAkBtE;AACD,wBAAsB,iBAAiB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE;;;CAAA,kBAuBzD"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import readline from 'node:readline/promises';
|
|
2
|
+
import { stdin as inputStream, stdout as outputStream } from 'node:process';
|
|
3
|
+
export class CliError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export function fail(message, code = 1) {
|
|
6
|
+
const error = new CliError(message);
|
|
7
|
+
error.exitCode = code;
|
|
8
|
+
throw error;
|
|
9
|
+
}
|
|
10
|
+
export function info(message = '') {
|
|
11
|
+
console.log(message);
|
|
12
|
+
}
|
|
13
|
+
function abortedPromptError() {
|
|
14
|
+
const error = new Error('Prompt aborted.');
|
|
15
|
+
error.code = 'ABORT_ERR';
|
|
16
|
+
return error;
|
|
17
|
+
}
|
|
18
|
+
function question(readlineInterface, message) {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
let settled = false;
|
|
21
|
+
const finish = (callback, value) => {
|
|
22
|
+
if (settled)
|
|
23
|
+
return;
|
|
24
|
+
settled = true;
|
|
25
|
+
readlineInterface.removeListener('close', onClose);
|
|
26
|
+
callback(value);
|
|
27
|
+
};
|
|
28
|
+
const onClose = () => finish(reject, abortedPromptError());
|
|
29
|
+
readlineInterface.once('close', onClose);
|
|
30
|
+
readlineInterface.question(message).then((answer) => finish(resolve, answer), (error) => finish(reject, error));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export async function promptText(message, defaultValue = '') {
|
|
34
|
+
const rl = readline.createInterface({ input: inputStream, output: outputStream });
|
|
35
|
+
try {
|
|
36
|
+
const answer = (await question(rl, `${message}${defaultValue ? ` [${defaultValue}]` : ''}: `)).trim();
|
|
37
|
+
return answer || defaultValue;
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
rl.close();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export async function promptSelect({ title, options, defaultIndex = 0 }) {
|
|
44
|
+
info(title);
|
|
45
|
+
options.forEach((option, index) => info(` ${index === defaultIndex ? '›' : ' '} ${index + 1}. ${option.label}${option.description ? `\n ${option.description}` : ''}`));
|
|
46
|
+
const rl = readline.createInterface({ input: inputStream, output: outputStream });
|
|
47
|
+
try {
|
|
48
|
+
while (true) {
|
|
49
|
+
const answer = (await question(rl, `Selection [${defaultIndex + 1}]: `)).trim();
|
|
50
|
+
const index = answer ? Number.parseInt(answer, 10) - 1 : defaultIndex;
|
|
51
|
+
if (Number.isInteger(index) && index >= 0 && index < options.length)
|
|
52
|
+
return options[index].value;
|
|
53
|
+
info('Choose a valid number.');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
rl.close();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export async function promptMultiSelect({ title, options }) {
|
|
61
|
+
info(title);
|
|
62
|
+
options.forEach((option, index) => info(` [ ] ${index + 1}. ${option.label}`));
|
|
63
|
+
info(' (Select multiple with comma-separated numbers, e.g. 1,2)');
|
|
64
|
+
const rl = readline.createInterface({ input: inputStream, output: outputStream });
|
|
65
|
+
try {
|
|
66
|
+
while (true) {
|
|
67
|
+
const answer = (await question(rl, 'Selection: ')).trim();
|
|
68
|
+
const indices = [
|
|
69
|
+
...new Set(answer
|
|
70
|
+
.split(',')
|
|
71
|
+
.map((value) => Number.parseInt(value.trim(), 10))
|
|
72
|
+
.filter(Number.isInteger))
|
|
73
|
+
];
|
|
74
|
+
if (indices.length && indices.every((index) => index >= 1 && index <= options.length))
|
|
75
|
+
return indices.map((index) => options[index - 1].value);
|
|
76
|
+
info('Choose one or more valid numbers.');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
rl.close();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=cli-io.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-io.mjs","sourceRoot":"","sources":["../../src/shared/cli-io.mjs"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5E,MAAM,OAAO,QAAS,SAAQ,KAAK;CAAG;AACtC,MAAM,UAAU,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,MAAM,KAAK,CAAC;AACd,CAAC;AACD,MAAM,UAAU,IAAI,CAAC,OAAO,GAAG,EAAE;IAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AACD,SAAS,kBAAkB;IACzB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC3C,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC;IACzB,OAAO,KAAK,CAAC;AACf,CAAC;AACD,SAAS,QAAQ,CAAC,iBAAiB,EAAE,OAAO;IAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC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AE,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAChF,IAAI,CAAC,4DAA4D,CAAC,CAAC;IACnE,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAClF,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC1D,MAAM,OAAO,GAAG;gBACd,GAAG,IAAI,GAAG,CACR,MAAM;qBACH,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;qBACjD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;aACF,CAAC;YACF,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;gBACnF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC1D,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function parseProfileFrontmatter(text: any): any;
|
|
2
|
+
export declare const READABILITY_FIRST_PROFILE: any;
|
|
3
|
+
export declare const ENGINEERING_PROFILES: {
|
|
4
|
+
[READABILITY_FIRST_PROFILE.id]: any;
|
|
5
|
+
'readability-first': any;
|
|
6
|
+
};
|
|
7
|
+
export declare const BROWNFIELD_POLICIES: {
|
|
8
|
+
improve: {
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
preserve: {
|
|
13
|
+
label: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=profiles.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.d.mts","sourceRoot":"","sources":["../../src/shared/profiles.mjs"],"names":[],"mappings":"AAMA,wBAAgB,uBAAuB,CAAC,IAAI,KAAA,OAI3C;AACD,eAAO,MAAM,yBAAyB,KAAgC,CAAC;AACvE,eAAO,MAAM,oBAAoB;IAE/B,CAAC,yBAAyB,CAAC,EAAE,CAAC,MAA2B;;CAC1D,CAAC;AACF,eAAO,MAAM,mBAAmB;IAC9B,OAAO;QACL,KAAK;QACL,WAAW;;IAGb,QAAQ;QACN,KAAK;QACL,WAAW;;CAEd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { parse } from 'yaml';
|
|
3
|
+
const text = fs.readFileSync(new URL('../../skills/flow/engineering/profiles/readability-first.md', import.meta.url), 'utf8');
|
|
4
|
+
export function parseProfileFrontmatter(text) {
|
|
5
|
+
const match = text.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);
|
|
6
|
+
if (!match)
|
|
7
|
+
throw new Error('Missing YAML frontmatter in Flow profile.');
|
|
8
|
+
return parse(match[1]);
|
|
9
|
+
}
|
|
10
|
+
export const READABILITY_FIRST_PROFILE = parseProfileFrontmatter(text);
|
|
11
|
+
export const ENGINEERING_PROFILES = {
|
|
12
|
+
'readability-first': READABILITY_FIRST_PROFILE,
|
|
13
|
+
[READABILITY_FIRST_PROFILE.id]: READABILITY_FIRST_PROFILE
|
|
14
|
+
};
|
|
15
|
+
export const BROWNFIELD_POLICIES = {
|
|
16
|
+
improve: {
|
|
17
|
+
label: 'Improve existing structure — Recommended',
|
|
18
|
+
description: 'Preserve behavior and external contracts; recommend clearer structure where justified. Does not authorize refactoring.'
|
|
19
|
+
},
|
|
20
|
+
preserve: {
|
|
21
|
+
label: 'Keep existing structure',
|
|
22
|
+
description: 'Retain consistent conventions unless a concrete problem warrants an approved change.'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=profiles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/shared/profiles.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAC1B,IAAI,GAAG,CAAC,6DAA6D,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,EACvF,MAAM,CACP,CAAC;AACF,MAAM,UAAU,uBAAuB,CAAC,IAAI;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACnE,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IACzE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AACD,MAAM,CAAC,MAAM,yBAAyB,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,mBAAmB,EAAE,yBAAyB;IAC9C,CAAC,yBAAyB,CAAC,EAAE,CAAC,EAAE,yBAAyB;CAC1D,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE;QACP,KAAK,EAAE,0CAA0C;QACjD,WAAW,EACT,wHAAwH;KAC3H;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,sFAAsF;KACpG;CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function configPath(root: any): any;
|
|
2
|
+
export declare function defaultConfig(flowVersion?: string): {
|
|
3
|
+
schema_version: number;
|
|
4
|
+
flow_version: string;
|
|
5
|
+
runtimes: never[];
|
|
6
|
+
engineering: {
|
|
7
|
+
profile: string;
|
|
8
|
+
existing_code_policy: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function readConfig(root: any): {
|
|
12
|
+
schema_version: number;
|
|
13
|
+
flow_version: string;
|
|
14
|
+
runtimes: never[];
|
|
15
|
+
engineering: {
|
|
16
|
+
profile: string;
|
|
17
|
+
existing_code_policy: string;
|
|
18
|
+
};
|
|
19
|
+
} | null;
|
|
20
|
+
export declare function writeConfig(root: any, config: any): void;
|
|
21
|
+
//# sourceMappingURL=project-config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-config.d.mts","sourceRoot":"","sources":["../../src/shared/project-config.mjs"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,CAAC,IAAI,KAAA,OAE9B;AAED,wBAAgB,aAAa,CAAC,WAAW,SAAU;;;;;QAKhC,OAAO;QAA8B,oBAAoB;;EAE3E;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA;;;;;QAJZ,OAAO;QAA8B,oBAAoB;;SAc3E;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,QAYvC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { parse, stringify } from 'yaml';
|
|
4
|
+
import { FLOW_SCHEMA_VERSION } from '../domain/contracts.mjs';
|
|
5
|
+
export function configPath(root) {
|
|
6
|
+
return path.join(root, '_flow', 'config.yaml');
|
|
7
|
+
}
|
|
8
|
+
export function defaultConfig(flowVersion = '0.6.0') {
|
|
9
|
+
return {
|
|
10
|
+
schema_version: FLOW_SCHEMA_VERSION,
|
|
11
|
+
flow_version: flowVersion,
|
|
12
|
+
runtimes: [],
|
|
13
|
+
engineering: { profile: 'flow/readability-first@1', existing_code_policy: 'not_applicable' }
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function readConfig(root) {
|
|
17
|
+
const file = configPath(root);
|
|
18
|
+
if (!fs.existsSync(file))
|
|
19
|
+
return null;
|
|
20
|
+
const raw = parse(fs.readFileSync(file, 'utf8')) ?? {};
|
|
21
|
+
const config = defaultConfig();
|
|
22
|
+
config.schema_version = raw.schema_version ?? 1;
|
|
23
|
+
config.flow_version = raw.flow_version ?? null;
|
|
24
|
+
config.runtimes = Array.isArray(raw.runtimes) ? raw.runtimes : [];
|
|
25
|
+
config.engineering = { ...config.engineering, ...(raw.engineering ?? {}) };
|
|
26
|
+
return config;
|
|
27
|
+
}
|
|
28
|
+
export function writeConfig(root, config) {
|
|
29
|
+
const normalized = {
|
|
30
|
+
schema_version: FLOW_SCHEMA_VERSION,
|
|
31
|
+
flow_version: config.flow_version ?? defaultConfig().flow_version,
|
|
32
|
+
runtimes: config.runtimes ?? [],
|
|
33
|
+
engineering: {
|
|
34
|
+
profile: config.engineering?.profile ?? defaultConfig().engineering.profile,
|
|
35
|
+
existing_code_policy: config.engineering?.existing_code_policy ?? 'not_applicable'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
fs.mkdirSync(path.join(root, '_flow'), { recursive: true });
|
|
39
|
+
fs.writeFileSync(configPath(root), stringify(normalized, { lineWidth: 0 }), 'utf8');
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=project-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-config.mjs","sourceRoot":"","sources":["../../src/shared/project-config.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAA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AAE,CAAC,EAAE,CAAC;IAC3E,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAI,EAAE,MAAM;IACtC,MAAM,UAAU,GAAG;QACjB,cAAc,EAAE,mBAAmB;QACnC,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,aAAa,EAAE,CAAC,YAAY;QACjE,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;QAC/B,WAAW,EAAE;YACX,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,IAAI,aAAa,EAAE,CAAC,WAAW,CAAC,OAAO;YAC3E,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,oBAAoB,IAAI,gBAAgB;SACnF;KACF,CAAC;IACF,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-path.d.mts","sourceRoot":"","sources":["../../src/shared/project-path.mjs"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAGpC;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,OAE/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
export function valueAfter(args, name) {
|
|
3
|
+
const index = args.indexOf(name);
|
|
4
|
+
return index >= 0 ? args[index + 1] : undefined;
|
|
5
|
+
}
|
|
6
|
+
export function projectRoot(args) {
|
|
7
|
+
return path.resolve(valueAfter(args, '--path') || process.cwd());
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=project-path.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-path.mjs","sourceRoot":"","sources":["../../src/shared/project-path.mjs"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,UAAU,CAAC,IAAI,EAAE,IAAI;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAI;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-installer.d.mts","sourceRoot":"","sources":["../../src/shared/skill-installer.mjs"],"names":[],"mappings":"AAaA,wBAAgB,mBAAmB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,WAAW,KAAA,OAoB7D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
function copyDirectory(source, target) {
|
|
4
|
+
fs.mkdirSync(target, { recursive: true });
|
|
5
|
+
for (const entry of fs.readdirSync(source, { withFileTypes: true })) {
|
|
6
|
+
const sourcePath = path.join(source, entry.name);
|
|
7
|
+
const targetPath = path.join(target, entry.name);
|
|
8
|
+
if (entry.isDirectory())
|
|
9
|
+
copyDirectory(sourcePath, targetPath);
|
|
10
|
+
else
|
|
11
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function installRuntimeSkill(root, runtime, packageRoot) {
|
|
15
|
+
if (typeof runtime.skills_path !== 'string' ||
|
|
16
|
+
!runtime.skills_path ||
|
|
17
|
+
path.isAbsolute(runtime.skills_path) ||
|
|
18
|
+
runtime.skills_path.split(/[\\/]/).includes('..'))
|
|
19
|
+
throw new Error('Runtime skills_path must remain project-local.');
|
|
20
|
+
const target = path.join(root, runtime.skills_path, 'flow');
|
|
21
|
+
let ancestor = root;
|
|
22
|
+
for (const segment of path.relative(root, target).split(path.sep)) {
|
|
23
|
+
ancestor = path.join(ancestor, segment);
|
|
24
|
+
if (fs.existsSync(ancestor) && fs.lstatSync(ancestor).isSymbolicLink())
|
|
25
|
+
throw new Error('Refusing a symlinked runtime path.');
|
|
26
|
+
}
|
|
27
|
+
if (fs.existsSync(target) && fs.lstatSync(target).isSymbolicLink())
|
|
28
|
+
throw new Error('Refusing to overwrite a symlinked skill.');
|
|
29
|
+
fs.rmSync(target, { recursive: true, force: true });
|
|
30
|
+
copyDirectory(path.join(packageRoot, 'skills', 'flow'), target);
|
|
31
|
+
return target;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=skill-installer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-installer.mjs","sourceRoot":"","sources":["../../src/shared/skill-installer.mjs"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,SAAS,aAAa,CAAC,MAAM,EAAE,MAAM;IACnC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,IAAI,CAAC,IAA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C;IAC9D,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAChE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caiqueoak/flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Readability-first, agent-agnostic software development workflow for coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
7
|
+
"clean": "node scripts/clean.mjs",
|
|
8
|
+
"build": "npm run clean && tsc && node dist/entry.js schemas",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
8
11
|
"lint": "eslint .",
|
|
9
|
-
"format": "prettier --write src test skills package.json package-lock.json README.md eslint.config.js prettier.config.mjs",
|
|
10
|
-
"format:check": "prettier --check src test skills package.json package-lock.json README.md eslint.config.js prettier.config.mjs",
|
|
11
|
-
"pack:check": "npm pack --dry-run"
|
|
12
|
+
"format": "prettier --write src test scripts skills package.json package-lock.json README.md eslint.config.js prettier.config.mjs tsconfig.json",
|
|
13
|
+
"format:check": "prettier --check src test scripts skills package.json package-lock.json README.md eslint.config.js prettier.config.mjs tsconfig.json",
|
|
14
|
+
"pack:check": "npm run build && npm pack --dry-run",
|
|
15
|
+
"test:package": "node scripts/test-package.mjs",
|
|
16
|
+
"prepack": "npm run build"
|
|
12
17
|
},
|
|
13
18
|
"bin": {
|
|
14
|
-
"flow": "./
|
|
19
|
+
"flow": "./dist/entry.js"
|
|
15
20
|
},
|
|
16
21
|
"dependencies": {
|
|
17
22
|
"yaml": "^2.9.0"
|
|
18
23
|
},
|
|
19
24
|
"devDependencies": {
|
|
20
25
|
"@eslint/js": "^9.36.0",
|
|
26
|
+
"@types/node": "^22.18.6",
|
|
21
27
|
"eslint": "^9.36.0",
|
|
22
28
|
"globals": "^16.4.0",
|
|
23
|
-
"prettier": "^3.6.2"
|
|
29
|
+
"prettier": "^3.6.2",
|
|
30
|
+
"typescript": "^5.9.2"
|
|
24
31
|
},
|
|
25
32
|
"files": [
|
|
26
|
-
"
|
|
33
|
+
"dist",
|
|
34
|
+
"schemas",
|
|
27
35
|
"skills",
|
|
28
36
|
"README.md",
|
|
29
37
|
"LICENSE"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flow.local/schemas/backlog.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schema_version",
|
|
8
|
+
"work_items"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema_version": {
|
|
12
|
+
"const": 4
|
|
13
|
+
},
|
|
14
|
+
"work_items": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": [
|
|
19
|
+
"id",
|
|
20
|
+
"folder",
|
|
21
|
+
"kind",
|
|
22
|
+
"title",
|
|
23
|
+
"state",
|
|
24
|
+
"priority",
|
|
25
|
+
"spec_maturity",
|
|
26
|
+
"depends_on",
|
|
27
|
+
"blockers"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^W\\d{3,}$",
|
|
33
|
+
"description": "Permanent work-item identifier."
|
|
34
|
+
},
|
|
35
|
+
"folder": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^W\\d{3,}-[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
38
|
+
},
|
|
39
|
+
"kind": {
|
|
40
|
+
"enum": [
|
|
41
|
+
"feature",
|
|
42
|
+
"technical",
|
|
43
|
+
"maintenance"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"title": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
},
|
|
50
|
+
"state": {
|
|
51
|
+
"enum": [
|
|
52
|
+
"outlined",
|
|
53
|
+
"blocked",
|
|
54
|
+
"eligible",
|
|
55
|
+
"in_progress",
|
|
56
|
+
"review",
|
|
57
|
+
"completed"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"priority": {
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"minimum": 1
|
|
63
|
+
},
|
|
64
|
+
"spec_maturity": {
|
|
65
|
+
"enum": [
|
|
66
|
+
"outlined",
|
|
67
|
+
"ready"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"depends_on": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"uniqueItems": true,
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^W\\d{3,}$"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"blockers": {
|
|
79
|
+
"type": "array"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flow.local/schemas/config.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schema_version",
|
|
8
|
+
"flow_version",
|
|
9
|
+
"runtimes",
|
|
10
|
+
"engineering"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schema_version": {
|
|
14
|
+
"const": 4
|
|
15
|
+
},
|
|
16
|
+
"flow_version": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"runtimes": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "object"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"engineering": {
|
|
26
|
+
"type": "object"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flow.local/schemas/gates.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schema_version",
|
|
7
|
+
"gates"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema_version": {
|
|
11
|
+
"const": 2
|
|
12
|
+
},
|
|
13
|
+
"gates": {
|
|
14
|
+
"type": "array"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flow.local/schemas/review.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schema_version",
|
|
7
|
+
"work_item",
|
|
8
|
+
"status"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema_version": {
|
|
12
|
+
"const": 1
|
|
13
|
+
},
|
|
14
|
+
"work_item": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^W\\d{3,}$"
|
|
17
|
+
},
|
|
18
|
+
"status": {
|
|
19
|
+
"enum": [
|
|
20
|
+
"pending",
|
|
21
|
+
"approved"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"reviewed_at": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flow.local/schemas/tasks.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schema_version",
|
|
7
|
+
"work_item",
|
|
8
|
+
"tasks"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema_version": {
|
|
12
|
+
"const": 3
|
|
13
|
+
},
|
|
14
|
+
"work_item": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^W\\d{3,}$"
|
|
17
|
+
},
|
|
18
|
+
"tasks": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": [
|
|
24
|
+
"id",
|
|
25
|
+
"title",
|
|
26
|
+
"state",
|
|
27
|
+
"depends_on"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^T\\d{3,}$"
|
|
33
|
+
},
|
|
34
|
+
"title": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"state": {
|
|
39
|
+
"enum": [
|
|
40
|
+
"pending",
|
|
41
|
+
"in_progress",
|
|
42
|
+
"completed"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"depends_on": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"uniqueItems": true,
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^T\\d{3,}$"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"provenance": {
|
|
54
|
+
"enum": [
|
|
55
|
+
"legacy_migration"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"legacy_commit": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Read-only provenance for migrated completed tasks."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|