Instructions to use Athleteaudio/codi-mentor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Athleteaudio/codi-mentor with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Athleteaudio/codi-mentor:Q4_K_M # Run inference directly in the terminal: llama cli -hf Athleteaudio/codi-mentor:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Athleteaudio/codi-mentor:Q4_K_M # Run inference directly in the terminal: llama cli -hf Athleteaudio/codi-mentor:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Athleteaudio/codi-mentor:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Athleteaudio/codi-mentor:Q4_K_M
Use Docker
docker model run hf.co/Athleteaudio/codi-mentor:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use Athleteaudio/codi-mentor with Ollama:
ollama run hf.co/Athleteaudio/codi-mentor:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Athleteaudio/codi-mentor with Docker Model Runner:
docker model run hf.co/Athleteaudio/codi-mentor:Q4_K_M
- Lemonade
How to use Athleteaudio/codi-mentor with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Athleteaudio/codi-mentor:Q4_K_M
Run and chat with the model
lemonade run user.codi-mentor-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload 3 files
Browse files
LICENSE
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of tracking and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for describing the origin of the Work and
|
| 141 |
+
reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Support. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may accept support,
|
| 167 |
+
warranty, indemnity, or other liability obligations and/or rights
|
| 168 |
+
consistent with this License. However, in accepting such obligations,
|
| 169 |
+
You may accept them only on Your own behalf and on Your sole
|
| 170 |
+
responsibility, not on behalf of any other Contributor, and only if
|
| 171 |
+
You agree to indemnify, defend, and hold each Contributor harmless
|
| 172 |
+
for any liability incurred by, or claims asserted against, such
|
| 173 |
+
Contributor by reason of your accepting any such warranty or support.
|
| 174 |
+
|
| 175 |
+
END OF TERMS AND CONDITIONS
|
| 176 |
+
|
| 177 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 178 |
+
|
| 179 |
+
To apply the Apache License to your work, attach the following
|
| 180 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 181 |
+
replaced with your own identifying information. (Don't include
|
| 182 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 183 |
+
comment syntax for the file format. We also recommend that a
|
| 184 |
+
file or class name and description of purpose be included on the
|
| 185 |
+
same "printed page" as the copyright notice for easier
|
| 186 |
+
identification within third-party archives.
|
| 187 |
+
|
| 188 |
+
Copyright 2026 Athlete Audio LLC
|
| 189 |
+
|
| 190 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 191 |
+
you may not use this file except in compliance with the License.
|
| 192 |
+
You may obtain a copy of the License at
|
| 193 |
+
|
| 194 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 195 |
+
|
| 196 |
+
Unless required by applicable law or agreed to in writing, software
|
| 197 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 198 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 199 |
+
implied. See the License for the specific language governing
|
| 200 |
+
permissions and limitations under the License.
|
NOTICE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Codi
|
| 2 |
+
Copyright 2026 Athlete Audio LLC
|
| 3 |
+
|
| 4 |
+
This product includes software developed at Athlete Audio LLC
|
| 5 |
+
(https://beatsforathletes.com/).
|
| 6 |
+
|
| 7 |
+
The tutor model that Codi loads at runtime (codi-mentor) is distributed
|
| 8 |
+
separately at https://huggingface.co/Athleteaudio/codi-mentor and is a
|
| 9 |
+
fine tune of Google Gemma 4 E2B, distributed under the Apache License 2.0.
|
| 10 |
+
Portions of the model weights derive from work by Google DeepMind.
|
README.md
CHANGED
|
@@ -1,3 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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doesn't just catch your
|
| 4 |
+
mistakes and teach you *why* β it helps you plan, architect, and build real projects,
|
| 5 |
+
answering *"what should I build next?"* not only *"what's wrong with this line?"*
|
| 6 |
+
|
| 7 |
+
> Codi is **not** an AI code generator and **not** just another IDE. It's a mentor:
|
| 8 |
+
> it asks thoughtful questions, explains reasoning before solutions, and never writes
|
| 9 |
+
> whole applications for you.
|
| 10 |
+
|
| 11 |
+
## Architect Mode (Phase 2)
|
| 12 |
+
|
| 13 |
+
Opening or creating a project lands you on the **Architect Dashboard**, not an empty
|
| 14 |
+
editor. Codi first runs a **Project Creation Wizard** (what are you building Β· describe
|
| 15 |
+
it Β· who's it for Β· language Β· framework Β· deployment), then builds a living plan:
|
| 16 |
+
|
| 17 |
+
- **Dynamic Architecture Map** β a layered diagram (e.g. Main β IPC β Renderer β
|
| 18 |
+
Services β Storage β AI) that lights up each layer as the matching folders/files
|
| 19 |
+
appear in your project.
|
| 20 |
+
- **Mission Board** β a roadmap tailored to your project type whose milestones
|
| 21 |
+
auto-check from detected structure (and you can override any of them).
|
| 22 |
+
- **Recommended Next Task** β the single most useful next step, with the reasoning.
|
| 23 |
+
- **Learning Dashboard** β engineering-skill *confidence* levels (Architecture, Async,
|
| 24 |
+
Testing, Debugging, Securityβ¦), grown from what you actually do β not % complete.
|
| 25 |
+
- **Project Review** β "Review My Project" analyzes the whole codebase and reports
|
| 26 |
+
strengths and opportunities across architecture, maintainability, naming, security,
|
| 27 |
+
and technical debt β always explaining **why**.
|
| 28 |
+
- **Architectural mentor** β while you edit, Codi asks whether code *belongs* where it
|
| 29 |
+
is ("this UI file is talking to a database directly β should that move to a service?").
|
| 30 |
+
|
| 31 |
+
The architect engine is modular: project blueprints live in `src/architect/blueprints.js`
|
| 32 |
+
(add a type or tweak detection there); the compute engines (`architecture`, `missions`,
|
| 33 |
+
`nextTask`, `skills`, `review`, `mentorArchitect`) are pure functions over a project scan.
|
| 34 |
+
|
| 35 |
---
|
| 36 |
+
|
| 37 |
+
Under the hood it's still a **learning IDE**: Codi catches your mistakes and teaches you
|
| 38 |
+
*why* they happened instead of silently fixing them.
|
| 39 |
+
|
| 40 |
+
Built as a real desktop app: **Electron + React + Monaco Editor + Node.js**, with
|
| 41 |
+
**ESLint** for JavaScript validation and JSON-backed **mistake history**.
|
| 42 |
+
|
| 43 |
+
## Features
|
| 44 |
+
|
| 45 |
+
- Open Folder / New File / file-tree navigation
|
| 46 |
+
- Monaco editor with syntax highlighting and tabs
|
| 47 |
+
- Live JavaScript syntax + error checking (ESLint)
|
| 48 |
+
- Problems panel (file, issue, line, column)
|
| 49 |
+
- Output / Terminal / Git tabs
|
| 50 |
+
- **Codi Coach** β a *proactive* AI mentor, not a passive panel:
|
| 51 |
+
- Speaks up on its own ("I noticed something on line 5β¦") when it sees an issue
|
| 52 |
+
- Asks Socratic multiple-choice questions ("Is `World` a variable or a string?")
|
| 53 |
+
- **Beginner mode** guides you directly (Explain / Show fix / Quiz)
|
| 54 |
+
- **Intermediate mode** hides answers and drips a 3-step hint ladder β the fix
|
| 55 |
+
stays hidden until you ask
|
| 56 |
+
- A dashboard with today's lesson, goal, streak, and learning metrics
|
| 57 |
+
- **Practice Mode** β 10 guided exercises where you fix real broken code yourself
|
| 58 |
+
- Learning metrics β Understanding %, errors fixed today, hints used, fixes revealed,
|
| 59 |
+
your most common mistake type, and a daily streak
|
| 60 |
+
- Mistake history that tracks repeated errors so you can see your patterns
|
| 61 |
+
- Dark, VS Code-inspired theme with a purple/blue accent
|
| 62 |
+
|
| 63 |
+
## The mentor experience
|
| 64 |
+
|
| 65 |
+
Codi is designed to feel like a teacher sitting next to you, not an autocomplete.
|
| 66 |
+
|
| 67 |
+
- **Proactive voice** β when you open a file or pause typing, Codi re-analyzes it
|
| 68 |
+
(ESLint) and, if it finds something, says so unprompted with a specific,
|
| 69 |
+
Socratic nudge tied to the line.
|
| 70 |
+
- **Interactive questions** β some issues come with a multiple-choice question that
|
| 71 |
+
makes *you* decide the intent before Codi explains the consequence of each choice.
|
| 72 |
+
- **Two teaching modes** β Beginner is direct and quick; Intermediate withholds the
|
| 73 |
+
answer and offers Hint 1 (concept) β Hint 2 (where to look) β Hint 3 (the specific
|
| 74 |
+
issue), revealing the actual fix only when you explicitly ask.
|
| 75 |
+
- **Always-useful panel** β before any error is selected, the Coach shows a welcome,
|
| 76 |
+
the day's concept + goal, your streak, live learning metrics, a mistake summary,
|
| 77 |
+
and a suggested next action.
|
| 78 |
+
|
| 79 |
+
The mentor logic lives in `src/coach/` (`mentorBrain.js` for nudges/questions/hints,
|
| 80 |
+
`curriculum.js` for the daily lesson). Metrics + streak persist via the existing
|
| 81 |
+
history store (`electron/services/historyService.js`).
|
| 82 |
+
|
| 83 |
+
### Project intent (build goal)
|
| 84 |
+
|
| 85 |
+
At the top of the Coach panel, Codi asks **"What are you trying to build?"** (with
|
| 86 |
+
quick examples like *A Discord bot* or *A crypto trading dashboard*). The answer is:
|
| 87 |
+
|
| 88 |
+
- **Saved per project folder** β each folder remembers its own goal.
|
| 89 |
+
- **Editable at any time** β click the β to change it.
|
| 90 |
+
- **Included in every coach request** β so explanations are framed around your
|
| 91 |
+
project. A broken async function in *a Discord bot* is explained in terms of
|
| 92 |
+
bot commands and event handling, not in the abstract.
|
| 93 |
+
|
| 94 |
+
Beyond "what's wrong with this line?", Codi also asks the more important question:
|
| 95 |
+
**"Does this line make sense for the program you're trying to build?"**
|
| 96 |
+
|
| 97 |
+
The goal is stored in `projectGoals` (keyed by folder path) in the same
|
| 98 |
+
`mistake-history.json` store, and passed through `codi.explain(...)` to the
|
| 99 |
+
local Gemma 4 coach (`electron/services/aiCoach.js`).
|
| 100 |
+
|
| 101 |
+
## Practice Mode
|
| 102 |
+
|
| 103 |
+
The dumbbell icon in the activity bar opens **Practice Mode**: 10 beginner-to-
|
| 104 |
+
intermediate JavaScript exercises where Codi hands you *broken* code and you fix it.
|
| 105 |
+
|
| 106 |
+
- The sidebar lists all exercises with live status (todo / attempted / solved-clean
|
| 107 |
+
/ solved-with-hints / revealed) and a progress bar.
|
| 108 |
+
- Each exercise shows the concept, a prompt, and an editable Monaco editor.
|
| 109 |
+
- **Check my fix** runs real validation β ESLint for syntax/reference mistakes,
|
| 110 |
+
hidden test cases for logic bugs (off-by-one, wrong operator, bad initial valueβ¦).
|
| 111 |
+
- Two progressive **hints** and a **Reveal solution** button β the answer is never
|
| 112 |
+
shown up front.
|
| 113 |
+
- After you solve it (or reveal it), Codi shows the **explanation** of what you learned.
|
| 114 |
+
- Progress (solved, hints used, whether you revealed the answer, attempt count) is
|
| 115 |
+
saved to the same `mistake-history.json` store as your mistake history.
|
| 116 |
+
|
| 117 |
+
Exercises live in `src/practice/exercises.js`; validation logic is in
|
| 118 |
+
`src/practice/practiceEngine.js`. Add more exercises by appending to the array β
|
| 119 |
+
no other changes needed.
|
| 120 |
+
|
| 121 |
+
## Run it
|
| 122 |
+
|
| 123 |
+
```bash
|
| 124 |
+
cd codi
|
| 125 |
+
npm install
|
| 126 |
+
npm run dev
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
`npm run dev` starts the Vite dev server and launches the Electron window against it.
|
| 130 |
+
|
| 131 |
+
To run the production build:
|
| 132 |
+
|
| 133 |
+
```bash
|
| 134 |
+
npm run build
|
| 135 |
+
npm start
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
To package a distributable:
|
| 139 |
+
|
| 140 |
+
```bash
|
| 141 |
+
npm run dist
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
## Connected Agents (Phase 1)
|
| 145 |
+
|
| 146 |
+
Codi can connect multiple coding agents and **manually switch** between them while
|
| 147 |
+
preserving project handoff context (goal, plan, steps, files, git diff, errors).
|
| 148 |
+
|
| 149 |
+
| Provider | Env var |
|
| 150 |
+
|----------|---------|
|
| 151 |
+
| Gemma 4 | `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`) |
|
| 152 |
+
| Grok | `XAI_API_KEY` |
|
| 153 |
+
| Codex | `OPENAI_API_KEY` |
|
| 154 |
+
| Ollama | `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`) |
|
| 155 |
+
|
| 156 |
+
Open the **Agents** icon in the activity bar (or click the agent name in the status bar)
|
| 157 |
+
to list providers, switch, and test connections. API keys are never written to disk or logs.
|
| 158 |
+
|
| 159 |
+
See `.env.example` for placeholders. Smoke test:
|
| 160 |
+
|
| 161 |
+
```bash
|
| 162 |
+
npm run test:agents
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
## Codi Coach: AI provider
|
| 166 |
+
|
| 167 |
+
Codi Coach works **fully offline** out of the box. The primary explanation
|
| 168 |
+
engine is a local fine-tuned **Gemma 4** model served through Ollama
|
| 169 |
+
(`electron/services/aiCoach.js`). A built-in teaching knowledge base covers the
|
| 170 |
+
common beginner mistakes when no model is available.
|
| 171 |
+
|
| 172 |
+
Point it at your local Ollama server and, optionally, a custom model:
|
| 173 |
+
|
| 174 |
+
```bash
|
| 175 |
+
set OLLAMA_BASE_URL=http://127.0.0.1:11434 # Windows (cmd)
|
| 176 |
+
$env:OLLAMA_BASE_URL="http://127.0.0.1:11434" # PowerShell
|
| 177 |
+
set CODI_OLLAMA_MODEL=codi-mentor
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
The default model is `codi-mentor` β Codi's own fine-tuned Gemma 4 coach. The
|
| 181 |
+
coach is prompted to **teach, not to dump the answer** β it never returns a whole
|
| 182 |
+
corrected file.
|
| 183 |
+
|
| 184 |
+
## Architecture
|
| 185 |
+
|
| 186 |
+
```
|
| 187 |
+
electron/
|
| 188 |
+
main.js Electron main process + IPC registration
|
| 189 |
+
preload.js Safe, typed window.codi bridge (contextIsolation on)
|
| 190 |
+
services/
|
| 191 |
+
fileService.js Folder tree, read/write/create files
|
| 192 |
+
lintService.js Validation layer β register new languages here
|
| 193 |
+
historyService.js Mistake history (JSON, storage-agnostic API)
|
| 194 |
+
aiCoach.js Local Gemma 4 coach + offline teaching knowledge base
|
| 195 |
+
gitService.js Branch + status via the system git binary
|
| 196 |
+
agentRegistry.js Supported coding-agent catalog (Gemma 4/Grok/Codex/Ollama)
|
| 197 |
+
agentSettings.js Active provider + non-secret local overrides
|
| 198 |
+
handoffContext.js Shared project context preserved across agent switches
|
| 199 |
+
agentService.js list / getActive / setActive / testConnection API
|
| 200 |
+
src/
|
| 201 |
+
monaco-setup.js Monaco workers wired through Vite + Codi dark theme
|
| 202 |
+
App.jsx App state + layout
|
| 203 |
+
components/ ActivityBar, Explorer, EditorArea, BottomPanel,
|
| 204 |
+
CoachPanel, StatusBar, HistorySidebar
|
| 205 |
+
lib/ language mapping, mini markdown renderer
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
### Adding a language (Python / TypeScript / C++)
|
| 209 |
+
|
| 210 |
+
The validation layer is modular. In `electron/services/lintService.js`, add a
|
| 211 |
+
validator function returning the same `Problem[]` shape and register it in the
|
| 212 |
+
`validators` map:
|
| 213 |
+
|
| 214 |
+
```js
|
| 215 |
+
const validators = {
|
| 216 |
+
javascript: validateJavaScript,
|
| 217 |
+
python: validatePython, // <- add
|
| 218 |
+
};
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
Then add the extension in `src/lib/language.js` and (optionally) to `VALIDATABLE`.
|
| 222 |
+
Nothing else in the UI needs to change.
|