learnship 2.0.10 → 2.1.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.
Files changed (79) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.cursor-plugin/plugin.json +2 -2
  3. package/README.md +59 -14
  4. package/SKILL.md +24 -2
  5. package/agents/learnship-doc-writer.md +63 -0
  6. package/agents/learnship-security-auditor.md +67 -0
  7. package/bin/install.js +9 -4
  8. package/commands/learnship/discuss-phase.md +1 -1
  9. package/commands/learnship/docs-update.md +22 -0
  10. package/commands/learnship/execute-phase.md +2 -6
  11. package/commands/learnship/extract-learnings.md +22 -0
  12. package/commands/learnship/forensics.md +21 -0
  13. package/commands/learnship/help.md +2 -1
  14. package/commands/learnship/ideate.md +1 -1
  15. package/commands/learnship/milestone-summary.md +22 -0
  16. package/commands/learnship/note.md +22 -0
  17. package/commands/learnship/plan-phase.md +0 -1
  18. package/commands/learnship/quick.md +1 -5
  19. package/commands/learnship/secure-phase.md +23 -0
  20. package/commands/learnship/session-report.md +21 -0
  21. package/commands/learnship/undo.md +22 -0
  22. package/commands/learnship/verify-work.md +1 -1
  23. package/cursor-rules/learnship.mdc +12 -2
  24. package/gemini-extension.json +2 -2
  25. package/hooks/session-start +12 -1
  26. package/learnship/agents/doc-writer.md +63 -0
  27. package/learnship/agents/security-auditor.md +67 -0
  28. package/learnship/references/common-bug-patterns.md +92 -0
  29. package/learnship/references/context-budget.md +49 -0
  30. package/learnship/references/domain-probes.md +133 -0
  31. package/learnship/references/gates.md +72 -0
  32. package/learnship/references/planning-config.md +99 -9
  33. package/learnship/references/thinking-models.md +61 -0
  34. package/learnship/references/universal-anti-patterns.md +51 -0
  35. package/learnship/templates/agents.md +20 -6
  36. package/learnship/templates/context.md +207 -32
  37. package/learnship/templates/discussion-log.md +49 -0
  38. package/learnship/templates/security.md +61 -0
  39. package/learnship/templates/ui-spec.md +107 -0
  40. package/learnship/workflows/complete-milestone.md +4 -5
  41. package/learnship/workflows/compound.md +2 -0
  42. package/learnship/workflows/debug.md +2 -0
  43. package/learnship/workflows/discuss-phase.md +73 -15
  44. package/learnship/workflows/docs-update.md +144 -0
  45. package/learnship/workflows/execute-phase.md +42 -7
  46. package/learnship/workflows/extract-learnings.md +161 -0
  47. package/learnship/workflows/forensics.md +118 -0
  48. package/learnship/workflows/help.md +20 -2
  49. package/learnship/workflows/ideate.md +63 -4
  50. package/learnship/workflows/ls.md +1 -1
  51. package/learnship/workflows/milestone-summary.md +150 -0
  52. package/learnship/workflows/new-project.md +68 -4
  53. package/learnship/workflows/next.md +1 -1
  54. package/learnship/workflows/note.md +110 -0
  55. package/learnship/workflows/pause-work.md +2 -0
  56. package/learnship/workflows/plan-phase.md +17 -2
  57. package/learnship/workflows/quick.md +28 -8
  58. package/learnship/workflows/review.md +1 -0
  59. package/learnship/workflows/secure-phase.md +147 -0
  60. package/learnship/workflows/session-report.md +133 -0
  61. package/learnship/workflows/settings.md +40 -46
  62. package/learnship/workflows/ship.md +2 -0
  63. package/learnship/workflows/undo.md +151 -0
  64. package/learnship/workflows/verify-work.md +36 -4
  65. package/package.json +1 -1
  66. package/references/common-bug-patterns.md +92 -0
  67. package/references/context-budget.md +49 -0
  68. package/references/domain-probes.md +133 -0
  69. package/references/gates.md +72 -0
  70. package/references/planning-config.md +139 -0
  71. package/references/solution-schema.md +159 -0
  72. package/references/thinking-models.md +61 -0
  73. package/references/universal-anti-patterns.md +51 -0
  74. package/templates/agents.md +80 -7
  75. package/templates/config.json +28 -3
  76. package/templates/context.md +207 -32
  77. package/templates/discussion-log.md +49 -0
  78. package/templates/security.md +61 -0
  79. package/templates/ui-spec.md +107 -0
