@nathapp/nax 0.46.3 → 0.48.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/bin/nax.ts +20 -0
- package/dist/nax.js +1344 -747
- package/package.json +1 -1
- package/src/cli/generate.ts +86 -13
- package/src/cli/init-context.ts +57 -0
- package/src/cli/init.ts +14 -1
- package/src/cli/plan.ts +139 -8
- package/src/config/loader.ts +34 -1
- package/src/config/merge.ts +37 -0
- package/src/config/runtime-types.ts +12 -0
- package/src/context/generator.ts +181 -1
- package/src/execution/story-context.ts +33 -2
- package/src/pipeline/stages/context.ts +5 -1
- package/src/pipeline/stages/execution.ts +26 -3
- package/src/pipeline/stages/review.ts +6 -1
- package/src/pipeline/stages/verify.ts +23 -7
- package/src/prd/schema.ts +17 -0
- package/src/prd/types.ts +6 -0
- package/src/precheck/checks-system.ts +25 -87
- package/src/review/orchestrator.ts +6 -2
- package/src/verification/smart-runner.ts +24 -2
package/bin/nax.ts
CHANGED
|
@@ -128,6 +128,7 @@ program
|
|
|
128
128
|
.description("Initialize nax in the current project")
|
|
129
129
|
.option("-d, --dir <path>", "Project directory", process.cwd())
|
|
130
130
|
.option("-f, --force", "Force overwrite existing files", false)
|
|
131
|
+
.option("--package <dir>", "Scaffold per-package nax/context.md (e.g. packages/api)")
|
|
131
132
|
.action(async (options) => {
|
|
132
133
|
// Validate directory path
|
|
133
134
|
let workdir: string;
|
|
@@ -138,6 +139,21 @@ program
|
|
|
138
139
|
process.exit(1);
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
// --package: scaffold per-package nax/context.md only
|
|
143
|
+
if (options.package) {
|
|
144
|
+
const { initPackage: initPkg } = await import("../src/cli/init-context");
|
|
145
|
+
try {
|
|
146
|
+
await initPkg(workdir, options.package, options.force);
|
|
147
|
+
console.log(chalk.green("\n[OK] Package scaffold created."));
|
|
148
|
+
console.log(chalk.dim(` Created: ${options.package}/nax/context.md`));
|
|
149
|
+
console.log(chalk.dim(`\nNext: nax generate --package ${options.package}`));
|
|
150
|
+
} catch (err) {
|
|
151
|
+
console.error(chalk.red(`Error: ${(err as Error).message}`));
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
141
157
|
const naxDir = join(workdir, "nax");
|
|
142
158
|
|
|
143
159
|
if (existsSync(naxDir) && !options.force) {
|
|
@@ -1124,6 +1140,8 @@ program
|
|
|
1124
1140
|
.option("-a, --agent <name>", "Specific agent (claude|opencode|cursor|windsurf|aider)")
|
|
1125
1141
|
.option("--dry-run", "Preview without writing files", false)
|
|
1126
1142
|
.option("--no-auto-inject", "Disable auto-injection of project metadata")
|
|
1143
|
+
.option("--package <dir>", "Generate CLAUDE.md for a specific package (e.g. packages/api)")
|
|
1144
|
+
.option("--all-packages", "Generate CLAUDE.md for all discovered packages", false)
|
|
1127
1145
|
.action(async (options) => {
|
|
1128
1146
|
try {
|
|
1129
1147
|
await generateCommand({
|
|
@@ -1132,6 +1150,8 @@ program
|
|
|
1132
1150
|
agent: options.agent,
|
|
1133
1151
|
dryRun: options.dryRun,
|
|
1134
1152
|
noAutoInject: !options.autoInject,
|
|
1153
|
+
package: options.package,
|
|
1154
|
+
allPackages: options.allPackages,
|
|
1135
1155
|
});
|
|
1136
1156
|
} catch (err) {
|
|
1137
1157
|
console.error(chalk.red(`Error: ${(err as Error).message}`));
|