@syntesseraai/opencode-feature-factory 0.10.2 → 0.10.4
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 +31 -102
- package/agents/building.md +10 -14
- package/agents/documenting.md +9 -14
- package/agents/feature-factory.md +15 -4
- package/agents/ff-research.md +5 -1
- package/agents/planning.md +4 -3
- package/agents/reviewing.md +3 -3
- package/bin/ff-deploy.js +8 -36
- package/dist/index.js +2 -2
- package/dist/mcp-config.d.ts +9 -1
- package/dist/mcp-config.js +7 -0
- package/dist/plugin-config.js +0 -1
- package/dist/tools/mini-loop.d.ts +4 -0
- package/dist/tools/mini-loop.js +310 -288
- package/dist/tools/pipeline.d.ts +4 -0
- package/dist/tools/pipeline.js +515 -493
- package/dist/workflow/fan-out.d.ts +20 -3
- package/dist/workflow/fan-out.js +34 -8
- package/dist/workflow/orchestrator.d.ts +1 -1
- package/dist/workflow/orchestrator.js +1 -1
- package/dist/workflow/run-isolation.d.ts +13 -0
- package/dist/workflow/run-isolation.js +77 -0
- package/package.json +1 -2
- package/command/mini-loop/documentation/document.md +0 -15
- package/command/mini-loop/documentation/gate.md +0 -16
- package/command/mini-loop/documentation/review.md +0 -17
- package/command/mini-loop/documentation/run.md +0 -16
- package/command/mini-loop/implementation/build.md +0 -15
- package/command/mini-loop/implementation/gate.md +0 -16
- package/command/mini-loop/implementation/review.md +0 -17
- package/command/mini-loop/implementation/run.md +0 -16
- package/command/mini-loop/start.md +0 -11
- package/command/pipeline/building/breakdown.md +0 -18
- package/command/pipeline/building/implement-batch.md +0 -26
- package/command/pipeline/building/run.md +0 -13
- package/command/pipeline/building/validate-batch.md +0 -17
- package/command/pipeline/complete.md +0 -13
- package/command/pipeline/documentation/document.md +0 -22
- package/command/pipeline/documentation/gate.md +0 -20
- package/command/pipeline/documentation/review.md +0 -22
- package/command/pipeline/documentation/run.md +0 -16
- package/command/pipeline/planning/confirm.md +0 -18
- package/command/pipeline/planning/gate.md +0 -24
- package/command/pipeline/planning/plan.md +0 -25
- package/command/pipeline/planning/run.md +0 -15
- package/command/pipeline/planning/synthesize.md +0 -22
- package/command/pipeline/reviewing/gate.md +0 -16
- package/command/pipeline/reviewing/review.md +0 -20
- package/command/pipeline/reviewing/run.md +0 -21
- package/command/pipeline/reviewing/synthesize.md +0 -18
- package/command/pipeline/reviewing/triage.md +0 -16
- package/command/pipeline/start.md +0 -14
|
@@ -18,6 +18,9 @@ import type { NamedModel, ModelId } from './types.js';
|
|
|
18
18
|
export type Client = {
|
|
19
19
|
session: {
|
|
20
20
|
create(options: {
|
|
21
|
+
query?: {
|
|
22
|
+
directory?: string;
|
|
23
|
+
};
|
|
21
24
|
body?: {
|
|
22
25
|
parentID?: string;
|
|
23
26
|
title?: string;
|
|
@@ -28,6 +31,9 @@ export type Client = {
|
|
|
28
31
|
};
|
|
29
32
|
}>;
|
|
30
33
|
prompt(options: {
|
|
34
|
+
query?: {
|
|
35
|
+
directory?: string;
|
|
36
|
+
};
|
|
31
37
|
path: {
|
|
32
38
|
id: string;
|
|
33
39
|
};
|
|
@@ -53,6 +59,9 @@ export type Client = {
|
|
|
53
59
|
};
|
|
54
60
|
}>;
|
|
55
61
|
promptAsync(options: {
|
|
62
|
+
query?: {
|
|
63
|
+
directory?: string;
|
|
64
|
+
};
|
|
56
65
|
path: {
|
|
57
66
|
id: string;
|
|
58
67
|
};
|
|
@@ -100,6 +109,14 @@ export declare function extractText(parts: Array<{
|
|
|
100
109
|
text?: string;
|
|
101
110
|
[k: string]: unknown;
|
|
102
111
|
}>): string;
|
|
112
|
+
export interface SessionContext {
|
|
113
|
+
sessionId: string;
|
|
114
|
+
directory?: string;
|
|
115
|
+
}
|
|
116
|
+
export declare function createRunParentSession(client: Client, callerSessionId: string, options?: {
|
|
117
|
+
title?: string;
|
|
118
|
+
directory?: string;
|
|
119
|
+
}): Promise<SessionContext>;
|
|
103
120
|
export interface FanOutResult {
|
|
104
121
|
tag: string;
|
|
105
122
|
raw: string;
|
|
@@ -111,13 +128,13 @@ export interface FanOutResult {
|
|
|
111
128
|
* Each model's work runs in its own child session so none of the
|
|
112
129
|
* intermediate outputs pollute the parent context window.
|
|
113
130
|
*/
|
|
114
|
-
export declare function fanOut(client: Client,
|
|
131
|
+
export declare function fanOut(client: Client, context: SessionContext, models: readonly NamedModel[], buildPrompt: (tag: string) => string, agent?: string): Promise<FanOutResult[]>;
|
|
115
132
|
/**
|
|
116
133
|
* Prompt in an isolated child session and return the raw text response.
|
|
117
134
|
*
|
|
118
135
|
* This keeps the sub-step off the parent's context window.
|
|
119
136
|
*/
|
|
120
|
-
export declare function promptSession(client: Client,
|
|
137
|
+
export declare function promptSession(client: Client, context: SessionContext, prompt: string, options?: {
|
|
121
138
|
model?: ModelId;
|
|
122
139
|
agent?: string;
|
|
123
140
|
title?: string;
|
|
@@ -131,6 +148,6 @@ export declare function promptSession(client: Client, parentSessionId: string, p
|
|
|
131
148
|
*
|
|
132
149
|
* Errors are swallowed — notification delivery must never break the pipeline.
|
|
133
150
|
*/
|
|
134
|
-
export declare function notifyParent(client: Client,
|
|
151
|
+
export declare function notifyParent(client: Client, context: SessionContext, agent: string | undefined, message: string, options?: {
|
|
135
152
|
noReply?: boolean;
|
|
136
153
|
}): Promise<void>;
|
package/dist/workflow/fan-out.js
CHANGED
|
@@ -19,6 +19,29 @@ export function extractText(parts) {
|
|
|
19
19
|
.map((p) => p.text)
|
|
20
20
|
.join('\n');
|
|
21
21
|
}
|
|
22
|
+
function withDirectory(directory) {
|
|
23
|
+
if (!directory) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return { directory };
|
|
27
|
+
}
|
|
28
|
+
export async function createRunParentSession(client, callerSessionId, options) {
|
|
29
|
+
const session = await client.session.create({
|
|
30
|
+
query: withDirectory(options?.directory),
|
|
31
|
+
body: {
|
|
32
|
+
parentID: callerSessionId,
|
|
33
|
+
title: options?.title,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const runParentId = session.data?.id;
|
|
37
|
+
if (!runParentId) {
|
|
38
|
+
throw new Error('Failed to create run parent session');
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
sessionId: runParentId,
|
|
42
|
+
directory: options?.directory,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
22
45
|
// ---------------------------------------------------------------------------
|
|
23
46
|
// Isolated session helper
|
|
24
47
|
// ---------------------------------------------------------------------------
|
|
@@ -28,11 +51,12 @@ export function extractText(parts) {
|
|
|
28
51
|
* The child session is parented to `parentSessionId` so it appears in the
|
|
29
52
|
* session tree but its messages do **not** pollute the parent context window.
|
|
30
53
|
*/
|
|
31
|
-
async function promptInChildSession(client,
|
|
54
|
+
async function promptInChildSession(client, context, prompt, options) {
|
|
32
55
|
// 1. Create an isolated child session
|
|
33
56
|
const session = await client.session.create({
|
|
57
|
+
query: withDirectory(context.directory),
|
|
34
58
|
body: {
|
|
35
|
-
parentID:
|
|
59
|
+
parentID: context.sessionId,
|
|
36
60
|
title: options?.title,
|
|
37
61
|
},
|
|
38
62
|
});
|
|
@@ -53,6 +77,7 @@ async function promptInChildSession(client, parentSessionId, prompt, options) {
|
|
|
53
77
|
body.agent = options.agent;
|
|
54
78
|
}
|
|
55
79
|
const response = await client.session.prompt({
|
|
80
|
+
query: withDirectory(context.directory),
|
|
56
81
|
path: { id: childId },
|
|
57
82
|
body,
|
|
58
83
|
});
|
|
@@ -66,9 +91,9 @@ async function promptInChildSession(client, parentSessionId, prompt, options) {
|
|
|
66
91
|
* Each model's work runs in its own child session so none of the
|
|
67
92
|
* intermediate outputs pollute the parent context window.
|
|
68
93
|
*/
|
|
69
|
-
export async function fanOut(client,
|
|
94
|
+
export async function fanOut(client, context, models, buildPrompt, agent) {
|
|
70
95
|
const results = await Promise.all(models.map(async (nm) => {
|
|
71
|
-
const raw = await promptInChildSession(client,
|
|
96
|
+
const raw = await promptInChildSession(client, context, buildPrompt(nm.tag), {
|
|
72
97
|
model: nm.model,
|
|
73
98
|
agent,
|
|
74
99
|
title: `ff-fanout-${nm.tag}`,
|
|
@@ -85,8 +110,8 @@ export async function fanOut(client, parentSessionId, models, buildPrompt, agent
|
|
|
85
110
|
*
|
|
86
111
|
* This keeps the sub-step off the parent's context window.
|
|
87
112
|
*/
|
|
88
|
-
export async function promptSession(client,
|
|
89
|
-
return promptInChildSession(client,
|
|
113
|
+
export async function promptSession(client, context, prompt, options) {
|
|
114
|
+
return promptInChildSession(client, context, prompt, options);
|
|
90
115
|
}
|
|
91
116
|
// ---------------------------------------------------------------------------
|
|
92
117
|
// Parent session notification helper
|
|
@@ -100,7 +125,7 @@ export async function promptSession(client, parentSessionId, prompt, options) {
|
|
|
100
125
|
*
|
|
101
126
|
* Errors are swallowed — notification delivery must never break the pipeline.
|
|
102
127
|
*/
|
|
103
|
-
export async function notifyParent(client,
|
|
128
|
+
export async function notifyParent(client, context, agent, message, options) {
|
|
104
129
|
try {
|
|
105
130
|
const body = {
|
|
106
131
|
noReply: options?.noReply ?? true,
|
|
@@ -110,7 +135,8 @@ export async function notifyParent(client, sessionId, agent, message, options) {
|
|
|
110
135
|
body.agent = agent;
|
|
111
136
|
}
|
|
112
137
|
await client.session.promptAsync({
|
|
113
|
-
|
|
138
|
+
query: withDirectory(context.directory),
|
|
139
|
+
path: { id: context.sessionId },
|
|
114
140
|
body,
|
|
115
141
|
});
|
|
116
142
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Re-exports the fan-out, gate, and type modules as a single convenient
|
|
5
5
|
* entry-point for tool implementations.
|
|
6
6
|
*/
|
|
7
|
-
export { fanOut, promptSession, extractText, notifyParent, type Client } from './fan-out.js';
|
|
7
|
+
export { fanOut, promptSession, extractText, notifyParent, createRunParentSession, type Client, type SessionContext, } from './fan-out.js';
|
|
8
8
|
export { evaluatePlanningGate, evaluateReviewGate, evaluateDocGate, evaluateMiniLoopImplGate, evaluateMiniLoopDocGate, } from './gate-evaluator.js';
|
|
9
9
|
export { runCI, ciScriptExists } from './ci-runner.js';
|
|
10
10
|
export * from './types.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Re-exports the fan-out, gate, and type modules as a single convenient
|
|
5
5
|
* entry-point for tool implementations.
|
|
6
6
|
*/
|
|
7
|
-
export { fanOut, promptSession, extractText, notifyParent } from './fan-out.js';
|
|
7
|
+
export { fanOut, promptSession, extractText, notifyParent, createRunParentSession, } from './fan-out.js';
|
|
8
8
|
export { evaluatePlanningGate, evaluateReviewGate, evaluateDocGate, evaluateMiniLoopImplGate, evaluateMiniLoopDocGate, } from './gate-evaluator.js';
|
|
9
9
|
export { runCI, ciScriptExists } from './ci-runner.js';
|
|
10
10
|
export * from './types.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface WorktreeOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
parentDirectory?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface RunDirectoryContext {
|
|
6
|
+
runId: string;
|
|
7
|
+
runDirectory: string;
|
|
8
|
+
worktreeEnabled: boolean;
|
|
9
|
+
worktreePath?: string;
|
|
10
|
+
repoRoot?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveRunDirectory(toolTag: 'pipeline' | 'mini-loop', worktree: WorktreeOptions | undefined, cwd?: string): Promise<RunDirectoryContext>;
|
|
13
|
+
export declare function cleanupWorktree(ctx: RunDirectoryContext): Promise<void>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { mkdir } from 'node:fs/promises';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { basename, isAbsolute, join, resolve } from 'node:path';
|
|
4
|
+
const UNSAFE_WORKTREE_PARENT_DIRS = new Set(['/', '/etc']);
|
|
5
|
+
function assertSafeParentDirectory(parentDirectory) {
|
|
6
|
+
const normalized = resolve(parentDirectory);
|
|
7
|
+
if (UNSAFE_WORKTREE_PARENT_DIRS.has(normalized)) {
|
|
8
|
+
throw new Error(`Unsafe worktree_parent_dir: ${parentDirectory}. Choose a dedicated writable path.`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function resolveParentDirectory(cwd, parentDirectory) {
|
|
12
|
+
// Trust model: worktree_parent_dir is caller-controlled and can point anywhere
|
|
13
|
+
// on the local filesystem. We allow flexible absolute/relative paths but reject
|
|
14
|
+
// obviously unsafe system locations where accidental cleanup would be dangerous.
|
|
15
|
+
if (!parentDirectory || parentDirectory.trim().length === 0) {
|
|
16
|
+
return join(cwd, '.feature-factory', 'worktrees');
|
|
17
|
+
}
|
|
18
|
+
const resolvedParent = isAbsolute(parentDirectory)
|
|
19
|
+
? parentDirectory
|
|
20
|
+
: resolve(cwd, parentDirectory);
|
|
21
|
+
assertSafeParentDirectory(resolvedParent);
|
|
22
|
+
return resolvedParent;
|
|
23
|
+
}
|
|
24
|
+
async function runGit(args, cwd) {
|
|
25
|
+
// eslint-disable-next-line no-undef
|
|
26
|
+
const proc = Bun.spawn(['git', ...args], {
|
|
27
|
+
cwd,
|
|
28
|
+
stdout: 'pipe',
|
|
29
|
+
stderr: 'pipe',
|
|
30
|
+
});
|
|
31
|
+
const [stdout, stderr] = await Promise.all([
|
|
32
|
+
new Response(proc.stdout).text(),
|
|
33
|
+
new Response(proc.stderr).text(),
|
|
34
|
+
proc.exited,
|
|
35
|
+
]);
|
|
36
|
+
if (proc.exitCode !== 0) {
|
|
37
|
+
const detail = stderr.trim() || stdout.trim() || `git ${args.join(' ')} failed`;
|
|
38
|
+
throw new Error(detail);
|
|
39
|
+
}
|
|
40
|
+
return stdout.trim();
|
|
41
|
+
}
|
|
42
|
+
export async function resolveRunDirectory(toolTag, worktree, cwd = process.cwd()) {
|
|
43
|
+
const runId = `${toolTag}-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
|
44
|
+
if (!worktree?.enabled) {
|
|
45
|
+
return {
|
|
46
|
+
runId,
|
|
47
|
+
runDirectory: cwd,
|
|
48
|
+
worktreeEnabled: false,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const repoRoot = await runGit(['rev-parse', '--show-toplevel'], cwd);
|
|
52
|
+
const head = await runGit(['rev-parse', '--verify', 'HEAD'], repoRoot);
|
|
53
|
+
const parentDirectory = resolveParentDirectory(repoRoot, worktree.parentDirectory);
|
|
54
|
+
await mkdir(parentDirectory, { recursive: true });
|
|
55
|
+
const repoName = basename(repoRoot);
|
|
56
|
+
const worktreePath = join(parentDirectory, `${repoName}-${runId}`);
|
|
57
|
+
await runGit(['worktree', 'add', '--detach', worktreePath, head], repoRoot);
|
|
58
|
+
return {
|
|
59
|
+
runId,
|
|
60
|
+
runDirectory: worktreePath,
|
|
61
|
+
worktreeEnabled: true,
|
|
62
|
+
worktreePath,
|
|
63
|
+
repoRoot,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export async function cleanupWorktree(ctx) {
|
|
67
|
+
if (!ctx.worktreeEnabled || !ctx.worktreePath) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const gitCwd = ctx.repoRoot ?? ctx.runDirectory;
|
|
71
|
+
try {
|
|
72
|
+
await runGit(['worktree', 'remove', '--force', ctx.worktreePath], gitCwd);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.warn('[feature-factory] Failed to cleanup run worktree:', error);
|
|
76
|
+
}
|
|
77
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@syntesseraai/opencode-feature-factory",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "OpenCode plugin for Feature Factory agents - provides sub-agents and skills for validation, review, security, and architecture assessment",
|
|
7
7
|
"license": "MIT",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"assets",
|
|
16
16
|
"skills",
|
|
17
17
|
"agents",
|
|
18
|
-
"command",
|
|
19
18
|
"bin"
|
|
20
19
|
],
|
|
21
20
|
"keywords": [
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Write documentation pass for mini-loop
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: documenting
|
|
5
|
-
model: openai/gpt-5.3-codex
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Update repository documentation for the approved mini-loop implementation from `$ARGUMENTS`.
|
|
9
|
-
|
|
10
|
-
Requirements:
|
|
11
|
-
|
|
12
|
-
1. Reflect shipped behavior and operational steps exactly.
|
|
13
|
-
2. Apply prior documentation rework feedback when present.
|
|
14
|
-
3. Keep updates concise and cross-link impacted docs when needed.
|
|
15
|
-
4. Return a concise documentation update report with changed docs and rationale.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Apply documentation mini-loop gate
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read the latest documentation review input from `$ARGUMENTS` and apply this gate exactly:
|
|
9
|
-
|
|
10
|
-
- APPROVED only when `CONFIDENCE` is strictly `>95`, `CHANGE_REQUESTED=NO`, and `UNRESOLVED_DOCUMENTATION_ISSUES=0`
|
|
11
|
-
- REWORK when not approved and iteration < 5
|
|
12
|
-
- ESCALATE when iteration == 5 and still not approved
|
|
13
|
-
|
|
14
|
-
Output exactly one line:
|
|
15
|
-
|
|
16
|
-
`MINI_LOOP_DOCUMENTATION_GATE=APPROVED|REWORK|ESCALATE`
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Review documentation pass for mini-loop
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Review the latest mini-loop documentation pass from `$ARGUMENTS`.
|
|
9
|
-
|
|
10
|
-
Required output fields:
|
|
11
|
-
|
|
12
|
-
1. `CHANGE_REQUESTED=YES|NO`
|
|
13
|
-
2. `UNRESOLVED_DOCUMENTATION_ISSUES=<integer>`
|
|
14
|
-
3. `CONFIDENCE=<0-100>`
|
|
15
|
-
4. concise documentation rework instructions when change is requested
|
|
16
|
-
|
|
17
|
-
Return a deterministic structured documentation review result with no file persistence.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run documentation mini-loop until gate passes
|
|
3
|
-
subtask: false
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
loop:
|
|
7
|
-
max: 5
|
|
8
|
-
until: documentation gate is APPROVED
|
|
9
|
-
return:
|
|
10
|
-
- /mini-loop/documentation/document {as:mini-doc-pass} $ARGUMENTS
|
|
11
|
-
- /mini-loop/documentation/review {as:mini-doc-review} $RESULT[mini-doc-pass]
|
|
12
|
-
- /mini-loop/documentation/gate $RESULT[mini-doc-review]
|
|
13
|
-
- If `MINI_LOOP_DOCUMENTATION_GATE=REWORK`, continue loop with prior documentation review feedback included in the next documentation pass.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Reply with only: "Documentation phase started"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Build implementation pass for mini-loop
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: building
|
|
5
|
-
model: openai/gpt-5.3-codex
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Implement the current mini-loop requirements from `$ARGUMENTS`.
|
|
9
|
-
|
|
10
|
-
Requirements:
|
|
11
|
-
|
|
12
|
-
1. Apply requested code rework when present.
|
|
13
|
-
2. Add or update tests for behavioral changes.
|
|
14
|
-
3. Run lint/typecheck/tests only for impacted scope.
|
|
15
|
-
4. Return a concise implementation report with changed files, tests run, and known open issues.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Apply implementation mini-loop gate
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read the latest implementation review input from `$ARGUMENTS` and apply this gate exactly:
|
|
9
|
-
|
|
10
|
-
- APPROVED only when `CONFIDENCE` is strictly `>95`, `CHANGE_REQUESTED=NO`, and `UNRESOLVED_BLOCKING_ISSUES=0`
|
|
11
|
-
- REWORK when not approved and iteration < 10
|
|
12
|
-
- ESCALATE when iteration == 10 and still not approved
|
|
13
|
-
|
|
14
|
-
Output exactly one line:
|
|
15
|
-
|
|
16
|
-
`MINI_LOOP_IMPLEMENTATION_GATE=APPROVED|REWORK|ESCALATE`
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Review implementation pass for mini-loop
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Review the latest mini-loop implementation output from `$ARGUMENTS`.
|
|
9
|
-
|
|
10
|
-
Required output fields:
|
|
11
|
-
|
|
12
|
-
1. `CHANGE_REQUESTED=YES|NO`
|
|
13
|
-
2. `UNRESOLVED_BLOCKING_ISSUES=<integer>`
|
|
14
|
-
3. `CONFIDENCE=<0-100>`
|
|
15
|
-
4. concise rework instructions when change is requested
|
|
16
|
-
|
|
17
|
-
Return a deterministic structured review result with no file persistence.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run implementation mini-loop until gate passes
|
|
3
|
-
subtask: false
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
loop:
|
|
7
|
-
max: 10
|
|
8
|
-
until: implementation gate is APPROVED
|
|
9
|
-
return:
|
|
10
|
-
- /mini-loop/implementation/build {as:mini-impl-build} $ARGUMENTS
|
|
11
|
-
- /mini-loop/implementation/review {as:mini-impl-review} $RESULT[mini-impl-build]
|
|
12
|
-
- /mini-loop/implementation/gate $RESULT[mini-impl-review]
|
|
13
|
-
- If `MINI_LOOP_IMPLEMENTATION_GATE=REWORK`, continue loop with prior review feedback included in the next build input.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Reply with only: "Implementation phase started"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Mini-loop two-stage workflow entrypoint
|
|
3
|
-
subtask: false
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
return:
|
|
7
|
-
- /mini-loop/implementation/run {as:implementation-phase} $ARGUMENTS
|
|
8
|
-
- /mini-loop/documentation/run $RESULT[implementation-phase]
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Reply with only: "Mini-loop started"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Break final plan into atomic tasks
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: building
|
|
5
|
-
model: anthropic/claude-opus-4-6
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read the approved final plan from `$ARGUMENTS` and produce atomic tasks.
|
|
9
|
-
|
|
10
|
-
Each task must include:
|
|
11
|
-
|
|
12
|
-
- task id
|
|
13
|
-
- title and description
|
|
14
|
-
- target files
|
|
15
|
-
- dependencies
|
|
16
|
-
- acceptance criteria
|
|
17
|
-
|
|
18
|
-
Return structured `TASKS` output (no file persistence).
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Implement validated batches with Codex
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: building
|
|
5
|
-
model: openai/gpt-5.3-codex
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read `BATCHES` input from `$ARGUMENTS` and implement each batch.
|
|
9
|
-
|
|
10
|
-
Execution strategy:
|
|
11
|
-
|
|
12
|
-
1. Process batches in dependency order — a batch may only start after all batches it depends on have completed.
|
|
13
|
-
2. Within each batch, launch **parallel sub-agents** (type: `building`) — one per task — for tasks that have no mutual dependency edges. Use concurrent tool calls to maximize throughput.
|
|
14
|
-
3. Tasks within the same batch that share file targets or have explicit dependency edges must run sequentially.
|
|
15
|
-
4. Wait for all tasks in a batch to complete before starting the next batch.
|
|
16
|
-
|
|
17
|
-
For each task (inside its sub-agent):
|
|
18
|
-
|
|
19
|
-
1. implement code changes
|
|
20
|
-
2. add/update tests
|
|
21
|
-
3. run lint/typecheck/tests for impacted scope
|
|
22
|
-
4. return a structured completion report (no file persistence)
|
|
23
|
-
|
|
24
|
-
After all batches complete, merge the per-task completion reports into a single `IMPLEMENTATION_REPORT` output.
|
|
25
|
-
|
|
26
|
-
This command performs implementation only; reviewing is triggered by `/pipeline/building/run` and by rework flow.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run build phase from approved plan
|
|
3
|
-
subtask: false
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
return:
|
|
7
|
-
- /pipeline/building/breakdown {as:build-tasks} $ARGUMENTS
|
|
8
|
-
- /pipeline/building/validate-batch {as:build-batches} $RESULT[build-tasks]
|
|
9
|
-
- /pipeline/building/implement-batch {as:build-implementation} $RESULT[build-batches]
|
|
10
|
-
- /pipeline/reviewing/run {as:review-phase} $RESULT[build-implementation]
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
Reply with only: "Building phase started"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Validate task batches for architecture and dependencies
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: building
|
|
5
|
-
model: opencode/gemini-3.1-pro
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read `TASKS` input from `$ARGUMENTS` and create dependency-safe batches.
|
|
9
|
-
|
|
10
|
-
For each batch:
|
|
11
|
-
|
|
12
|
-
1. validate architecture and codebase fit
|
|
13
|
-
2. confirm or adjust file targets
|
|
14
|
-
3. flag architectural risks
|
|
15
|
-
4. mark whether tasks can run in parallel
|
|
16
|
-
|
|
17
|
-
Return structured `BATCHES` output (no file persistence).
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Finalize pipeline run and summarize outcomes
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Finalize the pipeline run.
|
|
9
|
-
|
|
10
|
-
1. Summarize accepted plan, implemented tasks, review outcomes, and assumptions.
|
|
11
|
-
2. Prefer result-based handoff; persist only final user-requested artifacts.
|
|
12
|
-
3. Clear transient pipeline agent context files.
|
|
13
|
-
4. Return concise completion report to user.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Documentation write/update pass
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: documenting
|
|
5
|
-
model: openai/gpt-5.3-codex
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Document the approved code changes and update repository documentation.
|
|
9
|
-
|
|
10
|
-
Before writing docs, load these skills:
|
|
11
|
-
|
|
12
|
-
- `ff-todo-management`
|
|
13
|
-
- `ff-mini-plan`
|
|
14
|
-
|
|
15
|
-
Requirements:
|
|
16
|
-
|
|
17
|
-
1. Use the latest approved review outputs and implementation artifacts as source of truth.
|
|
18
|
-
2. Update all affected docs so behavior and operational steps match shipped code.
|
|
19
|
-
3. If this is a rework iteration, incorporate documentation reviewer feedback from the previous documentation review.
|
|
20
|
-
4. Summarize what docs were changed and why.
|
|
21
|
-
|
|
22
|
-
Return a structured documentation update summary (no file persistence).
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Apply documentation approval gate
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read the latest documentation review input from `$ARGUMENTS` and apply gate exactly:
|
|
9
|
-
|
|
10
|
-
Skill requirements:
|
|
11
|
-
|
|
12
|
-
- ChatGPT gate supervisor should keep gate decisions explicit and iteration-aware.
|
|
13
|
-
|
|
14
|
-
- APPROVED when verdict is `APPROVED` and unresolved documentation issues count is `0`
|
|
15
|
-
- REWORK when verdict is `REWORK_REQUIRED` and iteration < 5
|
|
16
|
-
- ESCALATE when iteration == 5 and still not approved
|
|
17
|
-
|
|
18
|
-
Output one status line:
|
|
19
|
-
|
|
20
|
-
`DOCUMENTATION_GATE=APPROVED|REWORK|ESCALATE`
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Documentation review pass
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: reviewing
|
|
5
|
-
model: opencode/gemini-3.1-pro
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Review the latest Codex documentation pass for completeness, correctness, and repository doc consistency.
|
|
9
|
-
|
|
10
|
-
Before reviewing docs, load these skills:
|
|
11
|
-
|
|
12
|
-
- `ff-report-templates`
|
|
13
|
-
- `ff-severity-classification`
|
|
14
|
-
|
|
15
|
-
Required output:
|
|
16
|
-
|
|
17
|
-
1. verdict `APPROVED` or `REWORK_REQUIRED`
|
|
18
|
-
2. unresolved documentation issues (if any)
|
|
19
|
-
3. explicit rework instructions
|
|
20
|
-
4. confidence score (0-100)
|
|
21
|
-
|
|
22
|
-
Return a structured documentation review result (no file persistence).
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run documentation loop after review approval
|
|
3
|
-
subtask: false
|
|
4
|
-
agent: general
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
loop:
|
|
7
|
-
max: 5
|
|
8
|
-
until: documentation updates are approved by documentation reviewer with zero unresolved documentation issues
|
|
9
|
-
return:
|
|
10
|
-
- /pipeline/documentation/document {as:doc-pass} $ARGUMENTS
|
|
11
|
-
- /pipeline/documentation/review {as:doc-review} $RESULT[doc-pass]
|
|
12
|
-
- /pipeline/documentation/gate $RESULT[doc-review]
|
|
13
|
-
- If `DOCUMENTATION_GATE=REWORK`, continue loop with review feedback for the next document pass.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Reply with only: "Documentation phase started"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Confirm whether pipeline can proceed after planning
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: planning
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Read the planning output in `$ARGUMENTS` and decide whether the pipeline may proceed.
|
|
9
|
-
|
|
10
|
-
Rules:
|
|
11
|
-
|
|
12
|
-
1. If `PLANNING_GATE=APPROVED`, return:
|
|
13
|
-
- `PLANNING_PROCEED=YES`
|
|
14
|
-
- The approved `FINAL_PLAN` content for build input.
|
|
15
|
-
2. If `PLANNING_GATE=REWORK` or `PLANNING_GATE=BLOCKED`, return:
|
|
16
|
-
- `PLANNING_PROCEED=NO`
|
|
17
|
-
- A short `USER_CONFIRMATION_REQUIRED` section explaining why continuation needs explicit user confirmation.
|
|
18
|
-
3. Do not invent missing gate values.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Apply planning consensus gate
|
|
3
|
-
subtask: true
|
|
4
|
-
agent: planning
|
|
5
|
-
model: openai/gpt-5.4
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Apply the planning gate to the synthesized consensus input passed in `$ARGUMENTS`:
|
|
9
|
-
|
|
10
|
-
- `>=75`: APPROVED
|
|
11
|
-
- `50-74`: REWORK
|
|
12
|
-
- `<50`: BLOCKED
|
|
13
|
-
|
|
14
|
-
Actions:
|
|
15
|
-
|
|
16
|
-
1. If APPROVED, return the accepted final plan in a `FINAL_PLAN` section.
|
|
17
|
-
2. If REWORK, return explicit divergence feedback so the next planning loop iteration re-plans with clear deltas.
|
|
18
|
-
3. If BLOCKED, return explicit user-decision-needed rationale.
|
|
19
|
-
|
|
20
|
-
Always include one status line in your final output:
|
|
21
|
-
|
|
22
|
-
`PLANNING_GATE=APPROVED|REWORK|BLOCKED`
|
|
23
|
-
|
|
24
|
-
If APPROVED, include a `FINAL_PLAN` section that becomes input to the build phase.
|