Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ NOTECRAFT_UI_VISUAL_DIR=
NOTECRAFT_CONTROL_PORT=
NOTECRAFT_CONTROL_KEY=

# Optional OfficeIMO bridge executable used by import development.
NOTECRAFT_OFFICEIMO_BRIDGE=

# Documentation and build output controls.
UPDATE_DOCS=
DIST=
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ MEMORY.md
*.exe
*.dmp

# OfficeIMO bridge build output and temporary upstream source inspection.
# Preserve existing ignored build output from the removed bridge.
/tools/officeimo/OfficeIMO.NoteCraft.Bridge/bin/
/tools/officeimo/OfficeIMO.NoteCraft.Bridge/obj/
/.work-officeimo-*/

# website/demo is the compiled WASM build of notecraft-web. It is built fresh
# by the deploy workflow (.github/workflows/deploy-website.yml), never
Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,16 @@ purpose summary.
| `nc-hl-design` | Level 2: design router | Feature scope, architecture handoff, state and data-flow design, decisions, risks, and acceptance criteria. | Does not replace `nc-arch` or implement MVC details. Routes the detailed design to the relevant specialist below. |
| `nc-design-artcraft-integration` | Design specialist: ArtCraft integration | Reuse and adapt established ArtCraft suite patterns, shared tools, and Android integration guidance while preserving NoteCraft product and architecture boundaries. | Does not override NoteCraft requirements, repository boundaries, licenses, or platform rules. |
| `nc-design-egui-integration` | Design specialist: egui integration | egui and winit input boundaries, semantic events, raw input adapters, clipboard behavior, and ArtCraft egui interaction patterns. | Does not own commands, product behavior, or platform service implementation. Consult `nc-design-controller` and `nc-arch-x-plat`. |
| `nc-design-controller` | MVC specialist: user actions | User actions and commands: which behaviour is a command, and which model, controller and view it touches. | Does not own product requirements or the editing history. Consult `nc-design-editor` for undo and redo. Review against the MVE proposal (`docs/rfc/ver.0.1.x/rfc-mve-v1-branching.md`, a draft) before recommending a new boundary. |
| `nc-design-editor` | Editing and history | Every change to page content reaches the editor, is recorded in its history, and can be undone and redone. | Does not own the stored form (`nc-dom-ser`) or the controls (`nc-uiux-controls`). |
| `nc-info-search` | Design reference: search | Today's plain scan, the planned hybrid search (keyword BM25 plus embeddings, merged by reciprocal rank fusion), and what is indexed. | Does not own the search box UI (`nc-uiux-features`) or product scope (`nc-prod`). |
| `nc-devx-docs` | Developer documentation | MSDN-level reference documentation, accuracy checked against the code, and the map of every document and skill. | Does not decide design or architecture, and does not own machine setup (`nc-devx`). |
| `nc-prod` | Product authority | Product requirements, non-negotiable behavior, local-file model, OneNote behavior, import, and format parity. | Does not design crate APIs or implement features. |
| `nc-dom-ser` | MVC specialist: DOM and persistence | HTML and CMGFM page model, DOM semantics, serialization, deserialization, asset references, round trips, and cross-format parity. | Does not own general architecture or UI styling. Consult with `nc-arch`; route feature design through `nc-hl-design`. |
| `nc-code-rust` | Implementation specialist | Rust code quality, error handling, logging, tests, linting, and maintainable crate implementation. | Does not decide product scope or architecture. Implements the approved design. |
| `nc-uiux-features` | MVC specialist: end-to-end feature view | Complete user-facing features spanning ribbon, page content, storage integration, persistence, accessibility, and regression tests. | Does not redefine storage or format semantics. Consult `nc-dom-ser` and `nc-arch` when those boundaries are crossed. |
| `nc-uiux-controls` | MVC specialist: interaction controls | Buttons, menus, hit targets, hover states, keyboard behavior, object selection, and dragging. | Does not own dialog theming, DOM persistence, or product scope. Consult `nc-uiux-z-order` when surfaces overlap or compete for pointer input. |
| `nc-uiux-keys` | MVC specialist: keyboard and pointer navigation | Moving into and out of page objects (code blocks, math, tables, images, diagrams) and between blocks: arrows, Page Up and Down, Home, End, and a single click to edit. | Does not own control hit targets (`nc-uiux-controls`) or the editing history (`nc-design-editor`). |
| `nc-uiux-dialogs` | MVC specialist: dialog view | Themed modal dialogs, confirmations, progress surfaces, privacy prompts, recovery prompts, and error states. | Does not own command behavior or persistence. Consult `nc-uiux-controls` for interaction details and `nc-uiux-z-order` for layer priority, modality, and focus. |
| `nc-uiux-bidi` | MVC specialist: text interaction | Bidirectional text, RTL controls, caret placement, selection, mixed-script behavior, and mirrored layout. | Does not own general editor serialization. Consult `nc-dom-ser` for persisted page representation. |
| `nc-uiux-i18n` | UI foundation specialist | Interface string extraction, locale catalogs, language preference, translation fallback, coverage audits, and localization verification using ArtCraft conventions. | Does not own notebook content translation or RTL interaction/mirroring. Consult `nc-uiux-bidi` for RTL behavior and `nc-ua` for localized help and demo content. |
Expand All @@ -181,6 +186,7 @@ purpose summary.
| `nc-uiux-icons` | UI foundation specialist | Licensed icon selection, local asset integration, semantic mapping, accessibility, and icon-state consistency. | Does not own Windows Shell asset extraction or page serialization. Consult `nc-dom-ser` and `nc-themes` where applicable. |
| `nc-uiux-testing` | UI automation and visual verification specialist | NoteCraft UI automation, semantic interaction tests, headless and real-window screenshot capture, visual assertions, accessibility-test integration, platform automation boundaries, and test evidence. | Does not own product documentation or demo content. Routes User Assistance assets and public screenshot selection to `nc-ua`; routes release acceptance evidence to `nc-release-signoff`. |
| `nc-runtime-diagnostics` | Runtime diagnostics specialist | Local application logs, telemetry sessions, settings and diagnostic paths, session correlation, event schemas, redaction, export/clear behavior, and troubleshooting evidence. | Does not set product privacy policy, implement logging, or own CI/machine setup. Routes privacy decisions to `nc-prod`, Rust implementation to `nc-code-rust`, architecture to `nc-arch`, and developer environment issues to `nc-devx`. |
| `nc-info-ocr` | Design reference: image text | Traditional OCR of printed text in pictures (companion text, line boxes, search hits) and AI image descriptions for alt text; engines, models, licences, status and open decisions. | Does not own the search index (`nc-info-search`) or product scope (`nc-prod`). Read before changing the OCR crate, its companion files, or the description path. |
| `nc-ua` | Product coverage specialist | User assistance, product coverage, multilingual demo content, generated outputs, scratch copies, public documentation screenshots, and demo-notebook consistency. | Does not own screenshot capture mechanics or UI automation. Consumes `nc-uiux-testing` and does not replace implementation or design skills. |
| `nc-release-signoff` | Release gate | Versioning, demo parity, tests, lint, packaging, installers, assets, and release evidence. | Does not implement features or waive failing gates. |
| `nc-devx` | Developer experience | Machine setup and its check scripts, the quality levels L0 to L4, git hooks, coverage, the PII scanner, and the daily workflow. | Does not decide product or architecture. Owns how work is checked, not what is built. |
Expand Down
2 changes: 1 addition & 1 deletion ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ source material.
| `assets/demo/import-file.svg` | Synthetic OneNote file import walkthrough | NoteCraft project | MIT OR Apache-2.0 |
| `assets/demo/import-open.png` | NoteCraft open screen showing the import actions | Rendered by `ui_shot` from NoteCraft with the Welcome notebook demo, in the default theme | MIT OR Apache-2.0 |
| `assets/demo/page-menu.png` | The navigator's menu for a page, with Lock read only, shown in the demo notebook's menus page | Rendered by the UI test harness from NoteCraft, with a sample notebook, in the default light theme | MIT OR Apache-2.0 |
| `assets/demo/imported-notebook.png` | NoteCraft imported notebook view using synthetic fixture data | Rendered by `ui_shot` from NoteCraft; no personal notebook data | MIT OR Apache-2.0 |
| `assets/demo/imported-notebook.png` | NoteCraft notebook view with synthetic sample content | Rendered by `ui_shot` from NoteCraft; no personal notebook data | MIT OR Apache-2.0 |
| `assets/demo/import-progress.png` | NoteCraft import progress dialog using synthetic fixture data | Rendered by `ui_shot` from NoteCraft with the Welcome notebook demo, in the default theme; no personal notebook data | MIT OR Apache-2.0 |

