@clemrig/factory 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/app/workflows/implement.js +155 -27
- package/dist/app/workflows/implement.js.map +1 -1
- package/dist/app/workflows/issue-save.js +17 -4
- package/dist/app/workflows/issue-save.js.map +1 -1
- package/dist/domain/definition.js +2 -0
- package/dist/domain/definition.js.map +1 -1
- package/dist/domain/pull-request.d.ts +3 -1
- package/dist/domain/pull-request.js +7 -3
- package/dist/domain/pull-request.js.map +1 -1
- package/dist/domain/review.d.ts +41 -3
- package/dist/domain/review.js +37 -4
- package/dist/domain/review.js.map +1 -1
- package/dist/domain/spec.d.ts +4 -2
- package/dist/domain/spec.js +30 -3
- package/dist/domain/spec.js.map +1 -1
- package/dist/domain/verification.d.ts +4 -0
- package/dist/domain/verification.js.map +1 -1
- package/dist/system/checks.d.ts +20 -5
- package/dist/system/checks.js +25 -4
- package/dist/system/checks.js.map +1 -1
- package/dist/system/git.d.ts +41 -0
- package/dist/system/git.js +172 -0
- package/dist/system/git.js.map +1 -1
- package/dist/system/issues.d.ts +2 -0
- package/dist/system/issues.js +7 -0
- package/dist/system/issues.js.map +1 -1
- package/dist/system/run-files.d.ts +4 -0
- package/dist/system/run-files.js +14 -0
- package/dist/system/run-files.js.map +1 -0
- package/package.json +3 -3
- package/prompts/implement/review.md +34 -8
- package/templates/skills/issue/SKILL.md +22 -5
package/dist/system/issues.js
CHANGED
|
@@ -53,6 +53,13 @@ export async function writeArtifact(repository, slug, kind, text) {
|
|
|
53
53
|
export async function hasArtifact(repository, slug, kind) {
|
|
54
54
|
return access(join(repository, artifactPath(slug, kind))).then(() => true, () => false);
|
|
55
55
|
}
|
|
56
|
+
/** Whether `slug` names an issue: a folder with its issue.md, spec.md or plan.md. */
|
|
57
|
+
export async function isIssue(repository, slug) {
|
|
58
|
+
for (const kind of ["issue", "spec", "plan"])
|
|
59
|
+
if (await hasArtifact(repository, slug, kind))
|
|
60
|
+
return true;
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
56
63
|
/** The artifact's text, or nothing when the issue has none. */
|
|
57
64
|
export async function readArtifact(repository, slug, kind) {
|
|
58
65
|
if (!(await hasArtifact(repository, slug, kind)))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/system/issues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAI1C,wDAAwD;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAErD,6GAA6G;AAC7G,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAkB;IAC3D,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,IAAI,KAAK,CAAC,CAAC;AAC9C,CAAC;AAcD,uEAAuE;AACvE,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,UAAkB;IAElB,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAChE,CAAC,KAA4B,EAAE,EAAE;QAC/B,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,EAAE,CAAC;QACvC,MAAM,KAAK,CAAC;IACd,CAAC,CACF,CAAC;IACF,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YAAE,SAAS;QACnC,MAAM,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+D;AAC/D,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,UAAkB,EAClB,IAAY,EACZ,IAAkB;IAElB,IAAI,CAAC,CAAC,MAAM,WAAW,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACnE,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Keeps `text` in the run's directory, at `path` within it; returns where, absolute. */
|
|
2
|
+
export declare function keepInRun(runDir: string, path: string, text: string): Promise<string>;
|
|
3
|
+
/** A check's name as part of a file name. */
|
|
4
|
+
export declare function fileName(name: string): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
/** Keeps `text` in the run's directory, at `path` within it; returns where, absolute. */
|
|
4
|
+
export async function keepInRun(runDir, path, text) {
|
|
5
|
+
const file = join(runDir, path);
|
|
6
|
+
await mkdir(dirname(file), { recursive: true });
|
|
7
|
+
await writeFile(file, text);
|
|
8
|
+
return file;
|
|
9
|
+
}
|
|
10
|
+
/** A check's name as part of a file name. */
|
|
11
|
+
export function fileName(name) {
|
|
12
|
+
return name.replace(/[^A-Za-z0-9._-]+/g, "-");
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=run-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-files.js","sourceRoot":"","sources":["../../src/system/run-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAc,EACd,IAAY,EACZ,IAAY;IAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clemrig/factory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Take a repository's issues from spec to pull request with agents, watch them on a local Kanban, and run the repository's own workflows",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@clemrig/factory-ui": "0.1.0",
|
|
43
|
-
"@clemrig/flow": "0.
|
|
44
|
-
"@clemrig/flow-ui": "0.4.
|
|
43
|
+
"@clemrig/flow": "0.6.0",
|
|
44
|
+
"@clemrig/flow-ui": "0.4.1"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,17 +1,43 @@
|
|
|
1
|
-
You review a change against its approved spec, independently. You change
|
|
1
|
+
You review a change against its approved spec, independently. You never change the repository.
|
|
2
2
|
|
|
3
3
|
Read the repository's agent instructions: `AGENTS.md` at the root and in the directories the change touches.
|
|
4
|
-
Ignore `.factory
|
|
4
|
+
Ignore `.factory/`, except the files this request names: it holds other issues' history and agents' outputs, which
|
|
5
|
+
you must not rely on.
|
|
5
6
|
|
|
6
|
-
The request gives the spec, the
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
The request gives the spec, the change and the repository's checks, which all passed:
|
|
8
|
+
|
|
9
|
+
- `changes` lists the changed files with their added and removed lines. A small change comes with its whole diff in
|
|
10
|
+
`diff`; a large one (`large` is true) with `diffFile`, the path of its diff: read the parts you review from it.
|
|
11
|
+
- `checks` gives each check's command, its duration and `outputFile`, where the run kept what it wrote.
|
|
12
|
+
|
|
13
|
+
Do not take anything on trust: verify each acceptance criterion in the code and the tests, reading files beyond the
|
|
14
|
+
diff when needed. Look for unmet criteria, defects, regressions, missing or weak tests, security problems and
|
|
15
|
+
departures from the repository's conventions. Follow every path the change must handle, failures, interruptions
|
|
16
|
+
and recoveries included, not only the one that succeeds.
|
|
17
|
+
|
|
18
|
+
If you can run commands, run what helps you judge: targeted tests, the scripts the change adds, small
|
|
19
|
+
reproductions. Write temporary files only in the system's temporary directory. Never modify, stage, commit or
|
|
20
|
+
delete anything in the repository: the run compares it before and after your review, restores what changed and
|
|
21
|
+
starts the review again.
|
|
22
|
+
|
|
23
|
+
When the change is large and you can launch sub-agents, you may give a few of them, five at most, one angle each
|
|
24
|
+
that this change calls for: for instance its conformance to the spec, its failure and recovery paths, its data and
|
|
25
|
+
migrations, its security or its tests. Give each the spec, its angle, the files concerned and where to read the
|
|
26
|
+
diff, and tell it to report its findings with their evidence, to change nothing and to launch no agent itself.
|
|
27
|
+
Their reports come back to you: check them, then give one answer for the whole change.
|
|
10
28
|
|
|
11
29
|
Answer with:
|
|
12
30
|
|
|
13
31
|
- `criteria`: each acceptance criterion once, `met` or `not_met`, with its evidence (file, test, behavior).
|
|
14
|
-
- `findings`:
|
|
15
|
-
|
|
32
|
+
- `findings`: each with its `nature`, its `file` when relevant and a `summary` that states the trigger, then the
|
|
33
|
+
consequence. The nature alone decides whether the finding blocks the change:
|
|
34
|
+
- blocking: `incorrect_behavior` (the change does the wrong thing in a situation it must handle), `data_loss`,
|
|
35
|
+
`outage`, `security`, `regression` (something that worked no longer does), `spec_violation` (the change
|
|
36
|
+
contradicts the spec's scope or constraints);
|
|
37
|
+
- not blocking: `weak_test`, `maintainability`, `documentation`.
|
|
38
|
+
|
|
39
|
+
A defect whose trigger is a situation the change must handle, as the spec and the change's own paths (a
|
|
40
|
+
recovery, say) define them, is `incorrect_behavior` however rare that situation is. Choose the nature that
|
|
41
|
+
describes the defect, not the severity you would like it to have.
|
|
16
42
|
|
|
17
43
|
The change is approved only when every criterion is met and no finding is blocking. Write in English.
|
|
@@ -22,10 +22,21 @@ description of the need. Once the operator agrees, save the issue (see Save).
|
|
|
22
22
|
2. Ask the operator questions, a few at a time, until you can fill every section without inventing anything.
|
|
23
23
|
Do not ask what the code or the docs already answer. For each question, give its practical consequence
|
|
24
24
|
and your recommendation.
|
|
25
|
-
3.
|
|
26
|
-
|
|
25
|
+
3. Ask whether the issue relies on another issue that must be delivered first: its spec assumes behavior that
|
|
26
|
+
issue brings. List the issues of `.factory/issues/` that look related, with whether each is delivered (its
|
|
27
|
+
`plan.md` is on the main branch), and record the operator's answer in Dependencies.
|
|
28
|
+
4. Describe what and why, never how: the run that implements the spec plans the technical work itself.
|
|
29
|
+
5. Propose the complete spec and wait for the operator's agreement, then save it (see Save).
|
|
27
30
|
|
|
28
|
-
Other issues in `.factory/issues/` are history, not the current truth: rely on the code and the docs
|
|
31
|
+
Other issues in `.factory/issues/` are history, not the current truth: rely on the code and the docs, and read
|
|
32
|
+
them only to find the issues this one depends on.
|
|
33
|
+
|
|
34
|
+
## Fix a refused spec
|
|
35
|
+
|
|
36
|
+
When `factory run implement` refuses to start because of the spec (a missing section such as Dependencies, a
|
|
37
|
+
malformed one, or a dependency that is not delivered), start from the problems it listed: read the spec, ask the
|
|
38
|
+
operator what the fix needs, propose the corrected spec, then save it (see Save). A dependency that is not
|
|
39
|
+
delivered is either delivered first or removed from the spec, as the operator decides.
|
|
29
40
|
|
|
30
41
|
## Format
|
|
31
42
|
|
|
@@ -57,13 +68,18 @@ Other issues in `.factory/issues/` are history, not the current truth: rely on t
|
|
|
57
68
|
|
|
58
69
|
## Constraints
|
|
59
70
|
<Limits imposed on the solution>
|
|
71
|
+
|
|
72
|
+
## Dependencies
|
|
73
|
+
- <slug of an issue that must be delivered first>
|
|
60
74
|
```
|
|
61
75
|
|
|
62
|
-
- Exactly these
|
|
76
|
+
- Exactly these six sections, in this order, with nothing between the title and the first one.
|
|
63
77
|
- No section is empty: write `None.` when there is nothing to say.
|
|
64
78
|
- Acceptance criteria contains only `- AC<n>: <criterion>` items, numbered from AC1 without gaps; an indented
|
|
65
79
|
line continues the criterion above it. Each criterion is a fact that a user, an API client or an operator
|
|
66
80
|
can check, not an implementation detail.
|
|
81
|
+
- Dependencies contains only `- <slug>` items, each an issue of `.factory/issues/` other than this one, or
|
|
82
|
+
`None.`: the run refuses to start until each of them is delivered.
|
|
67
83
|
- Headings stay in English; the content may be in any language.
|
|
68
84
|
|
|
69
85
|
## Save
|
|
@@ -73,7 +89,8 @@ Other issues in `.factory/issues/` are history, not the current truth: rely on t
|
|
|
73
89
|
`factory run issue-save --issue <slug> --kind issue --file <absolute path>` for `issue.md`, or
|
|
74
90
|
`--kind spec` for `spec.md`.
|
|
75
91
|
3. `Saved .factory/issues/<slug>/<kind>.md` means it is done. Otherwise the command lists every problem: fix
|
|
76
|
-
the draft and run it again. It refuses a spec whose issue does not exist yet
|
|
92
|
+
the draft and run it again. It refuses a spec whose issue does not exist yet, and a
|
|
93
|
+
dependency that is no issue of the repository.
|
|
77
94
|
|
|
78
95
|
## Boundaries
|
|
79
96
|
|