@iaforged/context-code 1.1.4 → 1.1.7

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 (34) hide show
  1. package/README.md +32 -8
  2. package/dist/src/commands/init.js +91 -219
  3. package/dist/src/commands/voice/index.js +6 -7
  4. package/dist/src/commands/voice/voice.js +87 -43
  5. package/dist/src/commands.js +1 -3
  6. package/dist/src/components/LogoV2/VoiceModeNotice.js +1 -1
  7. package/dist/src/components/PromptInput/VoiceIndicator.js +4 -4
  8. package/dist/src/components/Spinner.js +18 -18
  9. package/dist/src/constants/spinnerVerbs.js +9 -9
  10. package/dist/src/hooks/usePasteHandler.js +8 -8
  11. package/dist/src/hooks/useVoice.js +93 -805
  12. package/dist/src/hooks/useVoiceEnabled.js +3 -15
  13. package/dist/src/hooks/useVoiceIntegration.js +6 -25
  14. package/dist/src/keybindings/defaultBindings.js +9 -6
  15. package/dist/src/screens/REPL.js +10 -22
  16. package/dist/src/services/localDictation.js +520 -0
  17. package/dist/src/services/voice.js +9 -7
  18. package/dist/src/state/AppState.js +1 -3
  19. package/dist/src/tools/ConfigTool/ConfigTool.js +12 -15
  20. package/dist/src/tools/ConfigTool/supportedSettings.js +2 -2
  21. package/dist/src/utils/imagePaste.js +11 -5
  22. package/dist/src/utils/model/model.js +2 -0
  23. package/dist/src/utils/settings/types.js +2 -2
  24. package/dist/src/voice/voiceModeEnabled.js +5 -25
  25. package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  26. package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  27. package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  28. package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  29. package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  30. package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  31. package/dist/vendor/audio-capture-src/index.js +114 -0
  32. package/dist/vendor/audio-capture-src/index.ts +155 -0
  33. package/docs/comandos.md +132 -121
  34. package/package.json +1 -1
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Context Code
2
2
 
3
- Context Code es una herramienta de programación agéntica que se ejecuta en tu terminal, entiende tu base de código y te ayuda a avanzar más rápido con comandos en lenguaje natural.
3
+ Context Code es una herramienta de programacion agentica que se ejecuta en tu terminal, entiende tu base de codigo y te ayuda a avanzar mas rapido con comandos en lenguaje natural.
4
4
 
5
5
  Puede:
6
6
  - Leer y entender tu proyecto
7
7
  - Editar archivos y aplicar cambios
8
8
  - Ejecutar comandos de terminal
9
- - Ayudarte con depuración, refactors y flujos de trabajo
9
+ - Ayudarte con depuracion, refactors y flujos de trabajo
10
10
 
11
11
  ## Primeros pasos
12
12
 
@@ -22,18 +22,42 @@ Luego abre tu proyecto y ejecuta:
22
22
  context