These are screenshots of NoteCraft itself, made by `cargo xtask screenshots` from sample
Expand Down
107 changes: 107 additions & 0 deletions SKILLS/nc-devx-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: nc-devx-docs
description: Owns NoteCraft's developer documentation: accurate, MSDN-level reference for the repo, its crates, commands and formats, kept in step with the code. Knows where every architecture and design skill and document lives, and routes questions to them.
license: MIT
metadata:
version: "0.1.20261205"
related_skills: [nc-arch, nc-arch-x-plat, nc-design-editor, nc-dom-ser, nc-hl-design, nc-devx, nc-code-rust, nc-release-signoff]
---

# nc-devx-docs: NoteCraft developer documentation

## Job to be done

Keep NoteCraft's developer documentation exact. A reader who has never seen the repo should be able to
find a fact, check it against the code, and act on it without asking anyone. Documentation that
disagrees with the code is a defect, the same as a failing test.

## The standard: MSDN level

Write reference documentation the way Microsoft Learn documents an API:

- **Summary first.** One or two sentences: what it is, and what it is for.
- **Remarks.** Behaviour, limits, ordering, and the reasons for non-obvious choices.
- **Parameters, fields and outputs.** Every one, with its type, unit and valid range.
- **Errors.** Every error a caller can see, and what the caller should do.
- **Examples.** At least one example that runs, with its expected output.
- **See also.** Links to the related page, skill or RFC, by relative path.

