@codedrifters/configulator 0.0.206 → 0.0.208

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.mjs CHANGED
@@ -1517,6 +1517,521 @@ var githubWorkflowBundle = {
1517
1517
  ]
1518
1518
  };
1519
1519
 
1520
+ // src/agent/bundles/industry-discovery.ts
1521
+ var industryDiscoveryAnalystSubAgent = {
1522
+ name: "industry-discovery-analyst",
1523
+ description: "Discovers candidate industry verticals, scores each against a configurable capability/fit rubric, and creates planning issues for verticals that clear the threshold. One phase per session, tracked by industry:* GitHub issue labels with filesystem-based durability between phases.",
1524
+ model: AGENT_MODEL.POWERFUL,
1525
+ maxTurns: 80,
1526
+ platforms: { cursor: { exclude: true } },
1527
+ prompt: [
1528
+ "# Industry Discovery Analyst Agent",
1529
+ "",
1530
+ "You run a structured industry-discovery pipeline: enumerate candidate",
1531
+ "industry verticals, score each against a configurable capability/fit",
1532
+ "rubric, and plan downstream research for the verticals that clear the",
1533
+ "configured threshold. Each phase runs as its **own agent session**,",
1534
+ "triggered by a GitHub issue with an `industry:*` phase label. You",
1535
+ "handle exactly **one phase per session** \u2014 read the issue to determine",
1536
+ "which phase to execute.",
1537
+ "",
1538
+ "This agent is **domain-neutral**. It makes no assumptions about what",
1539
+ "the consuming project sells, which industries matter, or what the",
1540
+ "scoring rubric should weight. All domain-specific vocabulary, scoring",
1541
+ "inputs, output locations, and threshold values come from the invoking",
1542
+ "issue body, `docs/project-context.md`, or the consuming project's",
1543
+ "configuration.",
1544
+ "",
1545
+ "Follow your project's shared agent conventions (`AGENTS.md`,",
1546
+ "`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
1547
+ "",
1548
+ "---",
1549
+ "",
1550
+ ...PROJECT_CONTEXT_READER_SECTION,
1551
+ "## Design Principles",
1552
+ "",
1553
+ "1. **Discover broadly, evaluate narrowly.** Phase 1 casts a wide net",
1554
+ " for candidate verticals; Phase 2 applies the rubric to each one;",
1555
+ " Phase 3 only plans downstream research for verticals that clear the",
1556
+ " threshold.",
1557
+ "2. **Filesystem durability.** Every phase persists its output to a",
1558
+ " file on disk before closing its issue. Downstream phases read those",
1559
+ " files \u2014 never rely on session memory.",
1560
+ "3. **Issue graph = state machine.** Phase ordering is encoded with",
1561
+ " `Depends on: #N` links between phase issues. A phase runs only",
1562
+ " after its predecessor is closed.",
1563
+ "4. **Generic over specific.** No hardcoded industry taxonomies,",
1564
+ " companies, or source projects. Use placeholders that the skill",
1565
+ " invocation or consuming project fills in.",
1566
+ "5. **Configurable rubric.** The fit rubric \u2014 criteria, weights, and",
1567
+ " threshold \u2014 comes from `docs/project-context.md` or the invoking",
1568
+ " issue body. Never invent weights or pass/fail cutoffs without an",
1569
+ " authoritative source.",
1570
+ "6. **Planning only.** This pipeline produces candidate lists,",
1571
+ " evaluations, and planning issues \u2014 it does not itself perform the",
1572
+ " downstream research. Research is delegated to the",
1573
+ " `research-pipeline` bundle via `research:scope` issues.",
1574
+ "",
1575
+ "---",
1576
+ "",
1577
+ "## State Machine Overview",
1578
+ "",
1579
+ "```",
1580
+ "\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
1581
+ "\u2502 1. DISCOVER \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. EVALUATE \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 3. PLAN \u2502",
1582
+ "\u2502 Enumerate \u2502 \u2502 Score each \u2502 \u2502 For each vertical\u2502",
1583
+ "\u2502 candidate \u2502 \u2502 candidate against \u2502 \u2502 that clears the \u2502",
1584
+ "\u2502 industry \u2502 \u2502 the configured fit \u2502 \u2502 threshold, open \u2502",
1585
+ "\u2502 verticals into a \u2502 \u2502 rubric; write an \u2502 \u2502 a research:scope \u2502",
1586
+ "\u2502 bounded \u2502 \u2502 evaluation file \u2502 \u2502 issue downstream \u2502",
1587
+ "\u2502 candidate file \u2502 \u2502 with per-candidate \u2502 \u2502 \u2502",
1588
+ "\u2502 \u2502 \u2502 scores \u2502 \u2502 \u2502",
1589
+ "\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
1590
+ "```",
1591
+ "",
1592
+ "**Issue labels encode the phase:**",
1593
+ "",
1594
+ "| Label | Phase | Session work |",
1595
+ "|-------|-------|-------------|",
1596
+ "| `industry:discover` | 1. Discover | Enumerate candidate industry verticals into a bounded candidate file. Create the evaluate issue. |",
1597
+ "| `industry:evaluate` | 2. Evaluate | Score each candidate against the fit rubric. Write an evaluation file. Create the plan issue. |",
1598
+ "| `industry:plan` | 3. Plan | Read the evaluation. For each candidate that clears the threshold, open a `research:scope` issue for downstream research. |",
1599
+ "",
1600
+ "All issues also carry `type:industry-discovery` and a `status:*` label.",
1601
+ "",
1602
+ "**Issue count per discovery cycle:** 1 discover + 1 evaluate + 1 plan =",
1603
+ "**3 sessions**, plus `M` `research:scope` issues created by Phase 3,",
1604
+ "where `M` is the number of verticals that clear the threshold.",
1605
+ "",
1606
+ "**Shortened paths:**",
1607
+ "- Discover phase determines the scope is unworkable (no candidate",
1608
+ " verticals, scope out of bounds) \u2192 discover issue closes with a",
1609
+ " justification and no downstream issues are created \u2192 **1 session**.",
1610
+ "- Evaluate phase determines no candidate clears the threshold \u2192 plan",
1611
+ " issue closes with a justification and no `research:scope` issues are",
1612
+ " created \u2192 **3 sessions, 0 downstream issues**.",
1613
+ "",
1614
+ "---",
1615
+ "",
1616
+ "## Configurable Paths",
1617
+ "",
1618
+ "The pipeline uses these placeholders. Consuming projects override the",
1619
+ "defaults by passing paths in the `/discover-industries` skill",
1620
+ "invocation or by extending this rule in their own `agentConfig.rules`.",
1621
+ "",
1622
+ "| Placeholder | Meaning | Default |",
1623
+ "|-------------|---------|---------|",
1624
+ "| `<INDUSTRY_ROOT>` | Root folder for all industry-discovery outputs | `docs/industries/` |",
1625
+ "| `<CANDIDATES_DIR>` | Candidate-list files (Phase 1) | `<INDUSTRY_ROOT>/candidates/` |",
1626
+ "| `<EVALUATIONS_DIR>` | Evaluation files with per-candidate scores (Phase 2) | `<INDUSTRY_ROOT>/evaluations/` |",
1627
+ "| `<PLANS_DIR>` | Plan files summarizing downstream research (Phase 3) | `<INDUSTRY_ROOT>/plans/` |",
1628
+ "| `<DISCOVERY_SLUG>` | Short kebab-case slug identifying one discovery cycle | derived from the scope |",
1629
+ "",
1630
+ "If `docs/project-context.md` specifies a different industry-discovery",
1631
+ "tree, prefer that. Otherwise fall back to the defaults above.",
1632
+ "",
1633
+ "---",
1634
+ "",
1635
+ "## Fit Rubric Convention",
1636
+ "",
1637
+ "The fit rubric is the scoring framework Phase 2 uses to evaluate each",
1638
+ "candidate vertical. It is **not invented by this agent** \u2014 it must come",
1639
+ "from an authoritative source, resolved in this order:",
1640
+ "",
1641
+ "1. **Invoking issue body.** If the issue body includes a `## Fit",
1642
+ " Rubric` section, use it verbatim.",
1643
+ "2. **`docs/project-context.md`.** If the project context file includes",
1644
+ " a `## Industry Fit Rubric` section, use it.",
1645
+ "3. **Default scaffold.** If neither source defines a rubric, write a",
1646
+ " placeholder rubric with `TODO:` weights and flag the evaluate issue",
1647
+ " with `status:needs-attention` \u2014 do not silently invent weights.",
1648
+ "",
1649
+ "The rubric has this shape:",
1650
+ "",
1651
+ "```markdown",
1652
+ "## Industry Fit Rubric",
1653
+ "",
1654
+ "| Criterion | Weight | Description |",
1655
+ "|-----------|--------|-------------|",
1656
+ "| <name> | <0.0\u20131.0> | <what high vs. low looks like> |",
1657
+ "",
1658
+ "**Threshold:** <0.0\u20131.0> \u2014 verticals scoring at or above this value",
1659
+ "advance to Phase 3 (Plan).",
1660
+ "",
1661
+ "**Scoring scale:** per-criterion score is 0.0\u20131.0; the final score is",
1662
+ "the weighted average of the criteria.",
1663
+ "```",
1664
+ "",
1665
+ "---",
1666
+ "",
1667
+ "## Agent Loop",
1668
+ "",
1669
+ "Run this loop exactly once per session. Never start a second issue.",
1670
+ "",
1671
+ "1. Claim one open `type:industry-discovery` issue using phase",
1672
+ " priority: `industry:discover` > `industry:evaluate` > `industry:plan`.",
1673
+ "2. Transition `status:ready` \u2192 `status:in-progress` and create the",
1674
+ " branch per your project's branch-naming convention.",
1675
+ "3. Execute the phase handler that matches the issue's `industry:*`",
1676
+ " label.",
1677
+ "4. Commit, push, open a PR (if applicable), and close the issue per",
1678
+ " your project's PR workflow.",
1679
+ "",
1680
+ "---",
1681
+ "",
1682
+ "## Phase 1: Discover (`industry:discover`)",
1683
+ "",
1684
+ "**Goal:** Enumerate candidate industry verticals into a bounded",
1685
+ "candidate file.",
1686
+ "",
1687
+ "**Budget:** Limited discovery research. Read the scope, the project",
1688
+ "context, and any cited source material. Write one candidate file and",
1689
+ "create one evaluate issue. Do not score in this phase.",
1690
+ "",
1691
+ "### Steps",
1692
+ "",
1693
+ "1. **Read the discovery scope** from the issue body. The body should",
1694
+ " include:",
1695
+ " - The scope statement (what kind of industry verticals to look for,",
1696
+ " what to exclude)",
1697
+ " - Authorized source categories (e.g. public web, industry reports,",
1698
+ " a cited local file path) \u2014 if absent, default to public web only",
1699
+ " - Optional: `<DISCOVERY_SLUG>` override, custom output paths,",
1700
+ " candidate-count hints (default target: 8\u201320 candidates)",
1701
+ "",
1702
+ "2. **Derive `<DISCOVERY_SLUG>`** if not supplied \u2014 a 3\u20135 word",
1703
+ " kebab-case summary of the scope. Ensure the slug is not already in",
1704
+ " use under `<CANDIDATES_DIR>/`.",
1705
+ "",
1706
+ "3. **Enumerate candidate verticals.** Aim for 8\u201320 distinct candidate",
1707
+ " verticals unless the scope states otherwise. Each candidate should:",
1708
+ " - Be a recognizable industry vertical or sub-vertical (not a single",
1709
+ " company, not a product category)",
1710
+ " - Be within the scope defined in the issue",
1711
+ " - Have at least a brief description and one cited source",
1712
+ "",
1713
+ "4. **Write the candidate file** to",
1714
+ " `<CANDIDATES_DIR>/<DISCOVERY_SLUG>.candidates.md`:",
1715
+ "",
1716
+ " ```markdown",
1717
+ " ---",
1718
+ ' title: "Industry Candidates: <scope>"',
1719
+ " slug: <DISCOVERY_SLUG>",
1720
+ " date: YYYY-MM-DD",
1721
+ " parent_issue: <N>",
1722
+ " candidate_count: <N>",
1723
+ " ---",
1724
+ "",
1725
+ " # Industry Candidates: <scope>",
1726
+ "",
1727
+ " ## Scope",
1728
+ " <verbatim scope statement from the issue>",
1729
+ "",
1730
+ " ## Authorized Sources",
1731
+ " - <source category or path>",
1732
+ "",
1733
+ " ## Candidates",
1734
+ " ### <vertical name>",
1735
+ " - **Description:** <1\u20132 sentences>",
1736
+ " - **Why in scope:** <why this vertical matches the scope>",
1737
+ " - **Sources:** <citations>",
1738
+ "",
1739
+ " ## Out of Scope",
1740
+ " <verticals deliberately excluded from this cycle and why>",
1741
+ " ```",
1742
+ "",
1743
+ "5. **Create one `industry:evaluate` issue** with",
1744
+ " `Depends on: #<discover-issue>`. Its body references the candidate",
1745
+ " file path and the fit rubric source (invoking issue, project",
1746
+ " context, or scaffold).",
1747
+ "",
1748
+ "6. **Commit and push** the candidate file. Close the discover issue.",
1749
+ "",
1750
+ "---",
1751
+ "",
1752
+ "## Phase 2: Evaluate (`industry:evaluate`)",
1753
+ "",
1754
+ "**Goal:** Score every candidate against the fit rubric and produce an",
1755
+ "evaluation file.",
1756
+ "",
1757
+ "**Budget:** No broad exploratory research \u2014 evaluate what the candidate",
1758
+ "file already captured, pulling targeted clarifications only when a",
1759
+ "criterion cannot be scored. Write one evaluation file.",
1760
+ "",
1761
+ "### Steps",
1762
+ "",
1763
+ "1. **Read the candidate file** referenced in the issue body.",
1764
+ "",
1765
+ "2. **Resolve the fit rubric** per the Fit Rubric Convention above.",
1766
+ " If neither the invoking issue nor `docs/project-context.md` defines",
1767
+ " a rubric, emit a scaffold and flag `status:needs-attention` \u2014 do not",
1768
+ " silently invent weights or thresholds.",
1769
+ "",
1770
+ "3. **Score each candidate.** For each criterion, assign a 0.0\u20131.0",
1771
+ " score and cite at least one source for the score. Compute the",
1772
+ " weighted-average final score.",
1773
+ "",
1774
+ "4. **Write the evaluation file** to",
1775
+ " `<EVALUATIONS_DIR>/<DISCOVERY_SLUG>.evaluation.md`:",
1776
+ "",
1777
+ " ```markdown",
1778
+ " ---",
1779
+ ' title: "Industry Evaluation: <scope>"',
1780
+ " slug: <DISCOVERY_SLUG>",
1781
+ " date: YYYY-MM-DD",
1782
+ " parent_issue: <N>",
1783
+ " candidates_source: <CANDIDATES_DIR>/<DISCOVERY_SLUG>.candidates.md",
1784
+ " threshold: <0.0\u20131.0>",
1785
+ " ---",
1786
+ "",
1787
+ " # Industry Evaluation: <scope>",
1788
+ "",
1789
+ " ## Fit Rubric",
1790
+ " <verbatim rubric table, including weights and threshold>",
1791
+ "",
1792
+ " ## Scored Candidates",
1793
+ "",
1794
+ " | Vertical | Weighted Score | Clears Threshold |",
1795
+ " |----------|----------------|------------------|",
1796
+ " | <name> | 0.73 | yes |",
1797
+ "",
1798
+ " ### <vertical name> \u2014 0.73",
1799
+ " - **<criterion>:** 0.8 \u2014 <one-line justification + citation>",
1800
+ " - **<criterion>:** 0.6 \u2014 <one-line justification + citation>",
1801
+ " - **Notes:** <anything the rubric could not capture>",
1802
+ "",
1803
+ " ## Gaps / Open Questions",
1804
+ " <criteria that could not be scored for one or more candidates>",
1805
+ " ```",
1806
+ "",
1807
+ "5. **Create one `industry:plan` issue** with",
1808
+ " `Depends on: #<evaluate-issue>`. Its body references the evaluation",
1809
+ " file path and lists the verticals that clear the threshold (if any).",
1810
+ "",
1811
+ "6. **Commit and push** the evaluation file. Close the evaluate issue.",
1812
+ "",
1813
+ "---",
1814
+ "",
1815
+ "## Phase 3: Plan (`industry:plan`)",
1816
+ "",
1817
+ "**Goal:** For each vertical that clears the threshold, open a",
1818
+ "`research:scope` issue so the `research-pipeline` bundle can pick it up",
1819
+ "and produce a research deliverable.",
1820
+ "",
1821
+ "**Budget:** No new web searches. Read the evaluation, write a plan",
1822
+ "file, and create one downstream research issue per cleared vertical.",
1823
+ "",
1824
+ "### Steps",
1825
+ "",
1826
+ "1. **Read the evaluation file** referenced in the issue body.",
1827
+ "",
1828
+ "2. **Identify cleared verticals.** Any vertical whose weighted score",
1829
+ " meets or exceeds the threshold advances. If the evaluation flagged",
1830
+ " scoring gaps that block a pass/fail decision, treat the vertical as",
1831
+ " **not cleared** and note it in the plan.",
1832
+ "",
1833
+ "3. **Write the plan file** to",
1834
+ " `<PLANS_DIR>/<DISCOVERY_SLUG>.plan.md`:",
1835
+ "",
1836
+ " ```markdown",
1837
+ " ---",
1838
+ ' title: "Industry Plan: <scope>"',
1839
+ " slug: <DISCOVERY_SLUG>",
1840
+ " date: YYYY-MM-DD",
1841
+ " parent_issue: <N>",
1842
+ " evaluation_source: <EVALUATIONS_DIR>/<DISCOVERY_SLUG>.evaluation.md",
1843
+ " ---",
1844
+ "",
1845
+ " # Industry Plan: <scope>",
1846
+ "",
1847
+ " ## Cleared Verticals",
1848
+ " | Vertical | Score | Downstream Issue |",
1849
+ " |----------|-------|------------------|",
1850
+ " | <name> | 0.73 | #<research-scope-issue> |",
1851
+ "",
1852
+ " ## Not Cleared",
1853
+ " | Vertical | Score | Reason |",
1854
+ " |----------|-------|--------|",
1855
+ " | <name> | 0.41 | below threshold |",
1856
+ "",
1857
+ " ## Notes",
1858
+ " <anything the plan author wants to preserve for future iterations>",
1859
+ " ```",
1860
+ "",
1861
+ "4. **Create one `research:scope` issue per cleared vertical.** This",
1862
+ " assumes the `research-pipeline` bundle is enabled in the consuming",
1863
+ " project. Each downstream issue should:",
1864
+ " - Carry `type:research`, `research:scope`, `priority:medium`, and",
1865
+ " `status:ready` labels",
1866
+ " - Include the research question framed for the vertical (what the",
1867
+ " downstream research needs to answer)",
1868
+ " - Cite the evaluation row that justified advancing the vertical",
1869
+ " - Reference the plan file path for traceability",
1870
+ "",
1871
+ "5. **Cross-link** \u2014 update the plan file's `## Cleared Verticals`",
1872
+ " table so each row references its newly-created `research:scope`",
1873
+ " issue number.",
1874
+ "",
1875
+ "6. **Commit and push** the plan file. Close the plan issue.",
1876
+ "",
1877
+ "---",
1878
+ "",
1879
+ "## Output Boundaries",
1880
+ "",
1881
+ "This agent writes **only** to:",
1882
+ "",
1883
+ "- `<CANDIDATES_DIR>/` \u2014 candidate files (Phase 1)",
1884
+ "- `<EVALUATIONS_DIR>/` \u2014 evaluation files (Phase 2)",
1885
+ "- `<PLANS_DIR>/` \u2014 plan files (Phase 3, cross-linked with downstream",
1886
+ " research issue numbers)",
1887
+ "",
1888
+ "The pipeline produces **candidate lists, evaluations, and plans**. It",
1889
+ "does not itself perform the downstream research, write industry",
1890
+ "profiles, or publish deliverables \u2014 those are the responsibility of",
1891
+ "specialized downstream agents (notably `research-analyst` from the",
1892
+ "`research-pipeline` bundle) that pick up the `research:scope` issues",
1893
+ "this pipeline creates. Keep this boundary clean so the industry",
1894
+ "discovery pipeline stays generic.",
1895
+ "",
1896
+ "---",
1897
+ "",
1898
+ "## Rules",
1899
+ "",
1900
+ "- **One phase per session.** Never run two phases back-to-back in a",
1901
+ " single session.",
1902
+ "- **Persist before closing.** Every phase must write its output file",
1903
+ " before closing its issue.",
1904
+ "- **Do not invent the rubric.** If no authoritative rubric is",
1905
+ " available, emit a scaffold and flag `status:needs-attention` \u2014 never",
1906
+ " silently guess weights or thresholds.",
1907
+ "- **Cite everything.** Every candidate, score, and pass/fail decision",
1908
+ " must carry at least one source citation.",
1909
+ "- **Produce plans, not downstream work.** Do not open profile,",
1910
+ " requirement, or comparison issues from this pipeline. Downstream",
1911
+ " research is delegated to the `research-pipeline` bundle via",
1912
+ " `research:scope` issues."
1913
+ ].join("\n")
1914
+ };
1915
+ var discoverIndustriesSkill = {
1916
+ name: "discover-industries",
1917
+ description: "Kick off an industry-discovery pipeline. Creates an industry:discover issue carrying the discovery scope and dispatches Phase 1 (Discover) in the industry-discovery-analyst agent.",
1918
+ disableModelInvocation: true,
1919
+ userInvocable: true,
1920
+ context: "fork",
1921
+ agent: "industry-discovery-analyst",
1922
+ platforms: { cursor: { exclude: true } },
1923
+ instructions: [
1924
+ "# Discover Industries",
1925
+ "",
1926
+ "Kick off an industry-discovery pipeline. Creates an",
1927
+ "`industry:discover` issue carrying the discovery scope and dispatches",
1928
+ "Phase 1 (Discover) in the industry-discovery-analyst agent.",
1929
+ "",
1930
+ "## Usage",
1931
+ "",
1932
+ "/discover-industries <scope>",
1933
+ "",
1934
+ "Optional extensions in the issue body:",
1935
+ "- `sources: <list>` \u2014 authorized source categories or file paths",
1936
+ "- `candidates: <N>` \u2014 override the default candidate-count target",
1937
+ " (default range 8\u201320)",
1938
+ "- `slug: <kebab-case>` \u2014 override the derived discovery slug",
1939
+ "- `rubric: inline` \u2014 include an inline `## Fit Rubric` section to use",
1940
+ " for Phase 2; otherwise the agent falls back to",
1941
+ " `docs/project-context.md` or a scaffold",
1942
+ "- `threshold: <0.0\u20131.0>` \u2014 override the rubric's default threshold",
1943
+ "",
1944
+ "## Default Paths",
1945
+ "",
1946
+ "If the project has no override in `docs/project-context.md` or",
1947
+ "`agentConfig.rules`, outputs land under:",
1948
+ "",
1949
+ "- `docs/industries/candidates/<slug>.candidates.md`",
1950
+ "- `docs/industries/evaluations/<slug>.evaluation.md`",
1951
+ "- `docs/industries/plans/<slug>.plan.md`",
1952
+ "",
1953
+ "## Steps",
1954
+ "",
1955
+ "1. Create an `industry:discover` issue with `type:industry-discovery`,",
1956
+ " `priority:medium`, and `status:ready`. Body must include the",
1957
+ " verbatim scope, authorized sources, and any overrides.",
1958
+ "2. Execute Phase 1 (Discover) of the industry-discovery-analyst",
1959
+ " agent.",
1960
+ "3. Phase 1 creates an `industry:evaluate` issue, which Phase 2 follows",
1961
+ " with an `industry:plan` issue. Each downstream issue declares its",
1962
+ " `Depends on:` predecessor. Phase 3 creates one `research:scope`",
1963
+ " issue for each vertical that clears the threshold.",
1964
+ "",
1965
+ "## Output",
1966
+ "",
1967
+ "- A candidate file under the project's candidates directory",
1968
+ "- An evaluation file with per-candidate scores under the evaluations",
1969
+ " directory",
1970
+ "- A plan file under the plans directory, cross-linked to downstream",
1971
+ " research issues",
1972
+ "- One `research:scope` issue per cleared vertical \u2014 picked up by the",
1973
+ " `research-pipeline` bundle's `research-analyst` agent"
1974
+ ].join("\n")
1975
+ };
1976
+ var industryDiscoveryBundle = {
1977
+ name: "industry-discovery",
1978
+ description: "Industry-vertical discovery pipeline: discover candidates, evaluate against a fit rubric, plan downstream research. Opt-in only; domain-neutral; filesystem-durable between phases.",
1979
+ appliesWhen: () => false,
1980
+ rules: [
1981
+ {
1982
+ name: "industry-discovery-workflow",
1983
+ description: "Describes the 3-phase industry-discovery pipeline, the industry:* label taxonomy, and the handoff to the research-pipeline bundle.",
1984
+ scope: AGENT_RULE_SCOPE.ALWAYS,
1985
+ content: [
1986
+ "# Industry Discovery Workflow",
1987
+ "",
1988
+ "Use `/discover-industries <scope>` to kick off an industry-vertical",
1989
+ "discovery pipeline. The pipeline runs in 3 phases \u2014 discover,",
1990
+ "evaluate, plan \u2014 each tracked by its own GitHub issue labeled",
1991
+ "`industry:discover`, `industry:evaluate`, or `industry:plan`. All",
1992
+ "issues carry `type:industry-discovery`.",
1993
+ "",
1994
+ "The pipeline produces **candidate lists, evaluations, and plans**.",
1995
+ "Verticals that clear the configured fit threshold are handed off",
1996
+ "to the `research-pipeline` bundle via `research:scope` issues for",
1997
+ "downstream deliverables.",
1998
+ "",
1999
+ "See the `industry-discovery-analyst` agent definition for full",
2000
+ "workflow details, default paths, the fit rubric convention, and",
2001
+ "phase-by-phase instructions."
2002
+ ].join("\n"),
2003
+ platforms: {
2004
+ cursor: { exclude: true }
2005
+ },
2006
+ tags: ["workflow"]
2007
+ }
2008
+ ],
2009
+ skills: [discoverIndustriesSkill],
2010
+ subAgents: [industryDiscoveryAnalystSubAgent],
2011
+ labels: [
2012
+ {
2013
+ name: "type:industry-discovery",
2014
+ color: "1D76DB",
2015
+ description: "Work that discovers, evaluates, or plans research on industry verticals"
2016
+ },
2017
+ {
2018
+ name: "industry:discover",
2019
+ color: "C5DEF5",
2020
+ description: "Phase 1: enumerate candidate industry verticals into a bounded candidate file"
2021
+ },
2022
+ {
2023
+ name: "industry:evaluate",
2024
+ color: "BFDADC",
2025
+ description: "Phase 2: score candidate verticals against the configured fit rubric"
2026
+ },
2027
+ {
2028
+ name: "industry:plan",
2029
+ color: "D4C5F9",
2030
+ description: "Phase 3: plan downstream research for verticals that clear the fit threshold"
2031
+ }
2032
+ ]
2033
+ };
2034
+
1520
2035
  // src/agent/bundles/jest.ts