23
23
  ```
24
24
 
25
- ## 📚 Documentación
25
+ ## Dictado local
26
26
 
27
- Hemos organizado toda la documentación técnica, guías operativas y arquitectura en la carpeta `docs/`.
27
+ El CLI incluye dictado local con `whisper.cpp`, independiente del proveedor con el que estes logeado.
28
28
 
29
- **👉 [Ver el Índice de Documentación](docs/index.md)**
29
+ Flujo recomendado:
30
+
31
+ ```text
32
+ /dictar install
33
+ /dictar
34
+ ```
35
+
36
+ Comandos disponibles:
37
+
38
+ - `/dictar install` descarga e instala automaticamente el backend local y el modelo `base`.
39
+ - `/dictar status` muestra el backend y el modelo configurados.
40
+ - `/dictar` activa o desactiva el dictado local.
41
+ - `/voice` se mantiene como alias de compatibilidad, pero el nombre recomendado es `/dictar`.
42
+
43
+ Comportamiento por defecto:
44
+
45
+ - el modelo por defecto es `base`, que es multidioma;
46
+ - el idioma por defecto del dictado es espanol (`es`);
47
+ - si quieres otro idioma o autodeteccion, puedes ajustarlo en la configuracion.
48
+
49
+ ## Documentacion
50
+
51
+ Hemos organizado toda la documentacion tecnica, guias operativas y arquitectura en la carpeta `docs/`.
52
+
53
+ **[Ver el indice de documentacion](docs/index.md)**
30
54
 
31
55
  ## Reporte de errores
32
56
 
33
57
  Usa el comando `/bug` dentro de Context Code.
34
58
 
35
- ## Recolección, uso y retención de datos
59
+ ## Recoleccion, uso y retencion de datos
36
60
 
37
- Cuando usas Context Code, pueden recopilarse datos de uso y retroalimentación como se describe en la documentación.
61
+ Cuando usas Context Code, pueden recopilarse datos de uso y retroalimentacion como se describe en la documentacion.
38
62
 
39
- - [Políticas de uso de datos](https://code.iaforged.com/docs/en/data-usage)
63
+ - [Politicas de uso de datos](https://code.iaforged.com/docs/en/data-usage)
@@ -1,224 +1,96 @@
1
1
  import { feature } from '../recovery/bunBundleShim.js';
2
2
  import { maybeMarkProjectOnboardingComplete } from '../projectOnboardingState.js';
3
3
  import { isEnvTruthy } from '../utils/envUtils.js';
4
- const OLD_INIT_PROMPT = `Please analyze this codebase and create a .context/CONTEXT.md file, which will be given to future instances of Context Code to operate in this repository.
5
-
6
- What to add:
7
- 1. Commands that will be commonly used, such as how to build, lint, and run tests. Include the necessary commands to develop in this codebase, such as how to run a single test.
8
- 2. High-level code architecture and structure so that future instances can be productive more quickly. Focus on the "big picture" architecture that requires reading multiple files to understand.
9
-
10
- Usage notes:
11
- - If there's already a .context/CONTEXT.md, suggest improvements to it.
12
- - When you make the initial .context/CONTEXT.md, do not repeat yourself and do not include obvious instructions like "Provide helpful error messages to users", "Write unit tests for all new utilities", "Never include sensitive information (API keys, tokens) in code or commits".
13
- - Avoid listing every component or file structure that can be easily discovered.
14
- - Don't include generic development practices.
15
- - If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include the important parts.
16
- - If there is a README.md, make sure to include the important parts.
17
- - Do not make up information such as "Common Development Tasks", "Tips for Development", "Support and Documentation" unless this is expressly included in other files that you read.
18
- - Be sure to prefix the file with the following text:
19
-
20
- \`\`\`
21
- # CONTEXT.md
22
-
23
- This file provides guidance to Context Code when working with code in this repository.
24
- \`\`\``;
25
- const NEW_INIT_PROMPT = `Set up a minimal CLAUDE.md (and optionally skills and hooks) for this repo. CLAUDE.md is loaded into every Context Code session, so it must be concise — only include what Context would get wrong without it.
26
-
27
- ## Phase 1: Ask what to set up
28
-
29
- Use AskUserQuestion to find out what the user wants:
30
-
31
- - "Which CLAUDE.md files should /iniciar set up?"
32
- Options: "Project CLAUDE.md" | "Personal CLAUDE.local.md" | "Both project + personal"
33
- Description for project: "Team-shared instructions checked into source control — architecture, coding standards, common workflows."
34
- Description for personal: "Your private preferences for this project (gitignored, not shared) — your role, sandbox URLs, preferred test data, workflow quirks."
35
-
36
- - "Also set up skills and hooks?"
37
- Options: "Skills + hooks" | "Skills only" | "Hooks only" | "Neither, just CLAUDE.md"
38
- Description for skills: "On-demand capabilities you or Claude invoke with \`/skill-name\` — good for repeatable workflows and reference knowledge."
39
- Description for hooks: "Deterministic shell commands that run on tool events (e.g., format after every edit). Claude can't skip them."
40
-
41
- ## Phase 2: Explore the codebase
42
-
43
- Launch a subagent to survey the codebase, and ask it to read key files to understand the project: manifest files (package.json, Cargo.toml, pyproject.toml, go.mod, pom.xml, etc.), README, Makefile/build configs, CI config, existing CLAUDE.md, .context/rules/, AGENTS.md, .cursor/rules or .cursorrules, .github/copilot-instructions.md, .windsurfrules, .clinerules, .mcp.json.
44
-
45
- Detect:
46
- - Build, test, and lint commands (especially non-standard ones)
47
- - Languages, frameworks, and package manager
48
- - Project structure (monorepo with workspaces, multi-module, or single project)
49
- - Code style rules that differ from language defaults
50
- - Non-obvious gotchas, required env vars, or workflow quirks
51
- - Existing .context/skills/ and .context/rules/ directories
52
- - Formatter configuration (prettier, biome, ruff, black, gofmt, rustfmt, or a unified format script like \`npm run format\` / \`make fmt\`)
53
- - Git worktree usage: run \`git worktree list\` to check if this repo has multiple worktrees (only relevant if the user wants a personal CLAUDE.local.md)
54
-
55
- Note what you could NOT figure out from code alone these become interview questions.
56
-
57
- ## Phase 3: Fill in the gaps
58
-
59
- Use AskUserQuestion to gather what you still need to write good CLAUDE.md files and skills. Ask only things the code can't answer.
60
-
61
- If the user chose project CLAUDE.md or both: ask about codebase practices — non-obvious commands, gotchas, branch/PR conventions, required env setup, testing quirks. Skip things already in README or obvious from manifest files. Do not mark any options as "recommended" — this is about how their team works, not best practices.
62
-
63
- If the user chose personal CLAUDE.local.md or both: ask about them, not the codebase. Do not mark any options as "recommended" — this is about their personal preferences, not best practices. Examples of questions:
64
- - What's their role on the team? (e.g., "backend engineer", "data scientist", "new hire onboarding")
65
- - How familiar are they with this codebase and its languages/frameworks? (so Claude can calibrate explanation depth)
66
- - Do they have personal sandbox URLs, test accounts, API key paths, or local setup details Claude should know?
67
- - Only if Phase 2 found multiple git worktrees: ask whether their worktrees are nested inside the main repo (e.g., \`.context/worktrees/<name>/\`) or siblings/external (e.g., \`../myrepo-feature/\`). If nested, the upward file walk finds the main repo's CLAUDE.local.md automatically — no special handling needed. If sibling/external, the personal content should live in a home-directory file (e.g., \`~/.context/<project-name>-instructions.md\`) and each worktree gets a one-line CLAUDE.local.md stub that imports it: \`@~/.context/<project-name>-instructions.md\`. Never put this import in the project CLAUDE.md — that would check a personal reference into the team-shared file.
68
- - Any communication preferences? (e.g., "be terse", "always explain tradeoffs", "don't summarize at the end")
69
-
70
- **Synthesize a proposal from Phase 2 findings** — e.g., format-on-edit if a formatter exists, a \`/verify\` skill if tests exist, a CLAUDE.md note for anything from the gap-fill answers that's a guideline rather than a workflow. For each, pick the artifact type that fits, **constrained by the Phase 1 skills+hooks choice**:
71
-
72
- - **Hook** (stricter) — deterministic shell command on a tool event; Claude can't skip it. Fits mechanical, fast, per-edit steps: formatting, linting, running a quick test on the changed file.
73
- - **Skill** (on-demand) you or Claude invoke \`/skill-name\` when you want it. Fits workflows that don't belong on every edit: deep verification, session reports, deploys.
74
- - **CLAUDE.md note** (looser) — influences Claude's behavior but not enforced. Fits communication/thinking preferences: "plan before coding", "be terse", "explain tradeoffs".
75
-
76
- **Respect Phase 1's skills+hooks choice as a hard filter**: if the user picked "Skills only", downgrade any hook you'd suggest to a skill or a CLAUDE.md note. If "Hooks only", downgrade skills to hooks (where mechanically possible) or notes. If "Neither", everything becomes a CLAUDE.md note. Never propose an artifact type the user didn't opt into.
77
-
78
- **Show the proposal via AskUserQuestion's \`preview\` field, not as a separate text message** — the dialog overlays your output, so preceding text is hidden. The \`preview\` field renders markdown in a side-panel (like plan mode); the \`question\` field is plain-text-only. Structure it as:
79
-
80
- - \`question\`: short and plain, e.g. "Does this proposal look right?"
81
- - Each option gets a \`preview\` with the full proposal as markdown. The "Looks good — proceed" option's preview shows everything; per-item-drop options' previews show what remains after that drop.
82
- - **Keep previews compact — the preview box truncates with no scrolling.** One line per item, no blank lines between items, no header. Example preview content:
83
-
84
- • **Format-on-edit hook** (automatic) \`ruff format <file>\` via PostToolUse
85
- • **/verify skill** (on-demand) — \`make lint && make typecheck && make test\`
86
- **CLAUDE.md note** (guideline) — "run lint/typecheck/test before marking done"
87
-
88
- - Option labels stay short ("Looks good", "Drop the hook", "Drop the skill") — the tool auto-adds an "Other" free-text option, so don't add your own catch-all.
89
-
90
- **Build the preference queue** from the accepted proposal. Each entry: {type: hook|skill|note, description, target file, any Phase-2-sourced details like the actual test/format command}. Phases 4-7 consume this queue.
91
-
92
- ## Phase 4: Write CLAUDE.md (if user chose project or both)
93
-
94
- Write a minimal CLAUDE.md at the project root. Every line must pass this test: "Would removing this cause Claude to make mistakes?" If no, cut it.
95
-
96
- **Consume \`note\` entries from the Phase 3 preference queue whose target is CLAUDE.md** (team-level notes) — add each as a concise line in the most relevant section. These are the behaviors the user wants Claude to follow but didn't need guaranteed (e.g., "propose a plan before implementing", "explain the tradeoffs when refactoring"). Leave personal-targeted notes for Phase 5.
97
-
98
- Include:
99
- - Build/test/lint commands Claude can't guess (non-standard scripts, flags, or sequences)
100
- - Code style rules that DIFFER from language defaults (e.g., "prefer type over interface")
101
- - Testing instructions and quirks (e.g., "run single test with: pytest -k 'test_name'")
102
- - Repo etiquette (branch naming, PR conventions, commit style)
103
- - Required env vars or setup steps
104
- - Non-obvious gotchas or architectural decisions
105
- - Important parts from existing AI coding tool configs if they exist (AGENTS.md, .cursor/rules, .cursorrules, .github/copilot-instructions.md, .windsurfrules, .clinerules)
106
-
107
- Exclude:
108
- - File-by-file structure or component lists (Claude can discover these by reading the codebase)
109
- - Standard language conventions Claude already knows
110
- - Generic advice ("write clean code", "handle errors")
111
- - Detailed API docs or long references — use \`@path/to/import\` syntax instead (e.g., \`@docs/api-reference.md\`) to inline content on demand without bloating CLAUDE.md
112
- - Information that changes frequently — reference the source with \`@path/to/import\` so Claude always reads the current version
113
- - Long tutorials or walkthroughs (move to a separate file and reference with \`@path/to/import\`, or put in a skill)
114
- - Commands obvious from manifest files (e.g., standard "npm test", "cargo test", "pytest")
115
-
116
- Be specific: "Use 2-space indentation in TypeScript" is better than "Format code properly."
117
-
118
- Do not repeat yourself and do not make up sections like "Common Development Tasks" or "Tips for Development" — only include information expressly found in files you read.
119
-
120
- Prefix the file with:
121
-
122
- \`\`\`
123
- # CLAUDE.md
124
-
125
- This file provides guidance to Context Code (claude.ai/code) when working with code in this repository.
126
- \`\`\`
127
-
128
- If CLAUDE.md already exists: read it, propose specific changes as diffs, and explain why each change improves it. Do not silently overwrite.
129
-
130
- For projects with multiple concerns, suggest organizing instructions into \`.context/rules/\` as separate focused files (e.g., \`code-style.md\`, \`testing.md\`, \`security.md\`). These are loaded automatically alongside CLAUDE.md and can be scoped to specific file paths using \`paths\` frontmatter.
131
-
132
- For projects with distinct subdirectories (monorepos, multi-module projects, etc.): mention that subdirectory CLAUDE.md files can be added for module-specific instructions (they're loaded automatically when Claude works in those directories). Offer to create them if the user wants.
133
-
134
- ## Phase 5: Write CLAUDE.local.md (if user chose personal or both)
135
-
136
- Write a minimal CLAUDE.local.md at the project root. This file is automatically loaded alongside CLAUDE.md. After creating it, add \`CLAUDE.local.md\` to the project's .gitignore so it stays private.
137
-
138
- **Consume \`note\` entries from the Phase 3 preference queue whose target is CLAUDE.local.md** (personal-level notes) — add each as a concise line. If the user chose personal-only in Phase 1, this is the sole consumer of note entries.
139
-
140
- Include:
141
- - The user's role and familiarity with the codebase (so Context can calibrate explanations)
142
- - Personal sandbox URLs, test accounts, or local setup details
143
- - Personal workflow or communication preferences
144
-
145
- Keep it short — only include what would make Context's responses noticeably better for this user.
146
-
147
- If Phase 2 found multiple git worktrees and the user confirmed they use sibling/external worktrees (not nested inside the main repo): the upward file walk won't find a single CLAUDE.local.md from all worktrees. Write the actual personal content to \`~/.context/<project-name>-instructions.md\` and make CLAUDE.local.md a one-line stub that imports it: \`@~/.context/<project-name>-instructions.md\`. The user can copy this one-line stub to each sibling worktree. Never put this import in the project CLAUDE.md. If worktrees are nested inside the main repo (e.g., \`.context/worktrees/\`), no special handling is needed — the main repo's CLAUDE.local.md is found automatically.
148
-
149
- If CLAUDE.local.md already exists: read it, propose specific additions, and do not silently overwrite.
150
-
151
- ## Phase 6: Suggest and create skills (if user chose "Skills + hooks" or "Skills only")
152
-
153
- Skills add capabilities Context can use on demand without bloating every session.
154
-
155
- **First, consume \`skill\` entries from the Phase 3 preference queue.** Each queued skill preference becomes a SKILL.md tailored to what the user described. For each:
156
- - Name it from the preference (e.g., "verify-deep", "session-report", "deploy-sandbox")
157
- - Write the body using the user's own words from the interview plus whatever Phase 2 found (test commands, report format, deploy target). If the preference maps to an existing bundled skill (e.g., \`/verify\`), write a project skill that adds the user's specific constraints on top — tell the user the bundled one still exists and theirs is additive.
158
- - Ask a quick follow-up if the preference is underspecified (e.g., "which test command should verify-deep run?")
159
-
160
- **Then suggest additional skills** beyond the queue when you find:
161
- - Reference knowledge for specific tasks (conventions, patterns, style guides for a subsystem)
162
- - Repeatable workflows the user would want to trigger directly (deploy, fix an issue, release process, verify changes)
163
-
164
- For each suggested skill, provide: name, one-line purpose, and why it fits this repo.
165
-
166
- If \`.context/skills/\` already exists with skills, review them first. Do not overwrite existing skills — only propose new ones that complement what is already there.
167
-
168
- Create each skill at \`.context/skills/<skill-name>/SKILL.md\`:
169
-
170
- \`\`\`yaml
171
- ---
172
- name: <skill-name>
173
- description: <what the skill does and when to use it>
174
- ---
175
-
176
- <Instructions for Context>
177
- \`\`\`
178
-
179
- Both the user (\`/<skill-name>\`) and Context can invoke skills by default. For workflows with side effects (e.g., \`/deploy\`, \`/fix-issue 123\`), add \`disable-model-invocation: true\` so only the user can trigger it, and use \`$ARGUMENTS\` to accept input.
180
-
181
- ## Phase 7: Suggest additional optimizations
182
-
183
- Tell the user you're going to suggest a few additional optimizations now that CLAUDE.md and skills (if chosen) are in place.
184
-
185
- Check the environment and ask about each gap you find (use AskUserQuestion):
186
-
187
- - **GitHub CLI**: Run \`which gh\` (or \`where gh\` on Windows). If it's missing AND the project uses GitHub (check \`git remote -v\` for github.com), ask the user if they want to install it. Explain that the GitHub CLI lets Context help with commits, pull requests, issues, and code review directly.
188
-
189
- - **Linting**: If Phase 2 found no lint config (no .eslintrc, ruff.toml, .golangci.yml, etc. for the project's language), ask the user if they want Context to set up linting for this codebase. Explain that linting catches issues early and gives Context fast feedback on its own edits.
190
-
191
- - **Proposal-sourced hooks** (if user chose "Skills + hooks" or "Hooks only"): Consume \`hook\` entries from the Phase 3 preference queue. If Phase 2 found a formatter and the queue has no formatting hook, offer format-on-edit as a fallback. If the user chose "Neither" or "Skills only" in Phase 1, skip this bullet entirely.
192
-
193
- For each hook preference (from the queue or the formatter fallback):
194
-
195
- 1. Target file: default based on the Phase 1 CLAUDE.md choice — project → \`.context/settings.json\` (team-shared, committed); personal → \`.context/settings.local.json\`. Only ask if the user chose "both" in Phase 1 or the preference is ambiguous. Ask once for all hooks, not per-hook.
196
-
197
- 2. Pick the event and matcher from the preference:
198
- - "after every edit" → \`PostToolUse\` with matcher \`Write|Edit\`
199
- - "when Context finishes" / "before I review" → \`Stop\` event (fires at the end of every turn — including read-only ones)
200
- - "before running bash" → \`PreToolUse\` with matcher \`Bash\`
201
- - "before committing" (literal git-commit gate) → **not a hooks.json hook.** Matchers can't filter Bash by command content, so there's no way to target only \`git commit\`. Route this to a git pre-commit hook (\`.git/hooks/pre-commit\`, husky, pre-commit framework) instead — offer to write one. If the user actually means "before I review and commit Context's output", that's \`Stop\` — probe to disambiguate.
202
- Probe if the preference is ambiguous.
203
-
204
- 3. **Load the hook reference** (once per \`/iniciar\` run, before the first hook): invoke the Skill tool with \`skill: 'update-config'\` and args starting with \`[hooks-only]\` followed by a one-line summary of what you're building — e.g., \`[hooks-only] Constructing a PostToolUse/Write|Edit format hook for .context/settings.json using ruff\`. This loads the hooks schema and verification flow into context. Subsequent hooks reuse it — don't re-invoke.
205
-
206
- 4. Follow the skill's **"Constructing a Hook"** flow: dedup check → construct for THIS project → pipe-test raw → wrap → write JSON → \`jq -e\` validate → live-proof (for \`Pre|PostToolUse\` on triggerable matchers) → cleanup → handoff. Target file and event/matcher come from steps 1–2 above.
207
-
208
- Act on each "yes" before moving on.
209
-
210
- ## Phase 8: Summary and next steps
211
-
212
- Recap what was set up — which files were written and the key points included in each. Remind the user these files are a starting point: they should review and tweak them, and can run \`/iniciar\` again anytime to re-scan.
213
-
214
- Then tell the user that you'll be introducing a few more suggestions for optimizing their codebase and Context Code setup based on what you found. Present these as a single, well-formatted to-do list where every item is relevant to this repo. Put the most impactful items first.
215
-
216
- When building the list, work through these checks and include only what applies:
217
- - If frontend code was detected (React, Vue, Svelte, etc.): \`/plugin install frontend-design@claude-plugins-official\` gives Context design principles and component patterns so it produces polished UI; \`/plugin install playwright@claude-plugins-official\` lets Context launch a real browser, screenshot what it built, and fix visual bugs itself.
218
- - If you found gaps in Phase 7 (missing GitHub CLI, missing linting) and the user said no: list them here with a one-line reason why each helps.
219
- - If tests are missing or sparse: suggest setting up a test framework so Context can verify its own changes.
220
- - To help you create skills and optimize existing skills using evals, Context Code has an official skill-creator plugin you can install. Install it with \`/plugin install skill-creator@claude-plugins-official\`, then run \`/skill-creator <skill-name>\` to create new skills or refine any existing skill. (Always include this one.)
221
- - Browse official plugins with \`/plugin\` — these bundle skills, agents, hooks, and MCP servers that you may find helpful. You can also create your own custom plugins to share them with others. (Always include this one.)`;
4
+ const OLD_INIT_PROMPT = `Analiza esta base de codigo y crea un archivo .context/CONTEXT.md para futuras sesiones de Context Code en este repositorio.
5
+
6
+ Que debe incluir:
7
+ 1. Comandos realmente utiles y frecuentes: build, lint, test, desarrollo local y, si aplica, como ejecutar una sola prueba.
8
+ 2. Arquitectura y estructura de alto nivel: la vista general que normalmente requiere leer varios archivos para entenderse rapido.
9
+
10
+ Notas de uso:
11
+ - Si ya existe .context/CONTEXT.md, no lo sobrescribas a ciegas; sugiere mejoras concretas.
12
+ - Evita repetir obviedades o reglas genericas.
13
+ - No listes cada archivo o componente que pueda descubrirse facilmente.
14
+ - Si existen reglas de Cursor, Copilot u otras herramientas, incorpora solo lo importante.
15
+ - Si existe README.md, incorpora solo lo importante.
16
+ - No inventes secciones ni informacion no respaldada por archivos reales.
17
+ - El archivo debe comenzar exactamente con:
18
+
19
+ \`\`\`
20
+ # CONTEXT.md
21
+
22
+ This file provides guidance to Context Code when working with code in this repository.
23
+ \`\`\`
24
+ `;
25
+ const NEW_INIT_PROMPT = `Configura un .context/CONTEXT.md minimo y, si aplica, habilidades y hooks para este repositorio. Todo debe quedar en espanol salvo nombres tecnicos, rutas y comandos.
26
+
27
+ Fase 1:
28
+ - Pregunta al usuario que desea configurar.
29
+ - Ofrece estas opciones:
30
+ - "CONTEXT del proyecto"
31
+ - "CONTEXT personal"
32
+ - "Ambos"
33
+ - Pregunta tambien si desea:
34
+ - "Habilidades y hooks"
35
+ - "Solo habilidades"
36
+ - "Solo hooks"
37
+ - "Solo CONTEXT"
38
+
39
+ Fase 2:
40
+ - Explora la base de codigo.
41
+ - Revisa archivos clave como package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, README, Makefile, CI, .context/rules/, AGENTS.md, .cursor/rules, .cursorrules, .github/copilot-instructions.md, .windsurfrules, .clinerules y .mcp.json.
42
+ - Detecta:
43
+ - comandos de build, test y lint
44
+ - lenguajes, frameworks y package manager
45
+ - estructura general del proyecto
46
+ - reglas de estilo no obvias
47
+ - variables de entorno, gotchas o flujos especiales
48
+ - si ya existen .context/skills/ y .context/rules/
49
+ - configuracion de formatter
50
+ - uso de git worktree si hace falta para contenido personal
51
+
52
+ Fase 3:
53
+ - Pregunta solo lo que no puedas deducir del codigo.
54
+ - Si el usuario quiere contexto de proyecto, pregunta por practicas del equipo, comandos no obvios, convenciones de ramas o PR y quirks reales.
55
+ - Si el usuario quiere contexto personal, pregunta por su rol, nivel de familiaridad, preferencias de comunicacion, URLs de sandbox, cuentas de prueba o detalles locales.
56
+ - Construye una propuesta compacta con:
57
+ - notas para CONTEXT.md
58
+ - habilidades sugeridas
59
+ - hooks sugeridos
60
+ - Muestra la propuesta con AskUserQuestion usando preview compacto y en espanol.
61
+
62
+ Fase 4:
63
+ - Escribe un .context/CONTEXT.md minimo.
64
+ - Cada linea debe responder a: "si quito esto, Context Code cometeria errores o perderia tiempo real?"
65
+ - Incluye solo:
66
+ - comandos no obvios
67
+ - arquitectura de alto nivel
68
+ - reglas de estilo que se aparten de lo normal
69
+ - gotchas, setup o decisiones arquitectonicas importantes
70
+ - Excluye:
71
+ - listados exhaustivos de archivos
72
+ - consejos genericos
73
+ - documentacion larga que pueda referenciarse aparte
74
+
75
+ Fase 5:
76
+ - Si el usuario eligio contenido personal, escribe la variante personal minima y mantenla privada.
77
+
78
+ Fase 6:
79
+ - Si el usuario eligio habilidades, crea solo habilidades utiles y especificas para este repo.
80
+ - No sobrescribas habilidades existentes sin justificarlo.
81
+
82
+ Fase 7:
83
+ - Si el usuario eligio hooks, sugiere hooks concretos y utiles para este repo.
84
+ - Si no eligio hooks, no insistas.
85
+
86
+ Fase 8:
87
+ - Resume en espanol que se creo, que archivos se tocaron y que pasos siguientes convienen.
88
+ - Cierra con sugerencias breves y relevantes para mejorar la configuracion del repo.
89
+
90
+ Muy importante:
91
+ - Durante todo el flujo responde en espanol.
92
+ - No uses mensajes de arranque en ingles como "I'll analyze..." o "Let me start...".
93
+ - Cuando inicies el analisis, usa formulaciones en espanol como "Voy a revisar la base de codigo..." o similares.`;
222
94
  const command = {
223
95
  type: 'prompt',
224
96
  name: 'iniciar',
@@ -229,7 +101,7 @@ const command = {
229
101
  ? 'Inicializar .context/CONTEXT.md y habilidades/ganchos opcionales con documentacion de la base de codigo'
230
102
  : 'Inicializar .context/CONTEXT.md con documentacion de la base de codigo';
231
103
  },
232
- contentLength: 0, // Dynamic content
104
+ contentLength: 0,
233
105
  progressMessage: 'analizando tu base de codigo',
234
106
  source: 'builtin',
235
107
  async getPromptForCommand() {
@@ -1,13 +1,12 @@
1
- import { isVoiceGrowthBookEnabled, isVoiceModeEnabled, } from '../../voice/voiceModeEnabled.js';
1
+ import { isVoiceGrowthBookEnabled } from '../../voice/voiceModeEnabled.js';
2
2
  const voice = {
3
3
  type: 'local',
4
- name: 'voice',
5
- description: 'Activar/desactivar el modo de voz',
6
- availability: ['claude-ai'],
4
+ name: 'dictar',
5
+ aliases: ['voice'],
6
+ description: 'Activar/desactivar el dictado local',
7
+ argumentHint: '[install [modelo] | status]',
7
8
  isEnabled: () => isVoiceGrowthBookEnabled(),
8
- get isHidden() {
9
- return !isVoiceModeEnabled();
10
- },
9
+ isHidden: false,
11
10
  supportsNonInteractive: false,
12
11
  load: () => import('./voice.js'),
13
12
  };