Every factual claim must point at its source: a file and line (`crates/onenote/src/one.rs:409`), a
command, or a test name. A claim with no source is not allowed to stay in the document.

## Accuracy rules

1. **Verify before writing.** Read the code the document describes. Do not copy claims from older
documents, from memory, or from a PR description.
2. **Name what is not built.** Say "planned", "proposed" or "not yet implemented" in the text itself. A
proposal written in the present tense reads as a fact.
3. **Date the status.** Put "Status as of YYYY-MM-DD" on any document that describes progress.
4. **Keep one source of truth.** If two documents describe the same thing, one links to the other and
does not repeat the facts.
5. **Relative links only.** `cargo xtask docs` checks relative links; a broken link fails the gate.
6. **No personal data.** Use generic notebook names in examples. Never copy a real notebook's content.
7. **Re-check after each change.** When code changes a documented behaviour, update the document in the
same pull request.

## Where documents live

See `references/doc-map.md` for the full map. In short:

| Kind | Location |
|---|---|
| Product and user documentation | `docs/` (`page-model.md`, `folder-format.md`, `how-to/`) |
| Engineering reference | `docs/architecture.md`, `docs/testing.md`, `docs/coverage.json`, `docs/feature-parity.md` |
| Decisions | `docs/rfc/uiux/` and `docs/rfc/release/` (short records of a single decision, ADRs) |
| Proposals | `docs/rfc/` (versioned by product line) and `SKILLS/nc-dom-ser/references/rfc-*.md` |
| Research | `docs/research/` |
| Status of work in progress | `docs/onenote-migration-status.md`, `docs/onenote-reader-replacement.md` |
| Skills (design and architecture contracts) | `SKILLS/*/SKILL.md` |

