jumbo-cli 2.3.1 → 2.5.0
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/assets/skills/define-jumbo-goals/SKILL.md +7 -0
- package/assets/skills/refine-jumbo-goals/SKILL.md +28 -10
- package/assets/skills/start-jumbo-goal/SKILL.md +24 -1
- package/dist/application/context/project/get/ContextualProjectView.d.ts +4 -1
- package/dist/application/context/project/get/ContextualProjectView.d.ts.map +1 -1
- package/dist/application/context/sessions/SessionInstructionSignal.d.ts +8 -0
- package/dist/application/context/sessions/SessionInstructionSignal.d.ts.map +1 -0
- package/dist/application/context/sessions/SessionInstructionSignal.js +10 -0
- package/dist/application/context/sessions/SessionInstructionSignal.js.map +1 -0
- package/dist/application/context/sessions/get/SessionContextQueryHandler.d.ts +3 -1
- package/dist/application/context/sessions/get/SessionContextQueryHandler.d.ts.map +1 -1
- package/dist/application/context/sessions/get/SessionContextQueryHandler.js +5 -3
- package/dist/application/context/sessions/get/SessionContextQueryHandler.js.map +1 -1
- package/dist/application/context/sessions/start/ActivityMirrorAssembler.d.ts +25 -0
- package/dist/application/context/sessions/start/ActivityMirrorAssembler.d.ts.map +1 -0
- package/dist/application/context/sessions/start/ActivityMirrorAssembler.js +63 -0
- package/dist/application/context/sessions/start/ActivityMirrorAssembler.js.map +1 -0
- package/dist/application/context/sessions/start/LocalStartSessionGateway.d.ts +4 -1
- package/dist/application/context/sessions/start/LocalStartSessionGateway.d.ts.map +1 -1
- package/dist/application/context/sessions/start/LocalStartSessionGateway.js +23 -6
- package/dist/application/context/sessions/start/LocalStartSessionGateway.js.map +1 -1
- package/dist/application/context/sessions/start/SessionStartResponse.d.ts +4 -2
- package/dist/application/context/sessions/start/SessionStartResponse.d.ts.map +1 -1
- package/dist/domain/project/JumboMdContent.d.ts.map +1 -1
- package/dist/domain/project/JumboMdContent.js +32 -2
- package/dist/domain/project/JumboMdContent.js.map +1 -1
- package/dist/infrastructure/host/HostBuilder.d.ts.map +1 -1
- package/dist/infrastructure/host/HostBuilder.js +4 -2
- package/dist/infrastructure/host/HostBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.js +17 -8
- package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.js +7 -1
- package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/project/init/project.init.d.ts +10 -0
- package/dist/presentation/cli/commands/project/init/project.init.d.ts.map +1 -1
- package/dist/presentation/cli/commands/project/init/project.init.js +337 -1
- package/dist/presentation/cli/commands/project/init/project.init.js.map +1 -1
- package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.d.ts +1 -0
- package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.js +38 -4
- package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.d.ts +5 -3
- package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.d.ts.map +1 -1
- package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.js +28 -4
- package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.js.map +1 -1
- package/dist/presentation/cli/commands/sessions/start/session.start.js +2 -2
- package/dist/presentation/cli/commands/sessions/start/session.start.js.map +1 -1
- package/package.json +1 -1
|
@@ -43,6 +43,13 @@ This discovery serves two purposes:
|
|
|
43
43
|
- **Inform decomposition**: Understanding the system's boundaries, patterns, and constraints reveals the natural seams along which to split work.
|
|
44
44
|
- **Inform criteria**: Existing invariants, decisions, and patterns dictate what "correct" looks like.
|
|
45
45
|
|
|
46
|
+
If you encounter components, patterns, or decisions that exist in the codebase but are not registered in Jumbo, register them now — before writing goals. Accurate entity coverage produces better relations during refinement:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
jumbo component add --name "ExistingService" --description "What it does"
|
|
50
|
+
jumbo decision add --title "Existing pattern" --rationale "Why it was chosen" --context "Background"
|
|
51
|
+
```
|
|
52
|
+
|
|
46
53
|
Also explore the codebase directly to understand current implementation:
|
|
47
54
|
|
|
48
55
|
```bash
|
|
@@ -60,14 +60,19 @@ Do not skip any entity category. Every category is a potential source of impleme
|
|
|
60
60
|
|
|
61
61
|
### 3. Evaluate Every Entity Against the Goal
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Use different evaluation strategies depending on the entity category:
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
#### Invariants & Guidelines — evaluate by exclusion
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Review every invariant and guideline returned. For each, ask: **"Can I confidently say the implementing agent will never need this?"** Only exclude those where the answer is clearly yes. A missed constraint causes QA rejections — but over-relating creates context rot that dilutes focus. The bar is confidence of irrelevance, not possible relevance.
|
|
68
|
+
|
|
69
|
+
- **Invariants**: Review all. Exclude only those confidently unrelated to the goal's scope.
|
|
70
|
+
- **Guidelines**: Review all. Exclude only those confidently unrelated to the goal's scope.
|
|
71
|
+
|
|
72
|
+
#### Components, Decisions & Dependencies — evaluate by inclusion
|
|
73
|
+
|
|
74
|
+
Use targeted searches to find entities the implementation will modify, use, or depend on. For each candidate, ask: **"Will the implementing agent need to know about this to execute correctly?"** Only register entities with direct, actionable relevance.
|
|
68
75
|
|
|
69
|
-
- **Invariants**: Which non-negotiable constraints does this implementation touch, cross, or risk violating?
|
|
70
|
-
- **Guidelines**: Which coding standards, testing requirements, or process practices apply?
|
|
71
76
|
- **Decisions**: Which architectural decisions inform, motivate, or constrain this change?
|
|
72
77
|
- **Components**: Which system components will be created, modified, deleted, or depended upon?
|
|
73
78
|
- **Dependencies**: Which external libraries are involved in the implementation?
|
|
@@ -103,15 +108,28 @@ jumbo relation add \
|
|
|
103
108
|
- GOOD: "Removal must not leave orphaned registrations or broken import paths across layer boundaries"
|
|
104
109
|
- GOOD: "Ensure the read-side query path remains intact after removing the old handler"
|
|
105
110
|
|
|
106
|
-
### 5.
|
|
111
|
+
### 5. Surface Prerequisites
|
|
112
|
+
|
|
113
|
+
As you analyze the goal against project entities, you may discover that work X must happen before this goal can succeed. When you identify a prerequisite, register it immediately — do not defer it to a note or comment:
|
|
114
|
+
|
|
115
|
+
1. Register the prerequisite as a new goal:
|
|
116
|
+
```bash
|
|
117
|
+
jumbo goal add --objective "X that must happen first"
|
|
118
|
+
```
|
|
119
|
+
2. Link it to the current goal:
|
|
120
|
+
```bash
|
|
121
|
+
jumbo goal update --id <goal-id> --prerequisite-goals <new-goal-id>
|
|
122
|
+
```
|
|
123
|
+
3. Continue refining the current goal.
|
|
124
|
+
|
|
125
|
+
### 6. Update Goal Metadata
|
|
107
126
|
|
|
108
|
-
During entity exploration, you may discover:
|
|
127
|
+
During entity exploration, you may also discover:
|
|
109
128
|
- Additional files that belong in scope
|
|
110
129
|
- Files that should be created or modified
|
|
111
130
|
- Risk of scope creep
|
|
112
131
|
- Success criteria that need updating
|
|
113
132
|
- Applicable refactoring skills to reference in criteria (prefix with `skill:`)
|
|
114
|
-
- Registered goals that should be added as prerequisites or follow-ups
|
|
115
133
|
|
|
116
134
|
Update the goal accordingly:
|
|
117
135
|
|
|
@@ -125,7 +143,7 @@ jumbo goal update --id <goal-id> \
|
|
|
125
143
|
--prerequisite-goals <goalIds...>
|
|
126
144
|
```
|
|
127
145
|
|
|
128
|
-
###
|
|
146
|
+
### 7. Verify Completeness
|
|
129
147
|
|
|
130
148
|
Before approving, verify ALL of the following:
|
|
131
149
|
|
|
@@ -138,7 +156,7 @@ Before approving, verify ALL of the following:
|
|
|
138
156
|
- [ ] Goal criteria and scope reflect any discoveries made during refinement
|
|
139
157
|
- [ ] The goal has at least 5 relations total (fewer suggests incomplete analysis)
|
|
140
158
|
|
|
141
|
-
###
|
|
159
|
+
### 8. Approve Refinement
|
|
142
160
|
|
|
143
161
|
Only after completing all verification checks:
|
|
144
162
|
|
|
@@ -68,7 +68,30 @@ Coding standards, testing requirements, and process practices. You SHOULD follow
|
|
|
68
68
|
jumbo goal update-progress --id <goal-id> --task-description "<description>"
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
### 4.
|
|
71
|
+
### 4. Maintain Context as You Implement
|
|
72
|
+
|
|
73
|
+
Register decisions, components, and corrections as they happen — not as a cleanup step after implementation.
|
|
74
|
+
|
|
75
|
+
- **Architectural decision made** (e.g., chose pattern X over Y):
|
|
76
|
+
```bash
|
|
77
|
+
jumbo decision add --title "Chose X over Y" --rationale "Because Z" --context "Background"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- **New component created** (e.g., introduced a new service or builder):
|
|
81
|
+
```bash
|
|
82
|
+
jumbo component add --name "ComponentName" --description "What it does"
|
|
83
|
+
jumbo relation add --from-type goal --from-id <goal-id> --to-type component --to-id <component-id> --type involves --description "Created during implementation"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- **User corrects your approach** (e.g., "don't do X, do Y instead"):
|
|
87
|
+
```bash
|
|
88
|
+
jumbo invariant add --category "architecture" --description "Never do X because Y"
|
|
89
|
+
jumbo guideline add --category "codingStyle" --description "Prefer X over Y"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Context registered now is served to future sessions. What you skip is lost.
|
|
93
|
+
|
|
94
|
+
### 5. Submit for Review
|
|
72
95
|
|
|
73
96
|
When all success criteria are met and implementation is complete:
|
|
74
97
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ProjectView } from "../ProjectView.js";
|
|
2
2
|
import { AudienceView } from "../../audiences/AudienceView.js";
|
|
3
3
|
import { AudiencePainView } from "../../audience-pains/AudiencePainView.js";
|
|
4
|
+
import { ValuePropositionView } from "../../value-propositions/ValuePropositionView.js";
|
|
4
5
|
/**
|
|
5
|
-
* ContextualProjectView - Composed project view with audiences and
|
|
6
|
+
* ContextualProjectView - Composed project view with audiences, pains, and value propositions.
|
|
6
7
|
*
|
|
7
8
|
* Combines:
|
|
8
9
|
* - project: The core ProjectView entity
|
|
9
10
|
* - audiences: Active target audiences
|
|
10
11
|
* - audiencePains: Active audience pain points
|
|
12
|
+
* - valuePropositions: Active value propositions
|
|
11
13
|
*
|
|
12
14
|
* Follows the Contextual*View convention for application-layer composed read models.
|
|
13
15
|
* Reusable across session context, project queries, and any consumer needing
|
|
@@ -17,5 +19,6 @@ export interface ContextualProjectView {
|
|
|
17
19
|
readonly project: ProjectView;
|
|
18
20
|
readonly audiences: ReadonlyArray<AudienceView>;
|
|
19
21
|
readonly audiencePains: ReadonlyArray<AudiencePainView>;
|
|
22
|
+
readonly valuePropositions: ReadonlyArray<ValuePropositionView>;
|
|
20
23
|
}
|
|
21
24
|
//# sourceMappingURL=ContextualProjectView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextualProjectView.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/project/get/ContextualProjectView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextualProjectView.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/project/get/ContextualProjectView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAExF;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACxD,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CACjE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SessionInstructionSignal: {
|
|
2
|
+
readonly BROWNFIELD_ONBOARDING: "brownfield-onboarding";
|
|
3
|
+
readonly PRIMITIVE_GAPS_DETECTED: "primitive-gaps-detected";
|
|
4
|
+
readonly PAUSED_GOALS_RESUME: "paused-goals-resume";
|
|
5
|
+
readonly GOAL_SELECTION_PROMPT: "goal-selection-prompt";
|
|
6
|
+
};
|
|
7
|
+
export type SessionInstructionSignalValue = typeof SessionInstructionSignal[keyof typeof SessionInstructionSignal];
|
|
8
|
+
//# sourceMappingURL=SessionInstructionSignal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionInstructionSignal.d.ts","sourceRoot":"","sources":["../../../../src/application/context/sessions/SessionInstructionSignal.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;;;CAK3B,CAAC;AAEX,MAAM,MAAM,6BAA6B,GACvC,OAAO,wBAAwB,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionInstructionSignal = void 0;
|
|
4
|
+
exports.SessionInstructionSignal = {
|
|
5
|
+
BROWNFIELD_ONBOARDING: "brownfield-onboarding",
|
|
6
|
+
PRIMITIVE_GAPS_DETECTED: "primitive-gaps-detected",
|
|
7
|
+
PAUSED_GOALS_RESUME: "paused-goals-resume",
|
|
8
|
+
GOAL_SELECTION_PROMPT: "goal-selection-prompt",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=SessionInstructionSignal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionInstructionSignal.js","sourceRoot":"","sources":["../../../../src/application/context/sessions/SessionInstructionSignal.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,uBAAuB,EAAE,yBAAyB;IAClD,mBAAmB,EAAE,qBAAqB;IAC1C,qBAAqB,EAAE,uBAAuB;CACtC,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { IProjectContextReader } from "../../project/query/IProjectContextReader
|
|
|
6
6
|
import { IAudienceContextReader } from "../../audiences/query/IAudienceContextReader.js";
|
|
7
7
|
import { IAudiencePainContextReader } from "../../audience-pains/query/IAudiencePainContextReader.js";
|
|
8
8
|
import { IRelationViewReader } from "../../relations/get/IRelationViewReader.js";
|
|
9
|
+
import { IValuePropositionContextReader } from "../../value-propositions/query/IValuePropositionContextReader.js";
|
|
9
10
|
/**
|
|
10
11
|
* SessionContextQueryHandler - Builds the reusable base session context
|
|
11
12
|
*
|
|
@@ -23,7 +24,8 @@ export declare class SessionContextQueryHandler {
|
|
|
23
24
|
private readonly projectContextReader?;
|
|
24
25
|
private readonly audienceContextReader?;
|
|
25
26
|
private readonly audiencePainContextReader?;
|
|
26
|
-
|
|
27
|
+
private readonly valuePropositionContextReader?;
|
|
28
|
+
constructor(sessionViewReader: ISessionViewReader, goalStatusReader: IGoalStatusReader, decisionViewReader: IDecisionViewReader, relationViewReader: IRelationViewReader, projectContextReader?: IProjectContextReader | undefined, audienceContextReader?: IAudienceContextReader | undefined, audiencePainContextReader?: IAudiencePainContextReader | undefined, valuePropositionContextReader?: IValuePropositionContextReader | undefined);
|
|
27
29
|
/**
|
|
28
30
|
* Execute query to assemble base session context
|
|
29
31
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionContextQueryHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/get/SessionContextQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionContextQueryHandler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/get/SessionContextQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AAElH;;;;;;;;GAQG;AACH,qBAAa,0BAA0B;IAEnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACtC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACvC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC;gBAP9B,iBAAiB,EAAE,kBAAkB,EACrC,gBAAgB,EAAE,iBAAiB,EACnC,kBAAkB,EAAE,mBAAmB,EACvC,kBAAkB,EAAE,mBAAmB,EACvC,oBAAoB,CAAC,EAAE,qBAAqB,YAAA,EAC5C,qBAAqB,CAAC,EAAE,sBAAsB,YAAA,EAC9C,yBAAyB,CAAC,EAAE,0BAA0B,YAAA,EACtD,6BAA6B,CAAC,EAAE,8BAA8B,YAAA;IAGjF;;;;;;;;;;OAUG;IACG,OAAO,IAAI,OAAO,CAAC,qBAAqB,CAAC;CA0EhD"}
|
|
@@ -12,7 +12,7 @@ const Constants_js_1 = require("../../../../domain/goals/Constants.js");
|
|
|
12
12
|
* that compose this base view with event-specific enrichment.
|
|
13
13
|
*/
|
|
14
14
|
class SessionContextQueryHandler {
|
|
15
|
-
constructor(sessionViewReader, goalStatusReader, decisionViewReader, relationViewReader, projectContextReader, audienceContextReader, audiencePainContextReader) {
|
|
15
|
+
constructor(sessionViewReader, goalStatusReader, decisionViewReader, relationViewReader, projectContextReader, audienceContextReader, audiencePainContextReader, valuePropositionContextReader) {
|
|
16
16
|
this.sessionViewReader = sessionViewReader;
|
|
17
17
|
this.goalStatusReader = goalStatusReader;
|
|
18
18
|
this.decisionViewReader = decisionViewReader;
|
|
@@ -20,6 +20,7 @@ class SessionContextQueryHandler {
|
|
|
20
20
|
this.projectContextReader = projectContextReader;
|
|
21
21
|
this.audienceContextReader = audienceContextReader;
|
|
22
22
|
this.audiencePainContextReader = audiencePainContextReader;
|
|
23
|
+
this.valuePropositionContextReader = valuePropositionContextReader;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Execute query to assemble base session context
|
|
@@ -34,7 +35,7 @@ class SessionContextQueryHandler {
|
|
|
34
35
|
*/
|
|
35
36
|
async execute() {
|
|
36
37
|
// Query all view readers in parallel for efficiency
|
|
37
|
-
const [activeSession, doingGoals, blockedGoals, inReviewGoals, qualifiedGoals, pausedGoals, todoGoals, refinedGoals, activeDecisions, deactivatedRelations, project, audiences, audiencePains,] = await Promise.all([
|
|
38
|
+
const [activeSession, doingGoals, blockedGoals, inReviewGoals, qualifiedGoals, pausedGoals, todoGoals, refinedGoals, activeDecisions, deactivatedRelations, project, audiences, audiencePains, valuePropositions,] = await Promise.all([
|
|
38
39
|
this.sessionViewReader.findActive(),
|
|
39
40
|
this.goalStatusReader.findByStatus(Constants_js_1.GoalStatus.DOING),
|
|
40
41
|
this.goalStatusReader.findByStatus(Constants_js_1.GoalStatus.BLOCKED),
|
|
@@ -48,9 +49,10 @@ class SessionContextQueryHandler {
|
|
|
48
49
|
this.projectContextReader?.getProject() ?? Promise.resolve(null),
|
|
49
50
|
this.audienceContextReader?.findAllActive() ?? Promise.resolve([]),
|
|
50
51
|
this.audiencePainContextReader?.findAllActive() ?? Promise.resolve([]),
|
|
52
|
+
this.valuePropositionContextReader?.findAllActive() ?? Promise.resolve([]),
|
|
51
53
|
]);
|
|
52
54
|
const projectContext = project
|
|
53
|
-
? { project, audiences, audiencePains }
|
|
55
|
+
? { project, audiences, audiencePains, valuePropositions }
|
|
54
56
|
: null;
|
|
55
57
|
const activeGoals = doingGoals.concat(blockedGoals, inReviewGoals, qualifiedGoals);
|
|
56
58
|
const plannedGoals = todoGoals.concat(refinedGoals);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionContextQueryHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/sessions/get/SessionContextQueryHandler.ts"],"names":[],"mappings":";;;AAIA,wEAAmE;
|
|
1
|
+
{"version":3,"file":"SessionContextQueryHandler.js","sourceRoot":"","sources":["../../../../../src/application/context/sessions/get/SessionContextQueryHandler.ts"],"names":[],"mappings":";;;AAIA,wEAAmE;AAOnE;;;;;;;;GAQG;AACH,MAAa,0BAA0B;IACrC,YACmB,iBAAqC,EACrC,gBAAmC,EACnC,kBAAuC,EACvC,kBAAuC,EACvC,oBAA4C,EAC5C,qBAA8C,EAC9C,yBAAsD,EACtD,6BAA8D;QAP9D,sBAAiB,GAAjB,iBAAiB,CAAoB;QACrC,qBAAgB,GAAhB,gBAAgB,CAAmB;QACnC,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,yBAAoB,GAApB,oBAAoB,CAAwB;QAC5C,0BAAqB,GAArB,qBAAqB,CAAyB;QAC9C,8BAAyB,GAAzB,yBAAyB,CAA6B;QACtD,kCAA6B,GAA7B,6BAA6B,CAAiC;IAC9E,CAAC;IAEJ;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO;QACX,oDAAoD;QACpD,MAAM,CACJ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,aAAa,EACb,iBAAiB,EAClB,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACpB,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE;YACnC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,yBAAU,CAAC,KAAK,CAAC;YACpD,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,yBAAU,CAAC,OAAO,CAAC;YACtD,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,yBAAU,CAAC,QAAQ,CAAC;YACvD,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,yBAAU,CAAC,SAAS,CAAC;YACxD,IA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CAAC;aACjF,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACf,MAAM,2BAA2B,GAC/B,oBAAoB,CAAC,MAAM,KAAK,CAAC;YAC/B,CAAC,CAAC;gBACE,KAAK,EAAE,CAAC;gBACR,OAAO,EAAE,2BAA2B;aACrC;YACH,CAAC,CAAC;gBACE,KAAK,EAAE,oBAAoB,CAAC,MAAM;gBAClC,OAAO,EAAE,oBAAoB;qBAC1B,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;qBACX,GAAG,CACF,CAAC,QAAQ,EAAE,EAAE,CACX,GAAG,QAAQ,CAAC,cAAc,IAAI,QAAQ,CAAC,YAAY,OAAO,QAAQ,CAAC,YAAY,IAAI,QAAQ,CAAC,UAAU,EAAE,CAC3G;qBACA,IAAI,CAAC,IAAI,CAAC;aACd,CAAC;QAER,OAAO;YACL,OAAO,EAAE,aAAa,IAAI,IAAI;YAC9B,OAAO,EAAE;gBACP,cAAc;gBACd,WAAW;gBACX,WAAW;gBACX,YAAY;gBACZ,eAAe;gBACf,oBAAoB,EAAE,2BAA2B;aAClD;SACF,CAAC;IACJ,CAAC;CACF;AAjGD,gEAiGC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IEventStore } from "../../../persistence/IEventStore.js";
|
|
2
|
+
/**
|
|
3
|
+
* ActivityMirror - Summary of proactive context maintenance actions
|
|
4
|
+
* taken during recent sessions.
|
|
5
|
+
*/
|
|
6
|
+
export interface ActivityMirror {
|
|
7
|
+
readonly sessionCount: number;
|
|
8
|
+
readonly entitiesRegistered: number;
|
|
9
|
+
readonly decisionsRecorded: number;
|
|
10
|
+
readonly relationsAdded: number;
|
|
11
|
+
readonly goalsAdded: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* ActivityMirrorAssembler - Assembles a summary of proactive context
|
|
15
|
+
* maintenance actions from recent sessions.
|
|
16
|
+
*
|
|
17
|
+
* Follows the query-time assembly pattern (dec_a6bd3bba): no new projections
|
|
18
|
+
* or tables. Activity data is computed from existing events at query time.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ActivityMirrorAssembler {
|
|
21
|
+
private readonly eventStore;
|
|
22
|
+
constructor(eventStore: IEventStore);
|
|
23
|
+
assemble(): Promise<ActivityMirror | null>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ActivityMirrorAssembler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityMirrorAssembler.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/ActivityMirrorAssembler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAUD;;;;;;GAMG;AACH,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,WAAW;IAE9C,QAAQ,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;CAgDjD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityMirrorAssembler = void 0;
|
|
4
|
+
const ENTITY_ADD_EVENTS = new Set([
|
|
5
|
+
"ComponentAddedEvent",
|
|
6
|
+
"InvariantAddedEvent",
|
|
7
|
+
"GuidelineAddedEvent",
|
|
8
|
+
]);
|
|
9
|
+
const SESSION_LOOKBACK = 3;
|
|
10
|
+
/**
|
|
11
|
+
* ActivityMirrorAssembler - Assembles a summary of proactive context
|
|
12
|
+
* maintenance actions from recent sessions.
|
|
13
|
+
*
|
|
14
|
+
* Follows the query-time assembly pattern (dec_a6bd3bba): no new projections
|
|
15
|
+
* or tables. Activity data is computed from existing events at query time.
|
|
16
|
+
*/
|
|
17
|
+
class ActivityMirrorAssembler {
|
|
18
|
+
constructor(eventStore) {
|
|
19
|
+
this.eventStore = eventStore;
|
|
20
|
+
}
|
|
21
|
+
async assemble() {
|
|
22
|
+
const allEvents = await this.eventStore.getAllEvents();
|
|
23
|
+
const sessionStarts = allEvents.filter((e) => e.type === "SessionStartedEvent");
|
|
24
|
+
if (sessionStarts.length === 0) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const lookbackCount = Math.min(SESSION_LOOKBACK, sessionStarts.length);
|
|
28
|
+
const cutoffTimestamp = sessionStarts[sessionStarts.length - lookbackCount].timestamp;
|
|
29
|
+
let entitiesRegistered = 0;
|
|
30
|
+
let decisionsRecorded = 0;
|
|
31
|
+
let relationsAdded = 0;
|
|
32
|
+
let goalsAdded = 0;
|
|
33
|
+
for (const event of allEvents) {
|
|
34
|
+
if (event.timestamp < cutoffTimestamp)
|
|
35
|
+
continue;
|
|
36
|
+
if (ENTITY_ADD_EVENTS.has(event.type)) {
|
|
37
|
+
entitiesRegistered++;
|
|
38
|
+
}
|
|
39
|
+
else if (event.type === "DecisionAddedEvent") {
|
|
40
|
+
decisionsRecorded++;
|
|
41
|
+
}
|
|
42
|
+
else if (event.type === "RelationAddedEvent") {
|
|
43
|
+
relationsAdded++;
|
|
44
|
+
}
|
|
45
|
+
else if (event.type === "GoalAddedEvent") {
|
|
46
|
+
goalsAdded++;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const total = entitiesRegistered + decisionsRecorded + relationsAdded + goalsAdded;
|
|
50
|
+
if (total === 0) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
sessionCount: lookbackCount,
|
|
55
|
+
entitiesRegistered,
|
|
56
|
+
decisionsRecorded,
|
|
57
|
+
relationsAdded,
|
|
58
|
+
goalsAdded,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.ActivityMirrorAssembler = ActivityMirrorAssembler;
|
|
63
|
+
//# sourceMappingURL=ActivityMirrorAssembler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityMirrorAssembler.js","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/ActivityMirrorAssembler.ts"],"names":[],"mappings":";;;AAcA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B;;;;;;GAMG;AACH,MAAa,uBAAuB;IAClC,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;IAAG,CAAC;IAExD,KAAK,CAAC,QAAQ;QACZ,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAEvD,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,qBAAqB,CACxC,CAAC;QAEF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,eAAe,GACnB,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC,SAAS,CAAC;QAEhE,IAAI,kBAAkB,GAAG,CAAC,CAAC;QAC3B,IAAI,iBAAiB,GAAG,CAAC,CAAC;QAC1B,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,SAAS,GAAG,eAAe;gBAAE,SAAS;YAEhD,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtC,kBAAkB,EAAE,CAAC;YACvB,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;gBAC/C,iBAAiB,EAAE,CAAC;YACtB,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;gBAC/C,cAAc,EAAE,CAAC;YACnB,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;gBAC3C,UAAU,EAAE,CAAC;YACf,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GACT,kBAAkB,GAAG,iBAAiB,GAAG,cAAc,GAAG,UAAU,CAAC;QACvE,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO;YACL,YAAY,EAAE,aAAa;YAC3B,kBAAkB;YAClB,iBAAiB;YACjB,cAAc;YACd,UAAU;SACX,CAAC;IACJ,CAAC;CACF;AAnDD,0DAmDC"}
|
|
@@ -4,12 +4,15 @@ import { SessionStartResponse } from "./SessionStartResponse.js";
|
|
|
4
4
|
import { StartSessionCommandHandler } from "./StartSessionCommandHandler.js";
|
|
5
5
|
import { SessionContextQueryHandler } from "../get/SessionContextQueryHandler.js";
|
|
6
6
|
import { IBrownfieldStatusReader } from "./IBrownfieldStatusReader.js";
|
|
7
|
+
import { ActivityMirrorAssembler } from "./ActivityMirrorAssembler.js";
|
|
7
8
|
export declare class LocalStartSessionGateway implements IStartSessionGateway {
|
|
8
9
|
private readonly sessionContextQueryHandler;
|
|
9
10
|
private readonly startSessionCommandHandler;
|
|
10
11
|
private readonly brownfieldStatusReader;
|
|
11
|
-
|
|
12
|
+
private readonly activityMirrorAssembler;
|
|
13
|
+
constructor(sessionContextQueryHandler: SessionContextQueryHandler, startSessionCommandHandler: StartSessionCommandHandler, brownfieldStatusReader: IBrownfieldStatusReader, activityMirrorAssembler: ActivityMirrorAssembler);
|
|
12
14
|
startSession(request: SessionStartRequest): Promise<SessionStartResponse>;
|
|
13
15
|
private buildStartInstructions;
|
|
16
|
+
private hasPrimitiveGaps;
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=LocalStartSessionGateway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalStartSessionGateway.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/LocalStartSessionGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,sBAAsB;
|
|
1
|
+
{"version":3,"file":"LocalStartSessionGateway.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/LocalStartSessionGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAHvB,0BAA0B,EAAE,0BAA0B,EACtD,0BAA0B,EAAE,0BAA0B,EACtD,sBAAsB,EAAE,uBAAuB,EAC/C,uBAAuB,EAAE,uBAAuB;IAG7D,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4B/E,OAAO,CAAC,sBAAsB;IAuB9B,OAAO,CAAC,gBAAgB;CAYzB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LocalStartSessionGateway = void 0;
|
|
4
|
+
const SessionInstructionSignal_js_1 = require("../SessionInstructionSignal.js");
|
|
4
5
|
class LocalStartSessionGateway {
|
|
5
|
-
constructor(sessionContextQueryHandler, startSessionCommandHandler, brownfieldStatusReader) {
|
|
6
|
+
constructor(sessionContextQueryHandler, startSessionCommandHandler, brownfieldStatusReader, activityMirrorAssembler) {
|
|
6
7
|
this.sessionContextQueryHandler = sessionContextQueryHandler;
|
|
7
8
|
this.startSessionCommandHandler = startSessionCommandHandler;
|
|
8
9
|
this.brownfieldStatusReader = brownfieldStatusReader;
|
|
10
|
+
this.activityMirrorAssembler = activityMirrorAssembler;
|
|
9
11
|
}
|
|
10
12
|
async startSession(request) {
|
|
11
13
|
// 1. Assemble base session context
|
|
@@ -14,9 +16,11 @@ class LocalStartSessionGateway {
|
|
|
14
16
|
const isUnprimed = await this.brownfieldStatusReader.isUnprimed();
|
|
15
17
|
// 3. Build start-specific instructions
|
|
16
18
|
const instructions = this.buildStartInstructions(contextualSessionView, isUnprimed);
|
|
17
|
-
// 4.
|
|
19
|
+
// 4. Assemble activity mirror (before session start event is written)
|
|
20
|
+
const activityMirror = await this.activityMirrorAssembler.assemble();
|
|
21
|
+
// 5. Execute session start command
|
|
18
22
|
const result = await this.startSessionCommandHandler.execute({});
|
|
19
|
-
//
|
|
23
|
+
// 6. Return enriched context with session ID and activity mirror
|
|
20
24
|
return {
|
|
21
25
|
context: {
|
|
22
26
|
...contextualSessionView,
|
|
@@ -24,19 +28,32 @@ class LocalStartSessionGateway {
|
|
|
24
28
|
scope: "session-start",
|
|
25
29
|
},
|
|
26
30
|
sessionId: result.sessionId,
|
|
31
|
+
activityMirror,
|
|
27
32
|
};
|
|
28
33
|
}
|
|
29
34
|
buildStartInstructions(view, isUnprimed) {
|
|
30
35
|
const instructions = [];
|
|
31
36
|
if (isUnprimed) {
|
|
32
|
-
instructions.push(
|
|
37
|
+
instructions.push(SessionInstructionSignal_js_1.SessionInstructionSignal.BROWNFIELD_ONBOARDING);
|
|
38
|
+
}
|
|
39
|
+
if (!isUnprimed && this.hasPrimitiveGaps(view)) {
|
|
40
|
+
instructions.push(SessionInstructionSignal_js_1.SessionInstructionSignal.PRIMITIVE_GAPS_DETECTED);
|
|
33
41
|
}
|
|
34
42
|
if (view.context.pausedGoals.length > 0) {
|
|
35
|
-
instructions.push(
|
|
43
|
+
instructions.push(SessionInstructionSignal_js_1.SessionInstructionSignal.PAUSED_GOALS_RESUME);
|
|
36
44
|
}
|
|
37
|
-
instructions.push(
|
|
45
|
+
instructions.push(SessionInstructionSignal_js_1.SessionInstructionSignal.GOAL_SELECTION_PROMPT);
|
|
38
46
|
return instructions;
|
|
39
47
|
}
|
|
48
|
+
hasPrimitiveGaps(view) {
|
|
49
|
+
const projectContext = view.context.projectContext;
|
|
50
|
+
if (!projectContext) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return (projectContext.audiences.length === 0 ||
|
|
54
|
+
projectContext.audiencePains.length === 0 ||
|
|
55
|
+
projectContext.valuePropositions.length === 0);
|
|
56
|
+
}
|
|
40
57
|
}
|
|
41
58
|
exports.LocalStartSessionGateway = LocalStartSessionGateway;
|
|
42
59
|
//# sourceMappingURL=LocalStartSessionGateway.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalStartSessionGateway.js","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/LocalStartSessionGateway.ts"],"names":[],"mappings":";;;AAQA,MAAa,wBAAwB;IACnC,YACmB,0BAAsD,EACtD,0BAAsD,EACtD,sBAA+C
|
|
1
|
+
{"version":3,"file":"LocalStartSessionGateway.js","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/LocalStartSessionGateway.ts"],"names":[],"mappings":";;;AAQA,gFAA0E;AAE1E,MAAa,wBAAwB;IACnC,YACmB,0BAAsD,EACtD,0BAAsD,EACtD,sBAA+C,EAC/C,uBAAgD;QAHhD,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,2BAAsB,GAAtB,sBAAsB,CAAyB;QAC/C,4BAAuB,GAAvB,uBAAuB,CAAyB;IAChE,CAAC;IAEJ,KAAK,CAAC,YAAY,CAAC,OAA4B;QAC7C,mCAAmC;QACnC,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,OAAO,EAAE,CAAC;QAE9E,6BAA6B;QAC7B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,CAAC;QAElE,uCAAuC;QACvC,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;QAEpF,sEAAsE;QACtE,MAAM,cAAc,GAAG,MAAM,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K,CAAC,CAC9C,CAAC;IACJ,CAAC;CACF;AAvED,4DAuEC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { EnrichedSessionContext } from "../get/EnrichedSessionContext.js";
|
|
2
|
+
import { ActivityMirror } from "./ActivityMirrorAssembler.js";
|
|
2
3
|
/**
|
|
3
4
|
* SessionStartResponse - Result of starting a new session.
|
|
4
5
|
*
|
|
5
|
-
* Contains the enriched session context (with LLM instruction signals)
|
|
6
|
-
*
|
|
6
|
+
* Contains the enriched session context (with LLM instruction signals),
|
|
7
|
+
* the newly created session ID, and an optional activity mirror summary.
|
|
7
8
|
*/
|
|
8
9
|
export interface SessionStartResponse {
|
|
9
10
|
readonly context: EnrichedSessionContext;
|
|
10
11
|
readonly sessionId: string;
|
|
12
|
+
readonly activityMirror: ActivityMirror | null;
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=SessionStartResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionStartResponse.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/SessionStartResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionStartResponse.d.ts","sourceRoot":"","sources":["../../../../../src/application/context/sessions/start/SessionStartResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JumboMdContent.d.ts","sourceRoot":"","sources":["../../../src/domain/project/JumboMdContent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"JumboMdContent.d.ts","sourceRoot":"","sources":["../../../src/domain/project/JumboMdContent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM;IA2GhC;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI,MAAM;IAM/B;;OAEG;IACH,MAAM,CAAC,uBAAuB,IAAI,MAAM;IAIxC;;;;;OAKG;IACH,MAAM,CAAC,uBAAuB,IAAI,MAAM,EAAE;IAM1C;;;;;;;OAOG;IACH,MAAM,CAAC,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CA6BnE"}
|
|
@@ -50,8 +50,38 @@ Run \`jumbo session end --focus {focus-description}\` --summary {summary-of-what
|
|
|
50
50
|
### Before Starting Work on a Goal
|
|
51
51
|
Run \`jumbo goal start --id <id>\`
|
|
52
52
|
|
|
53
|
-
###
|
|
54
|
-
|
|
53
|
+
### Maintain Context as You Work
|
|
54
|
+
|
|
55
|
+
Jumbo is your persistent memory across sessions. Keeping it accurate is part of your job — not a cleanup step, but something you do in real-time as you work, the same way you write tests alongside code.
|
|
56
|
+
|
|
57
|
+
#### During Refinement
|
|
58
|
+
When you discover that work X must happen before a goal can succeed, register it immediately:
|
|
59
|
+
\`\`\`
|
|
60
|
+
jumbo goal add --objective "X that must happen first"
|
|
61
|
+
jumbo goal update --id <current-goal-id> --prerequisite-goals <new-goal-id>
|
|
62
|
+
\`\`\`
|
|
63
|
+
|
|
64
|
+
#### During Implementation
|
|
65
|
+
When you make an architectural decision, register it before moving on:
|
|
66
|
+
\`\`\`
|
|
67
|
+
jumbo decision add --title "Chose X over Y" --rationale "Because Z" --context "Background"
|
|
68
|
+
\`\`\`
|
|
69
|
+
|
|
70
|
+
When you create a new component, register it and link it:
|
|
71
|
+
\`\`\`
|
|
72
|
+
jumbo component add --name "ComponentName" --description "What it does"
|
|
73
|
+
jumbo relation add --from-type goal --from-id <goal-id> --to-type component --to-id <component-id> --type involves --description "Created during implementation"
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
#### When the User Corrects You
|
|
77
|
+
When user feedback changes the approach, capture it as a durable constraint:
|
|
78
|
+
\`\`\`
|
|
79
|
+
jumbo invariant add --category "architecture" --description "Never do X because Y"
|
|
80
|
+
jumbo guideline add --category "codingStyle" --description "Prefer X over Y"
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
#### Why This Matters
|
|
84
|
+
Context you register now is served to future sessions — yours or another agent's. Unregistered decisions, components, and corrections are lost at session end. The more you capture, the fewer mistakes future sessions make.
|
|
55
85
|
|
|
56
86
|
### Available Commands
|
|
57
87
|
\`jumbo --help \`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JumboMdContent.js","sourceRoot":"","sources":["../../../src/domain/project/JumboMdContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,MAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,eAAe;QACpB,OAAO
|
|
1
|
+
{"version":3,"file":"JumboMdContent.js","sourceRoot":"","sources":["../../../src/domain/project/JumboMdContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,MAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,eAAe;QACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGV,CAAC;IACA,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc;QACnB,OAAO;;EAET,IAAI,CAAC,eAAe,E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AS,CAAC,QAAQ,CAAC,CAAC;QAElD,OAAO,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,GAAG,KAAK,CAAC;IACjD,CAAC;CACF;AAhLD,wCAgLC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostBuilder.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/host/HostBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AASxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"HostBuilder.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/host/HostBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AASxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAwhBnF,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAE1B;gBAGZ,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,uBAAuB,CAAC,EAAE,CAAC,eAAe,EAAE,gBAAgB,KAAK,IAAI;IAOvE;;;;;;;OAOG;IACG,KAAK,IAAI,OAAO,CAAC,qBAAqB,CAAC;CAgnD9C"}
|
|
@@ -492,6 +492,7 @@ const UpdateTelemetryConsentCommandHandler_js_1 = require("../../application/con
|
|
|
492
492
|
const LocalUpdateTelemetryConsentGateway_js_1 = require("../../application/context/telemetry/update/LocalUpdateTelemetryConsentGateway.js");
|
|
493
493
|
const UpdateTelemetryConsentController_js_1 = require("../../application/context/telemetry/update/UpdateTelemetryConsentController.js");
|
|
494
494
|
const LocalStartSessionGateway_js_1 = require("../../application/context/sessions/start/LocalStartSessionGateway.js");
|
|
495
|
+
const ActivityMirrorAssembler_js_1 = require("../../application/context/sessions/start/ActivityMirrorAssembler.js");
|
|
495
496
|
const EndSessionController_js_1 = require("../../application/context/sessions/end/EndSessionController.js");
|
|
496
497
|
const LocalEndSessionGateway_js_1 = require("../../application/context/sessions/end/LocalEndSessionGateway.js");
|
|
497
498
|
const EndSessionCommandHandler_js_1 = require("../../application/context/sessions/end/EndSessionCommandHandler.js");
|
|
@@ -838,9 +839,10 @@ class HostBuilder {
|
|
|
838
839
|
const updateProjectGateway = new LocalUpdateProjectGateway_js_1.LocalUpdateProjectGateway(updateProjectCommandHandler, projectUpdatedProjector);
|
|
839
840
|
const updateProjectController = new UpdateProjectController_js_1.UpdateProjectController(updateProjectGateway);
|
|
840
841
|
// Session Controllers
|
|
841
|
-
const sessionContextQueryHandler = new SessionContextQueryHandler_js_1.SessionContextQueryHandler(sessionViewReader, goalStatusReader, decisionViewReader, relationViewReader, projectContextReader, audienceContextReader, audiencePainContextReader);
|
|
842
|
+
const sessionContextQueryHandler = new SessionContextQueryHandler_js_1.SessionContextQueryHandler(sessionViewReader, goalStatusReader, decisionViewReader, relationViewReader, projectContextReader, audienceContextReader, audiencePainContextReader, valuePropositionContextReader);
|
|
842
843
|
const startSessionCommandHandler = new StartSessionCommandHandler_js_1.StartSessionCommandHandler(sessionStartedEventStore, eventBus);
|
|
843
|
-
const
|
|
844
|
+
const activityMirrorAssembler = new ActivityMirrorAssembler_js_1.ActivityMirrorAssembler(eventStore);
|
|
845
|
+
const startSessionGateway = new LocalStartSessionGateway_js_1.LocalStartSessionGateway(sessionContextQueryHandler, startSessionCommandHandler, brownfieldStatusReader, activityMirrorAssembler);
|
|
844
846
|
const sessionStartController = new SessionStartController_js_1.SessionStartController(startSessionGateway);
|
|
845
847
|
const getTelemetryStatusGateway = new LocalGetTelemetryStatusGateway_js_1.LocalGetTelemetryStatusGateway(settingsReader, telemetryEnvironmentReader, telemetryConsentStatusResolver);
|
|
846
848
|
const getTelemetryStatusController = new GetTelemetryStatusController_js_1.GetTelemetryStatusController(getTelemetryStatusGateway);
|