For contributors and maintainers

Change the source, then prove the shipped tree.

IdeaForge has no dependencies and no build step. Its architecture keeps interview logic separate from browser APIs, while the test and delivery pipelines exercise the same static files that users receive.

Use the repository references for the sharp edges. This page is the working map, not a second copy of every implementation invariant. Read AGENTS.md for the validation loop, CLAUDE.md for invariants, and the architecture map before a change of any size.

Architecture and boundaries

Source is split by responsibility so most behaviour can run under Node without a DOM, network, real clock, or mocking framework. Dependencies flow from the UI into runtime and core, while browser-facing services sit beside that path.

Directory Owns Boundary
src/core/ Sessions, coverage, prompts, synthesis, exports, backup format validation, and other pure decisions. No DOM, network, clock, or randomness.
src/runtime/ Turn, synthesis, gain, and hands-free orchestration. Providers, time, and effects are injected.
src/providers/ Inference and hosted speech requests, authentication, model discovery and errors. Shared HTTP policy and fixed/allowlisted provider endpoints.
src/store/ IndexedDB sessions, local device preferences, backup persistence/import integration, and the encrypted keyring. Browser storage stays behind small adapters.
src/voice/ Recording, real input levels, recognition, transcription, native speech and buffered playback. Browser capability is proved by behaviour, not presence alone.
src/ui/ The shell, voice stage, navigation, session identity guards and browser coordination. The only layer that directly owns the DOM.

There is no package installation or compilation phase. Browser modules are served as written. tools/assemble-site.mjs only copies the publishable tree for browser checks, Pages, and packaging; it does not bundle or rewrite it.

The purity gate

tools/lint-purity.mjs scans src/core/ and src/runtime/ for platform globals such as window, document, browser storage, navigator, and fetch. It runs first in npm test.

Do not weaken the lint to admit a platform API. Move the browser work to its owning layer or inject the dependency. That seam is what keeps prompts deterministic, interrupted turns resumable, and tests fast.

Use the smallest test that can disprove the change

Deterministic development UX fixtures exercise long, empty, loading and error states without real provider keys. The contributor capture procedure distinguishes real-app screenshots from isolated voice phase fixtures and records viewport, text scale, geometry and tested commit. These lab artifacts do not replace the required browser checks or demonstrate physical-phone behaviour, live speech quality or field Web Vitals.

npm test
npm run test:graph
npm run test:browser:required
npm run test:all
Check What it proves When to run it
npm test The purity boundary and the Node unit suite. Continuously while changing pure or injected behaviour.
npm run test:graph Syntax, imports, and the shipped module graph. After moving, adding, or rewiring modules.
npm run test:browser:required IndexedDB, WebCrypto, media, speech, service workers, CSP, the guide, and the assembled site, plus a separate real Web Audio/trusted-gesture policy phase and a real-keyboard, coarse-pointer accessibility phase. For any browser-owned surface. Missing Chrome is a failure.
npm run test:all The complete local gate: unit, graph, and required browser checks. Before pushing a branch.

Tests use Node's built-in runner, injected clocks and fetch functions, and browser probes under test/browser/. A real local-model run is a separate, deliberate check through npm run validate:local; it is not a replacement for the deterministic suite.

Keep voice evidence in separate categories

tools/browser-check.mjs runs the media probes with a synthetic microphone and an autoplay bypass. They exercise ordering, cancellation and recovery, not a person granting permission or native recognition competing for a physical microphone.

The required browser command also runs tools/browser-policy-check.mjs in fresh profiles. It exercises real Web Audio before and after trusted gestures, with synthetic-microphone cases identified separately. Its app phase exercises the real Preview, Start, Resume, Pause and Exit handlers with trusted input and decoded audio, but scripted model/recognition and fake speech HTTP. This is playback-policy evidence, not live provider CORS or a voice-quality audition.

The same command runs an accessibility phase in its own fresh profile. It presses real Tab, Enter and Escape keys through every panel at phone and desktop widths, checking the focus order, that every stop is visible and uncovered, and that menus return focus. It then emulates a touch screen and measures every control at 48 by 48 CSS pixels or more, with voice actions at least 64 pixels high. Those are project comfort targets, not WCAG’s 24-pixel minimum. Shared controls are exercised with hover, press, keyboard focus, selected, disabled, busy and error/status states, long labels, 200% text and forced colours where supported. test/browser/contrast.browser.mjs measures the real stack of translucent backgrounds, not only palette hex values, in both themes. The app’s new visual foundation does not change its current layouts or output-action order; the guide’s own colour migration is separate. Automated checks are not a screen-reader audit.