## Architecture and design skills: when to use which

| Question | Skill | Read first |
|---|---|---|
| How are the crates layered, and who owns what? | `nc-arch` | `SKILLS/nc-arch/SKILL.md` |
| How do we branch the code per platform, without shrinking the app? | `nc-arch-x-plat` | `SKILLS/nc-arch-x-plat/SKILL.md`, `references/` |
| How does an edit reach the editor, and can it be undone? | `nc-design-editor` | `SKILLS/nc-design-editor/SKILL.md` |
| How is a page written to HTML and CommonMark, and kept in parity? | `nc-dom-ser` | `SKILLS/nc-dom-ser/SKILL.md`, `references/`, RFC 0001 to 0003 |
| How is a new feature or refactor designed (scope, data flow, acceptance)? | `nc-hl-design` | `SKILLS/nc-hl-design/SKILL.md`, `references/` |
| How is a user action made MVC-aligned? | `nc-design-controller` | `SKILLS/nc-design-controller/SKILL.md` |
| How do we integrate with ArtCraft's suite conventions? | `nc-design-artcraft-integration` | `SKILLS/nc-design-artcraft-integration/SKILL.md` |
| How do the egui boundaries, input and clipboard work? | `nc-design-egui-integration` | `SKILLS/nc-design-egui-integration/SKILL.md` |
| How is search designed, now and planned? | `nc-info-search` | `SKILLS/nc-info-search/SKILL.md` |
| Does a feature meet product requirements? | `nc-prod` | `SKILLS/nc-prod/SKILL.md` |
| What must pass before a release? | `nc-release-signoff` | `SKILLS/nc-release-signoff/SKILL.md` |
| How are themes and contrast handled? | `nc-themes` | `SKILLS/nc-themes/SKILL.md` |
| How is the user-facing product kept complete (demo, coverage, versions)? | `nc-ua` | `SKILLS/nc-ua/SKILL.md` |
| How do we diagnose a runtime failure from logs? | `nc-runtime-diagnostics` | `SKILLS/nc-runtime-diagnostics/SKILL.md` |
| How is Rust code written and reviewed here? | `nc-code-rust` | `SKILLS/nc-code-rust/SKILL.md` |
| How do I set up, lint, test and run locally? | `nc-devx` | `SKILLS/nc-devx/SKILL.md` |
| Dialogs, controls, keys, icons, drawing, bidi, i18n, z-order, testing | `nc-uiux-*` | `SKILLS/nc-uiux-*/SKILL.md` |

### Important: the architecture is changing

The target architecture for 0.1.x is **Model-View-Editor (MVE)**, proposed in
`docs/rfc/ver.0.1.x/rfc-mve-v1-branching.md`. The Editor coordinates change and plays the controller's role.
That RFC is a **draft for review**, not yet adopted.

Until it is accepted:

- `nc-design-controller` and `nc-hl-design` still describe MVC-aligned design. Read them as current, and
check the RFC before recommending a new boundary.
- Name the Editor only as the proposal says, and do not describe MVE as the current design.
- Record the proposed three-branch model (`main` hot, `release/*` cold, `_v1x` hot) as a proposal too.

## Workflow

1. Identify the reader's question, and pick the document that owns the answer (table above).
2. Read the code it describes; list each claim you will write.
3. Write the document in the MSDN shape, with a source for every claim.
4. Run `cargo xtask docs` for the links, and `cargo xtask text` for the text rules.
5. If the document describes progress, add the status date and the open items.
6. Link the document from the nearest index (`docs/README.md`, a skill, or the RFC index).

## Related

- `references/doc-map.md`: the full map of documents and skills.
- `references/writing-standard.md`: the template for a reference page, and a checklist.
Loading
Loading