claude-flow-guidance-implementation 0.1.2 → 0.1.3
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 +18 -0
- package/package.json +1 -1
- package/scaffold/scripts/analyze-guidance.js +1 -1
- package/scaffold/scripts/guidance-ab-benchmark.js +3 -1
- package/scaffold/scripts/guidance-autopilot.js +3 -1
- package/scaffold/scripts/guidance-codex-bridge.js +3 -1
- package/scaffold/scripts/guidance-integrations.js +3 -1
- package/scaffold/scripts/guidance-runtime.js +3 -1
- package/scaffold/scripts/scaffold-guidance.js +3 -1
package/README.md
CHANGED
|
@@ -47,6 +47,24 @@ npx --yes -p claude-flow-guidance-implementation cf-guidance-impl init --target
|
|
|
47
47
|
npx --yes -p claude-flow-guidance-implementation cf-guidance-impl verify --target ~/source/my-project
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
## Package Runtime Mode (No Local Guidance Code)
|
|
51
|
+
|
|
52
|
+
You can run guidance directly from `node_modules` and avoid committing copied guidance runtime files.
|
|
53
|
+
|
|
54
|
+
Example `package.json` scripts in a target repo:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
"guidance:analyze": "node ./node_modules/claude-flow-guidance-implementation/scaffold/scripts/analyze-guidance.js",
|
|
58
|
+
"guidance:optimize": "node ./node_modules/claude-flow-guidance-implementation/scaffold/scripts/guidance-autopilot.js --once --apply --source manual",
|
|
59
|
+
"guidance:ab-benchmark": "node ./node_modules/claude-flow-guidance-implementation/scaffold/scripts/guidance-ab-benchmark.js",
|
|
60
|
+
"guidance:codex:status": "node ./node_modules/claude-flow-guidance-implementation/scaffold/scripts/guidance-codex-bridge.js status"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Project root resolution for scaffold scripts:
|
|
64
|
+
- `GUIDANCE_PROJECT_DIR` (if set)
|
|
65
|
+
- else `CLAUDE_PROJECT_DIR` (if set)
|
|
66
|
+
- else current working directory (`process.cwd()`)
|
|
67
|
+
|
|
50
68
|
## CLI commands
|
|
51
69
|
|
|
52
70
|
```bash
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import { resolve, dirname } from 'node:path';
|
|
|
12
12
|
import { fileURLToPath } from 'node:url';
|
|
13
13
|
|
|
14
14
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
const root = resolve(
|
|
15
|
+
const root = resolve(process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd());
|
|
16
16
|
|
|
17
17
|
// Import guidance modules
|
|
18
18
|
const { analyze, autoOptimize, formatReport, formatBenchmark } = await import('@claude-flow/guidance/analyzer');
|
|
@@ -7,7 +7,9 @@ import { abBenchmark } from '@claude-flow/guidance/analyzer';
|
|
|
7
7
|
import { createSyntheticContentAwareExecutor } from '../src/guidance/content-aware-executor.js';
|
|
8
8
|
|
|
9
9
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
-
const rootDir = resolve(
|
|
10
|
+
const rootDir = resolve(
|
|
11
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
12
|
+
);
|
|
11
13
|
const guidanceDir = resolve(rootDir, '.claude-flow', 'guidance');
|
|
12
14
|
const reportPath = resolve(guidanceDir, 'ab-benchmark-report.json');
|
|
13
15
|
|
|
@@ -19,7 +19,9 @@ import { createCompiler } from '@claude-flow/guidance/compiler';
|
|
|
19
19
|
import { createSyntheticContentAwareExecutor } from '../src/guidance/content-aware-executor.js';
|
|
20
20
|
|
|
21
21
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
22
|
-
const rootDir = resolve(
|
|
22
|
+
const rootDir = resolve(
|
|
23
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
24
|
+
);
|
|
23
25
|
|
|
24
26
|
const DEFAULTS = {
|
|
25
27
|
mode: 'once',
|
|
@@ -5,7 +5,9 @@ import { dirname, resolve } from 'node:path';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const rootDir = resolve(
|
|
8
|
+
const rootDir = resolve(
|
|
9
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
10
|
+
);
|
|
9
11
|
|
|
10
12
|
const SUPPORTED_EVENTS = new Set([
|
|
11
13
|
'pre-command',
|
|
@@ -6,7 +6,9 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
import { createGuidanceAdvancedRuntime } from '../src/guidance/advanced-runtime.js';
|
|
7
7
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const rootDir = resolve(
|
|
9
|
+
const rootDir = resolve(
|
|
10
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
11
|
+
);
|
|
10
12
|
|
|
11
13
|
function usage() {
|
|
12
14
|
console.log(`Usage:
|
|
@@ -5,7 +5,9 @@ import { fileURLToPath } from 'node:url';
|
|
|
5
5
|
import { createGuidancePhase1Runtime } from '../src/guidance/phase1-runtime.js';
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const rootDir = resolve(
|
|
8
|
+
const rootDir = resolve(
|
|
9
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
10
|
+
);
|
|
9
11
|
|
|
10
12
|
function usage() {
|
|
11
13
|
console.log(`Usage:
|
|
@@ -6,7 +6,9 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
import { scaffold } from '@claude-flow/guidance/generators';
|
|
7
7
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const rootDir = resolve(
|
|
9
|
+
const rootDir = resolve(
|
|
10
|
+
process.env.GUIDANCE_PROJECT_DIR || process.env.CLAUDE_PROJECT_DIR || process.cwd()
|
|
11
|
+
);
|
|
10
12
|
const defaultOutputDir = resolve(rootDir, '.claude-flow', 'guidance', 'scaffold');
|
|
11
13
|
|
|
12
14
|
function parseArg(flag) {
|