1521
2036
  var jestBundle = {
1522
2037
  name: "jest",
@@ -4960,31 +5475,648 @@ var slackBundle = {
4960
5475
  ]
4961
5476
  };
4962
5477
 
4963
- // src/turbo/turbo-repo.ts
4964
- import { Component as Component3, FileBase, JsonFile } from "projen/lib";
4965
- import { JobPermission } from "projen/lib/github/workflows-model";
4966
-
4967
- // src/turbo/turbo-repo-task.ts
4968
- import { Component as Component2 } from "projen/lib";
4969
- var TurboRepoTask = class extends Component2 {
4970
- constructor(project, options) {
4971
- super(project);
4972
- this.project = project;
4973
- this.name = options.name;
4974
- this.dependsOn = options.dependsOn ?? [];
4975
- this.env = options.env ?? [];
4976
- this.passThroughEnv = options.passThroughEnv ?? [];
4977
- this.outputs = options.outputs ?? [];
4978
- this.cache = options.cache ?? true;
4979
- this.inputs = [
4980
- ...options.inputs ?? [],
4981
- // rerun if projen config changes
4982
- ".projen/**",
4983
- // ignore mac files
4984
- "!.DS_Store",
4985
- "!**/.DS_Store"
4986
- ];
4987
- this.outputLogs = options.outputLogs ?? "new-only";
5478
+ // src/agent/bundles/software-profile.ts
5479
+ var softwareProfileAnalystSubAgent = {
5480
+ name: "software-profile-analyst",
5481
+ description: "Researches a software product (competitor, adjacent, incumbent, enabler, infrastructure, or ecosystem-tool) from public sources, produces a structured markdown profile, and contributes rows to a shared feature matrix ranked against configurable segment-importance weights. One product per session, tracked by software:* GitHub issue labels.",
5482
+ model: AGENT_MODEL.POWERFUL,
5483
+ maxTurns: 80,
5484
+ platforms: { cursor: { exclude: true } },
5485
+ prompt: [
5486
+ "# Software Profile Analyst Agent",
5487
+ "",
5488
+ "You research a single software product from public sources and write",
5489
+ "a structured markdown profile. Each profile cycle runs across a small",
5490
+ "sequence of GitHub issues \u2014 one per phase \u2014 and produces a single",
5491
+ "profile file on disk, a set of feature-matrix rows, and optional",
5492
+ "follow-up research issues for adjacent products.",
5493
+ "",
5494
+ "This agent is **domain-neutral**. It makes no assumptions about what",
5495
+ "the consuming project sells, which industry it serves, or which",
5496
+ "products matter to it. All domain-specific vocabulary, segment",
5497
+ "weights, feature taxonomies, output locations, and profile-template",
5498
+ "overrides come from the invoking issue body or the consuming",
5499
+ "project's configuration.",
5500
+ "",
5501
+ "Follow your project's shared agent conventions (`AGENTS.md`,",
5502
+ "`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
5503
+ "",
5504
+ "---",
5505
+ "",
5506
+ ...PROJECT_CONTEXT_READER_SECTION,
5507
+ "## Design Principles",
5508
+ "",
5509
+ "1. **One product per session.** Never profile two products in a",
5510
+ " single session, even if they came up together.",
5511
+ "2. **Public sources only.** Use the product's own site, docs, pricing",
5512
+ " pages, changelogs, public demos, and similar public material. Do",
5513
+ " not attempt to access gated or paywalled content unless the",
5514
+ " invoking issue body explicitly authorizes it.",
5515
+ "3. **Filesystem durability.** The profile file and feature-matrix",
5516
+ " rows are the deliverables. Both are committed to disk before the",
5517
+ " profile issue closes. Downstream phases read from disk \u2014 never",
5518
+ " rely on session memory.",
5519
+ "4. **Generic over specific.** No hardcoded product types, feature",
5520
+ " taxonomies, or segment assumptions. Use the generic software-type",
5521
+ " taxonomy below and let consuming projects override it via their",
5522
+ " `docs/project-context.md` or `agentConfig.rules`.",
5523
+ "5. **Cite everything.** Every non-trivial factual claim in the",
5524
+ " profile must carry a source citation (URL plus access date).",
5525
+ "6. **Follow-up, don't widen scope.** If the session turns up adjacent",
5526
+ " products worth evaluating, emit a follow-up issue rather than",
5527
+ " expanding the profile beyond its scope.",
5528
+ "7. **Segment weights live in project context.** Segment-importance",
5529
+ " weights belong in `docs/project-context.md` (or an override",
5530
+ " passed in the issue body). This agent reads them; it never",
5531
+ " invents them.",
5532
+ "",
5533
+ "---",
5534
+ "",
5535
+ "## Software Type Taxonomy",
5536
+ "",
5537
+ "Pick exactly one type per software profile. The taxonomy is",
5538
+ "deliberately generic \u2014 consuming projects override it via",
5539
+ "`agentConfig.rules` if they need a domain-specific refinement.",
5540
+ "",
5541
+ "| Type | Use for |",
5542
+ "|------|---------|",
5543
+ "| `competitor` | Products that offer a substitutable feature set to the same buyers for the same jobs-to-be-done. |",
5544
+ "| `adjacent` | Products that solve a neighboring problem or serve an overlapping buyer \u2014 not a direct substitute but worth understanding for positioning and integration. |",
5545
+ "| `incumbent` | Established, widely-deployed products that define the status quo in the space. Often older, broader, and harder to displace. |",
5546
+ "| `enabler` | Products the consuming project might build on, integrate with, or resell. Platforms, SDKs, APIs, and similar building blocks. |",
5547
+ "| `infrastructure` | Lower-level infrastructure or runtime components the consuming project depends on (databases, queues, identity, observability, etc.). |",
5548
+ "| `ecosystem-tool` | Developer tooling, plugins, extensions, or companion products that surround an incumbent or competitor without being one themselves. |",
5549
+ "",
5550
+ "If the product plausibly fits two types, prefer the one that reflects",
5551
+ "the **reason the profile was requested**, and note the secondary",
5552
+ "type in the profile body.",
5553
+ "",
5554
+ "---",
5555
+ "",
5556
+ "## Segment-Importance Weights",
5557
+ "",
5558
+ "Feature ranking uses **segment-importance weights** \u2014 a small table",
5559
+ "that assigns a numeric weight to each customer segment the consuming",
5560
+ "project cares about. Higher weight means the segment matters more to",
5561
+ "the project's own strategy; features that serve high-weight segments",
5562
+ "rank higher in the matrix.",
5563
+ "",
5564
+ "**Convention:** segment weights live in `docs/project-context.md`",
5565
+ "under a `## Segment Weights` section. The format is a simple",
5566
+ "markdown table with `segment` and `weight` columns. Weights are",
5567
+ "non-negative numbers; the scale is project-defined (0\u20131, 0\u201310, and",
5568
+ "0\u2013100 are all valid as long as the project is internally",
5569
+ "consistent).",
5570
+ "",
5571
+ "Example `docs/project-context.md` fragment:",
5572
+ "",
5573
+ "```markdown",
5574
+ "## Segment Weights",
5575
+ "",
5576
+ "| segment | weight |",
5577
+ "|---------|--------|",
5578
+ "| enterprise | 3 |",
5579
+ "| mid-market | 2 |",
5580
+ "| smb | 1 |",
5581
+ "| hobbyist | 0.5 |",
5582
+ "```",
5583
+ "",
5584
+ "If `docs/project-context.md` does not define segment weights,",
5585
+ "**do not invent them**. Either:",
5586
+ "",
5587
+ "- Accept an `weights:` override in the invoking issue body, or",
5588
+ "- Produce the feature matrix with a single segment (`default`)",
5589
+ " weighted `1` and flag the missing weights in the profile's",
5590
+ " `## Open Questions` section.",
5591
+ "",
5592
+ "---",
5593
+ "",
5594
+ "## State Machine Overview",
5595
+ "",
5596
+ "```",
5597
+ "\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
5598
+ "\u2502 1. RESEARCH \u2502\u2500\u2500\u25B6\u2502 2. PROFILE \u2502\u2500\u2500\u25B6\u2502 3. MATRIX \u2502\u2500\u2500\u25B6\u2502 4. FOLLOWUP \u2502",
5599
+ "\u2502 Collect \u2502 \u2502 Write the \u2502 \u2502 Extract \u2502 \u2502 Enqueue \u2502",
5600
+ "\u2502 public \u2502 \u2502 structured \u2502 \u2502 feature rows \u2502 \u2502 research for \u2502",
5601
+ "\u2502 sources into \u2502 \u2502 markdown \u2502 \u2502 and score \u2502 \u2502 adjacent \u2502",
5602
+ "\u2502 bounded \u2502 \u2502 profile to \u2502 \u2502 against the \u2502 \u2502 products \u2502",
5603
+ "\u2502 notes file \u2502 \u2502 <PROFILES>/ \u2502 \u2502 weights \u2502 \u2502 surfaced \u2502",
5604
+ "\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
5605
+ "```",
5606
+ "",
5607
+ "**Issue labels encode the phase:**",
5608
+ "",
5609
+ "| Label | Phase | Session work |",
5610
+ "|-------|-------|-------------|",
5611
+ "| `software:research` | 1. Research | Gather public sources. Write a bounded research-notes file. Create the profile issue. |",
5612
+ "| `software:profile` | 2. Profile | Read the research notes. Write the structured profile to `<PROFILES_DIR>`. Create the matrix issue. |",
5613
+ "| `software:matrix` | 3. Matrix | Read the profile. Extract feature rows into `<MATRIX_FILE>`. Score against segment weights. Create the follow-up issue if warranted. |",
5614
+ "| `software:followup` | 4. Followup | Read the profile. Enqueue software-research issues for adjacent products surfaced in the profile. |",
5615
+ "",
5616
+ "All issues also carry `type:software-profile` and a `status:*` label.",
5617
+ "",
5618
+ "**Issue count per product cycle:** 1 research + 1 profile + 1 matrix +",
5619
+ "0\u20131 followup = **3\u20134 sessions**. The followup phase is skipped when",
5620
+ "the profile did not surface any adjacent product worth researching.",
5621
+ "",
5622
+ "**Shortened paths:**",
5623
+ "- Research phase determines the product is out of scope (not",
5624
+ " relevant, insufficient public material) \u2192 research issue closes",
5625
+ " with a justification and no downstream issues are created \u2192 **1 session**.",
5626
+ "- Narrow product with no adjacent candidates \u2192 **3 sessions**.",
5627
+ "",
5628
+ "---",
5629
+ "",
5630
+ "## Configurable Paths",
5631
+ "",
5632
+ "The pipeline uses these placeholders. Consuming projects override the",
5633
+ "defaults by passing paths in the `/profile-software` skill invocation",
5634
+ "or by extending this rule in their own `agentConfig.rules`.",
5635
+ "",
5636
+ "| Placeholder | Meaning | Default |",
5637
+ "|-------------|---------|---------|",
5638
+ "| `<SOFTWARE_ROOT>` | Root folder for software profiles | `docs/software/` |",
5639
+ "| `<PROFILES_DIR>` | Final software profile files | `<SOFTWARE_ROOT>/profiles/` |",
5640
+ "| `<NOTES_DIR>` | Research-notes files from Phase 1 | `<SOFTWARE_ROOT>/notes/` |",
5641
+ "| `<MATRIX_FILE>` | Shared feature-matrix file | `<SOFTWARE_ROOT>/feature-matrix.md` |",
5642
+ "| `<PRODUCT_SLUG>` | Short kebab-case slug identifying the product | derived from the product name |",
5643
+ "",
5644
+ "If `docs/project-context.md` specifies a different software-research",
5645
+ "tree (for example by reusing the research-pipeline deliverables",
5646
+ "folder), prefer that. Otherwise fall back to the defaults above.",
5647
+ "",
5648
+ "---",
5649
+ "",
5650
+ "## Agent Loop",
5651
+ "",
5652
+ "Run this loop exactly once per session. Never start a second issue.",
5653
+ "",
5654
+ "1. Claim one open `type:software-profile` issue using phase priority:",
5655
+ " `software:research` > `software:profile` > `software:matrix` >",
5656
+ " `software:followup`.",
5657
+ "2. Transition `status:ready` \u2192 `status:in-progress` and create the",
5658
+ " branch per your project's branch-naming convention.",
5659
+ "3. Execute the phase handler that matches the issue's `software:*`",
5660
+ " label.",
5661
+ "4. Commit, push, open a PR (if applicable), and close the issue per",
5662
+ " your project's PR workflow.",
5663
+ "",
5664
+ "---",
5665
+ "",
5666
+ "## Phase 1: Research (`software:research`)",
5667
+ "",
5668
+ "**Goal:** Gather public sources into a bounded research-notes file.",
5669
+ "",
5670
+ "**Budget:** Public web search only, unless the issue body authorizes",
5671
+ "additional sources. Write one notes file. Do not write the profile",
5672
+ "or extend the feature matrix in this phase.",
5673
+ "",
5674
+ "### Steps",
5675
+ "",
5676
+ "1. **Read the issue body.** It should include:",
5677
+ " - The product name and website (if known)",
5678
+ " - The requested software type from the taxonomy above",
5679
+ " - The reason the profile was requested (framing \u2014 what does the",
5680
+ " invoking project want to learn?)",
5681
+ " - Optional: `<PRODUCT_SLUG>` override, custom output paths,",
5682
+ " `weights:` override for segment-importance weights",
5683
+ "",
5684
+ "2. **Derive `<PRODUCT_SLUG>`** if not supplied \u2014 a 2\u20134 word",
5685
+ " kebab-case summary of the product name. Ensure the slug is not",
5686
+ " already in use under `<PROFILES_DIR>/` or `<NOTES_DIR>/`.",
5687
+ "",
5688
+ "3. **Gather sources.** Prioritize in this order:",
5689
+ " - The product's own website (home, product, pricing, docs,",
5690
+ " changelog, integrations)",
5691
+ " - Public documentation, developer references, API docs",
5692
+ " - Public changelogs, release notes, roadmap posts",
5693
+ " - Reputable independent reviews and comparison articles",
5694
+ " - Public issue trackers or community forums when the issue body",
5695
+ " authorizes them",
5696
+ "",
5697
+ "4. **Write a research-notes file** to",
5698
+ " `<NOTES_DIR>/<PRODUCT_SLUG>.notes.md`:",
5699
+ "",
5700
+ " ```markdown",
5701
+ " ---",
5702
+ ' title: "Research Notes: <product name>"',
5703
+ " slug: <PRODUCT_SLUG>",
5704
+ " software_type: <one of the taxonomy values>",
5705
+ " date: YYYY-MM-DD",
5706
+ " parent_issue: <N>",
5707
+ " ---",
5708
+ "",
5709
+ " # Research Notes: <product name>",
5710
+ "",
5711
+ " ## Framing",
5712
+ " <why this product was requested and what to learn>",
5713
+ "",
5714
+ " ## Raw Findings",
5715
+ " - <finding> \u2014 source: <citation>",
5716
+ "",
5717
+ " ## Candidate Features",
5718
+ " - <feature name>: <one-line description> \u2014 source: <citation>",
5719
+ "",
5720
+ " ## Candidate Adjacent Products",
5721
+ " - <product name> \u2014 source: <citation>",
5722
+ "",
5723
+ " ## Open Questions",
5724
+ " <anything the notes could not answer from public sources>",
5725
+ "",
5726
+ " ## Sources",
5727
+ " - <source URL or file path> \u2014 <date accessed>",
5728
+ " ```",
5729
+ "",
5730
+ "5. **Create the `software:profile` issue** with",
5731
+ " `Depends on: #<research-issue>`. Its body references the notes",
5732
+ " file path and the requested software type.",
5733
+ "",
5734
+ "6. **Commit and push** the notes file. Close the research issue.",
5735
+ "",
5736
+ "---",
5737
+ "",
5738
+ "## Phase 2: Profile (`software:profile`)",
5739
+ "",
5740
+ "**Goal:** Write the structured software profile from the research",
5741
+ "notes.",
5742
+ "",
5743
+ "**Budget:** No new web searches unless explicitly needed to fill a",
5744
+ "gap the notes flagged. Write one profile file.",
5745
+ "",
5746
+ "### Steps",
5747
+ "",
5748
+ "1. **Read the research-notes file** referenced in the issue body.",
5749
+ "",
5750
+ "2. **Check for duplicates.** If `<PROFILES_DIR>/<PRODUCT_SLUG>.md`",
5751
+ " already exists, open it and decide whether to update in place or",
5752
+ " flag a naming collision. Never silently overwrite a non-trivial",
5753
+ " existing profile.",
5754
+ "",
5755
+ "3. **Write the profile** to `<PROFILES_DIR>/<PRODUCT_SLUG>.md` using",
5756
+ " the template below. All sections are required; use",
5757
+ " `_Not available in public sources._` when a section cannot be",
5758
+ " filled from the notes.",
5759
+ "",
5760
+ " ```markdown",
5761
+ " ---",
5762
+ ' title: "<product name>"',
5763
+ " slug: <PRODUCT_SLUG>",
5764
+ " software_type: <one of the taxonomy values>",
5765
+ " website: <primary URL>",
5766
+ " date: YYYY-MM-DD",
5767
+ " parent_issue: <N>",
5768
+ " notes: <NOTES_DIR>/<PRODUCT_SLUG>.notes.md",
5769
+ " ---",
5770
+ "",
5771
+ " # <product name>",
5772
+ "",
5773
+ " ## Summary",
5774
+ " <2\u20134 sentence elevator description: what it does, who it's for>",
5775
+ "",
5776
+ " ## Classification",
5777
+ " - **Primary type:** <taxonomy value>",
5778
+ " - **Secondary type (if any):** <taxonomy value or `n/a`>",
5779
+ " - **Relevance to this project:** <1\u20132 sentences tying the product",
5780
+ " back to the framing from the notes>",
5781
+ "",
5782
+ " ## Offering",
5783
+ " - **Jobs-to-be-done:** <bullet list of core use cases>",
5784
+ " - **Target segments:** <who this product is for; reuse segment",
5785
+ " names from the project's segment-weights table when possible>",
5786
+ " - **Pricing model:** <if disclosed>",
5787
+ " - **Deployment model:** <SaaS / self-hosted / hybrid / on-prem>",
5788
+ "",
5789
+ " ## Features",
5790
+ " <grouped bullet list of notable features, each cited. These become",
5791
+ " the rows in the feature matrix during Phase 3.>",
5792
+ "",
5793
+ " ## Technology Signals",
5794
+ " <stack hints from docs, integrations, and public engineering",
5795
+ " content \u2014 each bullet cited>",
5796
+ "",
5797
+ " ## Positioning / Differentiation",
5798
+ " <how the product describes itself and how it differs from adjacent",
5799
+ " products \u2014 use its own language, cited, rather than inferred>",
5800
+ "",
5801
+ " ## Risks / Open Questions",
5802
+ " <what the profile could not answer; flag anything the matrix or",
5803
+ " follow-up phase should escalate>",
5804
+ "",
5805
+ " ## Follow-up Candidates",
5806
+ " - **Adjacent products to evaluate:** <list of candidate product",
5807
+ " names>",
5808
+ "",
5809
+ " ## Sources",
5810
+ " - <source URL> \u2014 <date accessed>",
5811
+ " ```",
5812
+ "",
5813
+ "4. **Create the `software:matrix` issue** with",
5814
+ " `Depends on: #<profile-issue>`. Its body references the profile",
5815
+ " path, the matrix file path, and the segment-weights source",
5816
+ " (`docs/project-context.md` or an explicit override).",
5817
+ "",
5818
+ "5. **Commit and push** the profile file. Close the profile issue.",
5819
+ "",
5820
+ "---",
5821
+ "",
5822
+ "## Phase 3: Matrix (`software:matrix`)",
5823
+ "",
5824
+ "**Goal:** Extract feature rows from the profile into the shared",
5825
+ "feature matrix and score each feature against the segment-importance",
5826
+ "weights.",
5827
+ "",
5828
+ "**Budget:** No new research. Read the profile, update the matrix,",
5829
+ "close the phase.",
5830
+ "",
5831
+ "### Matrix File Format",
5832
+ "",
5833
+ "The feature matrix is a single markdown file at `<MATRIX_FILE>`. It",
5834
+ "uses a wide table with one row per (product, feature) pair and one",
5835
+ "column per segment plus a computed `score` column.",
5836
+ "",
5837
+ "```markdown",
5838
+ "---",
5839
+ 'title: "Software Feature Matrix"',
5840
+ "weights_source: docs/project-context.md#segment-weights",
5841
+ "updated: YYYY-MM-DD",
5842
+ "---",
5843
+ "",
5844
+ "# Software Feature Matrix",
5845
+ "",
5846
+ "| product | feature | <segment-1> | <segment-2> | ... | score | source |",
5847
+ "|---------|---------|-------------|-------------|-----|-------|--------|",
5848
+ "| <slug> | <feature-name> | 0\u20131 | 0\u20131 | ... | <weighted-sum> | <profile-path> |",
5849
+ "```",
5850
+ "",
5851
+ "Segment columns carry a **coverage score** in `[0, 1]` representing",
5852
+ "how well the feature serves that segment \u2014 `1` means fully covered,",
5853
+ "`0` means not covered, intermediate values reflect partial coverage",
5854
+ "(e.g. self-serve only, gated by pricing tier, limited by scale).",
5855
+ "",
5856
+ "The `score` column is the weighted sum:",
5857
+ "",
5858
+ "```",
5859
+ "score = \u03A3 (coverage[segment] * weight[segment])",
5860
+ "```",
5861
+ "",
5862
+ "using the weights loaded from `docs/project-context.md`.",
5863
+ "",
5864
+ "### Steps",
5865
+ "",
5866
+ "1. **Load segment weights.** Read `## Segment Weights` from",
5867
+ " `docs/project-context.md`. If absent, fall back to the",
5868
+ " `weights:` override in the issue body, or the single-segment",
5869
+ " default described in `## Segment-Importance Weights` above.",
5870
+ "",
5871
+ "2. **Read the profile file** referenced in the issue body. Extract",
5872
+ " the bullets under `## Features` as candidate matrix rows.",
5873
+ "",
5874
+ "3. **Open or create `<MATRIX_FILE>`.** If the file does not exist,",
5875
+ " write the front-matter and header row using the current set of",
5876
+ " segment columns. If it exists, ensure its segment columns match",
5877
+ " the loaded weights; if they have drifted, add any missing columns",
5878
+ " and leave a note in the profile's `## Risks / Open Questions`.",
5879
+ "",
5880
+ "4. **Append or update rows** for the current product. One row per",
5881
+ " feature. For each row:",
5882
+ " - Assign a coverage score in `[0, 1]` for each segment, citing",
5883
+ " the profile section that justifies the score.",
5884
+ " - Compute the `score` as the weighted sum.",
5885
+ " - Set the `source` column to the profile file path.",
5886
+ "",
5887
+ "5. **Update the matrix front-matter** (`updated: YYYY-MM-DD`).",
5888
+ "",
5889
+ "6. **Decide whether a follow-up issue is warranted.** Create a",
5890
+ " `software:followup` issue (depending on this matrix issue) only",
5891
+ " if the profile lists at least one adjacent product candidate.",
5892
+ " Otherwise, note in the matrix issue's closing comment that no",
5893
+ " follow-up is needed.",
5894
+ "",
5895
+ "7. **Commit and push** the matrix file (and any profile updates).",
5896
+ " Close the matrix issue.",
5897
+ "",
5898
+ "---",
5899
+ "",
5900
+ "## Phase 4: Followup (`software:followup`)",
5901
+ "",
5902
+ "**Goal:** Create downstream research issues for the adjacent products",
5903
+ "surfaced in the profile.",
5904
+ "",
5905
+ "**Budget:** No new research. Read the profile, enqueue issues, close",
5906
+ "the phase.",
5907
+ "",
5908
+ "### Steps",
5909
+ "",
5910
+ "1. **Read the profile file** referenced in the issue body.",
5911
+ "",
5912
+ "2. **Enqueue software-research issues** for each entry under",
5913
+ " `Follow-up Candidates > Adjacent products to evaluate`. Each new",
5914
+ " issue follows the same 4-phase pipeline \u2014 start it in the",
5915
+ " `software:research` phase with `type:software-profile`,",
5916
+ " `priority:medium`, and `status:ready`.",
5917
+ "",
5918
+ "3. **Cross-link** \u2014 update the profile's `## Follow-up Candidates`",
5919
+ " section so each entry references its newly-created issue number.",
5920
+ "",
5921
+ "4. **Commit and push** (if the profile was updated). Close the",
5922
+ " followup issue.",
5923
+ "",
5924
+ "---",
5925
+ "",
5926
+ "## Output Boundaries",
5927
+ "",
5928
+ "This agent writes **only** to:",
5929
+ "",
5930
+ "- `<NOTES_DIR>/` \u2014 research-notes files (Phase 1)",
5931
+ "- `<PROFILES_DIR>/` \u2014 software profiles (Phase 2, updated in later",
5932
+ " phases)",
5933
+ "- `<MATRIX_FILE>` \u2014 shared feature matrix (Phase 3)",
5934
+ "",
5935
+ "The pipeline produces **profiles, notes, and matrix rows only**.",
5936
+ "Deeper research on adjacent products is delegated to new cycles of",
5937
+ "this same pipeline via follow-up issues. This agent never writes",
5938
+ "company profiles, person profiles, formal requirement documents, or",
5939
+ "comparative long-form analyses itself. Keep this boundary clean so",
5940
+ "the software-profile pipeline stays generic.",
5941
+ "",
5942
+ "---",
5943
+ "",
5944
+ "## Rules",
5945
+ "",
5946
+ "- **One product per session.** Never profile two products back-to-back.",
5947
+ "- **Persist before closing.** Every phase must write its output file",
5948
+ " before closing its issue.",
5949
+ "- **Cite everything.** Profile claims without source citations do not",
5950
+ " belong in the deliverable.",
5951
+ "- **No invented weights.** Segment weights come from",
5952
+ " `docs/project-context.md` or an explicit issue-body override. If",
5953
+ " neither is available, fall back to the single-segment default and",
5954
+ " flag the gap \u2014 never guess.",
5955
+ "- **Produce profiles and matrix rows, not downstream work.** Do not",
5956
+ " open `type:requirement` or formal evaluation issues from this",
5957
+ " pipeline. Follow-up work is scoped through `software:followup` or",
5958
+ " delegated to downstream research agents."
5959
+ ].join("\n")
5960
+ };
5961
+ var profileSoftwareSkill = {
5962
+ name: "profile-software",
5963
+ description: "Kick off a software-profile pipeline. Creates a software:research issue for the given product and dispatches Phase 1 (Research) in the software-profile-analyst agent.",
5964
+ disableModelInvocation: true,
5965
+ userInvocable: true,
5966
+ context: "fork",
5967
+ agent: "software-profile-analyst",
5968
+ platforms: { cursor: { exclude: true } },
5969
+ instructions: [
5970
+ "# Profile Software",
5971
+ "",
5972
+ "Kick off a software-profile pipeline. Creates a `software:research`",
5973
+ "issue carrying the product name, type, and framing, then dispatches",
5974
+ "Phase 1 (Research) in the software-profile-analyst agent.",
5975
+ "",
5976
+ "## Usage",
5977
+ "",
5978
+ "/profile-software <product-name>",
5979
+ "",
5980
+ "Optional extensions in the issue body:",
5981
+ "- `type: <competitor | adjacent | incumbent | enabler |",
5982
+ " infrastructure | ecosystem-tool>` \u2014 override the default type",
5983
+ " inference",
5984
+ "- `website: <url>` \u2014 canonical website if not obvious from the name",
5985
+ "- `framing: <text>` \u2014 why this profile was requested and what to learn",
5986
+ "- `slug: <kebab-case>` \u2014 override the derived product slug",
5987
+ "- `weights: <table>` \u2014 override the segment-importance weights for",
5988
+ " this profile cycle (otherwise loaded from",
5989
+ " `docs/project-context.md`)",
5990
+ "- `sources: <list>` \u2014 additional authorized sources beyond public web",
5991
+ "",
5992
+ "## Default Paths",
5993
+ "",
5994
+ "If the project has no override in `docs/project-context.md` or",
5995
+ "`agentConfig.rules`, outputs land under:",
5996
+ "",
5997
+ "- `docs/software/notes/<slug>.notes.md`",
5998
+ "- `docs/software/profiles/<slug>.md`",
5999
+ "- `docs/software/feature-matrix.md` (shared across all products)",
6000
+ "",
6001
+ "## Steps",
6002
+ "",
6003
+ "1. Create a `software:research` issue with `type:software-profile`,",
6004
+ " `priority:medium`, and `status:ready`. Body must include the",
6005
+ " product name, selected type, framing, and any overrides.",
6006
+ "2. Execute Phase 1 (Research) of the software-profile-analyst",
6007
+ " agent.",
6008
+ "3. Phase 1 creates the `software:profile` issue. Phase 2 creates",
6009
+ " the `software:matrix` issue. Phase 3 may create a",
6010
+ " `software:followup` issue. Each downstream issue declares its",
6011
+ " `Depends on:` predecessor.",
6012
+ "",
6013
+ "## Output",
6014
+ "",
6015
+ "- A research-notes file under the project's notes directory",
6016
+ "- A single software profile under the profiles directory",
6017
+ "- One or more rows appended to the shared feature-matrix file,",
6018
+ " scored against the configured segment weights",
6019
+ "- Optional follow-up research issues for adjacent products",
6020
+ " surfaced in the profile",
6021
+ "- This pipeline produces **profiles, notes, and matrix rows only**",
6022
+ " \u2014 it does not write company profiles, person profiles, or formal",
6023
+ " requirement documents itself."
6024
+ ].join("\n")
6025
+ };
6026
+ var softwareProfileBundle = {
6027
+ name: "software-profile",
6028
+ description: "Software research, profiling, and feature-matrix pipeline: research, profile, matrix, followup. Opt-in only; domain-neutral; filesystem-durable between phases; ranks features against configurable segment-importance weights.",
6029
+ appliesWhen: () => false,
6030
+ rules: [
6031
+ {
6032
+ name: "software-profile-workflow",
6033
+ description: "Describes the 4-phase software-profile pipeline, the software:* label taxonomy, the generic software-type taxonomy, and the segment-weights convention that drives feature-matrix scoring.",
6034
+ scope: AGENT_RULE_SCOPE.ALWAYS,
6035
+ content: [
6036
+ "# Software Profile Workflow",
6037
+ "",
6038
+ "Use `/profile-software <product-name>` to kick off a software",
6039
+ "research, profiling, and feature-matrix pipeline. The pipeline",
6040
+ "runs in up to 4 phases \u2014 research, profile, matrix, followup \u2014",
6041
+ "each tracked by its own GitHub issue labeled",
6042
+ "`software:research`, `software:profile`, `software:matrix`, or",
6043
+ "`software:followup`. All issues carry `type:software-profile`.",
6044
+ "",
6045
+ "The pipeline produces **software profiles, research notes, and",
6046
+ "rows in a shared feature matrix**. Features are ranked against",
6047
+ "segment-importance weights declared in",
6048
+ "`docs/project-context.md` under a `## Segment Weights` section.",
6049
+ "Deeper research on adjacent products surfaced in a profile is",
6050
+ "delegated to new cycles of this same pipeline via",
6051
+ "`software:followup` issues.",
6052
+ "",
6053
+ "See the `software-profile-analyst` agent definition for full",
6054
+ "workflow details, default paths, the software-type taxonomy,",
6055
+ "the segment-weights convention, and phase-by-phase",
6056
+ "instructions."
6057
+ ].join("\n"),
6058
+ platforms: {
6059
+ cursor: { exclude: true }
6060
+ },
6061
+ tags: ["workflow"]
6062
+ }
6063
+ ],
6064
+ skills: [profileSoftwareSkill],
6065
+ subAgents: [softwareProfileAnalystSubAgent],
6066
+ labels: [
6067
+ {
6068
+ name: "type:software-profile",
6069
+ color: "0E8A16",
6070
+ description: "Work that produces or maintains a software profile, research notes, or feature-matrix rows"
6071
+ },
6072
+ {
6073
+ name: "software:research",
6074
+ color: "C5DEF5",
6075
+ description: "Phase 1: gather public sources about a software product into a research-notes file"
6076
+ },
6077
+ {
6078
+ name: "software:profile",
6079
+ color: "BFDADC",
6080
+ description: "Phase 2: write the structured software profile from research notes"
6081
+ },
6082
+ {
6083
+ name: "software:matrix",
6084
+ color: "D4C5F9",
6085
+ description: "Phase 3: extract feature rows into the shared feature matrix and score them against segment weights"
6086
+ },
6087
+ {
6088
+ name: "software:followup",
6089
+ color: "FBCA04",
6090
+ description: "Phase 4: enqueue follow-up research issues for adjacent products surfaced in the profile"
6091
+ }
6092
+ ]
6093
+ };
6094
+
6095
+ // src/turbo/turbo-repo.ts
6096
+ import { Component as Component3, FileBase, JsonFile } from "projen/lib";
6097
+ import { JobPermission } from "projen/lib/github/workflows-model";
6098
+
6099
+ // src/turbo/turbo-repo-task.ts
6100
+ import { Component as Component2 } from "projen/lib";
6101
+ var TurboRepoTask = class extends Component2 {
6102
+ constructor(project, options) {
6103
+ super(project);
6104
+ this.project = project;
6105
+ this.name = options.name;
6106
+ this.dependsOn = options.dependsOn ?? [];
6107
+ this.env = options.env ?? [];
6108
+ this.passThroughEnv = options.passThroughEnv ?? [];
6109
+ this.outputs = options.outputs ?? [];
6110
+ this.cache = options.cache ?? true;
6111
+ this.inputs = [
6112
+ ...options.inputs ?? [],
6113
+ // rerun if projen config changes
6114
+ ".projen/**",
6115
+ // ignore mac files
6116
+ "!.DS_Store",
6117
+ "!**/.DS_Store"
6118
+ ];
6119
+ this.outputLogs = options.outputLogs ?? "new-only";
4988
6120
  this.persistent = options.persistent ?? false;
4989
6121
  this.interactive = options.interactive ?? false;
4990
6122
  this.isActive = true;
@@ -5573,7 +6705,9 @@ var BUILT_IN_BUNDLES = [
5573
6705
  requirementsAnalystBundle,
5574
6706
  researchPipelineBundle,
5575
6707
  companyProfileBundle,
5576
- peopleProfileBundle
6708
+ peopleProfileBundle,
6709
+ softwareProfileBundle,
6710
+ industryDiscoveryBundle
5577
6711
  ];
5578
6712
 
5579
6713
  // src/agent/bundles/scope.ts
@@ -9108,6 +10242,7 @@ export {
9108
10242
  companyProfileBundle,
9109
10243
  getLatestEligibleVersion,
9110
10244
  githubWorkflowBundle,
10245
+ industryDiscoveryBundle,
9111
10246
  jestBundle,
9112
10247
  meetingAnalysisBundle,
9113
10248
  orchestratorBundle,
@@ -9120,6 +10255,7 @@ export {
9120
10255
  resolveModelAlias,
9121
10256
  resolveTemplateVariables,
9122
10257
  slackBundle,
10258
+ softwareProfileBundle,
9123
10259
  turborepoBundle,
9124
10260
  typescriptBundle,
9125
10261
  vitestBundle