nexarch 0.11.3 → 0.11.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.
|
@@ -128,6 +128,8 @@ export async function checkIn(args) {
|
|
|
128
128
|
console.log(` Tech : ${app.recommendedTechnologyCount} recommended`);
|
|
129
129
|
if (typeof app.confirmedPolicyCount === "number")
|
|
130
130
|
console.log(` Policy : ${app.confirmedPolicyCount} confirmed`);
|
|
131
|
+
if (app.requiresPolicyReview)
|
|
132
|
+
console.log(` Gate : policy review required`);
|
|
131
133
|
console.log(` ID : ${app.id}`);
|
|
132
134
|
console.log(` Realise : npx nexarch proposals start --id "${app.id}"`);
|
|
133
135
|
}
|
|
@@ -203,7 +203,7 @@ function buildReadme(proposal, template) {
|
|
|
203
203
|
|
|
204
204
|
${proposal.application.description ?? "Application scaffold generated from a NexArch proposal."}
|
|
205
205
|
|
|
206
|
-
## Starter template
|
|
206
|
+
${proposal.proposal.requiresPolicyReview ? `> Policy review is required before activation. Review docs/architecture/policy-controls.md and satisfy each required control before marking this application active.\n\n` : ""}## Starter template
|
|
207
207
|
|
|
208
208
|
- Template: ${template.label}
|
|
209
209
|
- Runtime: ${template.runtime}
|
|
@@ -226,7 +226,7 @@ ${formatBulletList(technologies)}
|
|
|
226
226
|
|
|
227
227
|
${formatBulletList(policies)}
|
|
228
228
|
|
|
229
|
-
## Getting started
|
|
229
|
+
${proposal.proposal.preScaffoldInstructions ? `## Pre-scaffold instruction\n\n${proposal.proposal.preScaffoldInstructions}\n\n` : ""}## Getting started
|
|
230
230
|
|
|
231
231
|
${template.nextSteps.map((step, index) => `${index + 1}. ${step}`).join("\n")}
|
|
232
232
|
`;
|
|
@@ -234,7 +234,10 @@ ${template.nextSteps.map((step, index) => `${index + 1}. ${step}`).join("\n")}
|
|
|
234
234
|
function buildProposalMarkdown(proposal) {
|
|
235
235
|
const techLines = proposal.technologyChoices.map((tech) => `${tech.name}${tech.entitySubtypeCode ? ` (${tech.entitySubtypeCode})` : ""}${tech.description ? ` — ${tech.description}` : ""}`);
|
|
236
236
|
const policyLines = proposal.policyControls.map((control) => `${control.name}${control.description ? ` — ${control.description}` : ""}`);
|
|
237
|
-
|
|
237
|
+
const gateLines = proposal.proposal.requiresPolicyReview
|
|
238
|
+
? `- Activation gate: policy review required\n- Required policy controls: ${proposal.proposal.requiredPolicyControlIds?.length ?? 0}\n`
|
|
239
|
+
: "";
|
|
240
|
+
return `# NexArch proposal context\n\n## Application\n\n- Name: ${proposal.application.name}\n- ID: ${proposal.application.id}\n- Reference: ${proposal.application.entityRef ?? "n/a"}\n- Subtype: ${proposal.application.entitySubtypeCode ?? "n/a"}\n- Description: ${proposal.application.description ?? "n/a"}\n- Recommendation basis: ${proposal.application.recommendationBasis ?? "n/a"}\n- Proposal source: ${proposal.proposal.proposalSource ?? "n/a"}\n${gateLines}\n${proposal.application.recommendationSummary ? `## Recommendation summary\n\n${proposal.application.recommendationSummary}\n\n` : ""}${proposal.proposal.preScaffoldInstructions ? `## Pre-scaffold instruction\n\n${proposal.proposal.preScaffoldInstructions}\n\n` : ""}## Technology choices\n\n${formatBulletList(techLines)}\n\n## Policy controls\n\n${formatBulletList(policyLines)}\n`;
|
|
238
241
|
}
|
|
239
242
|
function buildPolicyMarkdown(proposal) {
|
|
240
243
|
if (proposal.policyControls.length === 0) {
|
|
@@ -242,12 +245,17 @@ function buildPolicyMarkdown(proposal) {
|
|
|
242
245
|
}
|
|
243
246
|
return `# Policy controls\n\n${proposal.policyControls.map((control) => {
|
|
244
247
|
const guidance = trimText(typeof control.controlAttributes.summary === "string" ? control.controlAttributes.summary : null);
|
|
245
|
-
const rules =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
const rules = (control.rules ?? [])
|
|
249
|
+
.map((rule) => {
|
|
250
|
+
const title = trimText(rule.title) ?? trimText(rule.ruleId) ?? trimText(rule.name) ?? "Unnamed rule";
|
|
251
|
+
const level = trimText(rule.requirementLevel);
|
|
252
|
+
const mode = trimText(rule.ruleMode);
|
|
253
|
+
const text = trimText(rule.ruleText);
|
|
254
|
+
return `${title}${level ? ` [${level}]` : ""}${mode ? ` (${mode})` : ""}${text ? ` — ${text}` : ""}`;
|
|
255
|
+
})
|
|
256
|
+
.filter((value) => Boolean(value));
|
|
257
|
+
const auditRules = Array.isArray(control.auditRules) ? control.auditRules.length : 0;
|
|
258
|
+
return `## ${control.name}\n\n${control.description ?? "No description provided."}\n\n${guidance ? `Guidance: ${guidance}\n\n` : ""}${control.policyMarkdown ? `Policy markdown\n\n${control.policyMarkdown}\n\n` : ""}${rules.length > 0 ? `Rules\n\n${formatBulletList(rules)}\n\n` : ""}${auditRules > 0 ? `Audit rules: ${auditRules}\n` : ""}`;
|
|
251
259
|
}).join("\n")}`;
|
|
252
260
|
}
|
|
253
261
|
function buildTsConfig() {
|
|
@@ -560,6 +568,7 @@ export async function proposalsStart(args) {
|
|
|
560
568
|
command: "proposals start",
|
|
561
569
|
operatorEmail: creds.email,
|
|
562
570
|
},
|
|
571
|
+
reviewedPolicyControlIds: proposal.proposal.requiredPolicyControlIds ?? proposal.proposal.confirmedPolicyControlIds,
|
|
563
572
|
}, { companyId: creds.companyId });
|
|
564
573
|
activated = parseToolText(activateRaw);
|
|
565
574
|
}
|
package/dist/index.js
CHANGED
|
@@ -189,8 +189,9 @@ Usage:
|
|
|
189
189
|
--json JSON output includes draftApplications[] and proposedApplications[]
|
|
190
190
|
nexarch proposals start
|
|
191
191
|
Start a new application workspace from a proposed NexArch app.
|
|
192
|
-
Lists proposed apps,
|
|
193
|
-
project scaffold, and activates the proposal to active
|
|
192
|
+
Lists proposed apps, shows policy review gates, writes a starter
|
|
193
|
+
project scaffold, and activates the proposal to active once
|
|
194
|
+
required policy controls are acknowledged.
|
|
194
195
|
Options: --id <applicationId>
|
|
195
196
|
--dir <path>
|
|
196
197
|
--reason <text>
|