@ai-content-space/loopx 0.1.9 → 0.2.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/AGENTS.md +50 -0
- package/README.md +59 -446
- package/README.zh-CN.md +59 -457
- package/docs/loopx/design/loopx-skill-suite-v1-design.md +73 -0
- package/docs/loopx/plans/loopx-skill-suite-v1-implementation.md +77 -0
- package/package.json +5 -2
- package/plugins/loopx/.codex-plugin/plugin.json +4 -4
- package/plugins/loopx/scripts/plugin-install.test.mjs +20 -20
- package/plugins/loopx/skills/clarify/SKILL.md +38 -311
- package/plugins/loopx/skills/debug/SKILL.md +1 -1
- package/plugins/loopx/skills/exec/SKILL.md +71 -0
- package/plugins/loopx/skills/finish/SKILL.md +254 -0
- package/plugins/loopx/skills/fix-review/SKILL.md +216 -0
- package/plugins/loopx/skills/go-style/SKILL.md +1 -1
- package/plugins/loopx/skills/kratos/SKILL.md +1 -1
- package/plugins/loopx/skills/plan/SKILL.md +136 -258
- package/plugins/loopx/skills/refactor-plan/SKILL.md +71 -0
- package/plugins/loopx/skills/review/SKILL.md +72 -105
- package/plugins/loopx/skills/review/code-reviewer.md +168 -0
- package/plugins/loopx/skills/spec/DESIGN_SPEC_TEMPLATE.md +323 -0
- package/plugins/loopx/skills/spec/SKILL.md +76 -0
- package/plugins/loopx/skills/subagent-exec/SKILL.md +282 -0
- package/plugins/loopx/skills/subagent-exec/agents/openai.yaml +3 -0
- package/plugins/loopx/skills/subagent-exec/code-quality-reviewer-prompt.md +25 -0
- package/plugins/loopx/skills/subagent-exec/codex-subagents.md +37 -0
- package/plugins/loopx/skills/subagent-exec/implementer-prompt.md +113 -0
- package/plugins/loopx/skills/subagent-exec/spec-reviewer-prompt.md +61 -0
- package/plugins/loopx/skills/tdd/SKILL.md +1 -1
- package/plugins/loopx/skills/verify/SKILL.md +1 -1
- package/scripts/claude-workflow-hook.mjs +109 -0
- package/scripts/codex-workflow-hook.mjs +2 -5
- package/scripts/install-skills.mjs +3 -3
- package/scripts/verify-skills.mjs +32 -1
- package/skills/RESOLVER.md +26 -17
- package/skills/clarify/SKILL.md +38 -311
- package/skills/debug/SKILL.md +1 -1
- package/skills/exec/SKILL.md +71 -0
- package/skills/finish/SKILL.md +254 -0
- package/skills/fix-review/SKILL.md +216 -0
- package/skills/go-style/SKILL.md +1 -1
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +136 -258
- package/skills/refactor-plan/SKILL.md +71 -0
- package/skills/review/SKILL.md +72 -105
- package/skills/review/code-reviewer.md +168 -0
- package/skills/spec/DESIGN_SPEC_TEMPLATE.md +323 -0
- package/skills/spec/SKILL.md +76 -0
- package/skills/subagent-exec/SKILL.md +282 -0
- package/skills/subagent-exec/agents/openai.yaml +3 -0
- package/skills/subagent-exec/code-quality-reviewer-prompt.md +25 -0
- package/skills/subagent-exec/codex-subagents.md +37 -0
- package/skills/subagent-exec/implementer-prompt.md +113 -0
- package/skills/subagent-exec/spec-reviewer-prompt.md +61 -0
- package/skills/tdd/SKILL.md +1 -1
- package/skills/verify/SKILL.md +1 -1
- package/src/autopilot-runtime.mjs +1 -1
- package/src/cli.mjs +79 -5
- package/src/context-manifest.mjs +2 -2
- package/src/html-views.mjs +457 -95
- package/src/install-discovery.mjs +210 -6
- package/src/next-skill.mjs +2 -4
- package/src/plan-runtime.mjs +572 -93
- package/src/runtime-maintenance.mjs +60 -16
- package/src/workflow.mjs +989 -65
- package/templates/architecture.md +58 -16
- package/templates/development-plan.md +42 -12
- package/plugins/loopx/skills/archive/SKILL.md +0 -55
- package/plugins/loopx/skills/autopilot/SKILL.md +0 -93
- package/plugins/loopx/skills/build/SKILL.md +0 -228
- package/skills/archive/SKILL.md +0 -55
- package/skills/autopilot/SKILL.md +0 -93
- package/skills/build/SKILL.md +0 -228
package/src/cli.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { createInterface } from 'node:readline/promises';
|
|
4
5
|
|
|
5
6
|
import { archiveStage, autopilotStage, approveStage, buildStage, clarifyStage, initWorkspace, planStage, reviewStage, statusSummary } from './workflow.mjs';
|
|
6
7
|
import { renderHtmlViews } from './html-views.mjs';
|
|
7
|
-
import { installBundledSkills } from './install-discovery.mjs';
|
|
8
|
+
import { installBundledSkills, installSkillsForTargets } from './install-discovery.mjs';
|
|
8
9
|
import { nextSkillCommand, withNextSkill } from './next-skill.mjs';
|
|
9
10
|
import { doctorRuntime, migrateLegacyRuntime } from './runtime-maintenance.mjs';
|
|
10
11
|
import { setupWorkspaceContext } from './workspace-context.mjs';
|
|
@@ -15,7 +16,7 @@ function usage() {
|
|
|
15
16
|
return [
|
|
16
17
|
'Usage:',
|
|
17
18
|
' loopx --version',
|
|
18
|
-
' loopx init [--slug <slug>]',
|
|
19
|
+
' loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>]',
|
|
19
20
|
' loopx clarify <slug> [--standard|--deep]',
|
|
20
21
|
' loopx approve <slug> --from <stage> --to <stage>',
|
|
21
22
|
' loopx plan [slug] [--direct <spec-path>] [--interactive] [--deliberate]',
|
|
@@ -27,12 +28,45 @@ function usage() {
|
|
|
27
28
|
' loopx render [slug|--all]',
|
|
28
29
|
' loopx status [slug] [--json]',
|
|
29
30
|
' loopx setup-context',
|
|
31
|
+
' loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes]',
|
|
30
32
|
' loopx doctor',
|
|
31
33
|
' loopx migrate',
|
|
32
34
|
' loopx repair-install',
|
|
33
35
|
].join('\n');
|
|
34
36
|
}
|
|
35
37
|
|
|
38
|
+
async function promptInstallOptions() {
|
|
39
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
40
|
+
try {
|
|
41
|
+
const targetAnswer = (await rl.question('Install targets (codex, claude, all) [all]: ')).trim().toLowerCase();
|
|
42
|
+
const projectAnswer = (await rl.question('Install Claude project skills instead of user skills? [y/N]: ')).trim().toLowerCase();
|
|
43
|
+
const modeAnswer = (await rl.question('Install mode (copy, symlink) [copy]: ')).trim().toLowerCase();
|
|
44
|
+
const proceedAnswer = (await rl.question('Proceed? [y/N]: ')).trim().toLowerCase();
|
|
45
|
+
if (proceedAnswer !== 'y' && proceedAnswer !== 'yes') {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const target = targetAnswer || 'all';
|
|
49
|
+
return {
|
|
50
|
+
targets: target === 'all' ? ['codex', 'claude'] : [target],
|
|
51
|
+
project: projectAnswer === 'y' || projectAnswer === 'yes',
|
|
52
|
+
installMethod: modeAnswer === 'symlink' ? 'symlink' : 'copy',
|
|
53
|
+
};
|
|
54
|
+
} finally {
|
|
55
|
+
rl.close();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function installOptionsFromArgs(options) {
|
|
60
|
+
const target = String(options.get('--target') || 'all').trim().toLowerCase();
|
|
61
|
+
const targets = target === 'all' ? ['codex', 'claude'] : [target];
|
|
62
|
+
return {
|
|
63
|
+
targets,
|
|
64
|
+
project: Boolean(options.get('--project')),
|
|
65
|
+
installMethod: options.get('--mode') === 'symlink' ? 'symlink' : 'copy',
|
|
66
|
+
dir: options.get('--dir'),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
36
70
|
function parseArgs(argv) {
|
|
37
71
|
const [command, ...rest] = argv;
|
|
38
72
|
const positionals = [];
|
|
@@ -90,6 +124,11 @@ function printHumanStatus(status) {
|
|
|
90
124
|
console.log(`plan_architect_review_status: ${status.state.plan_architect_review_status}`);
|
|
91
125
|
console.log(`plan_critic_verdict: ${status.state.plan_critic_verdict}`);
|
|
92
126
|
console.log(`plan_artifact_status: ${status.state.plan_docs_status}`);
|
|
127
|
+
console.log(`plan_delegation_mode: ${status.state.plan_delegation_mode ?? 'unknown'}`);
|
|
128
|
+
console.log(`plan_delegation_recommended_mode: ${status.state.plan_delegation_recommended_mode ?? status.state.plan_delegation_mode ?? 'unknown'}`);
|
|
129
|
+
console.log(`plan_delegation_actual_mode: ${status.state.plan_delegation_actual_mode ?? 'unknown'}`);
|
|
130
|
+
console.log(`plan_delegation_authorization_status: ${status.state.plan_delegation_authorization_status ?? 'unknown'}`);
|
|
131
|
+
console.log(`plan_delegation_decision_path: ${status.state.plan_delegation_decision_path ?? '(none)'}`);
|
|
93
132
|
console.log(`source_requirements_status: ${status.state.source_requirements_status ?? 'unknown'}`);
|
|
94
133
|
console.log(`requirement_traceability_path: ${status.state.requirement_traceability_path ?? '(none)'}`);
|
|
95
134
|
console.log(`plan_blockers: ${Array.isArray(status.state.plan_blockers) && status.state.plan_blockers.length > 0 ? status.state.plan_blockers.join(', ') : '(none)'}`);
|
|
@@ -156,7 +195,14 @@ async function main() {
|
|
|
156
195
|
try {
|
|
157
196
|
switch (command) {
|
|
158
197
|
case 'init': {
|
|
159
|
-
const result = await initWorkspace(process.cwd(), {
|
|
198
|
+
const result = await initWorkspace(process.cwd(), {
|
|
199
|
+
slug: options.get('--slug') || positionals[0],
|
|
200
|
+
agentDelegation: {
|
|
201
|
+
enabled: Boolean(options.get('--enable-agent-delegation') || options.get('--auto-agent-delegation')),
|
|
202
|
+
auto_start: Boolean(options.get('--auto-agent-delegation')),
|
|
203
|
+
threshold: options.get('--agent-delegation-threshold'),
|
|
204
|
+
},
|
|
205
|
+
});
|
|
160
206
|
console.log(JSON.stringify({ ok: true, command, workspaceRoot: result.workspaceRoot, workflow: result.workflow?.state ?? null }, null, 2));
|
|
161
207
|
return;
|
|
162
208
|
}
|
|
@@ -165,6 +211,21 @@ async function main() {
|
|
|
165
211
|
console.log(JSON.stringify({ ok: true, command, contextSetup }, null, 2));
|
|
166
212
|
return;
|
|
167
213
|
}
|
|
214
|
+
case 'install-skills': {
|
|
215
|
+
const installOptions = process.stdin.isTTY && !options.get('--target') && !options.get('--yes')
|
|
216
|
+
? await promptInstallOptions()
|
|
217
|
+
: installOptionsFromArgs(options);
|
|
218
|
+
if (!installOptions) {
|
|
219
|
+
console.log(JSON.stringify({ ok: false, command, cancelled: true }, null, 2));
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const result = await installSkillsForTargets({
|
|
223
|
+
...process.env,
|
|
224
|
+
LOOPX_INSTALL_CWD: process.cwd(),
|
|
225
|
+
}, installOptions);
|
|
226
|
+
console.log(JSON.stringify({ ok: result.ok, command, ...result }, null, 2));
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
168
229
|
case 'clarify': {
|
|
169
230
|
const profile = options.get('--deep') ? 'deep' : 'standard';
|
|
170
231
|
const result = await clarifyStage(process.cwd(), positionals[0], { profile });
|
|
@@ -243,9 +304,22 @@ async function main() {
|
|
|
243
304
|
return;
|
|
244
305
|
}
|
|
245
306
|
case 'repair-install': {
|
|
246
|
-
const result = await
|
|
307
|
+
const result = await installSkillsForTargets({
|
|
308
|
+
...process.env,
|
|
309
|
+
LOOPX_INSTALL_CWD: process.cwd(),
|
|
310
|
+
});
|
|
247
311
|
const ok = result.ok !== false;
|
|
248
|
-
|
|
312
|
+
const codex = result.results?.codex || {};
|
|
313
|
+
console.log(JSON.stringify({
|
|
314
|
+
ok,
|
|
315
|
+
command,
|
|
316
|
+
...result,
|
|
317
|
+
installed: codex.installed || [],
|
|
318
|
+
conflicts: codex.conflicts || [],
|
|
319
|
+
skipped: codex.skipped || [],
|
|
320
|
+
templateGovernance: codex.templateGovernance,
|
|
321
|
+
inspection: codex.inspection,
|
|
322
|
+
}, null, 2));
|
|
249
323
|
if (!ok) {
|
|
250
324
|
process.exitCode = 1;
|
|
251
325
|
}
|
package/src/context-manifest.mjs
CHANGED
|
@@ -134,7 +134,7 @@ export async function generateBuildContextManifest({ cwd, root, state, slug }) {
|
|
|
134
134
|
row(cwd, { stage: 'build', kind: 'architecture', path: join(root, 'architecture.md'), reason: 'architecture_constraints', priority: 21 }),
|
|
135
135
|
row(cwd, { stage: 'build', kind: 'development-plan', path: join(root, 'development-plan.md'), reason: 'execution_steps', priority: 22 }),
|
|
136
136
|
row(cwd, { stage: 'build', kind: 'test-plan', path: join(root, 'test-plan.md'), reason: 'verification_strategy', priority: 23 }),
|
|
137
|
-
row(cwd, { stage: 'build', kind: '
|
|
137
|
+
row(cwd, { stage: 'build', kind: 'requirements-snapshot', path: state.plan_artifact_path || join(cwd, '.loopx', 'plans', `requirements-snapshot-${slug}.md`), reason: 'approved_requirements_snapshot', priority: 30 }),
|
|
138
138
|
row(cwd, { stage: 'build', kind: 'test-spec', path: state.test_spec_artifact_path || join(cwd, '.loopx', 'plans', `test-spec-${slug}.md`), reason: 'test_requirements', priority: 31 }),
|
|
139
139
|
row(cwd, { stage: 'build', kind: 'vertical-slices', path: state.change_artifact_paths?.slices || join(cwd, '.loopx', 'changes', 'active', state.change_id || `chg-${slug}`, 'slices.json'), reason: 'end_to_end_delivery_slices', priority: 32 }),
|
|
140
140
|
row(cwd, { stage: 'build', kind: 'review-rework', path: reviewReworkPath, reason: 'review_requested_implementation_fixes', priority: 33, required: requiresReviewRework }),
|
|
@@ -155,7 +155,7 @@ export async function generateReviewContextManifest({ cwd, root, state, slug })
|
|
|
155
155
|
row(cwd, { stage: 'review', kind: 'source-requirements', path: state.plan_source_spec_path || join(root, 'spec.md'), reason: 'original_requirements_source_of_truth', priority: 11 }),
|
|
156
156
|
row(cwd, { stage: 'review', kind: 'requirement-traceability', path: state.requirement_traceability_path || join(root, 'requirement-traceability.md'), reason: 'source_requirement_coverage_gate', priority: 12 }),
|
|
157
157
|
row(cwd, { stage: 'review', kind: 'test-spec', path: state.test_spec_artifact_path || join(cwd, '.loopx', 'plans', `test-spec-${slug}.md`), reason: 'acceptance_tests', priority: 20 }),
|
|
158
|
-
row(cwd, { stage: 'review', kind: '
|
|
158
|
+
row(cwd, { stage: 'review', kind: 'requirements-snapshot', path: state.plan_artifact_path || join(cwd, '.loopx', 'plans', `requirements-snapshot-${slug}.md`), reason: 'approved_requirements_snapshot', priority: 21 }),
|
|
159
159
|
row(cwd, { stage: 'review', kind: 'vertical-slices', path: state.change_artifact_paths?.slices || join(cwd, '.loopx', 'changes', 'active', state.change_id || `chg-${slug}`, 'slices.json'), reason: 'slice_verification_contract', priority: 22 }),
|
|
160
160
|
row(cwd, { stage: 'review', kind: 'domain-context', path: contextPaths.domainGlossary, reason: 'terminology_and_boundary_review', priority: 23, required: contextSetup.status !== 'missing' }),
|
|
161
161
|
row(cwd, { stage: 'review', kind: 'changed-files', path: join(root, 'review-support', 'changed-files.json'), reason: 'changed_file_evidence', priority: 25, required: false }),
|