@codedrifters/configulator 0.0.253 → 0.0.255
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/lib/index.d.mts +213 -1
- package/lib/index.d.ts +214 -2
- package/lib/index.js +102 -2
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +99 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1342,6 +1342,47 @@ var baseBundle = {
|
|
|
1342
1342
|
]
|
|
1343
1343
|
};
|
|
1344
1344
|
|
|
1345
|
+
// src/agent/bundles/paths.ts
|
|
1346
|
+
var DEFAULT_AGENT_PATHS = Object.freeze({
|
|
1347
|
+
docsRoot: "docs/src/content/docs",
|
|
1348
|
+
researchRoot: "docs/research",
|
|
1349
|
+
profilesRoot: "docs/src/content/docs/profiles",
|
|
1350
|
+
meetingsRoot: "docs/src/content/docs/meetings",
|
|
1351
|
+
requirementsRoot: "docs/src/content/docs/requirements",
|
|
1352
|
+
researchRequirementsRoot: "docs/research/requirements",
|
|
1353
|
+
bcmRoot: "docs/src/content/docs/concepts",
|
|
1354
|
+
peopleRoot: "docs/src/content/docs/profiles/people",
|
|
1355
|
+
companiesRoot: "docs/src/content/docs/profiles/companies",
|
|
1356
|
+
softwareRoot: "docs/src/content/docs/profiles/software",
|
|
1357
|
+
industriesRoot: "docs/src/content/docs/profiles/industries"
|
|
1358
|
+
});
|
|
1359
|
+
function resolveAgentPaths(paths) {
|
|
1360
|
+
const docsRoot = paths?.docsRoot ?? DEFAULT_AGENT_PATHS.docsRoot;
|
|
1361
|
+
const researchRoot = paths?.researchRoot ?? DEFAULT_AGENT_PATHS.researchRoot;
|
|
1362
|
+
const profilesRoot = paths?.profilesRoot ?? `${docsRoot}/profiles`;
|
|
1363
|
+
const meetingsRoot = paths?.meetingsRoot ?? `${docsRoot}/meetings`;
|
|
1364
|
+
const requirementsRoot = paths?.requirementsRoot ?? `${docsRoot}/requirements`;
|
|
1365
|
+
const bcmRoot = paths?.bcmRoot ?? `${docsRoot}/concepts`;
|
|
1366
|
+
const researchRequirementsRoot = paths?.researchRequirementsRoot ?? `${researchRoot}/requirements`;
|
|
1367
|
+
const peopleRoot = paths?.peopleRoot ?? `${profilesRoot}/people`;
|
|
1368
|
+
const companiesRoot = paths?.companiesRoot ?? `${profilesRoot}/companies`;
|
|
1369
|
+
const softwareRoot = paths?.softwareRoot ?? `${profilesRoot}/software`;
|
|
1370
|
+
const industriesRoot = paths?.industriesRoot ?? `${profilesRoot}/industries`;
|
|
1371
|
+
return {
|
|
1372
|
+
docsRoot,
|
|
1373
|
+
researchRoot,
|
|
1374
|
+
profilesRoot,
|
|
1375
|
+
meetingsRoot,
|
|
1376
|
+
requirementsRoot,
|
|
1377
|
+
researchRequirementsRoot,
|
|
1378
|
+
bcmRoot,
|
|
1379
|
+
peopleRoot,
|
|
1380
|
+
companiesRoot,
|
|
1381
|
+
softwareRoot,
|
|
1382
|
+
industriesRoot
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1345
1386
|
// src/agent/bundles/project-context.ts
|
|
1346
1387
|
var PROJECT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
|
|
1347
1388
|
var SUBPROJECT_ROLE_GUIDANCE = [
|
|
@@ -1587,7 +1628,7 @@ var bcmWriterSubAgent = {
|
|
|
1587
1628
|
"",
|
|
1588
1629
|
"| Placeholder | Meaning | Default |",
|
|
1589
1630
|
"|-------------|---------|---------|",
|
|
1590
|
-
|
|
1631
|
+
`| \`<BCM_DOC_ROOT>\` | Root folder for all BCM capability-model documents | \`${DEFAULT_AGENT_PATHS.bcmRoot}/\` |`,
|
|
1591
1632
|
"| `<OUTLINE_ROOT>` | Working-directory root for outline files produced in Phase 1 | `docs/src/content/docs/concepts/.outlines/` |",
|
|
1592
1633
|
"| `<REGISTRY_INDEX>` | Capability registry `_index.md` file that lists every BCM doc | `<BCM_DOC_ROOT>/_index.md` |",
|
|
1593
1634
|
"| `<CAPABILITY_MAP>` | Capability-map file that shows the L1/L2/L3 hierarchy | `<BCM_DOC_ROOT>/capability-map.md` |",
|
|
@@ -12552,7 +12593,7 @@ var researchAnalystSubAgent = {
|
|
|
12552
12593
|
"",
|
|
12553
12594
|
"| Placeholder | Meaning | Default |",
|
|
12554
12595
|
"|-------------|---------|---------|",
|
|
12555
|
-
|
|
12596
|
+
`| \`<RESEARCH_ROOT>\` | Root folder for all research outputs | \`${DEFAULT_AGENT_PATHS.researchRoot}/\` |`,
|
|
12556
12597
|
"| `<SCOPE_DIR>` | Scope files | `<RESEARCH_ROOT>/scopes/` |",
|
|
12557
12598
|
"| `<SLICES_DIR>` | Slice note files | `<RESEARCH_ROOT>/slices/` |",
|
|
12558
12599
|
"| `<DELIVERABLES_DIR>` | Final verified deliverables | `<RESEARCH_ROOT>/deliverables/` |",
|
|
@@ -14447,6 +14488,45 @@ var vitestBundle = {
|
|
|
14447
14488
|
}
|
|
14448
14489
|
};
|
|
14449
14490
|
|
|
14491
|
+
// src/agent/bundles/priority-rules.ts
|
|
14492
|
+
function renderPriorityRulesSection(rules) {
|
|
14493
|
+
if (rules.length === 0) {
|
|
14494
|
+
return "";
|
|
14495
|
+
}
|
|
14496
|
+
const lines = [
|
|
14497
|
+
"## Project-specific priority rules",
|
|
14498
|
+
"",
|
|
14499
|
+
"These rules are supplied by this project through",
|
|
14500
|
+
"`AgentConfigOptions.priorityRules` and override the generic inference",
|
|
14501
|
+
"heuristics above. Rules evaluate in the order listed; **first match",
|
|
14502
|
+
"wins**. The bundle's default heuristics apply only when no rule below",
|
|
14503
|
+
"matches.",
|
|
14504
|
+
""
|
|
14505
|
+
];
|
|
14506
|
+
rules.forEach((rule, index) => {
|
|
14507
|
+
const matchDetails = [];
|
|
14508
|
+
if (rule.match.labels && rule.match.labels.length > 0) {
|
|
14509
|
+
const labelList = rule.match.labels.map((l) => `\`${l}\``).join(", ");
|
|
14510
|
+
matchDetails.push(`labels: ${labelList}`);
|
|
14511
|
+
}
|
|
14512
|
+
if (rule.match.titleRegex) {
|
|
14513
|
+
matchDetails.push(`title regex: \`${rule.match.titleRegex}\``);
|
|
14514
|
+
}
|
|
14515
|
+
if (rule.match.bodyRegex) {
|
|
14516
|
+
matchDetails.push(`body regex: \`${rule.match.bodyRegex}\``);
|
|
14517
|
+
}
|
|
14518
|
+
if (rule.match.issueNumbers && rule.match.issueNumbers.length > 0) {
|
|
14519
|
+
const numberList = rule.match.issueNumbers.map((n) => `#${n}`).join(", ");
|
|
14520
|
+
matchDetails.push(`issue numbers: ${numberList}`);
|
|
14521
|
+
}
|
|
14522
|
+
const matchSummary = matchDetails.length > 0 ? matchDetails.join("; ") : "(no match fields)";
|
|
14523
|
+
lines.push(
|
|
14524
|
+
`${index + 1}. **\`priority:${rule.priority}\`** when ${matchSummary} \u2014 ${rule.rationale}`
|
|
14525
|
+
);
|
|
14526
|
+
});
|
|
14527
|
+
return lines.join("\n");
|
|
14528
|
+
}
|
|
14529
|
+
|
|
14450
14530
|
// src/agent/bundles/index.ts
|
|
14451
14531
|
var BUILT_IN_BUNDLES = [
|
|
14452
14532
|
baseBundle,
|
|
@@ -15367,6 +15447,20 @@ ${extra}`
|
|
|
15367
15447
|
}
|
|
15368
15448
|
}
|
|
15369
15449
|
}
|
|
15450
|
+
if (this.options.priorityRules && this.options.priorityRules.length > 0) {
|
|
15451
|
+
const issueLabelRule = ruleMap.get("issue-label-conventions");
|
|
15452
|
+
if (issueLabelRule) {
|
|
15453
|
+
const section = renderPriorityRulesSection(this.options.priorityRules);
|
|
15454
|
+
ruleMap.set("issue-label-conventions", {
|
|
15455
|
+
...issueLabelRule,
|
|
15456
|
+
content: `${issueLabelRule.content}
|
|
15457
|
+
|
|
15458
|
+
---
|
|
15459
|
+
|
|
15460
|
+
${section}`
|
|
15461
|
+
});
|
|
15462
|
+
}
|
|
15463
|
+
}
|
|
15370
15464
|
return [...ruleMap.values()].sort((a, b) => {
|
|
15371
15465
|
if (a.name === "project-overview") return -1;
|
|
15372
15466
|
if (b.name === "project-overview") return 1;
|
|
@@ -18137,6 +18231,7 @@ export {
|
|
|
18137
18231
|
BUILT_IN_BUNDLES,
|
|
18138
18232
|
CLAUDE_RULE_TARGET,
|
|
18139
18233
|
COMPLETE_JOB_ID,
|
|
18234
|
+
DEFAULT_AGENT_PATHS,
|
|
18140
18235
|
DEFAULT_PRIORITY_LABELS,
|
|
18141
18236
|
DEFAULT_STATUS_LABELS,
|
|
18142
18237
|
DEFAULT_TEARDOWN_BRANCH_PATTERNS,
|
|
@@ -18189,10 +18284,12 @@ export {
|
|
|
18189
18284
|
pnpmBundle,
|
|
18190
18285
|
prReviewBundle,
|
|
18191
18286
|
projenBundle,
|
|
18287
|
+
renderPriorityRulesSection,
|
|
18192
18288
|
requirementsAnalystBundle,
|
|
18193
18289
|
requirementsReviewerBundle,
|
|
18194
18290
|
requirementsWriterBundle,
|
|
18195
18291
|
researchPipelineBundle,
|
|
18292
|
+
resolveAgentPaths,
|
|
18196
18293
|
resolveAstroProjectOutdir,
|
|
18197
18294
|
resolveAwsCdkProjectOutdir,
|
|
18198
18295
|
resolveModelAlias,
|