No authorised live speech key or spending cap was supplied for this redesign. Hosted CORS and voice quality remain unverified by the developer, and the in-app preview is a per-browser enablement gate rather than a compatibility promise. Physical Android/iPhone checks also remain unperformed, in tabs and installed mode. Record those limits explicitly in delivery evidence; desktop emulation cannot turn them into passes.

Extend through the existing seams

Add a provider Prefer an OpenAI-compatible preset. Use a dedicated adapter only for a different protocol, keep authentication data-driven, update the exact CSP origin, and add new source files to the service-worker shell.
Add a dimension Start with DIMENSIONS. Coverage initialization, selection, prompts, synthesis, and export derive from it; then inspect the few documented labels and engine branches that do not.
Add a UI panel Define the section in index.html, keep active-session ownership in src/ui/app.js, and place panel-specific DOM work in its own UI module.
Add voice behaviour Keep matching and state transitions pure, put browser media in src/voice/, and prove turn-taking, bounded recovery, explicit Pause/Resume/Exit and resource release. Keep hosted speech consent and keys independent from inference and transcription.

The focused repository skills add-provider and change-voice-and-driving carry the subsystem-specific checks. A new file under src/ must also appear in sw.js; the wiring tests enforce that cold offline path.

Keep the guide and captures tied to the app

npm run screenshots drives the real app with scripted model and voice input. It regenerates the light/dark pairs of Start, Settings, the interview, the result, the narrow and wide Ideas library, the listening and paused voice views, and the worked example. Review the images and reject font warnings, dimension mismatches or an incorrect wrap reason; a second run must leave the example unchanged. Never substitute a hand-edited export or a live paid provider.

The Start capture rejects a crop that would cut off Start with voice, Type instead or the footer, and a Start screen taller than 1100 CSS pixels. The Settings capture rejects one that cuts off its Data or About group. Fix the real Start or Settings layout rather than hiding controls only for screenshots. Model options and Voice and speaking pace are disclosures in the shipped app, not capture-only shortcuts.

The guide shares one local stylesheet, system fonts and restrictive CSP, with no guide JavaScript. Run npm run test:docs for inventories, source facts and links, and the required browser command for screenshot loading, narrow layout, navigation and Pages-style subpaths. Screenshot captures do not prove voice quality or physical-device support.

Contribute a focused change

git clone https://github.com/jaypetez/ideaforge.git
cd ideaforge
npm test
npm run serve

Node 22 or newer is enough. There is no npm install. Serve the repository over HTTP because ES modules, IndexedDB, and the service worker do not work from file://.

  1. Read the relevant architecture and invariant sections, then make the smallest coherent change without introducing a dependency or build step.
  2. Add a test that would have caught the failure. Use a browser probe when Node cannot observe the affected API or user flow.
  3. Run focused checks while editing, then npm run test:all before pushing.
  4. Open a pull request against main, state what was verified, and add the release-note label that describes the change. Leave merging to the reviewer unless you were explicitly asked to merge.

The complete contributor policy, provider checklist, assistant setup, and release boundary live in CONTRIBUTING.md.

Continuous integration

The CI workflow runs npm test and the module graph on Linux, Windows, and macOS with Node 22 and 24. A separate Ubuntu job runs the required browser suite, and an android job runs ./gradlew check :app:assembleDebug in android/ and uploads the debug APK as an artifact. Branch protection requires one stable aggregator named ci; it fails unless every matrix, browser and Android job succeeds, including cancelled or skipped jobs.

Android checks the effective debug and release merged manifests for a target of API 36 or newer, while retaining the release guard against debug-only permissions. SDK zipalign -c -P 16 -v 4 checks native-library ZIP placement in the actual debug APK and a disposable-key signed, minified release APK. A copied unaligned.so deliberately placed off a 16 KB boundary in a separate APK must fail the check. These are packaging checks, not ELF-segment or physical 16 KB-device runtime certification.

