Skip to content

Commit bd51476

Browse files
GeneAIGeneAI
authored andcommitted
debug: Add visual debugging markers - discovered script completely blocked
Added 6 colored debug banners to track JS execution. Result: ZERO banners visible, confirming JavaScript is completely blocked from executing. Root cause: CSP or nonce issue preventing script execution. Next steps: - Verify nonce generation and CSP header match - Check browser console for CSP violations - Compare working vs broken webview CSP policies
1 parent 5e302d0 commit bd51476

File tree

71 files changed

+17409
-377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+17409
-377
lines changed
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Empathy Framework: Intelligent Feedback System v2
4+
XML-Enhanced Prompt for Implementation
5+
6+
Developed via Socratic refinement:
7+
- Trigger: Hybrid (predefined + LLM context-aware)
8+
- Webview feedback: None needed (content IS feedback)
9+
- LLM forms: Context-dependent (plan, customize, learn)
10+
- Chain config: All sources merged (config + settings + learned)
11+
- UI: Webview panels + inline ghost text (both modes)
12+
- Timing: After command + on cursor idle (both modes)
13+
-->
14+
15+
<feature name="intelligent-feedback-system" version="2.0">
16+
17+
<goal>
18+
Create a dual-mode feedback system where:
19+
- Power users get minimal interruption with inline hints
20+
- New users get rich webview guidance with training dialogs
21+
- Both modes share contextual "next command" suggestions
22+
</goal>
23+
24+
<modes>
25+
<mode name="power" target="experienced-users">
26+
<feedback-philosophy>
27+
Content IS feedback. When a command opens a webview, file, or panel,
28+
no additional indicator is needed - the result speaks for itself.
29+
</feedback-philosophy>
30+
31+
<inline-feedback>
32+
<trigger>after-command-completion</trigger>
33+
<duration>1.5 seconds</duration>
34+
<style>ghost-text near cursor or status-bar fallback</style>
35+
<content>Brief confirmation (e.g., "✓ DVORAK")</content>
36+
</inline-feedback>
37+
38+
<next-command-hints>
39+
<trigger>after-command-completion</trigger>
40+
<trigger>cursor-idle-2-seconds</trigger>
41+
<duration>3-5 seconds</duration>
42+
<style>ghost-text in editor gutter or inline</style>
43+
<content>Next: Ctrl+Shift+E S → Ship</content>
44+
</next-command-hints>
45+
</mode>
46+
47+
<mode name="guided" target="new-users">
48+
<feedback-philosophy>
49+
Training dialogs that educate while executing. Each action is
50+
an opportunity to teach the framework and suggest next steps.
51+
</feedback-philosophy>
52+
53+
<webview-panels>
54+
<purpose>Rich information display after workflows</purpose>
55+
<content>
56+
<section name="summary">What just happened</section>
57+
<section name="results">Detailed output/report</section>
58+
<section name="next-steps">Recommended follow-up commands with buttons</section>
59+
<section name="keyboard-hint">The keyboard shortcut for muscle memory</section>
60+
</content>
61+
</webview-panels>
62+
63+
<next-command-hints>
64+
<!-- Same as power mode - shared experience -->
65+
<trigger>after-command-completion</trigger>
66+
<trigger>cursor-idle-2-seconds</trigger>
67+
<duration>3-5 seconds</duration>
68+
<style>ghost-text in editor gutter or inline</style>
69+
<content>Next: Ctrl+Shift+E S → Ship</content>
70+
</next-command-hints>
71+
</mode>
72+
</modes>
73+
74+
<recommendation-engine>
75+
<name>WorkflowChainAdvisor</name>
76+
<description>
77+
Hybrid system that suggests next commands based on:
78+
1. Predefined workflow chains (config)
79+
2. User's learned patterns (history)
80+
3. LLM context analysis (current code state)
81+
</description>
82+
83+
<sources priority="merge-all">
84+
<source name="empathy.config.yml" priority="1">
85+
Project-level predefined chains, version controlled
86+
</source>
87+
<source name="vscode-settings" priority="2">
88+
User preferences, syncs across machines
89+
</source>
90+
<source name="learned-patterns" priority="3">
91+
Auto-generated from command history over time
92+
</source>
93+
<source name="llm-context" priority="4">
94+
Real-time analysis of current code state
95+
</source>
96+
</sources>
97+
98+
<default-chains>
99+
<chain name="morning-routine">
100+
<step order="1">morning</step>
101+
<step order="2">ship</step>
102+
<step order="3">fix</step>
103+
</chain>
104+
<chain name="code-review">
105+
<step order="1">review-file</step>
106+
<step order="2">fix-lint</step>
107+
<step order="3">run-tests</step>
108+
</chain>
109+
<chain name="pre-commit">
110+
<step order="1">ship</step>
111+
<step order="2">fix-all</step>
112+
<step order="3">dashboard</step>
113+
</chain>
114+
</default-chains>
115+
</recommendation-engine>
116+
117+
<llm-forms>
118+
<description>
119+
Context-dependent LLM-powered forms that use a Socratic approach
120+
to refine user intent before execution.
121+
</description>
122+
123+
<form-types>
124+
<form name="plan-refinement">
125+
<trigger>Complex implementation tasks</trigger>
126+
<approach>socratic</approach>
127+
<output>XML-enhanced implementation plan</output>
128+
<questions>
129+
What are you trying to build?
130+
What constraints should we consider?
131+
Which approach do you prefer? [options]
132+
</questions>
133+
</form>
134+
135+
<form name="workflow-customization">
136+
<trigger>User wants to modify command chains</trigger>
137+
<approach>guided-selection</approach>
138+
<output>Updated empathy.config.yml</output>
139+
<questions>
140+
Which workflow do you want to customize?
141+
What commands should follow [X]?
142+
Should this be project-specific or global?
143+
</questions>
144+
</form>
145+
146+
<form name="learning-mode">
147+
<trigger>New user or explicit /learn command</trigger>
148+
<approach>tutorial</approach>
149+
<output>Progressive skill building</output>
150+
<questions>
151+
Have you used [feature] before?
152+
Would you like to see a demo?
153+
Ready to try it yourself?
154+
</questions>
155+
</form>
156+
</form-types>
157+
</llm-forms>
158+
159+
<implementation-components>
160+
<component name="FeedbackService" status="implemented">
161+
<file>src/services/FeedbackService.ts</file>
162+
<responsibility>Mode-aware feedback dispatch</responsibility>
163+
</component>
164+
165+
<component name="NextCommandHintService" status="to-implement">
166+
<file>src/services/NextCommandHintService.ts</file>
167+
<responsibility>
168+
- Track command history
169+
- Query recommendation engine
170+
- Display ghost text hints
171+
- Handle cursor idle detection
172+
</responsibility>
173+
</component>
174+
175+
<component name="WorkflowChainAdvisor" status="to-implement">
176+
<file>src/services/WorkflowChainAdvisor.ts</file>
177+
<responsibility>
178+
- Merge config sources
179+
- Learn from user patterns
180+
- Query LLM for context-aware suggestions
181+
</responsibility>
182+
</component>
183+
184+
<component name="GuidedPanelProvider" status="to-implement">
185+
<file>src/panels/GuidedPanelProvider.ts</file>
186+
<responsibility>
187+
- Rich webview for guided mode
188+
- Action summary
189+
- Next step buttons
190+
- Keyboard shortcut hints
191+
</responsibility>
192+
</component>
193+
194+
<component name="SocraticFormService" status="to-implement">
195+
<file>src/services/SocraticFormService.ts</file>
196+
<responsibility>
197+
- LLM-powered question generation
198+
- Progressive form refinement
199+
- XML-enhanced plan output
200+
</responsibility>
201+
</component>
202+
</implementation-components>
203+
204+
<success-criteria>
205+
<criterion>Power mode: Commands with output (webview/file) need no extra feedback</criterion>
206+
<criterion>Power mode: Simple commands show inline badge for 1.5s</criterion>
207+
<criterion>Both modes: Ghost text hints appear after commands and on idle</criterion>
208+
<criterion>Guided mode: Webview panels with summary + next steps + shortcuts</criterion>
209+
<criterion>Recommendations: Hybrid engine merges config + history + LLM</criterion>
210+
<criterion>LLM forms: Socratic approach for plan/customize/learn contexts</criterion>
211+
</success-criteria>
212+
213+
</feature>

0 commit comments

Comments
 (0)