@@ -18,11 +18,10 @@ If missing, create from template:
18
18
  ```bash
19
19
  cp templates/config.json .planning/config.json 2>/dev/null || cat > .planning/config.json << 'EOF'
20
20
  {
21
- "mode": "yolo",
21
+ "mode": "interactive",
22
22
  "granularity": "standard",
23
23
  "model_profile": "balanced",
24
24
  "learning_mode": "auto",
25
- "parallelization": false,
26
25
  "test_first": false,
27
26
  "planning": {
28
27
  "commit_docs": true,
@@ -35,7 +34,30 @@ cp templates/config.json .planning/config.json 2>/dev/null || cat > .planning/co
35
34
  "verifier": true,
36
35
  "validation": true,
37
36
  "review": true,
38
- "solutions_search": true
37
+ "solutions_search": true,
38
+ "security_enforcement": true,
39
+ "discuss_mode": "discuss",
40
+ "tdd_mode": false
41
+ },
42
+ "parallelization": {
43
+ "enabled": false,
44
+ "plan_level": true,
45
+ "task_level": false,
46
+ "max_concurrent_agents": 5,
47
+ "min_plans_for_parallel": 2
48
+ },
49
+ "gates": {
50
+ "confirm_project": true,
51
+ "confirm_phases": true,
52
+ "confirm_roadmap": true,
53
+ "confirm_plan": true,
54
+ "execute_next_plan": true,
55
+ "issues_review": true,
56
+ "confirm_transition": true
57
+ },
58
+ "safety": {
59
+ "always_confirm_destructive": true,
60
+ "always_confirm_external_services": true
39
61
  },
40
62
  "review": {
41
63
  "auto_after_verify": false
@@ -45,6 +67,9 @@ cp templates/config.json .planning/config.json 2>/dev/null || cat > .planning/co
45
67
  "conventional_commits": true,
46
68
  "pr_template": true
47
69
  },
70
+ "hooks": {
71
+ "context_warnings": true
72
+ },
48
73
  "git": {
49
74
  "branching_strategy": "none",
50
75
  "phase_branch_template": "phase-{phase}-{slug}",
@@ -84,12 +109,16 @@ Current configuration:
84
109
  [9] Test validation: [on/off]
85
110
  [10] Review workflow: [on/off]
86
111
  [11] Solutions search: [on/off]
87
- [12] Auto-review after verify: [on/off]
88
- [13] Ship: auto-test: [on/off]
89
- [14] Ship: conventional commits: [on/off]
90
- [15] Ship: PR template: [on/off]
91
- [16] Git branching: [current] (none | phase | milestone)
92
- [17] Commit docs: [on/off]
112
+ [12] Security enforcement: [on/off]
113
+ [13] Auto-review after verify: [on/off]
114
+ [14] Ship: auto-test: [on/off]
115
+ [15] Ship: conventional commits: [on/off]
116
+ [16] Ship: PR template: [on/off]
117
+ [17] Parallelization: [on/off] (max agents: [N])
118
+ [18] Git branching: [current] (none | phase | milestone)
119
+ [19] Commit docs: [on/off]
120
+ [20] Safety: confirm destructive: [on/off]
121
+ [21] Context warnings: [on/off]
93
122
 
94
123
  Enter a number to change a setting, or 'done' to save.
95
124
  ```
@@ -222,45 +251,10 @@ Current: [current]. New value? (on/off)
222
251
 
223
252
  ## Step 5: Save Config
224
253
 
225
- After user types "done", write the updated config:
254
+ After user types "done", read the current config, apply all changes, and write the complete updated JSON. Preserve any fields not shown in the menu (gates, hooks, etc.) — never drop fields the user didn't modify.
226
255
 
