@brainforge/core 3.1.7 → 3.1.8
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/dist/index.d.ts +1 -1
- package/dist/index.js +77 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type TaskStatus = 'todo' | 'in-progress' | 'done' | 'skipped';
|
|
|
8
8
|
type TaskPriority = 'low' | 'medium' | 'high' | 'critical';
|
|
9
9
|
type TaskType = 'backend' | 'frontend' | 'database' | 'devops' | 'security' | 'test' | 'docs' | 'general';
|
|
10
10
|
type BugSeverity = 'blocker' | 'high' | 'medium' | 'low';
|
|
11
|
-
type AgentId = 'orchestrator' | 'researcher' | 'codebase-mapper' | 'requirements-analyst' | 'architect' | 'planner' | 'backend-engineer' | 'frontend-engineer' | 'fullstack-engineer' | 'database-engineer' | 'devops-engineer' | 'security-reviewer' | 'test-engineer' | 'ui-reviewer' | 'debugger' | 'verifier' | 'docs-writer' | 'professor' | 'student-explainer' | 'ship-manager';
|
|
11
|
+
type AgentId = 'orchestrator' | 'researcher' | 'codebase-mapper' | 'requirements-analyst' | 'architect' | 'planner' | 'backend-engineer' | 'frontend-engineer' | 'fullstack-engineer' | 'database-engineer' | 'devops-engineer' | 'security-reviewer' | 'test-engineer' | 'ui-reviewer' | 'debugger' | 'verifier' | 'docs-writer' | 'professor' | 'student-explainer' | 'ship-manager' | 'code-reviewer' | 'code-fixer' | 'pattern-mapper' | 'integration-checker' | 'nyquist-auditor' | 'ui-researcher' | 'plan-checker';
|
|
12
12
|
interface ProjectConfig {
|
|
13
13
|
name: string;
|
|
14
14
|
description: string;
|
package/dist/index.js
CHANGED
|
@@ -1621,6 +1621,76 @@ var AGENT_REGISTRY = [
|
|
|
1621
1621
|
forbidden: ["shipping with open critical bugs", "skipping memory update"],
|
|
1622
1622
|
qualityChecks: ["no critical bugs in BUGS.md", "CHANGELOG entry accurate", "memory entry written"],
|
|
1623
1623
|
taskTypes: ["general"]
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
id: "code-reviewer",
|
|
1627
|
+
name: "Code Reviewer",
|
|
1628
|
+
purpose: "Adversarially reviews source code for bugs, security issues, and quality defects. Assumes all code contains defects until proven otherwise.",
|
|
1629
|
+
inputs: ["changed source files", "PLAN.md", "CONVENTIONS.md", "task context"],
|
|
1630
|
+
outputs: ["REVIEW.md with severity-classified findings (critical / warning / info)"],
|
|
1631
|
+
forbidden: ["modifying source code", "approving code with critical findings", "reviewing undeclared scope"],
|
|
1632
|
+
qualityChecks: ["every critical finding has a concrete fix suggestion", "OWASP patterns checked", "no false positives from existence-equals-correctness assumption"],
|
|
1633
|
+
taskTypes: ["backend", "frontend", "security", "general"]
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
id: "code-fixer",
|
|
1637
|
+
name: "Code Fixer",
|
|
1638
|
+
purpose: "Reads REVIEW.md and applies the minimal fix for each finding. One focused change per finding \u2014 no refactors, no scope creep.",
|
|
1639
|
+
inputs: ["REVIEW.md", "source files referenced in findings", "CONVENTIONS.md"],
|
|
1640
|
+
outputs: ["fixed source files", "FIX_SUMMARY.md listing each finding and resolution"],
|
|
1641
|
+
forbidden: ["refactoring code not in a finding", "changing behaviour beyond the fix", "skipping regression tests"],
|
|
1642
|
+
qualityChecks: ["every critical finding addressed", "regression test added for each fix", "build passes after all changes"],
|
|
1643
|
+
taskTypes: ["backend", "frontend", "general"]
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
id: "pattern-mapper",
|
|
1647
|
+
name: "Pattern Mapper",
|
|
1648
|
+
purpose: "Before planning, maps each new file to the closest existing code analog. Gives the planner concrete templates instead of starting from scratch.",
|
|
1649
|
+
inputs: ["list of files to create or modify", "RESEARCH.md", "codebase source files"],
|
|
1650
|
+
outputs: ["PATTERNS.md \u2014 per-file role, data-flow classification, analog path, extracted code excerpts"],
|
|
1651
|
+
forbidden: ["modifying source code", "inventing patterns not present in codebase", "reading more than 5 analogs per file"],
|
|
1652
|
+
qualityChecks: ["every new file has an analog or explicit no-analog note", "code excerpts include line numbers", "cross-cutting patterns listed"],
|
|
1653
|
+
taskTypes: ["general"]
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
id: "integration-checker",
|
|
1657
|
+
name: "Integration Checker",
|
|
1658
|
+
purpose: "After multiple phases complete, verifies all cross-phase wiring is intact. Assumes connections are broken until grep evidence proves otherwise.",
|
|
1659
|
+
inputs: ["phase SUMMARY.md files", "source files", "API routes", "component tree", "REQUIREMENTS.md"],
|
|
1660
|
+
outputs: ["INTEGRATION.md \u2014 wiring status, orphaned exports, broken E2E flows, auth coverage gaps"],
|
|
1661
|
+
forbidden: ["treating file existence as proof of integration", "approving broken E2E flows", "skipping auth coverage check"],
|
|
1662
|
+
qualityChecks: ["every public export has a consumer or explicit orphan note", "all user-facing flows traced end-to-end", "findings mapped to requirement IDs"],
|
|
1663
|
+
taskTypes: ["backend", "frontend", "general"]
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
id: "nyquist-auditor",
|
|
1667
|
+
name: "Nyquist Auditor",
|
|
1668
|
+
purpose: "Fills test coverage gaps by generating behavioral tests that can genuinely fail. Adversarially assumes each uncovered path is broken until a passing test proves otherwise.",
|
|
1669
|
+
inputs: ["coverage gaps list", "source files", "existing test files", "PLAN.md acceptance criteria"],
|
|
1670
|
+
outputs: ["new test files", "COVERAGE.md with gap-fill status (FILLED / ESCALATED / SKIPPED)"],
|
|
1671
|
+
forbidden: ["testing implementation internals instead of behaviour", "writing tests that cannot fail", "patching source code to make tests pass"],
|
|
1672
|
+
qualityChecks: ["every gap reaches a terminal state", "tests assert observable outcomes", "no more than 3 debug iterations per failing test before escalation"],
|
|
1673
|
+
taskTypes: ["test", "general"]
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
id: "ui-researcher",
|
|
1677
|
+
name: "UI Researcher",
|
|
1678
|
+
purpose: "Produces the UI-SPEC.md design contract before any UI is built: spacing scale, typography, colour allocation, component inventory, and copywriting templates.",
|
|
1679
|
+
inputs: ["REQUIREMENTS.md", "RESEARCH.md", "existing design tokens", "component library config"],
|
|
1680
|
+
outputs: ["UI-SPEC.md \u2014 prescriptive values (not recommendations) for every visual dimension"],
|
|
1681
|
+
forbidden: ['vague guidance ("use consistent spacing")', "recommending options without selecting one", "skipping accessibility contrast ratios"],
|
|
1682
|
+
qualityChecks: ["spacing scale has \u22654 steps", "typography has body + heading + code sizes defined", "colour palette includes accessible contrast pairs", "all key screens enumerated"],
|
|
1683
|
+
taskTypes: ["frontend", "general"]
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
id: "plan-checker",
|
|
1687
|
+
name: "Plan Checker",
|
|
1688
|
+
purpose: "Goal-backward validates a PLAN.md before execution begins. Confirms the plan will actually achieve the phase goal \u2014 not just complete tasks.",
|
|
1689
|
+
inputs: ["PLAN.md", "REQUIREMENTS.md", "ROADMAP.md phase goal", "prior phase SUMMARYs"],
|
|
1690
|
+
outputs: ["PLAN_CHECK.md \u2014 PASS / BLOCK verdict with specific gap list and fix suggestions"],
|
|
1691
|
+
forbidden: ["rubber-stamping a plan with gaps", "blocking on style preferences", "inventing requirements not in REQUIREMENTS.md"],
|
|
1692
|
+
qualityChecks: ["every must-have requirement has a covering task", "no task modifies files outside declared scope", "dependency graph is acyclic", "acceptance criteria are verifiable"],
|
|
1693
|
+
taskTypes: ["general"]
|
|
1624
1694
|
}
|
|
1625
1695
|
];
|
|
1626
1696
|
var REGISTRY_MAP = new Map(
|
|
@@ -6681,6 +6751,13 @@ function inferAgent(task) {
|
|
|
6681
6751
|
if (task.type === "docs" || /readme|doc|changelog|comment|jsdoc/.test(text)) return "docs-writer";
|
|
6682
6752
|
if (task.type === "frontend" || /component|ui|page|layout|style|css|form|modal|button|nav/.test(text)) return "frontend-engineer";
|
|
6683
6753
|
if (task.type === "backend" || /api|endpoint|route|controller|service|handler|webhook|cron/.test(text)) return "backend-engineer";
|
|
6754
|
+
if (/review|audit|inspect|analyse|analyze/.test(text) && !/security|auth/.test(text)) return "code-reviewer";
|
|
6755
|
+
if (/fix|patch|remediat/.test(text) && /review|finding|bug/.test(text)) return "code-fixer";
|
|
6756
|
+
if (/pattern|analog|template|scaffold/.test(text)) return "pattern-mapper";
|
|
6757
|
+
if (/integrat|wiring|cross.phase|end.to.end|e2e/.test(text)) return "integration-checker";
|
|
6758
|
+
if (/coverage|gap|nyquist|missing test/.test(text)) return "nyquist-auditor";
|
|
6759
|
+
if (/ui.spec|design.contract|spacing|typography|colour|color/.test(text)) return "ui-researcher";
|
|
6760
|
+
if (/plan.check|validate.plan|verify.plan/.test(text)) return "plan-checker";
|
|
6684
6761
|
return "fullstack-engineer";
|
|
6685
6762
|
}
|
|
6686
6763
|
function topologicalSort(tasks) {
|