# Learnitive

Learnitive is a local-first learning, research and writing workspace. Markdown is the default writing surface, LaTeX remains first-class for academic work, and advanced project/terminal/runtime capabilities are available without defining the public product as a browser IDE.

Staging: `https://edu.learnitive.com`  
Production: `https://www.learnitive.com`

## Product model

Learnitive combines:

- visual and source Markdown writing;
- first-class LaTeX, PDF, bibliography, citation and research-paper workflows;
- Learn courses and structured learning content;
- research, Paper Memory and source-grounded AI workflows;
- local AI plus Pro BYOK providers;
- browser/local project persistence, linked folders and ZIP/Git portability;
- collaboration and review workflows;
- templates for writing, research, theses and documents;
- an advanced Project Terminal and retained coding runtimes for users who need them.

The public product taxonomy is **Learn · Research · Write**. Coding/runtime implementation remains available as an advanced capability rather than the homepage/SEO category.

## InteractiveWeb namespace

The reusable company design base is **InteractiveWeb**.

- Shared UI/design/DOM infrastructure uses `interactive-*`.
- Learnitive-only UI/runtime concepts use `learnitive-*`.
- Keep product-specific `learnitive-*` selectors out of reusable InteractiveWeb packages; Learnitive-owned surfaces may use them.
- Product persistence/protocol identity remains `learnitive:` and `web+learnitive`.
- Product/service environment variables use `LEARNITIVE_*`.

The separate TeXise deployment remains a sibling legacy product. Learnitive installer/deployment logic must not modify its vhosts, services, web roots, or `/etc/texise/*` configuration. Historical TeXise implementation/audit documents remain in the repository where they are useful as provenance.

## Current terminal lifecycle defaults

- Guest: 30 minutes (Free fallback unless explicitly overridden)
- Free: 30 minutes
- Pro 1: 24 hours
- Pro 2: 72 hours
- Pro 3: 7 days

A browser/PTY reconnect creates a fresh PTY against the same still-valid sandbox allocation/workspace; it does not resurrect a dead PTY process.

## Homepage AI Builder

The public homepage AI Builder is a writing/research-first entry point into the existing project system, not a second generator backend. It is presented around research questions, sources, notes, outlines, Markdown and LaTeX drafting. Signed-in requests reuse the existing AI Settings provider/model/credential layer and create normal Learnitive projects; advanced code starters and runtimes remain available behind the product capability policy rather than defining the homepage experience.

Any pending homepage intent remains short-lived browser state under the Learnitive persistence namespace. Runtime/admin controls continue to govern AI availability and supported project modes.

## Development

The workspace uses PNPM and the `@learnitive/*` package scope.

```bash
pnpm install --frozen-lockfile
pnpm start
```

For parallel worktrees:

```bash
eval "$(node scripts/dev-ports.js --env)"
```

## Current release gates

Dependency-independent/current source contract gate:

```bash
pnpm run interactive:release-audit
```

Current release-quality orchestration:

```bash
pnpm run release:quality
```

The quality orchestrator runs the current Learnitive audit plus public-asset, frozen-lock, workspace dependency-version and public-barrel checks. A production release additionally requires installed dependencies, lint/typecheck, the production browser build, relevant Playwright suites, and release-candidate browser smoke testing.

Do not use historical TeXise/BF repair scripts as current release authority. `scripts/learnitive-r12-release-audit.mjs` is retained only as a compatibility entry point and forwards to the canonical current audit.

## Autonomous continuation and context handoff

For long multi-phase implementation work, read:

- `plans/AUTONOMOUS_EXECUTION_HANDOFF.md` — autonomous execution, quality-control, human-interaction and context-limit handoff rule;
- `PROJECT_STATE_LEDGER.md` — durable current project state;
- `NEXT_CHAT_CONTINUATION_PROMPT.md` — self-contained continuation prompt for a new chat.

The execution loop is:

**Execute → Verify → Identify problems → Fix → Verify again → Continue**

## Deployment safety

Learnitive staging/deployment lives under its own Learnitive paths and service identities. Do not repurpose the separate TeXise vhost/config/service paths. Before promotion to production, run the full dependency-backed build/test/browser certification in CI or staging and verify installer/runtime/firewall behavior on the target host.

## License

This repository remains licensed under AGPL-3.0-or-later. See [LICENSE](./LICENSE).