227
256
  ```bash
228
- cat > .planning/config.json << EOF
229
- {
230
- "mode": "[value]",
231
- "granularity": "[value]",
232
- "model_profile": "[value]",
233
- "learning_mode": "[value]",
234
- "parallelization": [true/false],
235
- "test_first": [true/false],
236
- "planning": {
237
- "commit_docs": [true/false],
238
- "commit_mode": "[auto/manual]",
239
- "search_gitignored": false
240
- },
241
- "workflow": {
242
- "research": [true/false],
243
- "plan_check": [true/false],
244
- "verifier": [true/false],
245
- "validation": [true/false],
246
- "review": [true/false],
247
- "solutions_search": [true/false]
248
- },
249
- "review": {
250
- "auto_after_verify": [true/false]
251
- },
252
- "ship": {
253
- "auto_test": [true/false],
254
- "conventional_commits": [true/false],
255
- "pr_template": [true/false]
256
- },
257
- "git": {
258
- "branching_strategy": "[value]",
259
- "phase_branch_template": "phase-{phase}-{slug}",
260
- "milestone_branch_template": "{milestone}-{slug}"
261
- }
262
- }
263
- EOF
257
+ node -e "const fs=require('fs');const c=JSON.parse(fs.readFileSync('.planning/config.json','utf8'));/* apply changes to c */;fs.writeFileSync('.planning/config.json',JSON.stringify(c,null,2)+'\n');"
264
258
  ```
265
259
 
266
260
  ## Step 6: Commit
@@ -187,6 +187,8 @@ or patterns while context is fresh.
187
187
  ▶ Next steps:
188
188
  - Review the PR and request reviews
189
189
  - /compound — capture learnings from this work