The workflow is read-only. The Node and browser jobs have no install or package-cache step; the Android job installs a JDK and keeps a Gradle dependency cache that only main may write. Do not bypass the aggregator or add path filters that can leave a required check waiting forever.

The native Android app

android/ is a separate Gradle project: :core is a pure Kotlin port of src/core/ and src/runtime/, :providers ports src/providers/, and :app is the Compose application. None of it is published with the site. The JavaScript core stays the reference: npm run vectors records its behaviour as golden vectors in test/vectors/, and the Kotlin tests replay them, so a behaviour change that regenerates them turns the Android job red until the port follows. The build and emulator ladder is the shared android-verify skill; installing the app is covered in Android app.

An instrumented walkthrough in android/app/src/androidTest/ drives the debug build's scripted interview through the screen to the Result screen. The separate android-device.yml workflow runs it on the Gradle managed emulator pixel6Api34 on every push to main, nightly and on demand. It is not part of the required ci check, so a slow or flaky emulator run never blocks a pull request.

GitHub Pages publishes the tested tree

  1. A successful CI run must come from a push to main.
  2. The Pages workflow verifies the matching ci job and confirms that its tested commit is still the exact tip of main.
  3. tools/assemble-site.mjs copies the application, guide, and generated screenshots into dist/.
  4. The workflow checks the tip again immediately before deploying, so an older run cannot overwrite a newer main branch.

The guide is part of that assembled tree but is deliberately excluded from the app service worker. A failed documentation navigation must never fall back to the application shell.

Releases are tag-driven and separate from Pages

Release work uses the explicitly invoked release skill. Preparation opens a version PR; it is not permission to merge or publish. An authorised maintainer publishes by pushing a vMAJOR.MINOR.PATCH tag at the approved, green commit on main.

The release workflow first checks that the tag, package.json, and src/version.js agree, proves the commit belongs to main, checks that the privacy policy has a confirmed public contact, and reruns npm run test:all. The release skill runs node tools/check-privacy-policy.mjs before preparation or tagging; an unresolved placeholder is a stop condition. Separate read-only signing jobs use app-signing and upload-key secrets (held as secrets of a release environment that accepts only version tags). The APK job refuses its output unless the signer matches the fingerprint pinned in SECURITY.md; it fails while that pin reads PENDING. The upload-signed AAB must pass checksum-pinned bundletool validation and signature checks with a different key. Only then may write-enabled jobs publish the reproducible source archives, the signed APK, upload-signed AAB, its R8 mapping.txt, SHA256SUMS covering all five payloads, and the multi-architecture container image. Pages deployment remains an independent main-branch pipeline.

Coding-assistant discovery

Open the repository root so each client can discover the shared instructions and skills. AGENTS.md owns the working loop, CLAUDE.md owns the implementation invariants, and .claude/skills/ contains the one shared definition of each project skill.

Claude Code and Copilot CLI also consume one lean-process contract: establish the complete scope, then prefer existing code and native APIs. Full is the automatic CLI default; explicit Lite, Ultra and Off controls never weaken the repository's permissions or validation gates. Read-only audit, debt, evidence and help skills supplement the existing exact-diff review. Before any pull request, the review-ideaforge-before-pr skill has at least two read-only reviewers check the exact diff without seeing each other and a fresh one challenge every finding; Claude Code and Copilot CLI hooks refuse gh pr create until it records a passing result for that commit. The process reference explains the project-native adapters, session-isolated local mode metadata, optional badge and client limits. No assistant utility or host SDK is included in the published app, and no global plugin installation is needed.

Client Entry point Documentation review adapter
Claude Code CLAUDE.md, which imports AGENTS.md ideaforge-docs-review-claude
GitHub Copilot CLI and VS Code .github/copilot-instructions.md plus the shared references ideaforge-docs-review-copilot

Use update-documentation when documentation should be changed and review-ideaforge-documentation for an exact, read-only drift review. Their client adapters expose only read tools and stop when the requested diff is not available.

copilot instruction list --json
copilot skill list --json

In Copilot CLI, /env, /instructions, /skills, and /agent show the loaded configuration. In Claude Code, use /memory and /skills. In VS Code, use the Chat customization and diagnostics views. Start a fresh session after changing instructions, skills, or agents, and do not bypass workspace trust or normal tool approval to make discovery work.