@codedrifters/configulator 0.0.203 → 0.0.205
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 +28 -1
- package/lib/index.d.ts +28 -1
- package/lib/index.js +1100 -149
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1098 -149
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -222,6 +222,7 @@ __export(index_exports, {
|
|
|
222
222
|
addSyncLabelsWorkflow: () => addSyncLabelsWorkflow,
|
|
223
223
|
awsCdkBundle: () => awsCdkBundle,
|
|
224
224
|
baseBundle: () => baseBundle,
|
|
225
|
+
companyProfileBundle: () => companyProfileBundle,
|
|
225
226
|
getLatestEligibleVersion: () => getLatestEligibleVersion,
|
|
226
227
|
githubWorkflowBundle: () => githubWorkflowBundle,
|
|
227
228
|
jestBundle: () => jestBundle,
|
|
@@ -231,6 +232,7 @@ __export(index_exports, {
|
|
|
231
232
|
prReviewBundle: () => prReviewBundle,
|
|
232
233
|
projenBundle: () => projenBundle,
|
|
233
234
|
requirementsAnalystBundle: () => requirementsAnalystBundle,
|
|
235
|
+
researchPipelineBundle: () => researchPipelineBundle,
|
|
234
236
|
resolveModelAlias: () => resolveModelAlias,
|
|
235
237
|
resolveTemplateVariables: () => resolveTemplateVariables,
|
|
236
238
|
slackBundle: () => slackBundle,
|
|
@@ -880,6 +882,559 @@ var baseBundle = {
|
|
|
880
882
|
]
|
|
881
883
|
};
|
|
882
884
|
|
|
885
|
+
// src/agent/bundles/project-context.ts
|
|
886
|
+
var PROJECT_CONTEXT_PATH = "docs/project-context.md";
|
|
887
|
+
var PROJECT_CONTEXT_READER_SECTION = [
|
|
888
|
+
"## Project Context",
|
|
889
|
+
"",
|
|
890
|
+
`Before doing any work, read \`${PROJECT_CONTEXT_PATH}\` at the`,
|
|
891
|
+
'repository root. It is the canonical answer to "what is this project',
|
|
892
|
+
'about?" \u2014 mission, domain vocabulary, in/out-of-scope capabilities, and',
|
|
893
|
+
"key stakeholders. Use it to frame judgment calls in this session.",
|
|
894
|
+
"",
|
|
895
|
+
`If \`${PROJECT_CONTEXT_PATH}\` does not exist, proceed with the current`,
|
|
896
|
+
"task and note the absence in your session log \u2014 the meeting-analyst and",
|
|
897
|
+
"requirements-analyst agents seed the file on their next run.",
|
|
898
|
+
"",
|
|
899
|
+
"You are a **read-only consumer** of this file. Do not edit it.",
|
|
900
|
+
"",
|
|
901
|
+
"---",
|
|
902
|
+
""
|
|
903
|
+
];
|
|
904
|
+
var PROJECT_CONTEXT_MAINTAINER_SECTION = [
|
|
905
|
+
"## Project Context",
|
|
906
|
+
"",
|
|
907
|
+
`Before starting any phase, read \`${PROJECT_CONTEXT_PATH}\` at the`,
|
|
908
|
+
'repository root. It is the canonical answer to "what is this project',
|
|
909
|
+
'about?" \u2014 mission, domain vocabulary, in/out-of-scope capabilities, and',
|
|
910
|
+
"key stakeholders. Use it to judge relevance when scanning source",
|
|
911
|
+
"material in this session.",
|
|
912
|
+
"",
|
|
913
|
+
"### Seed on first use",
|
|
914
|
+
"",
|
|
915
|
+
`If \`${PROJECT_CONTEXT_PATH}\` does not exist, create it from this`,
|
|
916
|
+
"template and commit it alongside this phase's other outputs:",
|
|
917
|
+
"",
|
|
918
|
+
"```markdown",
|
|
919
|
+
"# Project Context",
|
|
920
|
+
"",
|
|
921
|
+
"> Canonical description of this project. Read by all agents before",
|
|
922
|
+
"> work. Updated by meeting-analyst and requirements-analyst when new",
|
|
923
|
+
"> scope, vocabulary, or stakeholders emerge.",
|
|
924
|
+
"",
|
|
925
|
+
"## Mission",
|
|
926
|
+
"TODO: one or two sentences on what this project exists to do.",
|
|
927
|
+
"",
|
|
928
|
+
"## Target Users",
|
|
929
|
+
"TODO: who uses this, in what role.",
|
|
930
|
+
"",
|
|
931
|
+
"## In-Scope Capabilities",
|
|
932
|
+
"TODO: bullet list of the capabilities this project owns.",
|
|
933
|
+
"",
|
|
934
|
+
"## Out-of-Scope",
|
|
935
|
+
"TODO: capabilities or concerns that are explicitly not this project's.",
|
|
936
|
+
"",
|
|
937
|
+
"## Domain Vocabulary",
|
|
938
|
+
"TODO: short glossary of domain terms, acronyms, and their definitions.",
|
|
939
|
+
"",
|
|
940
|
+
"## Key Stakeholders",
|
|
941
|
+
"TODO: named people or teams and what they care about.",
|
|
942
|
+
"",
|
|
943
|
+
"## References",
|
|
944
|
+
"TODO: links to BCM docs, competitive analysis, product roadmap, and",
|
|
945
|
+
"other authoritative sources.",
|
|
946
|
+
"```",
|
|
947
|
+
"",
|
|
948
|
+
"Fill whatever you can infer from the source material you are already",
|
|
949
|
+
"reading in this phase; leave `TODO:` placeholders for the rest.",
|
|
950
|
+
"",
|
|
951
|
+
"### Update on new facts",
|
|
952
|
+
"",
|
|
953
|
+
"When the source material you process reveals new project-scope",
|
|
954
|
+
"information \u2014 a new capability, a vocabulary term, an entity, a",
|
|
955
|
+
"stakeholder, an in/out-of-scope decision, or a shift in mission \u2014",
|
|
956
|
+
`append or revise the relevant section in \`${PROJECT_CONTEXT_PATH}\``,
|
|
957
|
+
"before closing the phase. Commit those edits with the phase's other",
|
|
958
|
+
"outputs.",
|
|
959
|
+
"",
|
|
960
|
+
"Keep edits surgical: short bullet additions, brief clarifications, or",
|
|
961
|
+
"single-line vocabulary entries. Treat the file as an accreting",
|
|
962
|
+
"reference, not a document you reshape every session.",
|
|
963
|
+
"",
|
|
964
|
+
"---",
|
|
965
|
+
""
|
|
966
|
+
];
|
|
967
|
+
|
|
968
|
+
// src/agent/bundles/company-profile.ts
|
|
969
|
+
var companyProfileAnalystSubAgent = {
|
|
970
|
+
name: "company-profile-analyst",
|
|
971
|
+
description: "Researches an external company (competitor, vendor, partner, customer, etc.) from public sources and produces a structured markdown profile. Optionally enqueues follow-up people and software research tasks. One company per session, tracked by company:* GitHub issue labels.",
|
|
972
|
+
model: AGENT_MODEL.POWERFUL,
|
|
973
|
+
maxTurns: 80,
|
|
974
|
+
platforms: { cursor: { exclude: true } },
|
|
975
|
+
prompt: [
|
|
976
|
+
"# Company Profile Analyst Agent",
|
|
977
|
+
"",
|
|
978
|
+
"You research a single external company from public sources and write",
|
|
979
|
+
"a structured markdown profile. Each profile cycle runs across a small",
|
|
980
|
+
"sequence of GitHub issues \u2014 one per phase \u2014 and produces a single",
|
|
981
|
+
"profile file on disk plus optional follow-up research issues.",
|
|
982
|
+
"",
|
|
983
|
+
"This agent is **domain-neutral**. It makes no assumptions about what",
|
|
984
|
+
"the consuming project sells, which industry it serves, or which",
|
|
985
|
+
"companies matter to it. All domain-specific vocabulary, output",
|
|
986
|
+
"locations, and profile-template overrides come from the invoking",
|
|
987
|
+
"issue body or the consuming project's configuration.",
|
|
988
|
+
"",
|
|
989
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
990
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
991
|
+
"",
|
|
992
|
+
"---",
|
|
993
|
+
"",
|
|
994
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
995
|
+
"## Design Principles",
|
|
996
|
+
"",
|
|
997
|
+
"1. **One company per session.** Never profile two companies in a",
|
|
998
|
+
" single session, even if they came up together.",
|
|
999
|
+
"2. **Public sources only.** Use the company's own site, press, product",
|
|
1000
|
+
" docs, job listings, and other public material. Do not attempt to",
|
|
1001
|
+
" access gated or paywalled content unless the invoking issue body",
|
|
1002
|
+
" explicitly authorizes it.",
|
|
1003
|
+
"3. **Filesystem durability.** The profile file is the deliverable. It",
|
|
1004
|
+
" is committed to disk before the profile issue closes. Downstream",
|
|
1005
|
+
" phases read from disk \u2014 never rely on session memory.",
|
|
1006
|
+
"4. **Generic over specific.** No hardcoded company types, taxonomies,",
|
|
1007
|
+
" or competitive assumptions. Use the generic company-type taxonomy",
|
|
1008
|
+
" below and let consuming projects override it.",
|
|
1009
|
+
"5. **Cite everything.** Every non-trivial factual claim in the profile",
|
|
1010
|
+
" must carry a source citation (URL plus access date).",
|
|
1011
|
+
"6. **Follow-up, don't widen scope.** If the session turns up adjacent",
|
|
1012
|
+
" research questions (a key person worth profiling, a product worth",
|
|
1013
|
+
" evaluating), emit a follow-up issue rather than expanding the",
|
|
1014
|
+
" profile beyond its scope.",
|
|
1015
|
+
"",
|
|
1016
|
+
"---",
|
|
1017
|
+
"",
|
|
1018
|
+
"## Company Type Taxonomy",
|
|
1019
|
+
"",
|
|
1020
|
+
"Pick exactly one type per company profile. The taxonomy is",
|
|
1021
|
+
"deliberately generic \u2014 consuming projects override it via",
|
|
1022
|
+
"`agentConfig.rules` if they need a domain-specific refinement.",
|
|
1023
|
+
"",
|
|
1024
|
+
"| Type | Use for |",
|
|
1025
|
+
"|------|---------|",
|
|
1026
|
+
"| `competitor` | Companies that sell a substitutable offering to the same customers. |",
|
|
1027
|
+
"| `industry-player` | Notable companies in the same industry that are not direct competitors (adjacent offerings, upstream/downstream, ecosystem). |",
|
|
1028
|
+
"| `software-vendor` | Companies whose software this project uses, integrates with, or evaluates as a build-vs-buy option. |",
|
|
1029
|
+
"| `customer` | Existing or prospective customers worth understanding in depth. |",
|
|
1030
|
+
"| `partner` | Strategic or channel partners, integrators, resellers, design partners. |",
|
|
1031
|
+
"| `investor` | Funds, angels, corporate investors relevant to fundraising or market positioning. |",
|
|
1032
|
+
"",
|
|
1033
|
+
"If the company plausibly fits two types, prefer the one that reflects",
|
|
1034
|
+
"the **reason the profile was requested**, and note the secondary type",
|
|
1035
|
+
"in the profile body.",
|
|
1036
|
+
"",
|
|
1037
|
+
"---",
|
|
1038
|
+
"",
|
|
1039
|
+
"## State Machine Overview",
|
|
1040
|
+
"",
|
|
1041
|
+
"```",
|
|
1042
|
+
"\u250C\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\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\u2510",
|
|
1043
|
+
"\u2502 1. RESEARCH \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. DRAFT PROFILE \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 3. FOLLOWUP \u2502",
|
|
1044
|
+
"\u2502 Collect public \u2502 \u2502 Write the structured \u2502 \u2502 Create follow-up \u2502",
|
|
1045
|
+
"\u2502 sources into a \u2502 \u2502 markdown profile to \u2502 \u2502 research issues \u2502",
|
|
1046
|
+
"\u2502 bounded notes \u2502 \u2502 the configured path \u2502 \u2502 for people and \u2502",
|
|
1047
|
+
"\u2502 file \u2502 \u2502 \u2502 \u2502 software surfaced \u2502",
|
|
1048
|
+
"\u2514\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\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\u2518",
|
|
1049
|
+
"```",
|
|
1050
|
+
"",
|
|
1051
|
+
"**Issue labels encode the phase:**",
|
|
1052
|
+
"",
|
|
1053
|
+
"| Label | Phase | Session work |",
|
|
1054
|
+
"|-------|-------|-------------|",
|
|
1055
|
+
"| `company:research` | 1. Research | Gather public sources. Write a bounded research-notes file. Create the draft issue. |",
|
|
1056
|
+
"| `company:draft` | 2. Draft | Read the research notes. Write the structured profile to `<PROFILES_DIR>`. Create the follow-up issue if warranted. |",
|
|
1057
|
+
"| `company:followup` | 3. Followup | Read the profile. Enqueue people/software research issues for items surfaced in the profile. |",
|
|
1058
|
+
"",
|
|
1059
|
+
"All issues also carry `type:company-profile` and a `status:*` label.",
|
|
1060
|
+
"",
|
|
1061
|
+
"**Issue count per company cycle:** 1 research + 1 draft + 0\u20131 followup =",
|
|
1062
|
+
"**2\u20133 sessions**. The followup phase is skipped when the profile did",
|
|
1063
|
+
"not surface any person or product worth follow-up research.",
|
|
1064
|
+
"",
|
|
1065
|
+
"**Shortened paths:**",
|
|
1066
|
+
"- Research phase determines the company is out of scope (not",
|
|
1067
|
+
" relevant, insufficient public material) \u2192 research issue closes",
|
|
1068
|
+
" with a justification and no downstream issues are created \u2192 **1 session**.",
|
|
1069
|
+
"- Short profile with no follow-ups needed \u2192 **2 sessions**.",
|
|
1070
|
+
"",
|
|
1071
|
+
"---",
|
|
1072
|
+
"",
|
|
1073
|
+
"## Configurable Paths",
|
|
1074
|
+
"",
|
|
1075
|
+
"The pipeline uses these placeholders. Consuming projects override the",
|
|
1076
|
+
"defaults by passing paths in the `/profile-company` skill invocation",
|
|
1077
|
+
"or by extending this rule in their own `agentConfig.rules`.",
|
|
1078
|
+
"",
|
|
1079
|
+
"| Placeholder | Meaning | Default |",
|
|
1080
|
+
"|-------------|---------|---------|",
|
|
1081
|
+
"| `<COMPANY_ROOT>` | Root folder for company profiles | `docs/companies/` |",
|
|
1082
|
+
"| `<PROFILES_DIR>` | Final company profile files | `<COMPANY_ROOT>/profiles/` |",
|
|
1083
|
+
"| `<NOTES_DIR>` | Research-notes files from Phase 1 | `<COMPANY_ROOT>/notes/` |",
|
|
1084
|
+
"| `<COMPANY_SLUG>` | Short kebab-case slug identifying the company | derived from the company name |",
|
|
1085
|
+
"",
|
|
1086
|
+
"If `docs/project-context.md` specifies a different company-research",
|
|
1087
|
+
"tree (for example by reusing the research-pipeline deliverables",
|
|
1088
|
+
"folder), prefer that. Otherwise fall back to the defaults above.",
|
|
1089
|
+
"",
|
|
1090
|
+
"---",
|
|
1091
|
+
"",
|
|
1092
|
+
"## Agent Loop",
|
|
1093
|
+
"",
|
|
1094
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
1095
|
+
"",
|
|
1096
|
+
"1. Claim one open `type:company-profile` issue using phase priority:",
|
|
1097
|
+
" `company:research` > `company:draft` > `company:followup`.",
|
|
1098
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
1099
|
+
" branch per your project's branch-naming convention.",
|
|
1100
|
+
"3. Execute the phase handler that matches the issue's `company:*`",
|
|
1101
|
+
" label.",
|
|
1102
|
+
"4. Commit, push, open a PR (if applicable), and close the issue per",
|
|
1103
|
+
" your project's PR workflow.",
|
|
1104
|
+
"",
|
|
1105
|
+
"---",
|
|
1106
|
+
"",
|
|
1107
|
+
"## Phase 1: Research (`company:research`)",
|
|
1108
|
+
"",
|
|
1109
|
+
"**Goal:** Gather public sources into a bounded research-notes file.",
|
|
1110
|
+
"",
|
|
1111
|
+
"**Budget:** Public web search only, unless the issue body authorizes",
|
|
1112
|
+
"additional sources. Write one notes file. Do not write the profile",
|
|
1113
|
+
"in this phase.",
|
|
1114
|
+
"",
|
|
1115
|
+
"### Steps",
|
|
1116
|
+
"",
|
|
1117
|
+
"1. **Read the issue body.** It should include:",
|
|
1118
|
+
" - The company name and website (if known)",
|
|
1119
|
+
" - The requested company type from the taxonomy above",
|
|
1120
|
+
" - The reason the profile was requested (framing \u2014 what does the",
|
|
1121
|
+
" invoking project want to learn?)",
|
|
1122
|
+
" - Optional: `<COMPANY_SLUG>` override, custom output paths",
|
|
1123
|
+
"",
|
|
1124
|
+
"2. **Derive `<COMPANY_SLUG>`** if not supplied \u2014 a 2\u20134 word kebab-case",
|
|
1125
|
+
" summary of the company name. Ensure the slug is not already in use",
|
|
1126
|
+
" under `<PROFILES_DIR>/` or `<NOTES_DIR>/`.",
|
|
1127
|
+
"",
|
|
1128
|
+
"3. **Gather sources.** Prioritize in this order:",
|
|
1129
|
+
" - The company's own website (home, product, pricing, about, careers)",
|
|
1130
|
+
" - Recent public press releases and reputable news coverage",
|
|
1131
|
+
" - Public product documentation and changelogs",
|
|
1132
|
+
" - Job listings (signals on stack, team size, and hiring focus)",
|
|
1133
|
+
" - Public profiles on well-known directories (Crunchbase, LinkedIn",
|
|
1134
|
+
" company page, GitHub organization) when the issue body authorizes",
|
|
1135
|
+
" them",
|
|
1136
|
+
"",
|
|
1137
|
+
"4. **Write a research-notes file** to",
|
|
1138
|
+
" `<NOTES_DIR>/<COMPANY_SLUG>.notes.md`:",
|
|
1139
|
+
"",
|
|
1140
|
+
" ```markdown",
|
|
1141
|
+
" ---",
|
|
1142
|
+
' title: "Research Notes: <company name>"',
|
|
1143
|
+
" slug: <COMPANY_SLUG>",
|
|
1144
|
+
" company_type: <one of the taxonomy values>",
|
|
1145
|
+
" date: YYYY-MM-DD",
|
|
1146
|
+
" parent_issue: <N>",
|
|
1147
|
+
" ---",
|
|
1148
|
+
"",
|
|
1149
|
+
" # Research Notes: <company name>",
|
|
1150
|
+
"",
|
|
1151
|
+
" ## Framing",
|
|
1152
|
+
" <why this company was requested and what to learn>",
|
|
1153
|
+
"",
|
|
1154
|
+
" ## Raw Findings",
|
|
1155
|
+
" - <finding> \u2014 source: <citation>",
|
|
1156
|
+
"",
|
|
1157
|
+
" ## Candidate People of Interest",
|
|
1158
|
+
" - <name, role> \u2014 source: <citation>",
|
|
1159
|
+
"",
|
|
1160
|
+
" ## Candidate Products / Software of Interest",
|
|
1161
|
+
" - <product name> \u2014 source: <citation>",
|
|
1162
|
+
"",
|
|
1163
|
+
" ## Open Questions",
|
|
1164
|
+
" <anything the notes could not answer from public sources>",
|
|
1165
|
+
"",
|
|
1166
|
+
" ## Sources",
|
|
1167
|
+
" - <source URL or file path> \u2014 <date accessed>",
|
|
1168
|
+
" ```",
|
|
1169
|
+
"",
|
|
1170
|
+
"5. **Create the `company:draft` issue** with `Depends on: #<research-issue>`.",
|
|
1171
|
+
" Its body references the notes file path and the requested company",
|
|
1172
|
+
" type.",
|
|
1173
|
+
"",
|
|
1174
|
+
"6. **Commit and push** the notes file. Close the research issue.",
|
|
1175
|
+
"",
|
|
1176
|
+
"---",
|
|
1177
|
+
"",
|
|
1178
|
+
"## Phase 2: Draft Profile (`company:draft`)",
|
|
1179
|
+
"",
|
|
1180
|
+
"**Goal:** Write the structured company profile from the research notes.",
|
|
1181
|
+
"",
|
|
1182
|
+
"**Budget:** No new web searches unless explicitly needed to fill a",
|
|
1183
|
+
"gap the notes flagged. Write one profile file.",
|
|
1184
|
+
"",
|
|
1185
|
+
"### Steps",
|
|
1186
|
+
"",
|
|
1187
|
+
"1. **Read the research-notes file** referenced in the issue body.",
|
|
1188
|
+
"",
|
|
1189
|
+
"2. **Check for duplicates.** If `<PROFILES_DIR>/<COMPANY_SLUG>.md`",
|
|
1190
|
+
" already exists, open it and decide whether to update in place or",
|
|
1191
|
+
" flag a naming collision. Never silently overwrite a non-trivial",
|
|
1192
|
+
" existing profile.",
|
|
1193
|
+
"",
|
|
1194
|
+
"3. **Write the profile** to `<PROFILES_DIR>/<COMPANY_SLUG>.md` using",
|
|
1195
|
+
" the template below. All sections are required; use",
|
|
1196
|
+
" `_Not available in public sources._` when a section cannot be",
|
|
1197
|
+
" filled from the notes.",
|
|
1198
|
+
"",
|
|
1199
|
+
" ```markdown",
|
|
1200
|
+
" ---",
|
|
1201
|
+
' title: "<company name>"',
|
|
1202
|
+
" slug: <COMPANY_SLUG>",
|
|
1203
|
+
" company_type: <one of the taxonomy values>",
|
|
1204
|
+
" website: <primary URL>",
|
|
1205
|
+
" date: YYYY-MM-DD",
|
|
1206
|
+
" parent_issue: <N>",
|
|
1207
|
+
" notes: <NOTES_DIR>/<COMPANY_SLUG>.notes.md",
|
|
1208
|
+
" ---",
|
|
1209
|
+
"",
|
|
1210
|
+
" # <company name>",
|
|
1211
|
+
"",
|
|
1212
|
+
" ## Summary",
|
|
1213
|
+
" <2\u20134 sentence elevator description: what they do, who they sell to>",
|
|
1214
|
+
"",
|
|
1215
|
+
" ## Classification",
|
|
1216
|
+
" - **Primary type:** <taxonomy value>",
|
|
1217
|
+
" - **Secondary type (if any):** <taxonomy value or `n/a`>",
|
|
1218
|
+
" - **Relevance to this project:** <1\u20132 sentences tying the company",
|
|
1219
|
+
" back to the framing from the notes>",
|
|
1220
|
+
"",
|
|
1221
|
+
" ## Offering",
|
|
1222
|
+
" - **Products / services:** <bullet list with one-line descriptions>",
|
|
1223
|
+
" - **Target customers:** <who they sell to>",
|
|
1224
|
+
" - **Pricing model:** <if disclosed>",
|
|
1225
|
+
"",
|
|
1226
|
+
" ## Company",
|
|
1227
|
+
" - **Founded:** <year if known>",
|
|
1228
|
+
" - **Headquarters:** <city, country if known>",
|
|
1229
|
+
" - **Size signals:** <headcount, funding stage, public/private \u2014 if known>",
|
|
1230
|
+
" - **Notable people:** <founders, relevant leaders>",
|
|
1231
|
+
"",
|
|
1232
|
+
" ## Technology Signals",
|
|
1233
|
+
" <stack hints from job listings, product docs, public engineering",
|
|
1234
|
+
" content \u2014 each bullet cited>",
|
|
1235
|
+
"",
|
|
1236
|
+
" ## Positioning / Differentiation",
|
|
1237
|
+
" <how they describe themselves and how they differ from adjacent",
|
|
1238
|
+
" companies \u2014 use their own language, cited, rather than inferred>",
|
|
1239
|
+
"",
|
|
1240
|
+
" ## Risks / Open Questions",
|
|
1241
|
+
" <what the profile could not answer; flag anything the follow-up",
|
|
1242
|
+
" phase should escalate>",
|
|
1243
|
+
"",
|
|
1244
|
+
" ## Follow-up Candidates",
|
|
1245
|
+
" - **People to profile:** <list of candidate name, role pairs>",
|
|
1246
|
+
" - **Products / software to evaluate:** <list of candidate product",
|
|
1247
|
+
" names>",
|
|
1248
|
+
"",
|
|
1249
|
+
" ## Sources",
|
|
1250
|
+
" - <source URL> \u2014 <date accessed>",
|
|
1251
|
+
" ```",
|
|
1252
|
+
"",
|
|
1253
|
+
"4. **Decide whether a follow-up issue is warranted.** Create a",
|
|
1254
|
+
" `company:followup` issue (depending on this draft issue) only if",
|
|
1255
|
+
" the profile lists at least one follow-up candidate. Otherwise,",
|
|
1256
|
+
" note in the draft issue's closing comment that no follow-up is",
|
|
1257
|
+
" needed.",
|
|
1258
|
+
"",
|
|
1259
|
+
"5. **Commit and push** the profile file. Close the draft issue.",
|
|
1260
|
+
"",
|
|
1261
|
+
"---",
|
|
1262
|
+
"",
|
|
1263
|
+
"## Phase 3: Followup (`company:followup`)",
|
|
1264
|
+
"",
|
|
1265
|
+
"**Goal:** Create downstream research issues for the people and",
|
|
1266
|
+
"products surfaced in the profile.",
|
|
1267
|
+
"",
|
|
1268
|
+
"**Budget:** No new research. Read the profile, enqueue issues, close",
|
|
1269
|
+
"the phase.",
|
|
1270
|
+
"",
|
|
1271
|
+
"### Steps",
|
|
1272
|
+
"",
|
|
1273
|
+
"1. **Read the profile file** referenced in the issue body.",
|
|
1274
|
+
"",
|
|
1275
|
+
"2. **Enqueue people-profile issues** for each entry under",
|
|
1276
|
+
" `Follow-up Candidates > People to profile`. Use the consuming",
|
|
1277
|
+
" project's people-research pipeline if one exists; otherwise, open",
|
|
1278
|
+
" a generic `type:research` issue describing what to learn about the",
|
|
1279
|
+
" person and linking back to the company profile.",
|
|
1280
|
+
"",
|
|
1281
|
+
"3. **Enqueue software-evaluation issues** for each entry under",
|
|
1282
|
+
" `Follow-up Candidates > Products / software to evaluate`. Again,",
|
|
1283
|
+
" use a project-specific pipeline if configured, otherwise a generic",
|
|
1284
|
+
" `type:research` issue.",
|
|
1285
|
+
"",
|
|
1286
|
+
"4. **Cross-link** \u2014 update the profile's `## Follow-up Candidates`",
|
|
1287
|
+
" section so each entry references its newly-created issue number.",
|
|
1288
|
+
"",
|
|
1289
|
+
"5. **Commit and push** (if the profile was updated). Close the",
|
|
1290
|
+
" followup issue.",
|
|
1291
|
+
"",
|
|
1292
|
+
"---",
|
|
1293
|
+
"",
|
|
1294
|
+
"## Output Boundaries",
|
|
1295
|
+
"",
|
|
1296
|
+
"This agent writes **only** to:",
|
|
1297
|
+
"",
|
|
1298
|
+
"- `<NOTES_DIR>/` \u2014 research-notes files (Phase 1)",
|
|
1299
|
+
"- `<PROFILES_DIR>/` \u2014 company profiles (Phase 2, updated in Phase 3)",
|
|
1300
|
+
"",
|
|
1301
|
+
"The pipeline produces **profiles and notes only**. Deeper research on",
|
|
1302
|
+
"people or products is delegated to downstream research pipelines via",
|
|
1303
|
+
"follow-up issues \u2014 this agent never writes person profiles, product",
|
|
1304
|
+
"evaluations, or comparative analyses itself. Keep this boundary clean",
|
|
1305
|
+
"so the company-profile pipeline stays generic.",
|
|
1306
|
+
"",
|
|
1307
|
+
"---",
|
|
1308
|
+
"",
|
|
1309
|
+
"## Rules",
|
|
1310
|
+
"",
|
|
1311
|
+
"- **One company per session.** Never profile two companies back-to-back.",
|
|
1312
|
+
"- **Persist before closing.** Every phase must write its output file",
|
|
1313
|
+
" before closing its issue.",
|
|
1314
|
+
"- **Cite everything.** Profile claims without source citations do not",
|
|
1315
|
+
" belong in the deliverable.",
|
|
1316
|
+
"- **No assumed competition.** Never call a company a competitor unless",
|
|
1317
|
+
" the invoking issue body or the consuming project's configuration",
|
|
1318
|
+
" says so.",
|
|
1319
|
+
"- **Produce profiles, not downstream work.** Do not open",
|
|
1320
|
+
" `type:requirement` or formal evaluation issues from this pipeline.",
|
|
1321
|
+
" Follow-up work is scoped through `company:followup` or delegated to",
|
|
1322
|
+
" downstream research agents."
|
|
1323
|
+
].join("\n")
|
|
1324
|
+
};
|
|
1325
|
+
var profileCompanySkill = {
|
|
1326
|
+
name: "profile-company",
|
|
1327
|
+
description: "Kick off a company-profile pipeline. Creates a company:research issue for the given company and dispatches Phase 1 (Research) in the company-profile-analyst agent.",
|
|
1328
|
+
disableModelInvocation: true,
|
|
1329
|
+
userInvocable: true,
|
|
1330
|
+
context: "fork",
|
|
1331
|
+
agent: "company-profile-analyst",
|
|
1332
|
+
platforms: { cursor: { exclude: true } },
|
|
1333
|
+
instructions: [
|
|
1334
|
+
"# Profile Company",
|
|
1335
|
+
"",
|
|
1336
|
+
"Kick off a company-profile pipeline. Creates a `company:research`",
|
|
1337
|
+
"issue carrying the company name, type, and framing, then dispatches",
|
|
1338
|
+
"Phase 1 (Research) in the company-profile-analyst agent.",
|
|
1339
|
+
"",
|
|
1340
|
+
"## Usage",
|
|
1341
|
+
"",
|
|
1342
|
+
"/profile-company <company-name>",
|
|
1343
|
+
"",
|
|
1344
|
+
"Optional extensions in the issue body:",
|
|
1345
|
+
"- `type: <competitor | industry-player | software-vendor | customer |",
|
|
1346
|
+
" partner | investor>` \u2014 override the default type inference",
|
|
1347
|
+
"- `website: <url>` \u2014 canonical website if not obvious from the name",
|
|
1348
|
+
"- `framing: <text>` \u2014 why this profile was requested and what to learn",
|
|
1349
|
+
"- `slug: <kebab-case>` \u2014 override the derived company slug",
|
|
1350
|
+
"- `sources: <list>` \u2014 additional authorized sources beyond public web",
|
|
1351
|
+
"",
|
|
1352
|
+
"## Default Paths",
|
|
1353
|
+
"",
|
|
1354
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
1355
|
+
"`agentConfig.rules`, outputs land under:",
|
|
1356
|
+
"",
|
|
1357
|
+
"- `docs/companies/notes/<slug>.notes.md`",
|
|
1358
|
+
"- `docs/companies/profiles/<slug>.md`",
|
|
1359
|
+
"",
|
|
1360
|
+
"## Steps",
|
|
1361
|
+
"",
|
|
1362
|
+
"1. Create a `company:research` issue with `type:company-profile`,",
|
|
1363
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
1364
|
+
" company name, selected type, framing, and any overrides.",
|
|
1365
|
+
"2. Execute Phase 1 (Research) of the company-profile-analyst agent.",
|
|
1366
|
+
"3. Phase 1 creates the `company:draft` issue. Phase 2 may create a",
|
|
1367
|
+
" `company:followup` issue. Each downstream issue declares its",
|
|
1368
|
+
" `Depends on:` predecessor.",
|
|
1369
|
+
"",
|
|
1370
|
+
"## Output",
|
|
1371
|
+
"",
|
|
1372
|
+
"- A research-notes file under the project's notes directory",
|
|
1373
|
+
"- A single company profile under the profiles directory",
|
|
1374
|
+
"- Optional follow-up research issues for key people and products",
|
|
1375
|
+
" surfaced in the profile",
|
|
1376
|
+
"- This pipeline produces **profiles only** \u2014 it does not write person",
|
|
1377
|
+
" profiles, product evaluations, or comparative analyses itself."
|
|
1378
|
+
].join("\n")
|
|
1379
|
+
};
|
|
1380
|
+
var companyProfileBundle = {
|
|
1381
|
+
name: "company-profile",
|
|
1382
|
+
description: "Company research and profiling pipeline: research, draft profile, followup. Opt-in only; domain-neutral; filesystem-durable between phases.",
|
|
1383
|
+
appliesWhen: () => false,
|
|
1384
|
+
rules: [
|
|
1385
|
+
{
|
|
1386
|
+
name: "company-profile-workflow",
|
|
1387
|
+
description: "Describes the 3-phase company-profile pipeline, the company:* label taxonomy, and the boundary against downstream research agents.",
|
|
1388
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
1389
|
+
content: [
|
|
1390
|
+
"# Company Profile Workflow",
|
|
1391
|
+
"",
|
|
1392
|
+
"Use `/profile-company <company-name>` to kick off a company",
|
|
1393
|
+
"research and profiling pipeline. The pipeline runs in up to 3",
|
|
1394
|
+
"phases \u2014 research, draft, followup \u2014 each tracked by its own",
|
|
1395
|
+
"GitHub issue labeled `company:research`, `company:draft`, or",
|
|
1396
|
+
"`company:followup`. All issues carry `type:company-profile`.",
|
|
1397
|
+
"",
|
|
1398
|
+
"The pipeline produces **company profiles only**. Deeper research",
|
|
1399
|
+
"on people or products surfaced in a profile is delegated to",
|
|
1400
|
+
"downstream research pipelines via `company:followup` issues.",
|
|
1401
|
+
"",
|
|
1402
|
+
"See the `company-profile-analyst` agent definition for full",
|
|
1403
|
+
"workflow details, default paths, the company-type taxonomy, and",
|
|
1404
|
+
"phase-by-phase instructions."
|
|
1405
|
+
].join("\n"),
|
|
1406
|
+
platforms: {
|
|
1407
|
+
cursor: { exclude: true }
|
|
1408
|
+
},
|
|
1409
|
+
tags: ["workflow"]
|
|
1410
|
+
}
|
|
1411
|
+
],
|
|
1412
|
+
skills: [profileCompanySkill],
|
|
1413
|
+
subAgents: [companyProfileAnalystSubAgent],
|
|
1414
|
+
labels: [
|
|
1415
|
+
{
|
|
1416
|
+
name: "type:company-profile",
|
|
1417
|
+
color: "0E8A16",
|
|
1418
|
+
description: "Work that produces or maintains a company profile or its research notes"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
name: "company:research",
|
|
1422
|
+
color: "C5DEF5",
|
|
1423
|
+
description: "Phase 1: gather public sources about a company into a research-notes file"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
name: "company:draft",
|
|
1427
|
+
color: "BFDADC",
|
|
1428
|
+
description: "Phase 2: write the structured company profile from research notes"
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
name: "company:followup",
|
|
1432
|
+
color: "D4C5F9",
|
|
1433
|
+
description: "Phase 3: enqueue follow-up research issues for people and products surfaced in the profile"
|
|
1434
|
+
}
|
|
1435
|
+
]
|
|
1436
|
+
};
|
|
1437
|
+
|
|
883
1438
|
// src/agent/bundles/github-workflow.ts
|
|
884
1439
|
var import_github = require("projen/lib/github");
|
|
885
1440
|
var githubWorkflowBundle = {
|
|
@@ -1027,154 +1582,71 @@ var githubWorkflowBundle = {
|
|
|
1027
1582
|
"- Use conventional commit format for the PR title",
|
|
1028
1583
|
"- Delegate merge to the `pr-reviewer` sub-agent \u2014 do not merge manually and do not enable auto-merge directly"
|
|
1029
1584
|
].join("\n"),
|
|
1030
|
-
tags: ["workflow"]
|
|
1031
|
-
}
|
|
1032
|
-
]
|
|
1033
|
-
};
|
|
1034
|
-
|
|
1035
|
-
// src/agent/bundles/jest.ts
|
|
1036
|
-
var jestBundle = {
|
|
1037
|
-
name: "jest",
|
|
1038
|
-
description: "Jest testing conventions and patterns",
|
|
1039
|
-
appliesWhen: (project) => hasDep(project, "jest"),
|
|
1040
|
-
findApplicableProjects: (project) => findProjectsWithDep(project, "jest"),
|
|
1041
|
-
rules: [
|
|
1042
|
-
{
|
|
1043
|
-
name: "jest-testing",
|
|
1044
|
-
description: "Jest testing conventions and patterns",
|
|
1045
|
-
scope: AGENT_RULE_SCOPE.FILE_PATTERN,
|
|
1046
|
-
filePatterns: ["**/*.test.ts", "**/*.spec.ts"],
|
|
1047
|
-
content: [
|
|
1048
|
-
"# Jest Testing Patterns",
|
|
1049
|
-
"",
|
|
1050
|
-
"## Mandatory Requirements",
|
|
1051
|
-
"",
|
|
1052
|
-
"- **Tests MUST be created or updated whenever code functionality is added or changed**",
|
|
1053
|
-
"- This applies to all code changes, including:",
|
|
1054
|
-
" - New features and functionality",
|
|
1055
|
-
" - Bug fixes",
|
|
1056
|
-
" - Refactoring that changes behavior",
|
|
1057
|
-
" - API changes",
|
|
1058
|
-
" - Configuration changes that affect functionality",
|
|
1059
|
-
"- Tests should be written or updated as part of the same change that modifies the code",
|
|
1060
|
-
"",
|
|
1061
|
-
"## Test Structure",
|
|
1062
|
-
"",
|
|
1063
|
-
"- Use **Jest** with SWC for fast compilation",
|
|
1064
|
-
"- Test files: `.spec.ts` or `.test.ts` (co-located with source)",
|
|
1065
|
-
"- Use descriptive test names: `describe('ClassName', () => { it('should do something specific', () => {}) })`",
|
|
1066
|
-
"- Prefer snapshot tests for complex object structures",
|
|
1067
|
-
"- Mock external dependencies appropriately",
|
|
1068
|
-
"",
|
|
1069
|
-
"## Test Organization",
|
|
1070
|
-
"",
|
|
1071
|
-
"- Co-locate test files with source files",
|
|
1072
|
-
"- Test files can use dev dependencies (ESLint rule override)",
|
|
1073
|
-
"- Use `@swc/jest` for fast compilation",
|
|
1074
|
-
"- Configure Jest in `jest.config.json` (not in package.json)",
|
|
1075
|
-
"",
|
|
1076
|
-
"## Example Test Structure",
|
|
1077
|
-
"",
|
|
1078
|
-
"```typescript",
|
|
1079
|
-
"import { MyClass } from './my-class';",
|
|
1080
|
-
"",
|
|
1081
|
-
"describe('MyClass', () => {",
|
|
1082
|
-
" it('should do something specific', () => {",
|
|
1083
|
-
" // Test implementation",
|
|
1084
|
-
" });",
|
|
1085
|
-
"});",
|
|
1086
|
-
"```"
|
|
1087
|
-
].join("\n"),
|
|
1088
|
-
tags: ["testing"]
|
|
1089
|
-
}
|
|
1090
|
-
],
|
|
1091
|
-
claudePermissions: {
|
|
1092
|
-
allow: ["Bash(npx jest:*)"]
|
|
1093
|
-
}
|
|
1094
|
-
};
|
|
1095
|
-
|
|
1096
|
-
// src/agent/bundles/project-context.ts
|
|
1097
|
-
var PROJECT_CONTEXT_PATH = "docs/project-context.md";
|
|
1098
|
-
var PROJECT_CONTEXT_READER_SECTION = [
|
|
1099
|
-
"## Project Context",
|
|
1100
|
-
"",
|
|
1101
|
-
`Before doing any work, read \`${PROJECT_CONTEXT_PATH}\` at the`,
|
|
1102
|
-
'repository root. It is the canonical answer to "what is this project',
|
|
1103
|
-
'about?" \u2014 mission, domain vocabulary, in/out-of-scope capabilities, and',
|
|
1104
|
-
"key stakeholders. Use it to frame judgment calls in this session.",
|
|
1105
|
-
"",
|
|
1106
|
-
`If \`${PROJECT_CONTEXT_PATH}\` does not exist, proceed with the current`,
|
|
1107
|
-
"task and note the absence in your session log \u2014 the meeting-analyst and",
|
|
1108
|
-
"requirements-analyst agents seed the file on their next run.",
|
|
1109
|
-
"",
|
|
1110
|
-
"You are a **read-only consumer** of this file. Do not edit it.",
|
|
1111
|
-
"",
|
|
1112
|
-
"---",
|
|
1113
|
-
""
|
|
1114
|
-
];
|
|
1115
|
-
var PROJECT_CONTEXT_MAINTAINER_SECTION = [
|
|
1116
|
-
"## Project Context",
|
|
1117
|
-
"",
|
|
1118
|
-
`Before starting any phase, read \`${PROJECT_CONTEXT_PATH}\` at the`,
|
|
1119
|
-
'repository root. It is the canonical answer to "what is this project',
|
|
1120
|
-
'about?" \u2014 mission, domain vocabulary, in/out-of-scope capabilities, and',
|
|
1121
|
-
"key stakeholders. Use it to judge relevance when scanning source",
|
|
1122
|
-
"material in this session.",
|
|
1123
|
-
"",
|
|
1124
|
-
"### Seed on first use",
|
|
1125
|
-
"",
|
|
1126
|
-
`If \`${PROJECT_CONTEXT_PATH}\` does not exist, create it from this`,
|
|
1127
|
-
"template and commit it alongside this phase's other outputs:",
|
|
1128
|
-
"",
|
|
1129
|
-
"```markdown",
|
|
1130
|
-
"# Project Context",
|
|
1131
|
-
"",
|
|
1132
|
-
"> Canonical description of this project. Read by all agents before",
|
|
1133
|
-
"> work. Updated by meeting-analyst and requirements-analyst when new",
|
|
1134
|
-
"> scope, vocabulary, or stakeholders emerge.",
|
|
1135
|
-
"",
|
|
1136
|
-
"## Mission",
|
|
1137
|
-
"TODO: one or two sentences on what this project exists to do.",
|
|
1138
|
-
"",
|
|
1139
|
-
"## Target Users",
|
|
1140
|
-
"TODO: who uses this, in what role.",
|
|
1141
|
-
"",
|
|
1142
|
-
"## In-Scope Capabilities",
|
|
1143
|
-
"TODO: bullet list of the capabilities this project owns.",
|
|
1144
|
-
"",
|
|
1145
|
-
"## Out-of-Scope",
|
|
1146
|
-
"TODO: capabilities or concerns that are explicitly not this project's.",
|
|
1147
|
-
"",
|
|
1148
|
-
"## Domain Vocabulary",
|
|
1149
|
-
"TODO: short glossary of domain terms, acronyms, and their definitions.",
|
|
1150
|
-
"",
|
|
1151
|
-
"## Key Stakeholders",
|
|
1152
|
-
"TODO: named people or teams and what they care about.",
|
|
1153
|
-
"",
|
|
1154
|
-
"## References",
|
|
1155
|
-
"TODO: links to BCM docs, competitive analysis, product roadmap, and",
|
|
1156
|
-
"other authoritative sources.",
|
|
1157
|
-
"```",
|
|
1158
|
-
"",
|
|
1159
|
-
"Fill whatever you can infer from the source material you are already",
|
|
1160
|
-
"reading in this phase; leave `TODO:` placeholders for the rest.",
|
|
1161
|
-
"",
|
|
1162
|
-
"### Update on new facts",
|
|
1163
|
-
"",
|
|
1164
|
-
"When the source material you process reveals new project-scope",
|
|
1165
|
-
"information \u2014 a new capability, a vocabulary term, an entity, a",
|
|
1166
|
-
"stakeholder, an in/out-of-scope decision, or a shift in mission \u2014",
|
|
1167
|
-
`append or revise the relevant section in \`${PROJECT_CONTEXT_PATH}\``,
|
|
1168
|
-
"before closing the phase. Commit those edits with the phase's other",
|
|
1169
|
-
"outputs.",
|
|
1170
|
-
"",
|
|
1171
|
-
"Keep edits surgical: short bullet additions, brief clarifications, or",
|
|
1172
|
-
"single-line vocabulary entries. Treat the file as an accreting",
|
|
1173
|
-
"reference, not a document you reshape every session.",
|
|
1174
|
-
"",
|
|
1175
|
-
"---",
|
|
1176
|
-
""
|
|
1177
|
-
];
|
|
1585
|
+
tags: ["workflow"]
|
|
1586
|
+
}
|
|
1587
|
+
]
|
|
1588
|
+
};
|
|
1589
|
+
|
|
1590
|
+
// src/agent/bundles/jest.ts
|
|
1591
|
+
var jestBundle = {
|
|
1592
|
+
name: "jest",
|
|
1593
|
+
description: "Jest testing conventions and patterns",
|
|
1594
|
+
appliesWhen: (project) => hasDep(project, "jest"),
|
|
1595
|
+
findApplicableProjects: (project) => findProjectsWithDep(project, "jest"),
|
|
1596
|
+
rules: [
|
|
1597
|
+
{
|
|
1598
|
+
name: "jest-testing",
|
|
1599
|
+
description: "Jest testing conventions and patterns",
|
|
1600
|
+
scope: AGENT_RULE_SCOPE.FILE_PATTERN,
|
|
1601
|
+
filePatterns: ["**/*.test.ts", "**/*.spec.ts"],
|
|
1602
|
+
content: [
|
|
1603
|
+
"# Jest Testing Patterns",
|
|
1604
|
+
"",
|
|
1605
|
+
"## Mandatory Requirements",
|
|
1606
|
+
"",
|
|
1607
|
+
"- **Tests MUST be created or updated whenever code functionality is added or changed**",
|
|
1608
|
+
"- This applies to all code changes, including:",
|
|
1609
|
+
" - New features and functionality",
|
|
1610
|
+
" - Bug fixes",
|
|
1611
|
+
" - Refactoring that changes behavior",
|
|
1612
|
+
" - API changes",
|
|
1613
|
+
" - Configuration changes that affect functionality",
|
|
1614
|
+
"- Tests should be written or updated as part of the same change that modifies the code",
|
|
1615
|
+
"",
|
|
1616
|
+
"## Test Structure",
|
|
1617
|
+
"",
|
|
1618
|
+
"- Use **Jest** with SWC for fast compilation",
|
|
1619
|
+
"- Test files: `.spec.ts` or `.test.ts` (co-located with source)",
|
|
1620
|
+
"- Use descriptive test names: `describe('ClassName', () => { it('should do something specific', () => {}) })`",
|
|
1621
|
+
"- Prefer snapshot tests for complex object structures",
|
|
1622
|
+
"- Mock external dependencies appropriately",
|
|
1623
|
+
"",
|
|
1624
|
+
"## Test Organization",
|
|
1625
|
+
"",
|
|
1626
|
+
"- Co-locate test files with source files",
|
|
1627
|
+
"- Test files can use dev dependencies (ESLint rule override)",
|
|
1628
|
+
"- Use `@swc/jest` for fast compilation",
|
|
1629
|
+
"- Configure Jest in `jest.config.json` (not in package.json)",
|
|
1630
|
+
"",
|
|
1631
|
+
"## Example Test Structure",
|
|
1632
|
+
"",
|
|
1633
|
+
"```typescript",
|
|
1634
|
+
"import { MyClass } from './my-class';",
|
|
1635
|
+
"",
|
|
1636
|
+
"describe('MyClass', () => {",
|
|
1637
|
+
" it('should do something specific', () => {",
|
|
1638
|
+
" // Test implementation",
|
|
1639
|
+
" });",
|
|
1640
|
+
"});",
|
|
1641
|
+
"```"
|
|
1642
|
+
].join("\n"),
|
|
1643
|
+
tags: ["testing"]
|
|
1644
|
+
}
|
|
1645
|
+
],
|
|
1646
|
+
claudePermissions: {
|
|
1647
|
+
allow: ["Bash(npx jest:*)"]
|
|
1648
|
+
}
|
|
1649
|
+
};
|
|
1178
1650
|
|
|
1179
1651
|
// src/agent/bundles/meeting-analysis.ts
|
|
1180
1652
|
var meetingAnalystSubAgent = {
|
|
@@ -3494,6 +3966,481 @@ var requirementsAnalystBundle = {
|
|
|
3494
3966
|
]
|
|
3495
3967
|
};
|
|
3496
3968
|
|
|
3969
|
+
// src/agent/bundles/research-pipeline.ts
|
|
3970
|
+
var researchAnalystSubAgent = {
|
|
3971
|
+
name: "research-analyst",
|
|
3972
|
+
description: "Runs a generic research micro-task pipeline (scope, slice search/synthesize, verify). One phase per session, tracked by research:* GitHub issue labels with filesystem-based durability between phases.",
|
|
3973
|
+
model: AGENT_MODEL.POWERFUL,
|
|
3974
|
+
maxTurns: 80,
|
|
3975
|
+
platforms: { cursor: { exclude: true } },
|
|
3976
|
+
prompt: [
|
|
3977
|
+
"# Research Analyst Agent",
|
|
3978
|
+
"",
|
|
3979
|
+
"Generic research micro-task pipeline. Given a research question, you",
|
|
3980
|
+
"break it into a scope, a fixed number of focused search/synthesize",
|
|
3981
|
+
"slices, and a verification pass that reconciles the slice outputs into",
|
|
3982
|
+
"a single deliverable. Each phase runs as its **own agent session**,",
|
|
3983
|
+
"triggered by a GitHub issue with a `research:*` phase label. You",
|
|
3984
|
+
"handle exactly **one phase per session** \u2014 read the issue to determine",
|
|
3985
|
+
"which phase to execute.",
|
|
3986
|
+
"",
|
|
3987
|
+
"This agent is **domain-neutral**. It makes no assumptions about what",
|
|
3988
|
+
"is being researched (companies, products, people, markets, technical",
|
|
3989
|
+
"topics, academic literature, etc.). All domain-specific vocabulary,",
|
|
3990
|
+
"output locations, and acceptance criteria come from the invoking",
|
|
3991
|
+
"issue body or the consuming project's configuration.",
|
|
3992
|
+
"",
|
|
3993
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
3994
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
3995
|
+
"",
|
|
3996
|
+
"---",
|
|
3997
|
+
"",
|
|
3998
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
3999
|
+
"## Design Principles",
|
|
4000
|
+
"",
|
|
4001
|
+
"1. **Micro-tasks, not mega-prompts.** Split work into small slices so",
|
|
4002
|
+
" each session has a bounded context window and a single deliverable.",
|
|
4003
|
+
"2. **Filesystem durability.** Every phase persists its output to a",
|
|
4004
|
+
" file on disk before closing its issue. Downstream phases read those",
|
|
4005
|
+
" files \u2014 never rely on session memory.",
|
|
4006
|
+
"3. **Issue graph = state machine.** Phase ordering is encoded with",
|
|
4007
|
+
" `Depends on: #N` links between phase issues. A phase runs only",
|
|
4008
|
+
" after its predecessor is closed.",
|
|
4009
|
+
"4. **Generic over specific.** No hardcoded domains, companies, source",
|
|
4010
|
+
" projects, or proprietary taxonomies. Use placeholders that the",
|
|
4011
|
+
" skill invocation or consuming project fills in.",
|
|
4012
|
+
"5. **Verifiable synthesis.** The verify phase re-reads every slice",
|
|
4013
|
+
" output and produces a single deliverable whose claims can each be",
|
|
4014
|
+
" traced back to a slice.",
|
|
4015
|
+
"",
|
|
4016
|
+
"---",
|
|
4017
|
+
"",
|
|
4018
|
+
"## State Machine Overview",
|
|
4019
|
+
"",
|
|
4020
|
+
"```",
|
|
4021
|
+
"\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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
|
|
4022
|
+
"\u2502 1. SCOPE \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. SLICE (\xD7N) \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 3. VERIFY \u2502",
|
|
4023
|
+
"\u2502 Turn the \u2502 \u2502 For each slice: \u2502 \u2502 Read every \u2502",
|
|
4024
|
+
"\u2502 question \u2502 \u2502 search sources, \u2502 \u2502 slice \u2502",
|
|
4025
|
+
"\u2502 into N \u2502 \u2502 synthesize a \u2502 \u2502 output, \u2502",
|
|
4026
|
+
"\u2502 focused \u2502 \u2502 bounded note file \u2502 \u2502 reconcile, \u2502",
|
|
4027
|
+
"\u2502 slices \u2502 \u2502 \u2502 \u2502 deliverable \u2502",
|
|
4028
|
+
"\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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
|
|
4029
|
+
"```",
|
|
4030
|
+
"",
|
|
4031
|
+
"**Issue labels encode the phase:**",
|
|
4032
|
+
"",
|
|
4033
|
+
"| Label | Phase | Session work |",
|
|
4034
|
+
"|-------|-------|-------------|",
|
|
4035
|
+
"| `research:scope` | 1. Scope | Decompose the research question into N focused slices. Write a scope file. Create N `research:slice` issues. |",
|
|
4036
|
+
"| `research:slice` | 2. Slice | Execute one slice: search authorized sources, synthesize, write a single slice note file. |",
|
|
4037
|
+
"| `research:verify` | 3. Verify | Read every slice note, reconcile findings, produce the final deliverable and a verification report. |",
|
|
4038
|
+
"",
|
|
4039
|
+
"All issues also carry `type:research` and a `status:*` label.",
|
|
4040
|
+
"",
|
|
4041
|
+
"**Issue count per research cycle:** 1 scope + N slice + 1 verify =",
|
|
4042
|
+
"**N + 2 sessions**. Typical N is 3\u20136.",
|
|
4043
|
+
"",
|
|
4044
|
+
"**Shortened paths:**",
|
|
4045
|
+
"- Scope phase determines the question is unanswerable or out of scope",
|
|
4046
|
+
" \u2192 scope issue closes with a justification and no downstream issues",
|
|
4047
|
+
" are created \u2192 **1 session**.",
|
|
4048
|
+
"- Single-slice research (N = 1) \u2192 **3 sessions**. Never skip verify,",
|
|
4049
|
+
" even with one slice \u2014 verify is where the deliverable lands.",
|
|
4050
|
+
"",
|
|
4051
|
+
"---",
|
|
4052
|
+
"",
|
|
4053
|
+
"## Configurable Paths",
|
|
4054
|
+
"",
|
|
4055
|
+
"The pipeline uses these placeholders. Consuming projects override the",
|
|
4056
|
+
"defaults by passing paths in the `/research` skill invocation or by",
|
|
4057
|
+
"extending this rule in their own `agentConfig.rules`.",
|
|
4058
|
+
"",
|
|
4059
|
+
"| Placeholder | Meaning | Default |",
|
|
4060
|
+
"|-------------|---------|---------|",
|
|
4061
|
+
"| `<RESEARCH_ROOT>` | Root folder for all research outputs | `docs/research/` |",
|
|
4062
|
+
"| `<SCOPE_DIR>` | Scope files | `<RESEARCH_ROOT>/scopes/` |",
|
|
4063
|
+
"| `<SLICES_DIR>` | Slice note files | `<RESEARCH_ROOT>/slices/` |",
|
|
4064
|
+
"| `<DELIVERABLES_DIR>` | Final verified deliverables | `<RESEARCH_ROOT>/deliverables/` |",
|
|
4065
|
+
"| `<RESEARCH_SLUG>` | Short kebab-case slug identifying one research cycle | derived from the question |",
|
|
4066
|
+
"| `<N>` | Number of slices (default 4, max 8) | `4` |",
|
|
4067
|
+
"",
|
|
4068
|
+
"If `docs/project-context.md` specifies a different research tree,",
|
|
4069
|
+
"prefer that. Otherwise fall back to the defaults above.",
|
|
4070
|
+
"",
|
|
4071
|
+
"---",
|
|
4072
|
+
"",
|
|
4073
|
+
"## Agent Loop",
|
|
4074
|
+
"",
|
|
4075
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
4076
|
+
"",
|
|
4077
|
+
"1. Claim one open `type:research` issue using phase priority:",
|
|
4078
|
+
" `research:scope` > `research:slice` > `research:verify`.",
|
|
4079
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
4080
|
+
" branch per your project's branch-naming convention.",
|
|
4081
|
+
"3. Execute the phase handler that matches the issue's `research:*`",
|
|
4082
|
+
" label.",
|
|
4083
|
+
"4. Commit, push, open a PR (if applicable), and close the issue per",
|
|
4084
|
+
" your project's PR workflow.",
|
|
4085
|
+
"",
|
|
4086
|
+
"---",
|
|
4087
|
+
"",
|
|
4088
|
+
"## Phase 1: Scope (`research:scope`)",
|
|
4089
|
+
"",
|
|
4090
|
+
"**Goal:** Turn a natural-language research question into a bounded",
|
|
4091
|
+
"scope file and `N` focused slice issues.",
|
|
4092
|
+
"",
|
|
4093
|
+
"**Budget:** No web searches in this phase. Read the question, the",
|
|
4094
|
+
"project context, and any cited source material already on disk. Write",
|
|
4095
|
+
"one scope file. Create N slice issues.",
|
|
4096
|
+
"",
|
|
4097
|
+
"### Steps",
|
|
4098
|
+
"",
|
|
4099
|
+
"1. **Read the research question** from the issue body. The body should",
|
|
4100
|
+
" include:",
|
|
4101
|
+
" - The question itself",
|
|
4102
|
+
" - Authorized source categories (e.g. public web, vendor docs, a",
|
|
4103
|
+
" cited local file path) \u2014 if absent, default to public web only",
|
|
4104
|
+
" - Output acceptance criteria for the final deliverable",
|
|
4105
|
+
" - Optional: `<N>` override, `<RESEARCH_SLUG>` override, custom",
|
|
4106
|
+
" output paths",
|
|
4107
|
+
"",
|
|
4108
|
+
"2. **Derive `<RESEARCH_SLUG>`** if not supplied \u2014 a 3\u20135 word kebab-case",
|
|
4109
|
+
" summary of the question. Ensure the slug is not already in use",
|
|
4110
|
+
" under `<SCOPE_DIR>/`.",
|
|
4111
|
+
"",
|
|
4112
|
+
"3. **Decompose the question into N slices.** Each slice must:",
|
|
4113
|
+
" - Be answerable independently of the others",
|
|
4114
|
+
" - Fit inside a single agent session's context budget",
|
|
4115
|
+
" - Have a clearly scoped set of sources to consult",
|
|
4116
|
+
" - Produce a bounded note file (target: under 1500 words)",
|
|
4117
|
+
"",
|
|
4118
|
+
"4. **Write the scope file** to",
|
|
4119
|
+
" `<SCOPE_DIR>/<RESEARCH_SLUG>.scope.md`:",
|
|
4120
|
+
"",
|
|
4121
|
+
" ```markdown",
|
|
4122
|
+
" ---",
|
|
4123
|
+
' title: "Research Scope: <question>"',
|
|
4124
|
+
" slug: <RESEARCH_SLUG>",
|
|
4125
|
+
" date: YYYY-MM-DD",
|
|
4126
|
+
" parent_issue: <N>",
|
|
4127
|
+
" slice_count: <N>",
|
|
4128
|
+
" ---",
|
|
4129
|
+
"",
|
|
4130
|
+
" # Research Scope: <question>",
|
|
4131
|
+
"",
|
|
4132
|
+
" ## Question",
|
|
4133
|
+
" <verbatim question from the issue>",
|
|
4134
|
+
"",
|
|
4135
|
+
" ## Authorized Sources",
|
|
4136
|
+
" - <source category or path>",
|
|
4137
|
+
"",
|
|
4138
|
+
" ## Acceptance Criteria",
|
|
4139
|
+
" - [ ] <criterion for the final deliverable>",
|
|
4140
|
+
"",
|
|
4141
|
+
" ## Slices",
|
|
4142
|
+
" ### Slice 1: <title>",
|
|
4143
|
+
" - **Focus:** <what this slice answers>",
|
|
4144
|
+
" - **Sources:** <the subset of authorized sources this slice uses>",
|
|
4145
|
+
" - **Output:** <SLICES_DIR>/<RESEARCH_SLUG>-01-<slug>.slice.md",
|
|
4146
|
+
"",
|
|
4147
|
+
" ### Slice 2: <title>",
|
|
4148
|
+
" ...",
|
|
4149
|
+
"",
|
|
4150
|
+
" ## Out of Scope",
|
|
4151
|
+
" <sub-questions deliberately excluded from this cycle>",
|
|
4152
|
+
"",
|
|
4153
|
+
" ## Deliverable",
|
|
4154
|
+
" <DELIVERABLES_DIR>/<RESEARCH_SLUG>.md",
|
|
4155
|
+
" ```",
|
|
4156
|
+
"",
|
|
4157
|
+
"5. **Create N `research:slice` issues**, one per slice, each with",
|
|
4158
|
+
" `Depends on: #<scope-issue>`. Each slice issue body references the",
|
|
4159
|
+
" scope file and names the exact slice (by number and title).",
|
|
4160
|
+
"",
|
|
4161
|
+
"6. **Create one `research:verify` issue** that depends on all N slice",
|
|
4162
|
+
" issues. Its body references the scope file and lists every slice",
|
|
4163
|
+
" output path that verify must read.",
|
|
4164
|
+
"",
|
|
4165
|
+
"7. **Commit and push** the scope file. Close the scope issue.",
|
|
4166
|
+
"",
|
|
4167
|
+
"---",
|
|
4168
|
+
"",
|
|
4169
|
+
"## Phase 2: Slice (`research:slice`)",
|
|
4170
|
+
"",
|
|
4171
|
+
"**Goal:** Answer one slice by searching the authorized sources and",
|
|
4172
|
+
"writing a single slice note file.",
|
|
4173
|
+
"",
|
|
4174
|
+
"**Budget:** Search budget is one slice \u2014 do not expand scope. Write",
|
|
4175
|
+
"one slice note. Do not create downstream issues.",
|
|
4176
|
+
"",
|
|
4177
|
+
"### Steps",
|
|
4178
|
+
"",
|
|
4179
|
+
"1. **Read the scope file** referenced in the issue body.",
|
|
4180
|
+
"",
|
|
4181
|
+
"2. **Identify your slice** by number and title. Re-read the slice's",
|
|
4182
|
+
" focus, sources, and output path.",
|
|
4183
|
+
"",
|
|
4184
|
+
"3. **Search the authorized sources.** Stay within the source list for",
|
|
4185
|
+
" your slice \u2014 do not broaden to the full scope's source list unless",
|
|
4186
|
+
" the slice explicitly permits it.",
|
|
4187
|
+
"",
|
|
4188
|
+
"4. **Synthesize a slice note** and write it to the slice's output",
|
|
4189
|
+
" path (e.g. `<SLICES_DIR>/<RESEARCH_SLUG>-NN-<slug>.slice.md`):",
|
|
4190
|
+
"",
|
|
4191
|
+
" ```markdown",
|
|
4192
|
+
" ---",
|
|
4193
|
+
' title: "Slice NN: <title>"',
|
|
4194
|
+
" slug: <RESEARCH_SLUG>",
|
|
4195
|
+
" slice: NN",
|
|
4196
|
+
" date: YYYY-MM-DD",
|
|
4197
|
+
" parent_scope: <SCOPE_DIR>/<RESEARCH_SLUG>.scope.md",
|
|
4198
|
+
" parent_issue: <N>",
|
|
4199
|
+
" ---",
|
|
4200
|
+
"",
|
|
4201
|
+
" # Slice NN: <title>",
|
|
4202
|
+
"",
|
|
4203
|
+
" ## Question",
|
|
4204
|
+
" <the slice-level question>",
|
|
4205
|
+
"",
|
|
4206
|
+
" ## Key Findings",
|
|
4207
|
+
" - <finding> \u2014 source: <citation>",
|
|
4208
|
+
"",
|
|
4209
|
+
" ## Evidence",
|
|
4210
|
+
" <short quotations, paraphrases, or structured data with citations>",
|
|
4211
|
+
"",
|
|
4212
|
+
" ## Gaps / Open Questions",
|
|
4213
|
+
" <anything the slice could not answer inside its budget>",
|
|
4214
|
+
"",
|
|
4215
|
+
" ## Sources",
|
|
4216
|
+
" - <source URL or file path> \u2014 <date accessed>",
|
|
4217
|
+
" ```",
|
|
4218
|
+
"",
|
|
4219
|
+
"5. **Stay within the word budget** (default 1500 words). If the slice",
|
|
4220
|
+
" cannot fit, add an `## Overflow` section at the end noting what was",
|
|
4221
|
+
" cut and flag it for the verify phase \u2014 do not expand into other",
|
|
4222
|
+
" slices' territory.",
|
|
4223
|
+
"",
|
|
4224
|
+
"6. **Commit and push** the slice note. Close the slice issue.",
|
|
4225
|
+
"",
|
|
4226
|
+
"---",
|
|
4227
|
+
"",
|
|
4228
|
+
"## Phase 3: Verify (`research:verify`)",
|
|
4229
|
+
"",
|
|
4230
|
+
"**Goal:** Reconcile every slice into a single verified deliverable.",
|
|
4231
|
+
"",
|
|
4232
|
+
"**Budget:** No new web searches. Read the scope, read every slice",
|
|
4233
|
+
"note, reconcile contradictions, write the deliverable and a short",
|
|
4234
|
+
"verification report.",
|
|
4235
|
+
"",
|
|
4236
|
+
"### Steps",
|
|
4237
|
+
"",
|
|
4238
|
+
"1. **Read the scope file** and every slice note listed in the issue",
|
|
4239
|
+
" body. If any slice file is missing, stop and re-open the",
|
|
4240
|
+
" corresponding slice issue with `status:needs-attention`.",
|
|
4241
|
+
"",
|
|
4242
|
+
"2. **Build a claim index.** For every assertion in any slice, note",
|
|
4243
|
+
" which slice(s) support it and which sources back it.",
|
|
4244
|
+
"",
|
|
4245
|
+
"3. **Reconcile contradictions.** When slices disagree:",
|
|
4246
|
+
" - Prefer the slice with stronger sources",
|
|
4247
|
+
" - Flag unresolved contradictions in the verification report",
|
|
4248
|
+
" - Do not silently pick a side",
|
|
4249
|
+
"",
|
|
4250
|
+
"4. **Write the deliverable** to",
|
|
4251
|
+
" `<DELIVERABLES_DIR>/<RESEARCH_SLUG>.md`. The structure is dictated",
|
|
4252
|
+
" by the acceptance criteria in the scope file. Every factual claim",
|
|
4253
|
+
" in the deliverable must cite at least one slice note.",
|
|
4254
|
+
"",
|
|
4255
|
+
"5. **Write a verification report** to",
|
|
4256
|
+
" `<DELIVERABLES_DIR>/<RESEARCH_SLUG>.verify.md`:",
|
|
4257
|
+
"",
|
|
4258
|
+
" ```markdown",
|
|
4259
|
+
" ---",
|
|
4260
|
+
' title: "Verification Report: <question>"',
|
|
4261
|
+
" slug: <RESEARCH_SLUG>",
|
|
4262
|
+
" date: YYYY-MM-DD",
|
|
4263
|
+
" parent_issue: <N>",
|
|
4264
|
+
" slices_read: <count>",
|
|
4265
|
+
" ---",
|
|
4266
|
+
"",
|
|
4267
|
+
" # Verification Report: <question>",
|
|
4268
|
+
"",
|
|
4269
|
+
" ## Acceptance Criteria Coverage",
|
|
4270
|
+
" - [x] <criterion> \u2014 covered by slice(s) <NN, NN>",
|
|
4271
|
+
" - [ ] <criterion> \u2014 **not covered**; gap noted in deliverable",
|
|
4272
|
+
"",
|
|
4273
|
+
" ## Slice Coverage",
|
|
4274
|
+
" | Slice | Claims | Reused in deliverable | Notes |",
|
|
4275
|
+
" |-------|--------|-----------------------|-------|",
|
|
4276
|
+
" | 01 | <count> | <count> | |",
|
|
4277
|
+
"",
|
|
4278
|
+
" ## Reconciled Contradictions",
|
|
4279
|
+
" - <short summary of each reconciled contradiction and why>",
|
|
4280
|
+
"",
|
|
4281
|
+
" ## Unresolved Contradictions",
|
|
4282
|
+
" - <contradiction the verifier could not resolve>",
|
|
4283
|
+
"",
|
|
4284
|
+
" ## Gaps",
|
|
4285
|
+
" - <question the pipeline could not answer>",
|
|
4286
|
+
" ```",
|
|
4287
|
+
"",
|
|
4288
|
+
"6. **Comment on the scope issue** with a summary linking to the",
|
|
4289
|
+
" deliverable and verification report.",
|
|
4290
|
+
"",
|
|
4291
|
+
"7. **Commit and push.** Close the verify issue.",
|
|
4292
|
+
"",
|
|
4293
|
+
"---",
|
|
4294
|
+
"",
|
|
4295
|
+
"## Output Boundaries",
|
|
4296
|
+
"",
|
|
4297
|
+
"This agent writes **only** to:",
|
|
4298
|
+
"",
|
|
4299
|
+
"- `<SCOPE_DIR>/` \u2014 scope files (Phase 1)",
|
|
4300
|
+
"- `<SLICES_DIR>/` \u2014 slice notes (Phase 2)",
|
|
4301
|
+
"- `<DELIVERABLES_DIR>/` \u2014 deliverables and verification reports",
|
|
4302
|
+
" (Phase 3)",
|
|
4303
|
+
"",
|
|
4304
|
+
"The pipeline produces **notes and deliverables only**. It does not",
|
|
4305
|
+
"open downstream `type:requirement`, profile, or comparison issues \u2014",
|
|
4306
|
+
"those are the responsibility of specialized downstream agents (e.g.",
|
|
4307
|
+
"`requirements-analyst`, `meeting-analyst`) that consume the",
|
|
4308
|
+
"deliverables produced here. Keep this boundary clean so the research",
|
|
4309
|
+
"pipeline stays generic.",
|
|
4310
|
+
"",
|
|
4311
|
+
"---",
|
|
4312
|
+
"",
|
|
4313
|
+
"## Rules",
|
|
4314
|
+
"",
|
|
4315
|
+
"- **One phase per session.** Never run two phases back-to-back in a",
|
|
4316
|
+
" single session.",
|
|
4317
|
+
"- **Persist before closing.** Every phase must write its output file",
|
|
4318
|
+
" before closing its issue.",
|
|
4319
|
+
"- **Do not expand scope mid-slice.** Overflow goes into the slice's",
|
|
4320
|
+
" overflow section and is flagged for verify \u2014 not into another",
|
|
4321
|
+
" slice's territory.",
|
|
4322
|
+
"- **Cite everything.** Claims without a source citation do not belong",
|
|
4323
|
+
" in a slice note or deliverable.",
|
|
4324
|
+
"- **Produce notes, not downstream work.** Do not create",
|
|
4325
|
+
" `type:requirement`, profile, or comparison issues from this",
|
|
4326
|
+
" pipeline. Emit deliverables under `<DELIVERABLES_DIR>/` and let",
|
|
4327
|
+
" downstream agents decide what to do with them."
|
|
4328
|
+
].join("\n")
|
|
4329
|
+
};
|
|
4330
|
+
var researchSkill = {
|
|
4331
|
+
name: "research",
|
|
4332
|
+
description: "Kick off a generic research micro-task pipeline. Creates a research:scope issue and dispatches Phase 1 (Scope) in the research-analyst agent.",
|
|
4333
|
+
disableModelInvocation: true,
|
|
4334
|
+
userInvocable: true,
|
|
4335
|
+
context: "fork",
|
|
4336
|
+
agent: "research-analyst",
|
|
4337
|
+
platforms: { cursor: { exclude: true } },
|
|
4338
|
+
instructions: [
|
|
4339
|
+
"# Research",
|
|
4340
|
+
"",
|
|
4341
|
+
"Kick off a generic research micro-task pipeline. Creates a",
|
|
4342
|
+
"`research:scope` issue carrying the research question and dispatches",
|
|
4343
|
+
"Phase 1 (Scope) in the research-analyst agent.",
|
|
4344
|
+
"",
|
|
4345
|
+
"## Usage",
|
|
4346
|
+
"",
|
|
4347
|
+
"/research <question>",
|
|
4348
|
+
"",
|
|
4349
|
+
"Optional extensions in the question body:",
|
|
4350
|
+
"- `sources: <list>` \u2014 authorized source categories or file paths",
|
|
4351
|
+
"- `slices: <N>` \u2014 override the default slice count (default 4, max 8)",
|
|
4352
|
+
"- `slug: <kebab-case>` \u2014 override the derived research slug",
|
|
4353
|
+
"- `acceptance: <list>` \u2014 explicit acceptance criteria for the",
|
|
4354
|
+
" deliverable",
|
|
4355
|
+
"",
|
|
4356
|
+
"## Default Paths",
|
|
4357
|
+
"",
|
|
4358
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
4359
|
+
"`agentConfig.rules`, outputs land under:",
|
|
4360
|
+
"",
|
|
4361
|
+
"- `docs/research/scopes/<slug>.scope.md`",
|
|
4362
|
+
"- `docs/research/slices/<slug>-NN-<slice-slug>.slice.md`",
|
|
4363
|
+
"- `docs/research/deliverables/<slug>.md`",
|
|
4364
|
+
"- `docs/research/deliverables/<slug>.verify.md`",
|
|
4365
|
+
"",
|
|
4366
|
+
"## Steps",
|
|
4367
|
+
"",
|
|
4368
|
+
"1. Create a `research:scope` issue with `type:research`,",
|
|
4369
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
4370
|
+
" verbatim question, authorized sources, and any overrides.",
|
|
4371
|
+
"2. Execute Phase 1 (Scope) of the research-analyst agent.",
|
|
4372
|
+
"3. Phase 1 creates `research:slice` issues (one per slice) and a",
|
|
4373
|
+
" single `research:verify` issue. Each downstream issue declares",
|
|
4374
|
+
" its `Depends on:` predecessor.",
|
|
4375
|
+
"",
|
|
4376
|
+
"## Output",
|
|
4377
|
+
"",
|
|
4378
|
+
"- A scope file under the project's research scope directory",
|
|
4379
|
+
"- One slice note per slice under the slices directory",
|
|
4380
|
+
"- A single deliverable plus verification report under the deliverables",
|
|
4381
|
+
" directory",
|
|
4382
|
+
"- This pipeline produces **notes and deliverables only** \u2014 it does",
|
|
4383
|
+
" not open downstream `type:requirement` or profile issues."
|
|
4384
|
+
].join("\n")
|
|
4385
|
+
};
|
|
4386
|
+
var researchPipelineBundle = {
|
|
4387
|
+
name: "research-pipeline",
|
|
4388
|
+
description: "Generic research micro-task pipeline: scope, N-way slice search/synthesize, and verify. Opt-in only; domain-neutral; filesystem-durable between phases.",
|
|
4389
|
+
appliesWhen: () => false,
|
|
4390
|
+
rules: [
|
|
4391
|
+
{
|
|
4392
|
+
name: "research-pipeline-workflow",
|
|
4393
|
+
description: "Describes the 3-phase generic research pipeline, the research:* label taxonomy, and the boundary against downstream specialized agents.",
|
|
4394
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
4395
|
+
content: [
|
|
4396
|
+
"# Research Pipeline Workflow",
|
|
4397
|
+
"",
|
|
4398
|
+
"Use `/research <question>` to kick off a generic research",
|
|
4399
|
+
"micro-task pipeline. The pipeline runs in 3 phases \u2014 scope, slice,",
|
|
4400
|
+
"verify \u2014 each tracked by its own GitHub issue labeled",
|
|
4401
|
+
"`research:scope`, `research:slice`, or `research:verify`. All",
|
|
4402
|
+
"issues carry `type:research`.",
|
|
4403
|
+
"",
|
|
4404
|
+
"The pipeline produces **notes and deliverables only**. It does",
|
|
4405
|
+
"not open downstream `type:requirement` or profile issues \u2014 those",
|
|
4406
|
+
"belong to specialized downstream agents that consume the",
|
|
4407
|
+
"deliverables.",
|
|
4408
|
+
"",
|
|
4409
|
+
"See the `research-analyst` agent definition for full workflow",
|
|
4410
|
+
"details, default paths, and phase-by-phase instructions."
|
|
4411
|
+
].join("\n"),
|
|
4412
|
+
platforms: {
|
|
4413
|
+
cursor: { exclude: true }
|
|
4414
|
+
},
|
|
4415
|
+
tags: ["workflow"]
|
|
4416
|
+
}
|
|
4417
|
+
],
|
|
4418
|
+
skills: [researchSkill],
|
|
4419
|
+
subAgents: [researchAnalystSubAgent],
|
|
4420
|
+
labels: [
|
|
4421
|
+
{
|
|
4422
|
+
name: "type:research",
|
|
4423
|
+
color: "5319E7",
|
|
4424
|
+
description: "Work that produces or consumes a research note, slice, or deliverable"
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
name: "research:scope",
|
|
4428
|
+
color: "C5DEF5",
|
|
4429
|
+
description: "Phase 1: decompose a research question into N focused slice issues"
|
|
4430
|
+
},
|
|
4431
|
+
{
|
|
4432
|
+
name: "research:slice",
|
|
4433
|
+
color: "BFDADC",
|
|
4434
|
+
description: "Phase 2: execute one research slice \u2014 search authorized sources and write a slice note"
|
|
4435
|
+
},
|
|
4436
|
+
{
|
|
4437
|
+
name: "research:verify",
|
|
4438
|
+
color: "D4C5F9",
|
|
4439
|
+
description: "Phase 3: reconcile slice notes into a verified deliverable"
|
|
4440
|
+
}
|
|
4441
|
+
]
|
|
4442
|
+
};
|
|
4443
|
+
|
|
3497
4444
|
// src/agent/bundles/slack.ts
|
|
3498
4445
|
var slackBundle = {
|
|
3499
4446
|
name: "slack",
|
|
@@ -4144,7 +5091,9 @@ var BUILT_IN_BUNDLES = [
|
|
|
4144
5091
|
meetingAnalysisBundle,
|
|
4145
5092
|
orchestratorBundle,
|
|
4146
5093
|
prReviewBundle,
|
|
4147
|
-
requirementsAnalystBundle
|
|
5094
|
+
requirementsAnalystBundle,
|
|
5095
|
+
researchPipelineBundle,
|
|
5096
|
+
companyProfileBundle
|
|
4148
5097
|
];
|
|
4149
5098
|
|
|
4150
5099
|
// src/agent/bundles/scope.ts
|
|
@@ -7664,6 +8613,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
7664
8613
|
addSyncLabelsWorkflow,
|
|
7665
8614
|
awsCdkBundle,
|
|
7666
8615
|
baseBundle,
|
|
8616
|
+
companyProfileBundle,
|
|
7667
8617
|
getLatestEligibleVersion,
|
|
7668
8618
|
githubWorkflowBundle,
|
|
7669
8619
|
jestBundle,
|
|
@@ -7673,6 +8623,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
7673
8623
|
prReviewBundle,
|
|
7674
8624
|
projenBundle,
|
|
7675
8625
|
requirementsAnalystBundle,
|
|
8626
|
+
researchPipelineBundle,
|
|
7676
8627
|
resolveModelAlias,
|
|
7677
8628
|
resolveTemplateVariables,
|
|
7678
8629
|
slackBundle,
|