190
+ - /session-report — generate a session summary for stakeholders
191
+ - /extract-learnings [N] — capture decisions, lessons, patterns from this phase
190
192
  ```
191
193
 
192
194
  ---
@@ -0,0 +1,151 @@
1
+ ---
2
+ description: Safe git revert for phase or plan commits — preserves history, checks dependencies
3
+ ---
4
+
5
+ # Undo
6
+
7
+ Safe git revert workflow. Rolls back phase or plan commits using git revert (NEVER git reset) to preserve history. Includes dependency checks and a confirmation gate.
8
+
9
+ **Usage:**
10
+ - `undo --last N` — show last N commits for interactive selection
11
+ - `undo --phase NN` — revert all commits for phase NN
12
+ - `undo --plan NN-MM` — revert all commits for plan NN-MM
13
+
14
+ ## Step 1: Parse Arguments
15
+
16
+ Parse for the undo mode:
17
+
18
+ - `--last N` — MODE=last, COUNT=N (default 10 if N missing)
19
+ - `--phase NN` — MODE=phase, TARGET_PHASE=NN
20
+ - `--plan NN-MM` — MODE=plan, TARGET_PLAN=NN-MM
21
+
22
+ If no valid argument, display usage and exit.
23
+
24
+ ## Step 2: Gather Commits
25
+
26
+ **MODE=last:**
27
+
28
+ ```bash
29
+ git log --oneline --no-merges -${COUNT}
30
+ ```
31
+
32
+ Filter for conventional commits matching `type(scope): message` pattern. Display numbered list. Ask user to select which commits to revert (numbers or "all").
33
+
34
+ **MODE=phase:**
35
+
36
+ ```bash
37
+ git log --oneline --no-merges --all --grep="(${TARGET_PHASE})" | head -30
38
+ git log --oneline --no-merges --all --grep="phase-${TARGET_PHASE}" | head -30
39
+ ```
40
+
41
+ Collect all commits whose scope references the target phase.
42
+
43
+ **MODE=plan:**
44
+
45
+ ```bash
46
+ git log --oneline --no-merges --all --grep="(${TARGET_PLAN})" | head -20
47
+ ```
48
+
49
+ Collect all commits whose scope references the target plan.
50
+
51
+ If no commits found: "No commits found for [target]. Check the phase/plan number."
52
+
53
+ ## Step 3: Dependency Check
54
+
55
+ For each commit to be reverted, check if later commits depend on the files it modified:
56
+
57
+ ```bash
58
+ for COMMIT in $COMMITS; do
59
+ FILES=$(git diff-tree --no-commit-id --name-only -r $COMMIT)
60
+ for FILE in $FILES; do
61
+ LATER=$(git log --oneline ${COMMIT}..HEAD -- "$FILE" | head -5)
62
+ if [ -n "$LATER" ]; then
63
+ echo "WARNING: $FILE was modified in later commits:"
64
+ echo "$LATER"
65
+ fi
66
+ done
67
+ done
68
+ ```
69
+
70
+ If dependencies found, warn:
71
+ ```
72
+ WARNING: These commits have downstream dependencies.
73
+ Reverting may break later work. Files affected:
74
+
75
+ - [file]: modified in [N] later commits
76
+
77
+ Proceed anyway? [Yes, revert] / [No, cancel]
78
+ ```
79
+
80
+ ## Step 4: Confirmation Gate
81
+
82
+ Display the revert plan:
83
+ ```
84
+ Commits to revert ([N] total):
85
+
86
+ [hash] [message]
87
+ [hash] [message]
88
+
89
+ This will create [N] new revert commits preserving full history.
90
+
91
+ [Confirm revert] / [Cancel]
92
+ ```
93
+
94
+ Wait for explicit confirmation.
95
+
96
+ ## Step 5: Execute Revert
97
+
98
+ For each commit in reverse chronological order:
99
+
100
+ ```bash
101
+ git revert --no-commit [hash]
102
+ ```
103
+
104
+ After all reverts staged:
105
+
106
+ ```bash
107
+ git commit -m "revert([scope]): undo [description]
108
+
109
+ Reverted commits:
110
+ - [hash]: [message]
111
+ - [hash]: [message]"
112
+ ```
113
+
114
+ ## Step 6: Update State
115
+
116
+ If `.planning/STATE.md` exists, add a note about the revert:
117
+
118
+ ```markdown
119
+ ### Revert Log
120
+ - [date]: Reverted [N] commits for [target] — [reason if provided]
121
+ ```
122
+
123
+ ```bash
124
+ git add .planning/STATE.md
125
+ git commit -m "docs(state): record revert"
126
+ ```
127
+
128
+ ## Step 7: Report
129
+
130
+ ```
131
+ learnship > UNDO COMPLETE
132
+
133
+ Reverted [N] commits for [target].
134
+ New revert commit: [hash]
135
+
136
+ All original commits preserved in history.
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Learning Checkpoint
142
+
143
+ Read `learning_mode` from `.planning/config.json`.
144
+
145
+ **If `auto`:**
146
+
147
+ > **Learning moment:** Needing to undo is a signal worth examining:
148
+ >
149
+ > `@agentic-learning either-or` — What led to needing the undo? Was it a plan deficiency, an execution error, or a changed requirement? Log the reasoning so the pattern is visible next time.
150
+
151
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning either-or` to log why the undo was needed."*
@@ -10,6 +10,20 @@ Validate built features through conversational testing. Walk through each delive
10
10
 
11
11
  **Philosophy:** Show expected, ask if reality matches. No pass/fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
12
12
 
13
+ <core_principle>
14
+ **Task completion ≠ Goal achievement**
15
+
16
+ A task "create chat component" can be marked complete when the component is a placeholder. The task was done — but the goal "working chat interface" was not achieved.
17
+
18
+ Goal-backward verification:
19
+ 1. What must be TRUE for the goal to be achieved?
20
+ 2. What must EXIST for those truths to hold?
21
+ 3. What must be WIRED for those artifacts to function?
22
+ 4. What must TESTS PROVE for those truths to be evidenced?
23
+
24
+ Then verify each level against the actual codebase.
25
+ </core_principle>
26
+
13
27
  ## Step 1: Initialize
14
28
 
15
29
  Check for existing UAT sessions:
@@ -41,7 +55,21 @@ No active UAT sessions.
41
55
  Provide a phase number to start testing (e.g., verify-work 4)
42
56
  ```
43
57
 
