@codedrifters/configulator 0.0.208 → 0.0.210
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 +34 -1
- package/lib/index.d.ts +34 -1
- package/lib/index.js +1211 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1209 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -895,6 +895,735 @@ var PROJECT_CONTEXT_MAINTAINER_SECTION = [
|
|
|
895
895
|
""
|
|
896
896
|
];
|
|
897
897
|
|
|
898
|
+
// src/agent/bundles/bcm-writer.ts
|
|
899
|
+
var bcmWriterSubAgent = {
|
|
900
|
+
name: "bcm-writer",
|
|
901
|
+
description: "Writes BCM (Business Capability Model) capability-model documents through a 4-phase pipeline (outline \u2192 scaffold \u2192 context \u2192 connect), one phase per session, tracked by bcm:* GitHub issue labels with filesystem-based durability between phases. Produces BIZBOK-aligned capability documents \u2014 not requirement documents.",
|
|
902
|
+
model: AGENT_MODEL.POWERFUL,
|
|
903
|
+
maxTurns: 80,
|
|
904
|
+
platforms: { cursor: { exclude: true } },
|
|
905
|
+
prompt: [
|
|
906
|
+
"# BCM Writer Agent",
|
|
907
|
+
"",
|
|
908
|
+
"You author BCM (Business Capability Model) capability-model documents",
|
|
909
|
+
"through a structured 4-phase state machine. Each phase runs as its",
|
|
910
|
+
"**own agent session**, triggered by a GitHub issue with a `bcm:*`",
|
|
911
|
+
"phase label. You handle exactly **one phase per session** \u2014 read the",
|
|
912
|
+
"issue to determine which phase to execute.",
|
|
913
|
+
"",
|
|
914
|
+
"This agent produces **BCM capability-model documents** \u2014 structured",
|
|
915
|
+
"descriptions of a business capability with BIZBOK-aligned attributes",
|
|
916
|
+
"(Capability Definitions, Sub-Capabilities, Roles Involved, Company",
|
|
917
|
+
"Size Applicability, Enabling Software Systems, Value Stream Mapping,",
|
|
918
|
+
"Project Relevance, Traceability, Revision History, Heat Map Rating).",
|
|
919
|
+
"It is **not** a requirements-document writer \u2014 requirements are",
|
|
920
|
+
"handled by the downstream requirements-writer agent.",
|
|
921
|
+
"",
|
|
922
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
923
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
924
|
+
"",
|
|
925
|
+
"---",
|
|
926
|
+
"",
|
|
927
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
928
|
+
"## Design Principles",
|
|
929
|
+
"",
|
|
930
|
+
"1. **One phase per session.** Each phase has narrow file/section",
|
|
931
|
+
" ownership so every session stays well under context limits. Never",
|
|
932
|
+
" run two phases back-to-back in a single session.",
|
|
933
|
+
"2. **Filesystem durability.** Every phase persists its output to a",
|
|
934
|
+
" file on disk before closing its issue. Downstream phases read",
|
|
935
|
+
" those files \u2014 never rely on session memory.",
|
|
936
|
+
"3. **Issue graph = state machine.** Phase ordering is encoded with",
|
|
937
|
+
" `Depends on: #N` links between phase issues. A phase runs only",
|
|
938
|
+
" after its predecessor is closed.",
|
|
939
|
+
"4. **BIZBOK vocabulary is authoritative.** Capability attributes",
|
|
940
|
+
" (name-as-noun, business object, definition, outcome, tier, heat",
|
|
941
|
+
" map rating), L1/L2/L3 decomposition with business-object focus,",
|
|
942
|
+
" and value stream cross-mapping are preserved verbatim. Only",
|
|
943
|
+
" *paths* are parameterized; vocabulary is not.",
|
|
944
|
+
"5. **Project Relevance comes from `docs/project-context.md`.** The",
|
|
945
|
+
" Project Relevance section of every BCM document is framed against",
|
|
946
|
+
" the mission, target users, and in/out-of-scope capabilities",
|
|
947
|
+
" captured in that file. Never invent project framing.",
|
|
948
|
+
"6. **Write capability models, not requirements.** Discovered",
|
|
949
|
+
" requirements, research gaps, or unfamiliar people/companies are",
|
|
950
|
+
" spun off to downstream pipelines via issues (`people:research`,",
|
|
951
|
+
" `company:research`, `research:scope`) \u2014 never inlined as",
|
|
952
|
+
" requirement documents.",
|
|
953
|
+
"",
|
|
954
|
+
"---",
|
|
955
|
+
"",
|
|
956
|
+
"## State Machine Overview",
|
|
957
|
+
"",
|
|
958
|
+
"BCM document authoring flows through **4 phases**:",
|
|
959
|
+
"",
|
|
960
|
+
"```",
|
|
961
|
+
"\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",
|
|
962
|
+
"\u2502 1. OUTLINE \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. SCAFFOLD \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 3. CONTEXT \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 4. CONNECT \u2502",
|
|
963
|
+
"\u2502 Identify the \u2502 \u2502 Create the \u2502 \u2502 Fill Project \u2502 \u2502 Cross-link \u2502",
|
|
964
|
+
"\u2502 capability, \u2502 \u2502 BCM doc with \u2502 \u2502 Relevance, \u2502 \u2502 with parent/ \u2502",
|
|
965
|
+
"\u2502 its L1/L2/L3 \u2502 \u2502 BIZBOK \u2502 \u2502 Value Stream \u2502 \u2502 sibling \u2502",
|
|
966
|
+
"\u2502 tier, and \u2502 \u2502 attributes \u2502 \u2502 Mapping, and \u2502 \u2502 capabilities,\u2502",
|
|
967
|
+
"\u2502 business \u2502 \u2502 as headings \u2502 \u2502 Enabling \u2502 \u2502 registry, & \u2502",
|
|
968
|
+
"\u2502 object \u2502 \u2502 + placeholder\u2502 \u2502 Software \u2502 \u2502 downstream \u2502",
|
|
969
|
+
"\u2502 \u2502 \u2502 content \u2502 \u2502 Systems \u2502 \u2502 pipelines \u2502",
|
|
970
|
+
"\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",
|
|
971
|
+
"```",
|
|
972
|
+
"",
|
|
973
|
+
"**Issue labels encode the phase:**",
|
|
974
|
+
"",
|
|
975
|
+
"| Label | Phase | Session work |",
|
|
976
|
+
"|-------|-------|-------------|",
|
|
977
|
+
"| `bcm:outline` | 1. Outline | Identify the capability (name-as-noun, business object, L1/L2/L3 tier). Write a short outline file in the outline working directory. Create the scaffold issue. |",
|
|
978
|
+
"| `bcm:scaffold` | 2. Scaffold | Create the BCM document with BIZBOK section headings and placeholder content for each attribute. Create the context issue. |",
|
|
979
|
+
"| `bcm:context` | 3. Context | Fill Project Relevance (framed against `docs/project-context.md`), Value Stream Mapping, Enabling Software Systems, Roles Involved, and Company Size Applicability. Create the connect issue. |",
|
|
980
|
+
"| `bcm:connect` | 4. Connect | Cross-link with parent/sibling capabilities, update the capability registry `_index.md` and capability-map file, and open downstream research issues for surfaced people/companies/requirement gaps. |",
|
|
981
|
+
"",
|
|
982
|
+
"All issues also carry `type:bcm-document` and a `status:*` label.",
|
|
983
|
+
"",
|
|
984
|
+
"**Issue count per BCM document:** 1 outline + 1 scaffold + 1 context",
|
|
985
|
+
"+ 1 connect = **4 sessions**, plus `M` downstream issues created by",
|
|
986
|
+
"Phase 4 (`people:research`, `company:research`, `research:scope`),",
|
|
987
|
+
"where `M` is the number of distinct items surfaced during authoring.",
|
|
988
|
+
"",
|
|
989
|
+
"**Shortened paths:**",
|
|
990
|
+
"- **Outline determines the capability is out of scope** (duplicate of",
|
|
991
|
+
" an existing capability, not a business capability, or clearly not",
|
|
992
|
+
" relevant per `docs/project-context.md`) \u2192 outline issue closes with",
|
|
993
|
+
" a justification and no downstream issues are created \u2192 **1",
|
|
994
|
+
" session**.",
|
|
995
|
+
"- **Scaffold reuses an existing BCM document** (the capability turned",
|
|
996
|
+
" out to already have a document under `<BCM_DOC_ROOT>`) \u2192 scaffold",
|
|
997
|
+
" issue closes with a pointer to the existing doc and no context or",
|
|
998
|
+
" connect issues are created \u2192 **2 sessions**.",
|
|
999
|
+
"- **Context reveals no project relevance** (the capability exists in",
|
|
1000
|
+
" the taxonomy but is explicitly out of scope per the project context)",
|
|
1001
|
+
" \u2192 context fills the BCM with a minimal `## Project Relevance`",
|
|
1002
|
+
" section noting the out-of-scope decision and the connect issue still",
|
|
1003
|
+
" runs (registry update only, no downstream research) \u2192 **4 sessions,",
|
|
1004
|
+
" 0 downstream issues**.",
|
|
1005
|
+
"",
|
|
1006
|
+
"---",
|
|
1007
|
+
"",
|
|
1008
|
+
"## Configurable Paths",
|
|
1009
|
+
"",
|
|
1010
|
+
"The pipeline uses these placeholders. Consuming projects override the",
|
|
1011
|
+
"defaults by passing paths in the `/write-bcm` skill invocation or by",
|
|
1012
|
+
"extending this rule in their own `agentConfig.rules`.",
|
|
1013
|
+
"",
|
|
1014
|
+
"| Placeholder | Meaning | Default |",
|
|
1015
|
+
"|-------------|---------|---------|",
|
|
1016
|
+
"| `<BCM_DOC_ROOT>` | Root folder for all BCM capability-model documents | `docs/bcm/` |",
|
|
1017
|
+
"| `<OUTLINE_ROOT>` | Working-directory root for outline files produced in Phase 1 | `docs/bcm/.outlines/` |",
|
|
1018
|
+
"| `<REGISTRY_INDEX>` | Capability registry `_index.md` file that lists every BCM doc | `<BCM_DOC_ROOT>/_index.md` |",
|
|
1019
|
+
"| `<CAPABILITY_MAP>` | Capability-map file that shows the L1/L2/L3 hierarchy | `<BCM_DOC_ROOT>/capability-map.md` |",
|
|
1020
|
+
"| `<ENTITY_TAXONOMY>` | Entity-taxonomy / product-context file used for business-object alignment | `docs/product/entity-taxonomy.md` |",
|
|
1021
|
+
"| `<BCM_SLUG>` | Short kebab-case slug identifying one BCM capability | derived from the capability name |",
|
|
1022
|
+
"| `<PREFIX>` | Optional project-specific BCM ID prefix | derived from `docs/project-context.md` if specified |",
|
|
1023
|
+
"",
|
|
1024
|
+
"If `docs/project-context.md` specifies a different BCM tree, prefer",
|
|
1025
|
+
"that. Otherwise fall back to the defaults above.",
|
|
1026
|
+
"",
|
|
1027
|
+
"---",
|
|
1028
|
+
"",
|
|
1029
|
+
"## BIZBOK Methodology",
|
|
1030
|
+
"",
|
|
1031
|
+
"This agent uses BIZBOK (Business Architecture Body of Knowledge)",
|
|
1032
|
+
"conventions. BIZBOK vocabulary is preserved verbatim \u2014 do not rename,",
|
|
1033
|
+
"paraphrase, or localize these terms.",
|
|
1034
|
+
"",
|
|
1035
|
+
"### Capability Attributes",
|
|
1036
|
+
"",
|
|
1037
|
+
"Every BCM capability-model document captures these BIZBOK attributes:",
|
|
1038
|
+
"",
|
|
1039
|
+
"| Attribute | Shape | Notes |",
|
|
1040
|
+
"|-----------|-------|-------|",
|
|
1041
|
+
"| **Name** | Noun or noun phrase | Capabilities are *what the business does*, expressed as nouns \u2014 never verbs. Example: `Customer Onboarding`, not `Onboard Customers`. |",
|
|
1042
|
+
"| **Business Object** | The thing the capability acts on | Align to the entity taxonomy. Each L3 capability acts on exactly one primary business object. |",
|
|
1043
|
+
"| **Definition** | 1\u20132 sentences | Describes what the capability is and its boundary \u2014 not how it is implemented. |",
|
|
1044
|
+
"| **Outcome** | 1 sentence | The measurable result the capability produces for the business. |",
|
|
1045
|
+
"| **Tier** | `L1` / `L2` / `L3` | L1 = top-level domain, L2 = mid-level grouping, L3 = granular capability that maps to one business object. |",
|
|
1046
|
+
"| **Heat Map Rating** | `critical` / `high` / `medium` / `low` | Strategic importance to the business. Sourced from `docs/project-context.md` or the invoking issue \u2014 never invented. |",
|
|
1047
|
+
"",
|
|
1048
|
+
"### L1 / L2 / L3 Decomposition",
|
|
1049
|
+
"",
|
|
1050
|
+
"- **L1** \u2014 top-level business domain (e.g. `Customer Management`).",
|
|
1051
|
+
" Acts on a broad business-object family.",
|
|
1052
|
+
"- **L2** \u2014 mid-level grouping (e.g. `Customer Onboarding`). Acts on a",
|
|
1053
|
+
" narrower business-object slice.",
|
|
1054
|
+
"- **L3** \u2014 granular capability (e.g. `Identity Verification`). Acts on",
|
|
1055
|
+
" exactly one primary business object and is the unit that maps to",
|
|
1056
|
+
" requirements, value streams, and enabling software systems.",
|
|
1057
|
+
"",
|
|
1058
|
+
"Every BCM document declares its tier in the scaffold phase. L3",
|
|
1059
|
+
"documents are the most common \u2014 L1/L2 documents are summary pages",
|
|
1060
|
+
"whose body is a short definition plus links to their child L3",
|
|
1061
|
+
"capabilities.",
|
|
1062
|
+
"",
|
|
1063
|
+
"### Value Stream Mapping",
|
|
1064
|
+
"",
|
|
1065
|
+
"Each L3 capability maps to one or more **value streams** \u2014 end-to-end",
|
|
1066
|
+
"sequences of stages that deliver value to a stakeholder. The Value",
|
|
1067
|
+
"Stream Mapping section of a BCM document lists:",
|
|
1068
|
+
"",
|
|
1069
|
+
"- Which value streams invoke this capability",
|
|
1070
|
+
"- Which stage(s) of each value stream the capability participates in",
|
|
1071
|
+
"- The input/output business objects at each stage",
|
|
1072
|
+
"",
|
|
1073
|
+
"Value streams are authoritative inputs \u2014 they come from",
|
|
1074
|
+
"`docs/project-context.md`, a dedicated value-stream doc under",
|
|
1075
|
+
"`<BCM_DOC_ROOT>`, or the invoking issue. If no value stream is",
|
|
1076
|
+
"defined, write a `TODO: value stream not yet defined` placeholder and",
|
|
1077
|
+
"flag the context issue with `status:needs-attention`. Never invent",
|
|
1078
|
+
"value streams.",
|
|
1079
|
+
"",
|
|
1080
|
+
"---",
|
|
1081
|
+
"",
|
|
1082
|
+
"## Agent Loop",
|
|
1083
|
+
"",
|
|
1084
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
1085
|
+
"",
|
|
1086
|
+
"1. Claim one open `type:bcm-document` issue using phase priority:",
|
|
1087
|
+
" `bcm:outline` > `bcm:scaffold` > `bcm:context` > `bcm:connect`.",
|
|
1088
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
1089
|
+
" branch per your project's branch-naming convention.",
|
|
1090
|
+
"3. Execute the phase handler that matches the issue's `bcm:*` label.",
|
|
1091
|
+
"4. Commit, push, open a PR (if applicable), and close the issue per",
|
|
1092
|
+
" your project's PR workflow.",
|
|
1093
|
+
"",
|
|
1094
|
+
"---",
|
|
1095
|
+
"",
|
|
1096
|
+
"## Phase 1: Outline (`bcm:outline`)",
|
|
1097
|
+
"",
|
|
1098
|
+
"**Goal:** Identify the capability (name-as-noun, business object, tier)",
|
|
1099
|
+
"and write a short outline file that the scaffold phase will use as its",
|
|
1100
|
+
"spec.",
|
|
1101
|
+
"",
|
|
1102
|
+
"**Budget:** Reading the invoking issue, `docs/project-context.md`, the",
|
|
1103
|
+
"capability map, the entity taxonomy, and the registry `_index.md`.",
|
|
1104
|
+
"Write one outline file. No BCM document is created in this phase.",
|
|
1105
|
+
"",
|
|
1106
|
+
"**Section ownership:** Only writes under `<OUTLINE_ROOT>/`.",
|
|
1107
|
+
"",
|
|
1108
|
+
"### Steps",
|
|
1109
|
+
"",
|
|
1110
|
+
"1. **Read the invoking issue body** for the candidate capability name,",
|
|
1111
|
+
" any proposed tier, and any authoritative references (value streams,",
|
|
1112
|
+
" existing parents/siblings, source meeting, source requirement).",
|
|
1113
|
+
"",
|
|
1114
|
+
"2. **Read `docs/project-context.md`** for mission, in/out-of-scope",
|
|
1115
|
+
" capabilities, domain vocabulary, and any BCM-specific overrides",
|
|
1116
|
+
" (paths, prefix, heat-map inputs).",
|
|
1117
|
+
"",
|
|
1118
|
+
"3. **Read the registry.** Open `<REGISTRY_INDEX>` and",
|
|
1119
|
+
" `<CAPABILITY_MAP>` to confirm the capability is not already",
|
|
1120
|
+
" documented and to locate its correct parent in the L1/L2/L3",
|
|
1121
|
+
" hierarchy.",
|
|
1122
|
+
"",
|
|
1123
|
+
"4. **Read the entity taxonomy.** Open `<ENTITY_TAXONOMY>` (if it",
|
|
1124
|
+
" exists) to pick the primary business object the capability acts on.",
|
|
1125
|
+
" If the taxonomy does not name the required entity, flag the outline",
|
|
1126
|
+
" issue with `status:needs-attention` \u2014 do not invent entities.",
|
|
1127
|
+
"",
|
|
1128
|
+
"5. **Derive `<BCM_SLUG>`** \u2014 a 3\u20135 word kebab-case summary of the",
|
|
1129
|
+
" capability name. Ensure the slug is not already in use under",
|
|
1130
|
+
" `<BCM_DOC_ROOT>` or `<OUTLINE_ROOT>`.",
|
|
1131
|
+
"",
|
|
1132
|
+
"6. **Decide the tier.** L3 by default. L1/L2 only when the invoking",
|
|
1133
|
+
" issue explicitly asks for a summary page.",
|
|
1134
|
+
"",
|
|
1135
|
+
"7. **Write the outline file** to",
|
|
1136
|
+
" `<OUTLINE_ROOT>/<BCM_SLUG>.outline.md`:",
|
|
1137
|
+
"",
|
|
1138
|
+
" ```markdown",
|
|
1139
|
+
" ---",
|
|
1140
|
+
' title: "BCM Outline: <Capability Name>"',
|
|
1141
|
+
" slug: <BCM_SLUG>",
|
|
1142
|
+
" date: YYYY-MM-DD",
|
|
1143
|
+
" parent_issue: <N>",
|
|
1144
|
+
" tier: L1 | L2 | L3",
|
|
1145
|
+
" ---",
|
|
1146
|
+
"",
|
|
1147
|
+
" # BCM Outline: <Capability Name>",
|
|
1148
|
+
"",
|
|
1149
|
+
" ## Capability Name",
|
|
1150
|
+
" <noun or noun phrase \u2014 never a verb>",
|
|
1151
|
+
"",
|
|
1152
|
+
" ## Business Object",
|
|
1153
|
+
" <entity from <ENTITY_TAXONOMY> this capability acts on>",
|
|
1154
|
+
"",
|
|
1155
|
+
" ## Tier",
|
|
1156
|
+
" L1 | L2 | L3",
|
|
1157
|
+
"",
|
|
1158
|
+
" ## Parent Capability",
|
|
1159
|
+
" <slug of the L(n-1) parent, or `none` for L1>",
|
|
1160
|
+
"",
|
|
1161
|
+
" ## Sibling Capabilities",
|
|
1162
|
+
" <list of sibling slugs, if any>",
|
|
1163
|
+
"",
|
|
1164
|
+
" ## Proposed Definition",
|
|
1165
|
+
" <1\u20132 sentences describing what the capability is>",
|
|
1166
|
+
"",
|
|
1167
|
+
" ## Proposed Outcome",
|
|
1168
|
+
" <1 sentence on the measurable result>",
|
|
1169
|
+
"",
|
|
1170
|
+
" ## Heat Map Rating",
|
|
1171
|
+
" critical | high | medium | low (source: <where rating came from>)",
|
|
1172
|
+
"",
|
|
1173
|
+
" ## Open Questions",
|
|
1174
|
+
" <anything the scaffold phase needs a human to resolve first>",
|
|
1175
|
+
" ```",
|
|
1176
|
+
"",
|
|
1177
|
+
"8. **Decide the shortened path.** If the capability is out of scope,",
|
|
1178
|
+
" a duplicate, or not actually a business capability, close the",
|
|
1179
|
+
" outline issue with a justification comment and do **not** create a",
|
|
1180
|
+
" scaffold issue.",
|
|
1181
|
+
"",
|
|
1182
|
+
"9. **Otherwise, create one `bcm:scaffold` issue** with",
|
|
1183
|
+
" `Depends on: #<outline-issue>`. Its body references the outline",
|
|
1184
|
+
" file path.",
|
|
1185
|
+
"",
|
|
1186
|
+
"10. **Commit and push** the outline file. Close the outline issue.",
|
|
1187
|
+
"",
|
|
1188
|
+
"---",
|
|
1189
|
+
"",
|
|
1190
|
+
"## Phase 2: Scaffold (`bcm:scaffold`)",
|
|
1191
|
+
"",
|
|
1192
|
+
"**Goal:** Create the BCM capability-model document with BIZBOK section",
|
|
1193
|
+
"headings and placeholder content for each attribute.",
|
|
1194
|
+
"",
|
|
1195
|
+
"**Budget:** Reading the outline file and the scaffold template. Write",
|
|
1196
|
+
"one BCM document. No research or cross-linking yet.",
|
|
1197
|
+
"",
|
|
1198
|
+
"**Section ownership:** Writes the complete BCM document under",
|
|
1199
|
+
"`<BCM_DOC_ROOT>/` but fills only the structural attributes (Capability",
|
|
1200
|
+
"Definitions, Sub-Capabilities, Heat Map Rating from the outline, Tier,",
|
|
1201
|
+
"Business Object, Revision History). Leaves Project Relevance, Value",
|
|
1202
|
+
"Stream Mapping, Enabling Software Systems, Roles Involved, and Company",
|
|
1203
|
+
"Size Applicability as placeholder sections for the context phase.",
|
|
1204
|
+
"",
|
|
1205
|
+
"### Steps",
|
|
1206
|
+
"",
|
|
1207
|
+
"1. **Read the outline file** referenced in the issue body.",
|
|
1208
|
+
"",
|
|
1209
|
+
"2. **Shortened path: existing document.** Before writing, confirm",
|
|
1210
|
+
" `<BCM_DOC_ROOT>/<BCM_SLUG>.md` does not already exist. If it does,",
|
|
1211
|
+
" comment on the scaffold issue with a link to the existing doc and",
|
|
1212
|
+
" close both the scaffold issue and any pending context/connect",
|
|
1213
|
+
" issues \u2014 do not create downstream issues.",
|
|
1214
|
+
"",
|
|
1215
|
+
"3. **Write the BCM document** to `<BCM_DOC_ROOT>/<BCM_SLUG>.md`:",
|
|
1216
|
+
"",
|
|
1217
|
+
" ```markdown",
|
|
1218
|
+
" ---",
|
|
1219
|
+
' title: "<Capability Name>"',
|
|
1220
|
+
" slug: <BCM_SLUG>",
|
|
1221
|
+
" tier: L1 | L2 | L3",
|
|
1222
|
+
" business_object: <entity>",
|
|
1223
|
+
" parent: <parent-slug or `none`>",
|
|
1224
|
+
" heat_map: critical | high | medium | low",
|
|
1225
|
+
" date: YYYY-MM-DD",
|
|
1226
|
+
" ---",
|
|
1227
|
+
"",
|
|
1228
|
+
" # <Capability Name>",
|
|
1229
|
+
"",
|
|
1230
|
+
" ## Capability Definitions",
|
|
1231
|
+
" <1\u20132 sentences from the outline's Proposed Definition, refined>",
|
|
1232
|
+
"",
|
|
1233
|
+
" **Outcome:** <1 sentence from the outline's Proposed Outcome>",
|
|
1234
|
+
"",
|
|
1235
|
+
" **Tier:** L1 | L2 | L3",
|
|
1236
|
+
"",
|
|
1237
|
+
" **Business Object:** <entity>",
|
|
1238
|
+
"",
|
|
1239
|
+
" **Heat Map Rating:** critical | high | medium | low",
|
|
1240
|
+
"",
|
|
1241
|
+
" ## Sub-Capabilities",
|
|
1242
|
+
" <For L1/L2: list of child slugs with 1-line definitions.",
|
|
1243
|
+
' For L3: write "None \u2014 this is an L3 leaf capability.">',
|
|
1244
|
+
"",
|
|
1245
|
+
" ## Roles Involved",
|
|
1246
|
+
" TODO: filled in Phase 3 (Context).",
|
|
1247
|
+
"",
|
|
1248
|
+
" ## Company Size Applicability",
|
|
1249
|
+
" TODO: filled in Phase 3 (Context).",
|
|
1250
|
+
"",
|
|
1251
|
+
" ## Enabling Software Systems",
|
|
1252
|
+
" TODO: filled in Phase 3 (Context).",
|
|
1253
|
+
"",
|
|
1254
|
+
" ## Value Stream Mapping",
|
|
1255
|
+
" TODO: filled in Phase 3 (Context).",
|
|
1256
|
+
"",
|
|
1257
|
+
" ## Project Relevance",
|
|
1258
|
+
" TODO: filled in Phase 3 (Context) from docs/project-context.md.",
|
|
1259
|
+
"",
|
|
1260
|
+
" ## Traceability",
|
|
1261
|
+
" - **Parent capability:** <parent-slug or `none`>",
|
|
1262
|
+
" - **Sibling capabilities:** <sibling slugs>",
|
|
1263
|
+
" - **Source outline:** <OUTLINE_ROOT>/<BCM_SLUG>.outline.md",
|
|
1264
|
+
"",
|
|
1265
|
+
" ## Revision History",
|
|
1266
|
+
" | Date | Phase | Change |",
|
|
1267
|
+
" |------|-------|--------|",
|
|
1268
|
+
" | YYYY-MM-DD | scaffold | Initial scaffold from outline |",
|
|
1269
|
+
" ```",
|
|
1270
|
+
"",
|
|
1271
|
+
"4. **Create one `bcm:context` issue** with",
|
|
1272
|
+
" `Depends on: #<scaffold-issue>`. Its body references the BCM",
|
|
1273
|
+
" document path and the outline file path.",
|
|
1274
|
+
"",
|
|
1275
|
+
"5. **Commit and push** the BCM document. Close the scaffold issue.",
|
|
1276
|
+
"",
|
|
1277
|
+
"---",
|
|
1278
|
+
"",
|
|
1279
|
+
"## Phase 3: Context (`bcm:context`)",
|
|
1280
|
+
"",
|
|
1281
|
+
"**Goal:** Fill the context-specific sections of the BCM document \u2014",
|
|
1282
|
+
"Project Relevance, Value Stream Mapping, Enabling Software Systems,",
|
|
1283
|
+
"Roles Involved, and Company Size Applicability \u2014 and append a",
|
|
1284
|
+
"revision-history entry.",
|
|
1285
|
+
"",
|
|
1286
|
+
"**Budget:** Read the scaffold, `docs/project-context.md`, the value",
|
|
1287
|
+
"stream source, and the entity taxonomy. Targeted research only \u2014",
|
|
1288
|
+
"enough to fill each section with cited facts. Do not open downstream",
|
|
1289
|
+
"issues in this phase; that is Phase 4's job.",
|
|
1290
|
+
"",
|
|
1291
|
+
"**Section ownership:** Replaces the `TODO:` placeholder contents of",
|
|
1292
|
+
"these BCM sections:",
|
|
1293
|
+
"- `## Roles Involved`",
|
|
1294
|
+
"- `## Company Size Applicability`",
|
|
1295
|
+
"- `## Enabling Software Systems`",
|
|
1296
|
+
"- `## Value Stream Mapping`",
|
|
1297
|
+
"- `## Project Relevance`",
|
|
1298
|
+
"",
|
|
1299
|
+
"Appends one row to `## Revision History`. Touches no other sections.",
|
|
1300
|
+
"",
|
|
1301
|
+
"### Steps",
|
|
1302
|
+
"",
|
|
1303
|
+
"1. **Read the scaffolded BCM document** referenced in the issue body.",
|
|
1304
|
+
"",
|
|
1305
|
+
"2. **Read `docs/project-context.md`** for mission, target users,",
|
|
1306
|
+
" in/out-of-scope capabilities, and key stakeholders \u2014 this is the",
|
|
1307
|
+
" authoritative source for the Project Relevance section.",
|
|
1308
|
+
"",
|
|
1309
|
+
"3. **Resolve the value stream.** Find the value-stream source named in",
|
|
1310
|
+
" the outline or the issue body. If none is provided, check",
|
|
1311
|
+
" `docs/project-context.md` and `<BCM_DOC_ROOT>` for a value-stream",
|
|
1312
|
+
" doc. If still unresolved, write a `TODO: value stream not yet",
|
|
1313
|
+
" defined` placeholder and flag the context issue with",
|
|
1314
|
+
" `status:needs-attention`.",
|
|
1315
|
+
"",
|
|
1316
|
+
"4. **Fill `## Roles Involved`.** List the business roles that invoke,",
|
|
1317
|
+
" own, or are accountable for this capability. Cite the source (an",
|
|
1318
|
+
" org chart, a stakeholders section, or a meeting note). Unknown",
|
|
1319
|
+
" roles get a `TODO:` placeholder and a note.",
|
|
1320
|
+
"",
|
|
1321
|
+
"5. **Fill `## Company Size Applicability`.** Indicate whether this",
|
|
1322
|
+
" capability applies to `small`, `medium`, `large`, or `enterprise`",
|
|
1323
|
+
" organizations, with a one-line rationale each. Source from",
|
|
1324
|
+
" `docs/project-context.md` target users when possible.",
|
|
1325
|
+
"",
|
|
1326
|
+
"6. **Fill `## Enabling Software Systems`.** List the software systems",
|
|
1327
|
+
" (internal or external) that enable this capability. Reference",
|
|
1328
|
+
" existing software profiles under `<BCM_DOC_ROOT>/../software/` or",
|
|
1329
|
+
" equivalent. Unknown systems get a `TODO:` marker \u2014 do not invent.",
|
|
1330
|
+
"",
|
|
1331
|
+
"7. **Fill `## Value Stream Mapping`.** For each value stream that",
|
|
1332
|
+
" invokes this capability, list the stage(s), input business object,",
|
|
1333
|
+
" and output business object. Example row:",
|
|
1334
|
+
"",
|
|
1335
|
+
" ```markdown",
|
|
1336
|
+
" | Value Stream | Stage | Input | Output |",
|
|
1337
|
+
" |--------------|-------|-------|--------|",
|
|
1338
|
+
" | <name> | <stage> | <input entity> | <output entity> |",
|
|
1339
|
+
" ```",
|
|
1340
|
+
"",
|
|
1341
|
+
"8. **Fill `## Project Relevance`.** Frame the capability against",
|
|
1342
|
+
" `docs/project-context.md`:",
|
|
1343
|
+
" - Which in-scope capability does this match (or overlap with)?",
|
|
1344
|
+
" - Which mission pillar does it support?",
|
|
1345
|
+
" - Which target-user role benefits from it?",
|
|
1346
|
+
" - Is it explicitly in scope, out of scope, or ambiguous? If",
|
|
1347
|
+
" out-of-scope, record the justification and keep the section",
|
|
1348
|
+
" minimal \u2014 the BCM document still exists as a taxonomy reference,",
|
|
1349
|
+
" but Phase 4 will not create downstream research issues.",
|
|
1350
|
+
"",
|
|
1351
|
+
"9. **Append a `## Revision History` row:**",
|
|
1352
|
+
"",
|
|
1353
|
+
" ```markdown",
|
|
1354
|
+
" | YYYY-MM-DD | context | Filled Project Relevance, Value Stream Mapping, Enabling Software Systems, Roles Involved, Company Size Applicability |",
|
|
1355
|
+
" ```",
|
|
1356
|
+
"",
|
|
1357
|
+
"10. **Create one `bcm:connect` issue** with",
|
|
1358
|
+
" `Depends on: #<context-issue>`. Its body references the BCM",
|
|
1359
|
+
" document path and lists any people, companies, or software",
|
|
1360
|
+
" systems that surfaced during context work \u2014 Phase 4 will convert",
|
|
1361
|
+
" those into downstream issues.",
|
|
1362
|
+
"",
|
|
1363
|
+
"11. **Commit and push** the updated BCM document. Close the context",
|
|
1364
|
+
" issue.",
|
|
1365
|
+
"",
|
|
1366
|
+
"---",
|
|
1367
|
+
"",
|
|
1368
|
+
"## Phase 4: Connect (`bcm:connect`)",
|
|
1369
|
+
"",
|
|
1370
|
+
"**Goal:** Cross-link the new BCM document with its parent and sibling",
|
|
1371
|
+
"capabilities, update the capability registry and capability-map, and",
|
|
1372
|
+
"open downstream research issues for items surfaced during authoring.",
|
|
1373
|
+
"",
|
|
1374
|
+
"**Budget:** No new research. Reading the completed BCM doc, the",
|
|
1375
|
+
"registry, and the capability-map. Writing cross-links and creating",
|
|
1376
|
+
"downstream issues.",
|
|
1377
|
+
"",
|
|
1378
|
+
"**Section ownership:** Writes to `<REGISTRY_INDEX>`,",
|
|
1379
|
+
"`<CAPABILITY_MAP>`, and appends one row to the BCM document's",
|
|
1380
|
+
"`## Revision History`. Updates parent/sibling BCM docs only to add",
|
|
1381
|
+
"reciprocal cross-links in their `## Traceability` sections.",
|
|
1382
|
+
"",
|
|
1383
|
+
"### Steps",
|
|
1384
|
+
"",
|
|
1385
|
+
"1. **Read the completed BCM document** referenced in the issue body.",
|
|
1386
|
+
"",
|
|
1387
|
+
"2. **Update `<REGISTRY_INDEX>`.** Add a row for the new capability",
|
|
1388
|
+
" (slug, title, tier, heat map rating, business object, link).",
|
|
1389
|
+
"",
|
|
1390
|
+
"3. **Update `<CAPABILITY_MAP>`.** Insert the new capability under its",
|
|
1391
|
+
" parent at the correct L1/L2/L3 position.",
|
|
1392
|
+
"",
|
|
1393
|
+
"4. **Add reciprocal cross-links.** For the parent and each sibling",
|
|
1394
|
+
" referenced in the BCM document's `## Traceability` section, open",
|
|
1395
|
+
" their BCM files and append this document's slug to their relevant",
|
|
1396
|
+
" cross-link list. Keep edits surgical \u2014 only modify the traceability",
|
|
1397
|
+
" section of sibling/parent docs.",
|
|
1398
|
+
"",
|
|
1399
|
+
"5. **Create downstream research issues.** For each distinct item",
|
|
1400
|
+
" surfaced during authoring:",
|
|
1401
|
+
"",
|
|
1402
|
+
" | Surfaced item | Downstream label | Bundle |",
|
|
1403
|
+
" |---------------|------------------|--------|",
|
|
1404
|
+
" | Unfamiliar person (role holder, stakeholder) | `people:research` | `people-profile` |",
|
|
1405
|
+
" | Unfamiliar company (enabling vendor, partner, competitor) | `company:research` | `company-profile` |",
|
|
1406
|
+
" | Missing research topic (value stream, market sizing, etc.) | `research:scope` | `research-pipeline` |",
|
|
1407
|
+
"",
|
|
1408
|
+
" Each downstream issue should:",
|
|
1409
|
+
" - Carry the listed phase label plus the bundle's `type:*` label,",
|
|
1410
|
+
" `priority:medium`, and `status:ready`",
|
|
1411
|
+
" - Include a brief scope statement and a link back to this BCM",
|
|
1412
|
+
" document for traceability",
|
|
1413
|
+
" - Reference the context-phase output that revealed the item",
|
|
1414
|
+
"",
|
|
1415
|
+
" This phase assumes the `people-profile`, `company-profile`, and",
|
|
1416
|
+
" `research-pipeline` bundles are enabled in the consuming project.",
|
|
1417
|
+
" If a bundle is not enabled, flag the connect issue with",
|
|
1418
|
+
" `status:needs-attention` and list the items that could not be",
|
|
1419
|
+
" routed \u2014 never invent an alternative label taxonomy.",
|
|
1420
|
+
"",
|
|
1421
|
+
"6. **Do NOT create requirement issues.** Requirement gaps surfaced",
|
|
1422
|
+
" during BCM authoring are the responsibility of the",
|
|
1423
|
+
" `requirements-analyst` bundle, which scans BCM documents for gaps",
|
|
1424
|
+
" on its own schedule. Never inline requirement documents or open",
|
|
1425
|
+
" `req:*` issues from this pipeline.",
|
|
1426
|
+
"",
|
|
1427
|
+
"7. **Append a final `## Revision History` row:**",
|
|
1428
|
+
"",
|
|
1429
|
+
" ```markdown",
|
|
1430
|
+
" | YYYY-MM-DD | connect | Added to registry and capability map; cross-linked with parent/siblings; opened <N> downstream research issues |",
|
|
1431
|
+
" ```",
|
|
1432
|
+
"",
|
|
1433
|
+
"8. **Commit and push** the registry update, capability-map update,",
|
|
1434
|
+
" cross-link edits, and BCM-document revision-history row. Close the",
|
|
1435
|
+
" connect issue.",
|
|
1436
|
+
"",
|
|
1437
|
+
"---",
|
|
1438
|
+
"",
|
|
1439
|
+
"## Output Boundaries",
|
|
1440
|
+
"",
|
|
1441
|
+
"This agent writes **only** to:",
|
|
1442
|
+
"",
|
|
1443
|
+
"- `<OUTLINE_ROOT>/` \u2014 outline working files (Phase 1)",
|
|
1444
|
+
"- `<BCM_DOC_ROOT>/` \u2014 BCM capability-model documents (Phases 2\u20134)",
|
|
1445
|
+
"- `<REGISTRY_INDEX>` \u2014 capability registry (Phase 4)",
|
|
1446
|
+
"- `<CAPABILITY_MAP>` \u2014 capability map (Phase 4)",
|
|
1447
|
+
"- Reciprocal cross-links in sibling/parent BCM docs under",
|
|
1448
|
+
" `<BCM_DOC_ROOT>/` (Phase 4, `## Traceability` section only)",
|
|
1449
|
+
"",
|
|
1450
|
+
"The pipeline produces **BCM capability-model documents**. It does not",
|
|
1451
|
+
"write requirement documents, people profiles, company profiles, or",
|
|
1452
|
+
"software profiles \u2014 those are the responsibility of specialized",
|
|
1453
|
+
"downstream agents (`requirements-analyst`, `people-profile-analyst`,",
|
|
1454
|
+
"`company-profile-analyst`, `software-profile-analyst`) that pick up",
|
|
1455
|
+
"the issues this pipeline creates. Keep this boundary clean so the BCM",
|
|
1456
|
+
"writer stays focused on capability modeling.",
|
|
1457
|
+
"",
|
|
1458
|
+
"---",
|
|
1459
|
+
"",
|
|
1460
|
+
"## Rules",
|
|
1461
|
+
"",
|
|
1462
|
+
"- **One phase per session.** Never run two phases back-to-back.",
|
|
1463
|
+
"- **Persist before closing.** Every phase must write its output file",
|
|
1464
|
+
" (or registry/map updates for Phase 4) before closing its issue.",
|
|
1465
|
+
"- **BIZBOK vocabulary is verbatim.** Do not rename Capability",
|
|
1466
|
+
" Definitions, Sub-Capabilities, Roles Involved, Company Size",
|
|
1467
|
+
" Applicability, Enabling Software Systems, Value Stream Mapping,",
|
|
1468
|
+
" Project Relevance, Traceability, Revision History, or Heat Map",
|
|
1469
|
+
" Rating. Paths are parameterized; vocabulary is not.",
|
|
1470
|
+
"- **Name capabilities as nouns.** Never as verbs. Reject outlines that",
|
|
1471
|
+
" use a verb phrase.",
|
|
1472
|
+
"- **Do not invent business objects, value streams, heat-map ratings,",
|
|
1473
|
+
" or roles.** If the source material (entity taxonomy, project",
|
|
1474
|
+
" context, invoking issue) does not supply them, write a `TODO:`",
|
|
1475
|
+
" placeholder and flag `status:needs-attention`.",
|
|
1476
|
+
"- **Write capability models, not requirements.** Requirement gaps are",
|
|
1477
|
+
" handed off to the `requirements-analyst` bundle. Never create",
|
|
1478
|
+
" `req:*` issues from this pipeline.",
|
|
1479
|
+
"- **Delegate, don't duplicate.** People, companies, and research",
|
|
1480
|
+
" topics surfaced during authoring are sent to downstream pipelines",
|
|
1481
|
+
" via `people:research`, `company:research`, and `research:scope`",
|
|
1482
|
+
" issues \u2014 never inlined in the BCM document body.",
|
|
1483
|
+
"- **Cite everything.** Every Project Relevance statement, value",
|
|
1484
|
+
" stream row, and role assignment must carry at least one source",
|
|
1485
|
+
" citation."
|
|
1486
|
+
].join("\n")
|
|
1487
|
+
};
|
|
1488
|
+
var writeBcmSkill = {
|
|
1489
|
+
name: "write-bcm",
|
|
1490
|
+
description: "Kick off a BCM capability-model document authoring cycle. Creates a bcm:outline issue carrying the capability name and dispatches Phase 1 (Outline) in the bcm-writer agent.",
|
|
1491
|
+
disableModelInvocation: true,
|
|
1492
|
+
userInvocable: true,
|
|
1493
|
+
context: "fork",
|
|
1494
|
+
agent: "bcm-writer",
|
|
1495
|
+
platforms: { cursor: { exclude: true } },
|
|
1496
|
+
instructions: [
|
|
1497
|
+
"# Write BCM",
|
|
1498
|
+
"",
|
|
1499
|
+
"Kick off a BCM (Business Capability Model) capability-model document",
|
|
1500
|
+
"authoring cycle. Creates a `bcm:outline` issue carrying the candidate",
|
|
1501
|
+
"capability name and dispatches Phase 1 (Outline) in the bcm-writer",
|
|
1502
|
+
"agent.",
|
|
1503
|
+
"",
|
|
1504
|
+
"## Usage",
|
|
1505
|
+
"",
|
|
1506
|
+
"/write-bcm <capability-name>",
|
|
1507
|
+
"",
|
|
1508
|
+
"Optional extensions in the issue body:",
|
|
1509
|
+
"- `tier: L1 | L2 | L3` \u2014 override the default (L3)",
|
|
1510
|
+
"- `parent: <slug>` \u2014 pre-specify the parent capability",
|
|
1511
|
+
"- `business_object: <entity>` \u2014 pre-specify the primary business",
|
|
1512
|
+
" object",
|
|
1513
|
+
"- `heat_map: critical | high | medium | low` \u2014 pre-specify the heat",
|
|
1514
|
+
" map rating",
|
|
1515
|
+
"- `value_stream: <path or slug>` \u2014 pre-specify the value stream",
|
|
1516
|
+
" source",
|
|
1517
|
+
"- `slug: <kebab-case>` \u2014 override the derived BCM slug",
|
|
1518
|
+
"",
|
|
1519
|
+
"## Default Paths",
|
|
1520
|
+
"",
|
|
1521
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
1522
|
+
"`agentConfig.rules`, outputs land under:",
|
|
1523
|
+
"",
|
|
1524
|
+
"- `docs/bcm/.outlines/<slug>.outline.md` (Phase 1)",
|
|
1525
|
+
"- `docs/bcm/<slug>.md` (Phases 2\u20134)",
|
|
1526
|
+
"- `docs/bcm/_index.md` (Phase 4, registry update)",
|
|
1527
|
+
"- `docs/bcm/capability-map.md` (Phase 4, capability-map update)",
|
|
1528
|
+
"",
|
|
1529
|
+
"## Steps",
|
|
1530
|
+
"",
|
|
1531
|
+
"1. Create a `bcm:outline` issue with `type:bcm-document`,",
|
|
1532
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
1533
|
+
" verbatim capability name and any overrides.",
|
|
1534
|
+
"2. Execute Phase 1 (Outline) of the bcm-writer agent.",
|
|
1535
|
+
"3. Phase 1 creates a `bcm:scaffold` issue, which Phase 2 follows with",
|
|
1536
|
+
" `bcm:context`, then Phase 4 (`bcm:connect`). Each downstream issue",
|
|
1537
|
+
" declares its `Depends on:` predecessor. Phase 4 creates downstream",
|
|
1538
|
+
" `people:research`, `company:research`, and `research:scope` issues",
|
|
1539
|
+
" for items surfaced during authoring.",
|
|
1540
|
+
"",
|
|
1541
|
+
"## Output",
|
|
1542
|
+
"",
|
|
1543
|
+
"- An outline file under the project's outline working directory",
|
|
1544
|
+
"- A BCM capability-model document with BIZBOK attributes populated",
|
|
1545
|
+
"- Registry and capability-map entries cross-linked with parent and",
|
|
1546
|
+
" sibling capabilities",
|
|
1547
|
+
"- Downstream `people:research`, `company:research`, and",
|
|
1548
|
+
" `research:scope` issues \u2014 picked up by the `people-profile`,",
|
|
1549
|
+
" `company-profile`, and `research-pipeline` bundles respectively"
|
|
1550
|
+
].join("\n")
|
|
1551
|
+
};
|
|
1552
|
+
var bcmWriterBundle = {
|
|
1553
|
+
name: "bcm-writer",
|
|
1554
|
+
description: "BCM (Business Capability Model) capability-model document authoring pipeline: outline, scaffold, context, connect. Enabled by default; BIZBOK-aligned; filesystem-durable between phases.",
|
|
1555
|
+
appliesWhen: () => true,
|
|
1556
|
+
rules: [
|
|
1557
|
+
{
|
|
1558
|
+
name: "bcm-writer-workflow",
|
|
1559
|
+
description: "Describes the 4-phase BCM-document authoring pipeline, the bcm:* label taxonomy, BIZBOK methodology, and the handoffs to people-profile, company-profile, and research-pipeline bundles.",
|
|
1560
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
1561
|
+
content: [
|
|
1562
|
+
"# BCM Writer Workflow",
|
|
1563
|
+
"",
|
|
1564
|
+
"Use `/write-bcm <capability-name>` to kick off a BCM",
|
|
1565
|
+
"capability-model document authoring cycle. The pipeline runs in",
|
|
1566
|
+
"4 phases \u2014 outline, scaffold, context, connect \u2014 each tracked by",
|
|
1567
|
+
"its own GitHub issue labeled `bcm:outline`, `bcm:scaffold`,",
|
|
1568
|
+
"`bcm:context`, or `bcm:connect`. All issues carry",
|
|
1569
|
+
"`type:bcm-document`.",
|
|
1570
|
+
"",
|
|
1571
|
+
"The pipeline produces **BCM capability-model documents** \u2014",
|
|
1572
|
+
"structured descriptions of a business capability with",
|
|
1573
|
+
"BIZBOK-aligned attributes (Capability Definitions, Sub-Capabilities,",
|
|
1574
|
+
"Roles Involved, Company Size Applicability, Enabling Software",
|
|
1575
|
+
"Systems, Value Stream Mapping, Project Relevance, Traceability,",
|
|
1576
|
+
"Revision History, Heat Map Rating). It is **not** a",
|
|
1577
|
+
"requirements-document writer \u2014 requirements are handled by the",
|
|
1578
|
+
"downstream `requirements-analyst` bundle.",
|
|
1579
|
+
"",
|
|
1580
|
+
"Items surfaced during authoring (unfamiliar people, companies, or",
|
|
1581
|
+
"research topics) are handed off to the `people-profile`,",
|
|
1582
|
+
"`company-profile`, and `research-pipeline` bundles via",
|
|
1583
|
+
"`people:research`, `company:research`, and `research:scope`",
|
|
1584
|
+
"issues.",
|
|
1585
|
+
"",
|
|
1586
|
+
"See the `bcm-writer` agent definition for full workflow details,",
|
|
1587
|
+
"default paths, BIZBOK methodology, and phase-by-phase",
|
|
1588
|
+
"instructions."
|
|
1589
|
+
].join("\n"),
|
|
1590
|
+
platforms: {
|
|
1591
|
+
cursor: { exclude: true }
|
|
1592
|
+
},
|
|
1593
|
+
tags: ["workflow"]
|
|
1594
|
+
}
|
|
1595
|
+
],
|
|
1596
|
+
skills: [writeBcmSkill],
|
|
1597
|
+
subAgents: [bcmWriterSubAgent],
|
|
1598
|
+
labels: [
|
|
1599
|
+
{
|
|
1600
|
+
name: "type:bcm-document",
|
|
1601
|
+
color: "1D76DB",
|
|
1602
|
+
description: "Work that produces or maintains a BCM (Business Capability Model) capability-model document"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
name: "bcm:outline",
|
|
1606
|
+
color: "C5DEF5",
|
|
1607
|
+
description: "Phase 1: identify the capability (name-as-noun, business object, tier) and write the outline file"
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
name: "bcm:scaffold",
|
|
1611
|
+
color: "BFDADC",
|
|
1612
|
+
description: "Phase 2: create the BCM document with BIZBOK section headings and placeholder content"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
name: "bcm:context",
|
|
1616
|
+
color: "D4C5F9",
|
|
1617
|
+
description: "Phase 3: fill Project Relevance, Value Stream Mapping, Enabling Software Systems, Roles Involved, and Company Size Applicability"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
name: "bcm:connect",
|
|
1621
|
+
color: "FEF2C0",
|
|
1622
|
+
description: "Phase 4: cross-link with parent/siblings, update registry and capability-map, open downstream research issues"
|
|
1623
|
+
}
|
|
1624
|
+
]
|
|
1625
|
+
};
|
|
1626
|
+
|
|
898
1627
|
// src/agent/bundles/company-profile.ts
|
|
899
1628
|
var companyProfileAnalystSubAgent = {
|
|
900
1629
|
name: "company-profile-analyst",
|
|
@@ -2093,6 +2822,481 @@ var jestBundle = {
|
|
|
2093
2822
|
}
|
|
2094
2823
|
};
|
|
2095
2824
|
|
|
2825
|
+
// src/agent/bundles/maintenance-audit.ts
|
|
2826
|
+
var maintenanceAuditSubAgent = {
|
|
2827
|
+
name: "maintenance-audit",
|
|
2828
|
+
description: "Audits documentation registries and cross-references for integrity (broken links, registry drift, stale indexes) and applies idempotent fixes. One phase per session, tracked by maint:* GitHub issue labels with filesystem-based durability between phases.",
|
|
2829
|
+
model: AGENT_MODEL.POWERFUL,
|
|
2830
|
+
maxTurns: 80,
|
|
2831
|
+
platforms: { cursor: { exclude: true } },
|
|
2832
|
+
prompt: [
|
|
2833
|
+
"# Maintenance Audit Agent",
|
|
2834
|
+
"",
|
|
2835
|
+
"Generic documentation-maintenance pipeline. Given a set of",
|
|
2836
|
+
"configurable documentation directories (registries, cross-reference",
|
|
2837
|
+
"trees, index files), you perform an **audit-then-fix** cycle: scan",
|
|
2838
|
+
"for broken cross-references, registry drift, and stale indexes;",
|
|
2839
|
+
"produce an audit report; apply idempotent fixes. Each phase runs",
|
|
2840
|
+
"as its **own agent session**, triggered by a GitHub issue with a",
|
|
2841
|
+
"`maint:*` phase label. You handle exactly **one phase per session**",
|
|
2842
|
+
"\u2014 read the issue to determine which phase to execute.",
|
|
2843
|
+
"",
|
|
2844
|
+
"This agent is **domain-neutral**. It makes no assumptions about",
|
|
2845
|
+
"what the documentation covers (requirements, ADRs, capability",
|
|
2846
|
+
"models, research notes, profiles, product specs, etc.). All",
|
|
2847
|
+
"domain-specific vocabulary, doc paths, registry formats, and fix",
|
|
2848
|
+
"policies come from the invoking issue body or the consuming",
|
|
2849
|
+
"project's configuration.",
|
|
2850
|
+
"",
|
|
2851
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
2852
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
2853
|
+
"",
|
|
2854
|
+
"---",
|
|
2855
|
+
"",
|
|
2856
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
2857
|
+
"## Design Principles",
|
|
2858
|
+
"",
|
|
2859
|
+
"1. **Audit before fix.** Every cycle begins with a scan that writes",
|
|
2860
|
+
" a durable report. No fixes are applied until Phase 2 reads that",
|
|
2861
|
+
" report.",
|
|
2862
|
+
"2. **Idempotent fixes only.** Every fix must be safe to re-run.",
|
|
2863
|
+
" Prefer removing stale entries, re-generating indexes from",
|
|
2864
|
+
" authoritative sources, and normalizing link targets. Never",
|
|
2865
|
+
" invent content to fill gaps \u2014 that is authoring work and",
|
|
2866
|
+
" belongs to the downstream writer agent for that doc type.",
|
|
2867
|
+
"3. **Filesystem durability.** Phase 1 persists its report to disk",
|
|
2868
|
+
" before closing its issue. Phase 2 reads that file \u2014 never rely",
|
|
2869
|
+
" on session memory.",
|
|
2870
|
+
"4. **Issue graph = state machine.** Phase ordering is encoded with",
|
|
2871
|
+
" `Depends on: #N` links between phase issues. The fix phase runs",
|
|
2872
|
+
" only after the scan phase is closed.",
|
|
2873
|
+
"5. **Bounded scope.** The audit scope for each cycle is declared in",
|
|
2874
|
+
" the scan issue body. Do not expand scope mid-session \u2014 if you",
|
|
2875
|
+
" discover additional doc trees that need auditing, note them in",
|
|
2876
|
+
" the report and let a human decide whether to queue a follow-up",
|
|
2877
|
+
" cycle.",
|
|
2878
|
+
"6. **Generic over specific.** No hardcoded domains, companies,",
|
|
2879
|
+
" source projects, or proprietary taxonomies. Use placeholders",
|
|
2880
|
+
" that the skill invocation or consuming project fills in.",
|
|
2881
|
+
"",
|
|
2882
|
+
"---",
|
|
2883
|
+
"",
|
|
2884
|
+
"## State Machine Overview",
|
|
2885
|
+
"",
|
|
2886
|
+
"Maintenance audits flow through **2 phases**:",
|
|
2887
|
+
"",
|
|
2888
|
+
"```",
|
|
2889
|
+
"\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",
|
|
2890
|
+
"\u2502 1. SCAN \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. FIX \u2502",
|
|
2891
|
+
"\u2502 Walk doc \u2502 \u2502 Read audit \u2502",
|
|
2892
|
+
"\u2502 tree, check \u2502 \u2502 report, \u2502",
|
|
2893
|
+
"\u2502 xrefs and \u2502 \u2502 apply safe \u2502",
|
|
2894
|
+
"\u2502 indexes, \u2502 \u2502 idempotent \u2502",
|
|
2895
|
+
"\u2502 write audit \u2502 \u2502 fixes, then \u2502",
|
|
2896
|
+
"\u2502 report \u2502 \u2502 verify \u2502",
|
|
2897
|
+
"\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",
|
|
2898
|
+
"```",
|
|
2899
|
+
"",
|
|
2900
|
+
"**Issue labels encode the phase:**",
|
|
2901
|
+
"",
|
|
2902
|
+
"| Label | Phase | Session work |",
|
|
2903
|
+
"|-------|-------|-------------|",
|
|
2904
|
+
"| `maint:scan` | 1. Scan | Walk the configured doc tree, check cross-references and registry indexes, write a durable audit report. |",
|
|
2905
|
+
"| `maint:fix` | 2. Fix | Read the audit report, apply idempotent fixes, then verify the fixes cleared the reported findings. |",
|
|
2906
|
+
"",
|
|
2907
|
+
"All issues also carry `type:maintenance` and a `status:*` label.",
|
|
2908
|
+
"",
|
|
2909
|
+
"**Issue count per audit cycle:** 1 scan + 1 fix = **2 sessions**.",
|
|
2910
|
+
"",
|
|
2911
|
+
"**Shortened paths:**",
|
|
2912
|
+
"- Scan finds no issues \u2192 close scan issue with a justification,",
|
|
2913
|
+
" do not create a fix issue \u2192 **1 session**.",
|
|
2914
|
+
"- Every reported finding requires a human judgment call \u2192 close",
|
|
2915
|
+
" scan with the report, open a `status:needs-attention` flag,",
|
|
2916
|
+
" do not auto-create a fix issue \u2192 **1 session**.",
|
|
2917
|
+
"",
|
|
2918
|
+
"---",
|
|
2919
|
+
"",
|
|
2920
|
+
"## Configurable Paths",
|
|
2921
|
+
"",
|
|
2922
|
+
"Projects adopting this bundle must define these paths in their",
|
|
2923
|
+
"agent configuration (`agentConfig.rules` extension or project-level",
|
|
2924
|
+
"docs) or in each scan issue body. The agent never hardcodes paths.",
|
|
2925
|
+
"",
|
|
2926
|
+
"| Placeholder | Meaning | Example |",
|
|
2927
|
+
"|-------------|---------|---------|",
|
|
2928
|
+
"| `<DOCS_ROOT>` | Root of the doc tree being audited | `docs/requirements/`, `docs/adrs/`, `docs/bcm/` |",
|
|
2929
|
+
"| `<REGISTRY_INDEX>` | Registry or index file to check for drift | `<DOCS_ROOT>/_index.md`, `<DOCS_ROOT>/README.md` |",
|
|
2930
|
+
"| `<AUDIT_ROOT>` | Where audit reports are written | `docs/maintenance/` |",
|
|
2931
|
+
"| `<AUDIT_SLUG>` | Short identifier for this audit scope | e.g. `requirements-xrefs`, `adr-registry`, `bcm-traceability` |",
|
|
2932
|
+
"| `<FIX_POLICY>` | Which fix categories to auto-apply vs. flag | e.g. `auto: prune-stale-index, normalize-links; flag: missing-target` |",
|
|
2933
|
+
"",
|
|
2934
|
+
"If your project stores these in different locations, substitute",
|
|
2935
|
+
"accordingly wherever the phase instructions reference a path. The",
|
|
2936
|
+
"agent reads the scan issue body to determine which scope is being",
|
|
2937
|
+
"audited in this cycle.",
|
|
2938
|
+
"",
|
|
2939
|
+
"---",
|
|
2940
|
+
"",
|
|
2941
|
+
"## Agent Loop",
|
|
2942
|
+
"",
|
|
2943
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
2944
|
+
"",
|
|
2945
|
+
"1. Claim one open `type:maintenance` issue using phase priority:",
|
|
2946
|
+
" `maint:scan` > `maint:fix`.",
|
|
2947
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
2948
|
+
" branch per your project's branch-naming convention.",
|
|
2949
|
+
"3. Execute the phase handler that matches the issue's `maint:*`",
|
|
2950
|
+
" label.",
|
|
2951
|
+
"4. Commit, push, open a PR (if applicable), and close the issue per",
|
|
2952
|
+
" your project's PR workflow.",
|
|
2953
|
+
"",
|
|
2954
|
+
"---",
|
|
2955
|
+
"",
|
|
2956
|
+
"## Phase 1: Scan (`maint:scan`)",
|
|
2957
|
+
"",
|
|
2958
|
+
"**Goal:** Walk the configured doc tree, check every cross-reference",
|
|
2959
|
+
"and registry index, and produce a durable audit report listing",
|
|
2960
|
+
"every finding.",
|
|
2961
|
+
"",
|
|
2962
|
+
"**Budget:** Filesystem reads + registry parsing. Write one audit",
|
|
2963
|
+
"report file. No edits to source docs in this phase.",
|
|
2964
|
+
"",
|
|
2965
|
+
"### Audit Checks",
|
|
2966
|
+
"",
|
|
2967
|
+
"The scan issue body declares which checks to run. Default check",
|
|
2968
|
+
"catalog:",
|
|
2969
|
+
"",
|
|
2970
|
+
"| Check | What it detects |",
|
|
2971
|
+
"|-------|-----------------|",
|
|
2972
|
+
"| **Broken xref** | A markdown link or relative path in a doc points to a file or anchor that does not exist under `<DOCS_ROOT>`. |",
|
|
2973
|
+
"| **Orphaned doc** | A doc file exists under `<DOCS_ROOT>` but is not referenced by any registry, index, or parent doc. |",
|
|
2974
|
+
"| **Registry drift** | A `<REGISTRY_INDEX>` lists a doc that no longer exists, or omits a doc that does exist. |",
|
|
2975
|
+
"| **Stale index** | An index file is older than the most recently modified doc it indexes, or lists entries in an outdated order. |",
|
|
2976
|
+
"| **Duplicate ID** | Two docs claim the same identifier (e.g. both `FOO-007`), violating the registry's ID uniqueness rule. |",
|
|
2977
|
+
"| **Missing traceability** | A doc declares a `Traceability` or `Related` section but one or more listed targets do not exist. |",
|
|
2978
|
+
"| **Dangling backlink** | A doc is referenced from elsewhere but its own Traceability section does not link back. |",
|
|
2979
|
+
"",
|
|
2980
|
+
"Additional project-specific checks can be supplied in the issue",
|
|
2981
|
+
"body. Only run the checks the issue enumerates \u2014 do not invent new",
|
|
2982
|
+
"categories mid-scan.",
|
|
2983
|
+
"",
|
|
2984
|
+
"### Steps",
|
|
2985
|
+
"",
|
|
2986
|
+
"1. **Read the scan scope** from the issue body. Confirm",
|
|
2987
|
+
" `<DOCS_ROOT>`, the checks to run, and the output path for the",
|
|
2988
|
+
" audit report.",
|
|
2989
|
+
"",
|
|
2990
|
+
"2. **Walk the doc tree.** Enumerate every file under `<DOCS_ROOT>`",
|
|
2991
|
+
" that matches the doc-extension convention (typically `*.md`).",
|
|
2992
|
+
"",
|
|
2993
|
+
"3. **Run each declared check.** For each finding, capture:",
|
|
2994
|
+
" - The check category (from the catalog above)",
|
|
2995
|
+
" - The source file path and line (if applicable)",
|
|
2996
|
+
" - The target that triggered the finding (broken link target,",
|
|
2997
|
+
" orphaned doc path, drifted registry entry, etc.)",
|
|
2998
|
+
" - A suggested fix category (`prune`, `normalize`, `regenerate`,",
|
|
2999
|
+
" `flag-for-human`)",
|
|
3000
|
+
"",
|
|
3001
|
+
"4. **Write the audit report** to:",
|
|
3002
|
+
" ```",
|
|
3003
|
+
" <AUDIT_ROOT>/maint-audit-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
|
|
3004
|
+
" ```",
|
|
3005
|
+
"",
|
|
3006
|
+
" Format:",
|
|
3007
|
+
" ```markdown",
|
|
3008
|
+
" ---",
|
|
3009
|
+
' title: "Maintenance Audit: <AUDIT_SLUG>"',
|
|
3010
|
+
" date: YYYY-MM-DD",
|
|
3011
|
+
" parent_issue: <N>",
|
|
3012
|
+
" status: complete",
|
|
3013
|
+
" ---",
|
|
3014
|
+
"",
|
|
3015
|
+
" # Maintenance Audit: <AUDIT_SLUG>",
|
|
3016
|
+
"",
|
|
3017
|
+
" ## Scope",
|
|
3018
|
+
" - **Docs root:** `<DOCS_ROOT>`",
|
|
3019
|
+
" - **Checks run:** <list of check categories>",
|
|
3020
|
+
" - **Files scanned:** <count>",
|
|
3021
|
+
"",
|
|
3022
|
+
" ## Findings Summary",
|
|
3023
|
+
" | Category | Count | Auto-fixable | Needs human |",
|
|
3024
|
+
" |----------|-------|--------------|-------------|",
|
|
3025
|
+
" | Broken xref | N | N | N |",
|
|
3026
|
+
" | Orphaned doc | N | N | N |",
|
|
3027
|
+
" | Registry drift | N | N | N |",
|
|
3028
|
+
" | Stale index | N | N | N |",
|
|
3029
|
+
" | Duplicate ID | N | N | N |",
|
|
3030
|
+
" | Missing traceability | N | N | N |",
|
|
3031
|
+
" | Dangling backlink | N | N | N |",
|
|
3032
|
+
"",
|
|
3033
|
+
" ## Findings",
|
|
3034
|
+
"",
|
|
3035
|
+
" ### Finding 1: <category> \u2014 <short description>",
|
|
3036
|
+
" - **File:** <path>:<line>",
|
|
3037
|
+
" - **Target:** <broken target or drifted entry>",
|
|
3038
|
+
" - **Suggested fix:** prune / normalize / regenerate / flag-for-human",
|
|
3039
|
+
" - **Notes:** <any context that helps the fix phase>",
|
|
3040
|
+
"",
|
|
3041
|
+
" ## Findings Requiring Human Judgment",
|
|
3042
|
+
" <list of findings where the fix phase must NOT auto-apply>",
|
|
3043
|
+
"",
|
|
3044
|
+
" ## Out-of-Scope Observations",
|
|
3045
|
+
" <incidental issues noticed during the walk but outside the",
|
|
3046
|
+
" declared scope \u2014 e.g. a sibling doc tree that also looks stale.",
|
|
3047
|
+
" Recorded here so a human can decide whether to queue a follow-up",
|
|
3048
|
+
" cycle. Not acted on in this cycle.>",
|
|
3049
|
+
" ```",
|
|
3050
|
+
"",
|
|
3051
|
+
"5. **Decide the next step:**",
|
|
3052
|
+
" - **No findings** \u2192 comment on the scan issue noting a clean",
|
|
3053
|
+
" audit, commit the (still valuable) empty report, close the",
|
|
3054
|
+
" issue. Do not create a `maint:fix` issue.",
|
|
3055
|
+
" - **All findings need human judgment** \u2192 commit the report,",
|
|
3056
|
+
" comment on the scan issue summarizing the findings, apply",
|
|
3057
|
+
" `status:needs-attention`, and close the issue. Do not create",
|
|
3058
|
+
" a `maint:fix` issue.",
|
|
3059
|
+
" - **At least one auto-fixable finding** \u2192 create a `maint:fix`",
|
|
3060
|
+
" issue (blocked on this scan issue via `Depends on: #N`). The",
|
|
3061
|
+
" fix issue body must reference the audit report path and",
|
|
3062
|
+
" enumerate the auto-fix categories to apply.",
|
|
3063
|
+
"",
|
|
3064
|
+
"6. **Commit and push.**",
|
|
3065
|
+
"",
|
|
3066
|
+
"---",
|
|
3067
|
+
"",
|
|
3068
|
+
"## Phase 2: Fix (`maint:fix`)",
|
|
3069
|
+
"",
|
|
3070
|
+
"**Goal:** Read the audit report, apply idempotent fixes, verify",
|
|
3071
|
+
"they cleared the reported findings, and commit the doc-tree changes.",
|
|
3072
|
+
"",
|
|
3073
|
+
"**Budget:** Bounded edits to files under `<DOCS_ROOT>` plus a final",
|
|
3074
|
+
"verification re-run of the checks from Phase 1. No new audit",
|
|
3075
|
+
"categories. No fixes that require authoring new content.",
|
|
3076
|
+
"",
|
|
3077
|
+
"### Fix Categories",
|
|
3078
|
+
"",
|
|
3079
|
+
"Apply only the categories the fix issue body enumerates. Defaults:",
|
|
3080
|
+
"",
|
|
3081
|
+
"| Category | What it does | Safety |",
|
|
3082
|
+
"|----------|-------------|--------|",
|
|
3083
|
+
"| **prune** | Remove stale entries from registries/indexes that point to non-existent docs. | Safe \u2014 only deletes references the scan confirmed are dead. |",
|
|
3084
|
+
"| **normalize** | Rewrite relative link paths to a canonical form (e.g. always use paths relative to `<DOCS_ROOT>`, always include file extensions). | Safe \u2014 preserves target, changes only the link expression. |",
|
|
3085
|
+
"| **regenerate** | Rebuild an index or registry file from the authoritative source (the filesystem or a declared source-of-truth file). | Safe IF the source-of-truth is unambiguous. Otherwise flag-for-human. |",
|
|
3086
|
+
"| **flag-for-human** | Do not auto-apply. Leave the finding in place and note it in the fix report. | Used for ambiguous category assignments, duplicate IDs, or missing targets where the correct target is unclear. |",
|
|
3087
|
+
"",
|
|
3088
|
+
"### Steps",
|
|
3089
|
+
"",
|
|
3090
|
+
"1. **Read the audit report** referenced in the fix issue body.",
|
|
3091
|
+
"",
|
|
3092
|
+
"2. **Partition findings.** Group findings by fix category. Confirm",
|
|
3093
|
+
" each auto-fixable finding still matches what the report",
|
|
3094
|
+
" recorded (docs may have moved since the scan) \u2014 if a finding no",
|
|
3095
|
+
" longer applies, note it as `stale-finding` and skip.",
|
|
3096
|
+
"",
|
|
3097
|
+
"3. **Apply fixes in deterministic order:**",
|
|
3098
|
+
" 1. **prune** \u2014 remove dead registry entries first. This reduces",
|
|
3099
|
+
" the surface area for downstream fixes.",
|
|
3100
|
+
" 2. **normalize** \u2014 rewrite link expressions to canonical form.",
|
|
3101
|
+
" 3. **regenerate** \u2014 rebuild indexes last, from the now-clean",
|
|
3102
|
+
" tree.",
|
|
3103
|
+
"",
|
|
3104
|
+
"4. **Never author new content.** If a finding requires inventing a",
|
|
3105
|
+
" target (e.g. a broken link where no candidate target exists),",
|
|
3106
|
+
" mark it `flag-for-human` and skip. Authoring new docs belongs",
|
|
3107
|
+
" to the writer agent for that doc type, not this agent.",
|
|
3108
|
+
"",
|
|
3109
|
+
"5. **Verify.** Re-run the same checks the scan phase ran, scoped",
|
|
3110
|
+
" to the files the fix phase touched (plus any index files those",
|
|
3111
|
+
" edits affect). Every finding the fix phase claimed to resolve",
|
|
3112
|
+
" must now be gone. Any finding that remains is a regression \u2014",
|
|
3113
|
+
" revert the corresponding edit and mark it `flag-for-human`.",
|
|
3114
|
+
"",
|
|
3115
|
+
"6. **Write the fix report** to:",
|
|
3116
|
+
" ```",
|
|
3117
|
+
" <AUDIT_ROOT>/maint-fix-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
|
|
3118
|
+
" ```",
|
|
3119
|
+
"",
|
|
3120
|
+
" Format:",
|
|
3121
|
+
" ```markdown",
|
|
3122
|
+
" ---",
|
|
3123
|
+
' title: "Maintenance Fix: <AUDIT_SLUG>"',
|
|
3124
|
+
" date: YYYY-MM-DD",
|
|
3125
|
+
" parent_issue: <N>",
|
|
3126
|
+
" audit_report: <path to scan report>",
|
|
3127
|
+
" status: complete",
|
|
3128
|
+
" ---",
|
|
3129
|
+
"",
|
|
3130
|
+
" # Maintenance Fix: <AUDIT_SLUG>",
|
|
3131
|
+
"",
|
|
3132
|
+
" ## Source Audit Report",
|
|
3133
|
+
" <link to the Phase 1 audit report>",
|
|
3134
|
+
"",
|
|
3135
|
+
" ## Fixes Applied",
|
|
3136
|
+
" | Category | Count | Files touched |",
|
|
3137
|
+
" |----------|-------|---------------|",
|
|
3138
|
+
" | prune | N | <list> |",
|
|
3139
|
+
" | normalize | N | <list> |",
|
|
3140
|
+
" | regenerate | N | <list> |",
|
|
3141
|
+
"",
|
|
3142
|
+
" ## Skipped",
|
|
3143
|
+
" <findings that were stale, flagged for human, or reverted",
|
|
3144
|
+
" during verification \u2014 one entry each, with the reason>",
|
|
3145
|
+
"",
|
|
3146
|
+
" ## Verification",
|
|
3147
|
+
" - **Re-scan result:** clean / <N> residual findings",
|
|
3148
|
+
" - **Residual findings:** <list, with reasons \u2014 each becomes a",
|
|
3149
|
+
" follow-up `flag-for-human` note>",
|
|
3150
|
+
" ```",
|
|
3151
|
+
"",
|
|
3152
|
+
"7. **Comment on the scan issue** with a summary of what was fixed,",
|
|
3153
|
+
" what was skipped, and any residual findings.",
|
|
3154
|
+
"",
|
|
3155
|
+
"8. **Commit and push.**",
|
|
3156
|
+
"",
|
|
3157
|
+
"---",
|
|
3158
|
+
"",
|
|
3159
|
+
"## Coordination with Other Agents",
|
|
3160
|
+
"",
|
|
3161
|
+
"| Direction | Agent | What |",
|
|
3162
|
+
"|-----------|-------|------|",
|
|
3163
|
+
"| Downstream (last resort) | Writer agent for the audited doc type | When the audit surfaces findings that require authoring new content (missing target, partial coverage that can only be resolved by writing a new doc), the fix phase flags them for human \u2014 the human may then dispatch the appropriate writer agent. This agent never opens writer-agent issues itself. |",
|
|
3164
|
+
"",
|
|
3165
|
+
"**File boundaries:** Writes audit and fix reports to",
|
|
3166
|
+
"`<AUDIT_ROOT>/`. Applies bounded, idempotent edits under",
|
|
3167
|
+
"`<DOCS_ROOT>/` per the fix-policy declared in the fix issue body.",
|
|
3168
|
+
"Never writes to source code, never writes to doc trees outside",
|
|
3169
|
+
"`<DOCS_ROOT>`, never authors new document files to close a gap.",
|
|
3170
|
+
"",
|
|
3171
|
+
"---",
|
|
3172
|
+
"",
|
|
3173
|
+
"## Blocked Issues",
|
|
3174
|
+
"",
|
|
3175
|
+
"Additional block reasons specific to maintenance audits:",
|
|
3176
|
+
"- `<DOCS_ROOT>` is undefined or does not exist in the repo",
|
|
3177
|
+
"- The registry file format is ambiguous (no declared schema)",
|
|
3178
|
+
"- All findings are `flag-for-human` and the fix issue has nothing",
|
|
3179
|
+
" to auto-apply \u2014 resolve by closing the fix issue with a summary",
|
|
3180
|
+
" instead",
|
|
3181
|
+
"",
|
|
3182
|
+
"---",
|
|
3183
|
+
"",
|
|
3184
|
+
"## Rules",
|
|
3185
|
+
"",
|
|
3186
|
+
"- **Audit before fix.** Never apply a fix whose finding is not",
|
|
3187
|
+
" recorded in the audit report referenced by the fix issue.",
|
|
3188
|
+
"- **Idempotent fixes only.** If re-running the same fix twice",
|
|
3189
|
+
" would produce a different result, it is not an idempotent fix.",
|
|
3190
|
+
" Mark it `flag-for-human` instead.",
|
|
3191
|
+
"- **Bounded scope.** Do not expand the audit scope mid-session.",
|
|
3192
|
+
" Record out-of-scope observations in the report for human review.",
|
|
3193
|
+
"- **No authoring.** Do not invent new document content to close a",
|
|
3194
|
+
" finding. That work belongs to the writer agent for the doc type.",
|
|
3195
|
+
"- **Verify before closing.** Always re-run the checks after",
|
|
3196
|
+
" applying fixes and record the result in the fix report."
|
|
3197
|
+
].join("\n")
|
|
3198
|
+
};
|
|
3199
|
+
var maintenanceAuditSkill = {
|
|
3200
|
+
name: "audit-docs",
|
|
3201
|
+
description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
|
|
3202
|
+
disableModelInvocation: true,
|
|
3203
|
+
userInvocable: true,
|
|
3204
|
+
context: "fork",
|
|
3205
|
+
agent: "maintenance-audit",
|
|
3206
|
+
platforms: { cursor: { exclude: true } },
|
|
3207
|
+
instructions: [
|
|
3208
|
+
"# Audit Docs",
|
|
3209
|
+
"",
|
|
3210
|
+
"Kick off a maintenance-audit cycle against a configurable doc",
|
|
3211
|
+
"tree. Creates a `maint:scan` issue targeted at the requested",
|
|
3212
|
+
"scope and dispatches Phase 1 (Scan) in the maintenance-audit",
|
|
3213
|
+
"agent.",
|
|
3214
|
+
"",
|
|
3215
|
+
"## Usage",
|
|
3216
|
+
"",
|
|
3217
|
+
"/audit-docs <scope>",
|
|
3218
|
+
"",
|
|
3219
|
+
"Where `<scope>` is a short slug plus path for the doc tree to",
|
|
3220
|
+
"audit. Examples:",
|
|
3221
|
+
"- `requirements-xrefs:docs/requirements/` \u2014 audit requirement",
|
|
3222
|
+
" traceability links and the category registries",
|
|
3223
|
+
"- `adr-registry:docs/adrs/` \u2014 audit the ADR registry index",
|
|
3224
|
+
"- `bcm-traceability:docs/bcm/` \u2014 audit BCM capability-model",
|
|
3225
|
+
" cross-references",
|
|
3226
|
+
"",
|
|
3227
|
+
"The consuming project defines which scopes are valid.",
|
|
3228
|
+
"",
|
|
3229
|
+
"## Steps",
|
|
3230
|
+
"",
|
|
3231
|
+
"1. Create a `maint:scan` issue with `type:maintenance`,",
|
|
3232
|
+
" `priority:medium`, and `status:ready`. Body must list:",
|
|
3233
|
+
" - `<DOCS_ROOT>` \u2014 the doc tree to audit",
|
|
3234
|
+
" - `<AUDIT_ROOT>` \u2014 where to write the audit report",
|
|
3235
|
+
" - `<AUDIT_SLUG>` \u2014 short identifier for this audit",
|
|
3236
|
+
" - The audit checks to run (defaults to the full check catalog)",
|
|
3237
|
+
"2. Execute Phase 1 (Scan) of the maintenance-audit agent.",
|
|
3238
|
+
"3. If auto-fixable findings exist, a `maint:fix` issue is created",
|
|
3239
|
+
" automatically.",
|
|
3240
|
+
"",
|
|
3241
|
+
"## Output",
|
|
3242
|
+
"",
|
|
3243
|
+
"- A `maint-audit-<slug>-<YYYY-MM-DD>.md` report under",
|
|
3244
|
+
" `<AUDIT_ROOT>`.",
|
|
3245
|
+
"- A `maint:fix` issue if auto-fixable findings were found."
|
|
3246
|
+
].join("\n")
|
|
3247
|
+
};
|
|
3248
|
+
var maintenanceAuditBundle = {
|
|
3249
|
+
name: "maintenance-audit",
|
|
3250
|
+
description: "Documentation-maintenance agent bundle. 2-phase pipeline (scan, fix) with maint:* phase labels for auditing registries and cross-references and applying idempotent fixes.",
|
|
3251
|
+
appliesWhen: () => false,
|
|
3252
|
+
rules: [
|
|
3253
|
+
{
|
|
3254
|
+
name: "maintenance-audit-workflow",
|
|
3255
|
+
description: "Describes the 2-phase documentation-maintenance pipeline, the maint:* label taxonomy, and the audit-before-fix boundary.",
|
|
3256
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
3257
|
+
content: [
|
|
3258
|
+
"# Maintenance Audit Workflow",
|
|
3259
|
+
"",
|
|
3260
|
+
"Use `/audit-docs <scope>` to kick off a documentation-maintenance",
|
|
3261
|
+
"audit cycle. The pipeline runs in 2 phases \u2014 scan and fix \u2014 each",
|
|
3262
|
+
"tracked by its own GitHub issue labeled `maint:scan` or",
|
|
3263
|
+
"`maint:fix`. All issues carry `type:maintenance`.",
|
|
3264
|
+
"",
|
|
3265
|
+
"The maintenance-audit agent *audits doc registries and applies",
|
|
3266
|
+
"idempotent fixes*; it does **not** author new document content.",
|
|
3267
|
+
"Findings that would require authoring new docs are flagged for",
|
|
3268
|
+
"human review so the appropriate writer agent can be dispatched.",
|
|
3269
|
+
"",
|
|
3270
|
+
"See the `maintenance-audit` agent definition for full workflow",
|
|
3271
|
+
"details and phase-by-phase instructions."
|
|
3272
|
+
].join("\n"),
|
|
3273
|
+
platforms: {
|
|
3274
|
+
cursor: { exclude: true }
|
|
3275
|
+
},
|
|
3276
|
+
tags: ["workflow"]
|
|
3277
|
+
}
|
|
3278
|
+
],
|
|
3279
|
+
skills: [maintenanceAuditSkill],
|
|
3280
|
+
subAgents: [maintenanceAuditSubAgent],
|
|
3281
|
+
labels: [
|
|
3282
|
+
{
|
|
3283
|
+
name: "type:maintenance",
|
|
3284
|
+
color: "5319E7",
|
|
3285
|
+
description: "Work that audits or fixes documentation registries, cross-references, or indexes"
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
name: "maint:scan",
|
|
3289
|
+
color: "C5DEF5",
|
|
3290
|
+
description: "Phase 1: scan doc tree for broken xrefs, registry drift, and stale indexes"
|
|
3291
|
+
},
|
|
3292
|
+
{
|
|
3293
|
+
name: "maint:fix",
|
|
3294
|
+
color: "BFDADC",
|
|
3295
|
+
description: "Phase 2: apply idempotent fixes from a maintenance audit report"
|
|
3296
|
+
}
|
|
3297
|
+
]
|
|
3298
|
+
};
|
|
3299
|
+
|
|
2096
3300
|
// src/agent/bundles/meeting-analysis.ts
|
|
2097
3301
|
var meetingAnalystSubAgent = {
|
|
2098
3302
|
name: "meeting-analyst",
|
|
@@ -6707,7 +7911,9 @@ var BUILT_IN_BUNDLES = [
|
|
|
6707
7911
|
companyProfileBundle,
|
|
6708
7912
|
peopleProfileBundle,
|
|
6709
7913
|
softwareProfileBundle,
|
|
6710
|
-
industryDiscoveryBundle
|
|
7914
|
+
industryDiscoveryBundle,
|
|
7915
|
+
bcmWriterBundle,
|
|
7916
|
+
maintenanceAuditBundle
|
|
6711
7917
|
];
|
|
6712
7918
|
|
|
6713
7919
|
// src/agent/bundles/scope.ts
|
|
@@ -10239,11 +11445,13 @@ export {
|
|
|
10239
11445
|
addSyncLabelsWorkflow,
|
|
10240
11446
|
awsCdkBundle,
|
|
10241
11447
|
baseBundle,
|
|
11448
|
+
bcmWriterBundle,
|
|
10242
11449
|
companyProfileBundle,
|
|
10243
11450
|
getLatestEligibleVersion,
|
|
10244
11451
|
githubWorkflowBundle,
|
|
10245
11452
|
industryDiscoveryBundle,
|
|
10246
11453
|
jestBundle,
|
|
11454
|
+
maintenanceAuditBundle,
|
|
10247
11455
|
meetingAnalysisBundle,
|
|
10248
11456
|
orchestratorBundle,
|
|
10249
11457
|
peopleProfileBundle,
|