@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.js
CHANGED
|
@@ -190,6 +190,7 @@ __export(index_exports, {
|
|
|
190
190
|
BUILT_IN_BUNDLES: () => BUILT_IN_BUNDLES,
|
|
191
191
|
CLAUDE_RULE_TARGET: () => CLAUDE_RULE_TARGET,
|
|
192
192
|
COMPLETE_JOB_ID: () => COMPLETE_JOB_ID,
|
|
193
|
+
DEFAULT_AGENT_PATHS: () => DEFAULT_AGENT_PATHS,
|
|
193
194
|
DEFAULT_PRIORITY_LABELS: () => DEFAULT_PRIORITY_LABELS,
|
|
194
195
|
DEFAULT_STATUS_LABELS: () => DEFAULT_STATUS_LABELS,
|
|
195
196
|
DEFAULT_TEARDOWN_BRANCH_PATTERNS: () => DEFAULT_TEARDOWN_BRANCH_PATTERNS,
|
|
@@ -242,10 +243,12 @@ __export(index_exports, {
|
|
|
242
243
|
pnpmBundle: () => pnpmBundle,
|
|
243
244
|
prReviewBundle: () => prReviewBundle,
|
|
244
245
|
projenBundle: () => projenBundle,
|
|
246
|
+
renderPriorityRulesSection: () => renderPriorityRulesSection,
|
|
245
247
|
requirementsAnalystBundle: () => requirementsAnalystBundle,
|
|
246
248
|
requirementsReviewerBundle: () => requirementsReviewerBundle,
|
|
247
249
|
requirementsWriterBundle: () => requirementsWriterBundle,
|
|
248
250
|
researchPipelineBundle: () => researchPipelineBundle,
|
|
251
|
+
resolveAgentPaths: () => resolveAgentPaths,
|
|
249
252
|
resolveAstroProjectOutdir: () => resolveAstroProjectOutdir,
|
|
250
253
|
resolveAwsCdkProjectOutdir: () => resolveAwsCdkProjectOutdir,
|
|
251
254
|
resolveModelAlias: () => resolveModelAlias,
|
|
@@ -1432,6 +1435,47 @@ var baseBundle = {
|
|
|
1432
1435
|
]
|
|
1433
1436
|
};
|
|
1434
1437
|
|
|
1438
|
+
// src/agent/bundles/paths.ts
|
|
1439
|
+
var DEFAULT_AGENT_PATHS = Object.freeze({
|
|
1440
|
+
docsRoot: "docs/src/content/docs",
|
|
1441
|
+
researchRoot: "docs/research",
|
|
1442
|
+
profilesRoot: "docs/src/content/docs/profiles",
|
|
1443
|
+
meetingsRoot: "docs/src/content/docs/meetings",
|
|
1444
|
+
requirementsRoot: "docs/src/content/docs/requirements",
|
|
1445
|
+
researchRequirementsRoot: "docs/research/requirements",
|
|
1446
|
+
bcmRoot: "docs/src/content/docs/concepts",
|
|
1447
|
+
peopleRoot: "docs/src/content/docs/profiles/people",
|
|
1448
|
+
companiesRoot: "docs/src/content/docs/profiles/companies",
|
|
1449
|
+
softwareRoot: "docs/src/content/docs/profiles/software",
|
|
1450
|
+
industriesRoot: "docs/src/content/docs/profiles/industries"
|
|
1451
|
+
});
|
|
1452
|
+
function resolveAgentPaths(paths) {
|
|
1453
|
+
const docsRoot = paths?.docsRoot ?? DEFAULT_AGENT_PATHS.docsRoot;
|
|
1454
|
+
const researchRoot = paths?.researchRoot ?? DEFAULT_AGENT_PATHS.researchRoot;
|
|
1455
|
+
const profilesRoot = paths?.profilesRoot ?? `${docsRoot}/profiles`;
|
|
1456
|
+
const meetingsRoot = paths?.meetingsRoot ?? `${docsRoot}/meetings`;
|
|
1457
|
+
const requirementsRoot = paths?.requirementsRoot ?? `${docsRoot}/requirements`;
|
|
1458
|
+
const bcmRoot = paths?.bcmRoot ?? `${docsRoot}/concepts`;
|
|
1459
|
+
const researchRequirementsRoot = paths?.researchRequirementsRoot ?? `${researchRoot}/requirements`;
|
|
1460
|
+
const peopleRoot = paths?.peopleRoot ?? `${profilesRoot}/people`;
|
|
1461
|
+
const companiesRoot = paths?.companiesRoot ?? `${profilesRoot}/companies`;
|
|
1462
|
+
const softwareRoot = paths?.softwareRoot ?? `${profilesRoot}/software`;
|
|
1463
|
+
const industriesRoot = paths?.industriesRoot ?? `${profilesRoot}/industries`;
|
|
1464
|
+
return {
|
|
1465
|
+
docsRoot,
|
|
1466
|
+
researchRoot,
|
|
1467
|
+
profilesRoot,
|
|
1468
|
+
meetingsRoot,
|
|
1469
|
+
requirementsRoot,
|
|
1470
|
+
researchRequirementsRoot,
|
|
1471
|
+
bcmRoot,
|
|
1472
|
+
peopleRoot,
|
|
1473
|
+
companiesRoot,
|
|
1474
|
+
softwareRoot,
|
|
1475
|
+
industriesRoot
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1435
1479
|
// src/agent/bundles/project-context.ts
|
|
1436
1480
|
var PROJECT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
|
|
1437
1481
|
var SUBPROJECT_ROLE_GUIDANCE = [
|
|
@@ -1677,7 +1721,7 @@ var bcmWriterSubAgent = {
|
|
|
1677
1721
|
"",
|
|
1678
1722
|
"| Placeholder | Meaning | Default |",
|
|
1679
1723
|
"|-------------|---------|---------|",
|
|
1680
|
-
|
|
1724
|
+
`| \`<BCM_DOC_ROOT>\` | Root folder for all BCM capability-model documents | \`${DEFAULT_AGENT_PATHS.bcmRoot}/\` |`,
|
|
1681
1725
|
"| `<OUTLINE_ROOT>` | Working-directory root for outline files produced in Phase 1 | `docs/src/content/docs/concepts/.outlines/` |",
|
|
1682
1726
|
"| `<REGISTRY_INDEX>` | Capability registry `_index.md` file that lists every BCM doc | `<BCM_DOC_ROOT>/_index.md` |",
|
|
1683
1727
|
"| `<CAPABILITY_MAP>` | Capability-map file that shows the L1/L2/L3 hierarchy | `<BCM_DOC_ROOT>/capability-map.md` |",
|
|
@@ -12642,7 +12686,7 @@ var researchAnalystSubAgent = {
|
|
|
12642
12686
|
"",
|
|
12643
12687
|
"| Placeholder | Meaning | Default |",
|
|
12644
12688
|
"|-------------|---------|---------|",
|
|
12645
|
-
|
|
12689
|
+
`| \`<RESEARCH_ROOT>\` | Root folder for all research outputs | \`${DEFAULT_AGENT_PATHS.researchRoot}/\` |`,
|
|
12646
12690
|
"| `<SCOPE_DIR>` | Scope files | `<RESEARCH_ROOT>/scopes/` |",
|
|
12647
12691
|
"| `<SLICES_DIR>` | Slice note files | `<RESEARCH_ROOT>/slices/` |",
|
|
12648
12692
|
"| `<DELIVERABLES_DIR>` | Final verified deliverables | `<RESEARCH_ROOT>/deliverables/` |",
|
|
@@ -14537,6 +14581,45 @@ var vitestBundle = {
|
|
|
14537
14581
|
}
|
|
14538
14582
|
};
|
|
14539
14583
|
|
|
14584
|
+
// src/agent/bundles/priority-rules.ts
|
|
14585
|
+
function renderPriorityRulesSection(rules) {
|
|
14586
|
+
if (rules.length === 0) {
|
|
14587
|
+
return "";
|
|
14588
|
+
}
|
|
14589
|
+
const lines = [
|
|
14590
|
+
"## Project-specific priority rules",
|
|
14591
|
+
"",
|
|
14592
|
+
"These rules are supplied by this project through",
|
|
14593
|
+
"`AgentConfigOptions.priorityRules` and override the generic inference",
|
|
14594
|
+
"heuristics above. Rules evaluate in the order listed; **first match",
|
|
14595
|
+
"wins**. The bundle's default heuristics apply only when no rule below",
|
|
14596
|
+
"matches.",
|
|
14597
|
+
""
|
|
14598
|
+
];
|
|
14599
|
+
rules.forEach((rule, index) => {
|
|
14600
|
+
const matchDetails = [];
|
|
14601
|
+
if (rule.match.labels && rule.match.labels.length > 0) {
|
|
14602
|
+
const labelList = rule.match.labels.map((l) => `\`${l}\``).join(", ");
|
|
14603
|
+
matchDetails.push(`labels: ${labelList}`);
|
|
14604
|
+
}
|
|
14605
|
+
if (rule.match.titleRegex) {
|
|
14606
|
+
matchDetails.push(`title regex: \`${rule.match.titleRegex}\``);
|
|
14607
|
+
}
|
|
14608
|
+
if (rule.match.bodyRegex) {
|
|
14609
|
+
matchDetails.push(`body regex: \`${rule.match.bodyRegex}\``);
|
|
14610
|
+
}
|
|
14611
|
+
if (rule.match.issueNumbers && rule.match.issueNumbers.length > 0) {
|
|
14612
|
+
const numberList = rule.match.issueNumbers.map((n) => `#${n}`).join(", ");
|
|
14613
|
+
matchDetails.push(`issue numbers: ${numberList}`);
|
|
14614
|
+
}
|
|
14615
|
+
const matchSummary = matchDetails.length > 0 ? matchDetails.join("; ") : "(no match fields)";
|
|
14616
|
+
lines.push(
|
|
14617
|
+
`${index + 1}. **\`priority:${rule.priority}\`** when ${matchSummary} \u2014 ${rule.rationale}`
|
|
14618
|
+
);
|
|
14619
|
+
});
|
|
14620
|
+
return lines.join("\n");
|
|
14621
|
+
}
|
|
14622
|
+
|
|
14540
14623
|
// src/agent/bundles/index.ts
|
|
14541
14624
|
var BUILT_IN_BUNDLES = [
|
|
14542
14625
|
baseBundle,
|
|
@@ -15457,6 +15540,20 @@ ${extra}`
|
|
|
15457
15540
|
}
|
|
15458
15541
|
}
|
|
15459
15542
|
}
|
|
15543
|
+
if (this.options.priorityRules && this.options.priorityRules.length > 0) {
|
|
15544
|
+
const issueLabelRule = ruleMap.get("issue-label-conventions");
|
|
15545
|
+
if (issueLabelRule) {
|
|
15546
|
+
const section = renderPriorityRulesSection(this.options.priorityRules);
|
|
15547
|
+
ruleMap.set("issue-label-conventions", {
|
|
15548
|
+
...issueLabelRule,
|
|
15549
|
+
content: `${issueLabelRule.content}
|
|
15550
|
+
|
|
15551
|
+
---
|
|
15552
|
+
|
|
15553
|
+
${section}`
|
|
15554
|
+
});
|
|
15555
|
+
}
|
|
15556
|
+
}
|
|
15460
15557
|
return [...ruleMap.values()].sort((a, b) => {
|
|
15461
15558
|
if (a.name === "project-overview") return -1;
|
|
15462
15559
|
if (b.name === "project-overview") return 1;
|
|
@@ -18215,6 +18312,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
18215
18312
|
BUILT_IN_BUNDLES,
|
|
18216
18313
|
CLAUDE_RULE_TARGET,
|
|
18217
18314
|
COMPLETE_JOB_ID,
|
|
18315
|
+
DEFAULT_AGENT_PATHS,
|
|
18218
18316
|
DEFAULT_PRIORITY_LABELS,
|
|
18219
18317
|
DEFAULT_STATUS_LABELS,
|
|
18220
18318
|
DEFAULT_TEARDOWN_BRANCH_PATTERNS,
|
|
@@ -18267,10 +18365,12 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
18267
18365
|
pnpmBundle,
|
|
18268
18366
|
prReviewBundle,
|
|
18269
18367
|
projenBundle,
|
|
18368
|
+
renderPriorityRulesSection,
|
|
18270
18369
|
requirementsAnalystBundle,
|
|
18271
18370
|
requirementsReviewerBundle,
|
|
18272
18371
|
requirementsWriterBundle,
|
|
18273
18372
|
researchPipelineBundle,
|
|
18373
|
+
resolveAgentPaths,
|
|
18274
18374
|
resolveAstroProjectOutdir,
|
|
18275
18375
|
resolveAwsCdkProjectOutdir,
|
|
18276
18376
|
resolveModelAlias,
|