44
- ## Step 2: Find Deliverables
58
+ ## Step 2: Extract Must-Haves
59
+
60
+ First, extract must-haves from plan frontmatter:
61
+ ```bash
62
+ for plan in .planning/phases/[padded_phase]-[phase_slug]/*-PLAN.md; do
63
+ echo "=== $plan ==="
64
+ head -30 "$plan"
65
+ done
66
+ ```
67
+
68
+ Look for `must_haves` in each plan's frontmatter — these are the primary verification targets. If plans have must_haves, use them as the backbone of the test list.
69
+
70
+ Also check ROADMAP.md for Success Criteria for this phase — these override plan-level must_haves when both exist.
71
+
72
+ ## Step 2b: Find Deliverables
45
73
 
46
74
  Read all SUMMARY.md files for the phase:
47
75
  ```bash
@@ -55,6 +83,8 @@ Extract testable deliverables from each SUMMARY.md — focus on **user-observabl
55
83
 
56
84
  Skip internal changes (refactors, type changes, test additions).
57
85
 
86
+ **Stub detection:** Before presenting tests, do a quick scan for placeholder code using patterns from `@./references/verification-patterns.md` (if it exists). Flag any files that look like stubs — these should be tested more carefully.
87
+
58
88
  **Cold-start smoke test:** If any SUMMARY.md mentions server entry points, database files, migrations, or docker files — prepend a "Cold Start Smoke Test" as the first test:
59
89
  ```
60
90
  Expected: Kill any running server. Clear ephemeral state. Start from scratch.
@@ -198,9 +228,11 @@ Immediately run the `review` workflow for this phase's changes.
198
228
  All tests passed. ✓
199
229
 
200
230
  ▶ Recommended next steps:
201
- `/review` — multi-persona code review (6 lenses: correctness, testing, security, performance, maintainability, adversarial)
202
- `/ship` test lint commit → push → PR
203
- `/compound` capture notable solutions or patterns while context is fresh
231
+ `/review` — multi-persona code review (6 lenses)
232
+ `/secure-phase [X]` STRIDE security verification for this phase
233
+ `/ship` test lint commit push PR
234
+ `/compound` — capture notable solutions or patterns while context is fresh
235
+ `/extract-learnings [X]` — capture decisions, lessons, patterns, surprises
204
236
 
205
237
  ▶ Or continue: discuss-phase [X+1]
206
238
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learnship",
3
- "version": "2.0.10",
3
+ "version": "2.1.0",
4
4
  "description": "Learn as you build. Build with intent. — A multi-platform agentic engineering system for Windsurf, Claude Code, Cursor, OpenCode, Gemini CLI, and Codex: spec-driven workflows, integrated learning, and production-grade design.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -0,0 +1,92 @@
1
+ <common_bug_patterns>
2
+
3
+ Patterns for detecting common bugs in AI-generated code. Used by the verifier agent and verify-work workflow to catch issues that pass basic existence checks but fail in practice.
4
+
5
+ ---
6
+
7
+ ## Stub Detection
8
+
9
+ These patterns indicate placeholder code regardless of file type:
10
+
11
+ ### Comment-based stubs
12
+ ```bash
13
+ grep -E "(TODO|FIXME|XXX|HACK|PLACEHOLDER)" "$file"
14
+ grep -E "implement|add later|coming soon|will be" "$file" -i
15
+ grep -E "// \.\.\.|/\* \.\.\. \*/|# \.\.\." "$file"
16
+ ```
17
+
18
+ ### Placeholder text in output
19
+ ```bash
20
+ grep -E "placeholder|lorem ipsum|coming soon|under construction" "$file" -i
21
+ grep -E "sample|example|test data|dummy" "$file" -i
22
+ ```
23
+
24
+ ### Empty or trivial implementations
25
+ ```bash
26
+ grep -E "return null|return undefined|return \{\}|return \[\]" "$file"
27
+ grep -E "pass$|\.\.\.|\bnothing\b" "$file"
28
+ grep -E "console\.(log|warn|error).*only" "$file"
29
+ ```
30
+
31
+ ### Hardcoded values where dynamic expected
32
+ ```bash
33
+ grep -E "id.*=.*['\"].*['\"]" "$file"
34
+ grep -E "count.*=.*\d+|length.*=.*\d+" "$file"
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Wiring Gaps
40
+
41
+ Code exists but isn't connected to the rest of the system:
42
+
43
+ ### Unregistered routes
44
+ - Route handler file exists but not imported in the router/app entry
45
+ - API endpoint defined but not added to the route table
46
+
47
+ ### Unused exports
48
+ - Component exported but never imported anywhere
49
+ - Utility function exported but no consumers
50
+
51
+ ### Missing environment variables
52
+ - Code references `process.env.X` but `.env.example` doesn't list it
53
+ - Config reads a key that's not in the defaults
54
+
55
+ ### Broken imports
56
+ - Import path doesn't match actual file location (case sensitivity on Linux)
57
+ - Circular dependency that works in dev but fails in production build
58
+
59
+ ---
60
+
61
+ ## State Drift
62
+
63
+ State management issues that cause subtle bugs:
64
+
65
+ ### Stale state references
66
+ - React component reads state that was updated in a different render cycle
67
+ - Cache not invalidated after mutation
68
+
69
+ ### Race conditions
70
+ - Multiple async operations writing to the same resource
71
+ - Optimistic UI update without rollback on failure
72
+
73
+ ### Schema mismatch
74
+ - Database migration changes column type but API response type not updated
75
+ - Frontend expects field that backend stopped sending
76
+
77
+ ---
78
+
79
+ ## Verification Levels
80
+
81
+ For each artifact, verify at the appropriate level:
82
+
83
+ | Level | Check | Method |
84
+ |-------|-------|--------|
85
+ | 1. Exists | File is present at expected path | `ls [file]` |
86
+ | 2. Substantive | Content is real implementation, not placeholder | Stub detection patterns above |
87
+ | 3. Wired | Connected to the rest of the system | Import/route check |
88
+ | 4. Functional | Actually works when invoked | Run command or manual test |
89
+
90
+ Levels 1-3 can be checked programmatically. Level 4 often requires human verification (verify-work UAT).
91
+
92
+ </common_bug_patterns>
@@ -0,0 +1,49 @@
1
+ <context_budget>
2
+
3
+ Standard rules for keeping orchestrator context lean. Reference this in workflows that spawn subagents or read significant content.
4
+
5
+ ---
6
+
7
+ ## Universal Rules
8
+
9
+ Every workflow that spawns agents or reads significant content must follow these rules:
10
+
11
+ 1. **Never** read agent definition files (`agents/*.md`) — `subagent_type` auto-loads them
12
+ 2. **Never** inline large files into subagent prompts — tell agents to read files from disk instead
13
+ 3. **Read depth scales with context window** — check `context_window` in `.planning/config.json`:
14
+ - At < 500000 tokens (default 200k): read only frontmatter, status fields, or summaries
15
+ - At >= 500000 tokens (1M model): MAY read full subagent output bodies when needed for inline decisions
16
+ 4. **Delegate** heavy work to subagents — the orchestrator routes, it doesn't execute
17
+ 5. **Proactive warning**: If you've already consumed significant context (large file reads, multiple subagent results), warn the user: "Context budget is getting heavy. Consider checkpointing progress."
18
+
19
+ ## Read Depth by Context Window
20
+
21
+ | Context Window | Subagent Output Reading | SUMMARY.md | VERIFICATION.md | PLAN.md (other phases) |
22
+ |---------------|------------------------|------------|-----------------|------------------------|
23
+ | < 500k (200k model) | Frontmatter only | Frontmatter only | Frontmatter only | Current phase only |
24
+ | >= 500k (1M model) | Full body permitted | Full body permitted | Full body permitted | Current phase only |
25
+
26
+ **How to check:** Read `.planning/config.json` and inspect `context_window`. If the field is absent, treat as 200000 (conservative default).
27
+
28
+ ## Context Degradation Tiers
29
+
30
+ Monitor context usage and adjust behavior accordingly:
31
+
32
+ | Tier | Usage | Behavior |
33
+ |------|-------|----------|
34
+ | PEAK | 0-30% | Full operations. Read bodies, spawn multiple agents, inline results. |
35
+ | GOOD | 30-50% | Normal operations. Prefer frontmatter reads, delegate aggressively. |
36
+ | DEGRADING | 50-70% | Economize. Frontmatter-only reads, minimal inlining, warn user about budget. |
37
+ | POOR | 70%+ | Emergency mode. Checkpoint progress immediately. No new reads unless critical. |
38
+
39
+ ## Context Degradation Warning Signs
40
+
41
+ Quality degrades gradually before panic thresholds fire. Watch for these early signals:
42
+
43
+ - **Silent partial completion** — agent claims task is done but implementation is incomplete. Always verify agent output meets the plan's must_haves, not just that files exist.
44
+ - **Increasing vagueness** — agent starts using phrases like "appropriate handling" or "standard patterns" instead of specific code. This indicates context pressure.
45
+ - **Skipped steps** — agent omits protocol steps it would normally follow. If an agent's success criteria has 8 items but it only reports 5, suspect context pressure.
46
+
47
+ When delegating to agents, the orchestrator cannot verify semantic correctness of agent output — only structural completeness. Mitigate with must_haves and spot-check verification.
48
+
49
+ </context_budget>
@@ -0,0 +1,133 @@
1
+ <domain_probes>
2
+
3
+ Domain-aware probing patterns for `/new-project` deep questioning and `/discuss-phase` gray area identification.
4
+
5
+ When the user mentions a technology area, use these probes to ask insightful follow-up questions. Don't run through them as a checklist — pick the 2-3 most relevant based on context. The goal is to surface hidden assumptions and trade-offs the user may not have considered yet.
6
+
7
+ ---
8
+
9
+ ## Authentication
10
+
11
+ | User mentions | Probe with domain knowledge |
12
+ |---|---|
13
+ | "login" or "auth" | OAuth (which providers?), JWT, or session-based? Social login or just email/password? |
14
+ | "users" or "accounts" | MFA required? Password reset flow? Email verification? |
15
+ | "sessions" | Session duration and refresh strategy? Server-side sessions or stateless tokens? |
16
+ | "roles" or "permissions" | RBAC, ABAC, or simple role checks? How many distinct roles? |
17
+ | "API keys" | Key rotation strategy? Scoped permissions per key? Rate limiting per key? |
18
+
19
+ ---
20
+
21
+ ## Real-Time Updates
22
+
23
+ | User mentions | Probe with domain knowledge |
24
+ |---|---|
25
+ | "real-time" or "live updates" | WebSockets, SSE, or polling? What specifically needs to be real-time vs. eventual? |
26
+ | "notifications" | Push notifications (browser/mobile), in-app only, or both? Persistence and read receipts? |
27
+ | "collaboration" or "multiplayer" | Conflict resolution strategy? Operational transforms or CRDTs? Expected concurrent users? |
28
+ | "chat" or "messaging" | Message history and search? Typing indicators? Read receipts? |
29
+ | "streaming" | Reconnection strategy? What happens when the connection drops — queue or discard? |
30
+
31
+ ---
32
+
33
+ ## Dashboard
34
+
35
+ | User mentions | Probe with domain knowledge |
36
+ |---|---|
37
+ | "dashboard" | What data sources feed it? How many distinct views? |
38
+ | "charts" or "graphs" | Interactive or static? Drill-down capability? Export to CSV/PDF? |
39
+ | "metrics" or "KPIs" | Refresh strategy — real-time, periodic polling, or on-demand? Acceptable staleness? |
40
+ | "admin panel" | Role-based visibility? Which actions beyond viewing (edit, delete, approve)? |
41
+ | "mobile" or "responsive" | Simplified mobile view or full parity? Touch interactions for charts? |
42
+
43
+ ---
44
+
45
+ ## API Design
46
+
47
+ | User mentions | Probe with domain knowledge |
48
+ |---|---|
49
+ | "API" | REST, GraphQL, or RPC-style? Internal only or public-facing? |
50
+ | "endpoints" or "routes" | Versioning strategy (URL path, header, query param)? Breaking change policy? |
51
+ | "pagination" | Cursor-based or offset? Expected result set sizes? Stable ordering guarantee? |
52
+ | "rate limiting" | Per-user, per-IP, or per-API-key? Burst allowance? How to communicate limits to clients? |
53
+ | "errors" | Structured error format? Error codes vs. messages? How much detail in production errors? |
54
+
55
+ ---
56
+
57
+ ## Database
58
+
59
+ | User mentions | Probe with domain knowledge |
60
+ |---|---|
61
+ | "database" or "storage" | SQL or NoSQL? What drives the choice — relational integrity, flexibility, scale? |
62
+ | "ORM" or "queries" | ORM (which one?) or raw queries? Query builder as middle ground? |
63
+ | "migrations" | Migration tool? Rollback strategy? How to handle data migrations vs. schema migrations? |
64
+ | "seeding" or "test data" | Seed data for development? Realistic fake data or minimal fixtures? |
65
+ | "scale" or "performance" | Read/write ratio? Read replicas? Connection pooling strategy? |
66
+
67
+ ---
68
+
69
+ ## Search
70
+
71
+ | User mentions | Probe with domain knowledge |
72
+ |---|---|
73
+ | "search" | Full-text or exact match? Dedicated search engine (Elasticsearch, Meilisearch) or database-level? |
74
+ | "filtering" or "facets" | Faceted filtering? How many filter dimensions? Combined filters (AND/OR)? |
75
+ | "autocomplete" or "typeahead" | Debounce strategy? Minimum character threshold? Result ranking? |
76
+ | "indexing" | Index size and update frequency? Real-time indexing or batch? Acceptable index lag? |
77
+
78
+ ---
79
+
80
+ ## File Upload/Storage
81
+
82
+ | User mentions | Probe with domain knowledge |
83
+ |---|---|
84
+ | "upload" or "file upload" | Local filesystem or cloud (S3, GCS, Azure Blob)? Direct upload or through server? |
85
+ | "images" or "media" | Processing pipeline — resize, compress, thumbnail generation? Format conversion? |
86
+ | "size limits" | Max file size? Max total storage per user? What happens when limits are hit? |
87
+ | "documents" or "attachments" | Virus scanning? Preview generation? Versioning of uploaded files? |
88
+
89
+ ---
90
+
91
+ ## Caching
92
+
93
+ | User mentions | Probe with domain knowledge |
94
+ |---|---|
95
+ | "caching" or "performance" | Where to cache — browser, CDN, application layer, database query cache? |
96
+ | "invalidation" | Invalidation strategy — TTL, event-driven, or manual? Cache-aside vs. write-through? |
97
+ | "stale data" | Acceptable staleness window? Stale-while-revalidate pattern? |
98
+
99
+ ---
100
+
101
+ ## Testing
102
+
103
+ | User mentions | Probe with domain knowledge |
104
+ |---|---|
105
+ | "testing" or "tests" | Unit, integration, and E2E balance? Where to invest most testing effort? |
106
+ | "CI" or "pipeline" | Tests in CI? Parallel test execution? Test-on-PR or test-on-push? |
107
+ | "E2E" or "browser testing" | Playwright, Cypress, or other? Headed vs. headless? Visual regression testing? |
108
+
109
+ ---
110
+
111
+ ## Deployment
112
+
113
+ | User mentions | Probe with domain knowledge |
114
+ |---|---|
115
+ | "deploy" or "hosting" | Container, serverless, or traditional VM/VPS? Managed platform (Vercel, Railway) or self-hosted? |
116
+ | "CI/CD" or "pipeline" | GitHub Actions, GitLab CI, or other? Deploy on merge to main or manual trigger? |
117
+ | "environments" | How many environments (dev, staging, prod)? Environment parity strategy? |
118
+ | "rollback" | Rollback strategy? Blue-green, canary, or instant rollback? |
119
+ | "secrets" or "config" | Secret management — env vars, vault, or platform-native? Per-environment config strategy? |
120
+
121
+ ---
122
+
123
+ ## AI/ML Integration
124
+
125
+ | User mentions | Probe with domain knowledge |
126
+ |---|---|
127
+ | "AI" or "LLM" or "model" | Which provider/model? Streaming responses or batch? Fallback strategy? |
128
+ | "embeddings" or "RAG" | Vector store choice? Chunking strategy? Retrieval pipeline? |
129
+ | "fine-tuning" or "training" | Training data pipeline? Evaluation metrics? A/B testing new models? |
130
+ | "prompts" | Prompt versioning? Temperature/parameter management? Cost tracking? |
131
+ | "agents" or "tools" | Tool calling strategy? Human-in-the-loop? Safety guardrails? |
132
+
133
+ </domain_probes>