// SPDX-License-Identifier: CC-BY-SA-4.0
// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath)
= CappauScripto Face Identity Card (Draft)
:toc:
:toclevels: 2
:icons: font

== Identity Card

[cols="1,3", options="header"]
|===
| Field | Required content

| Face name
| `CappauScripto`
CLI token: `cappa` (for example `cappa check src/main.cappa`)

| Audience
| Primary: CoffeeScript developers and Ruby-influenced JavaScript teams that
prefer concise, indentation-forward syntax.
Migration source: CoffeeScript codebases and JS codebases with CoffeeScript
style conventions.

| Syntax promise
| Keep CoffeeScript-style flow, readability, and expressiveness while compiling
to the same AffineScript core semantics.
Top 10 syntax mappings are listed below in one table.

| Error vocabulary
| Human-first wording with canonical compiler code preserved.
Diagnostics stay plain and actionable; branding stays out of stack traces.
Canonical error to face wording mapping is listed below.

| Tooling promise
| `npm`, `pnpm`, and `yarn` workflows supported from `package.json`.
`cappa check`, `cappa test`, `cappa bench`, and `cappa migrate` commands are
stable and CI-friendly.
Editor support includes formatting, diagnostics, completion, and go-to
definition through the shared language server.
Day-to-day use should feel familiar from first run, not like a toolchain reset.

| Proof upgrade sentence
| You keep CoffeeScript fluency and terse syntax, gain static guarantees,
ownership safety, and predictable build artifacts.

| Mascot and visual language
| Symbol: demitasse cup with alignment ticks.
Color direction: espresso brown (`#3B2A21`), crema (`#D9B382`), milk foam
(`#F8F4ED`), dark roast text (`#1C140F`).
Tone keywords: warm, precise, craft, dependable, welcoming.

| Migration path
| Day 0: run `cappa migrate` and `cappa check` on one pilot package.
Day 7: convert one service or module end-to-end and enforce `cappa check` in CI.
Day 30: ship broad migration with compatibility dashboard and defect delta
report.
|===

== Voice Guide (v1)

* Primary voice: warm craft, sharp engineering, no-snob tone.
* Brand copy can be playful; diagnostics and CLI errors stay direct and plain.
* Preferred rhythm: short lines, concrete claims, no hype words.
* Primary tagline: `Brew fast. Type strong. Ship calm.`
* Alternate taglines:
** `Keep the flow. Pour in guarantees.`
** `CoffeeScript feel, AffineScript backbone.`

== Top 10 Syntax Mappings

[cols="1,2,2,2", options="header"]
|===
| # | CoffeeScript idiom | CappauScripto face | Core semantic target

| 1
| `square = (x) -> x * x`
| `let square = (x) -> x * x`
| `let square = fn(x) => x * x`

| 2
| `handler = => @count += 1`
| `let handler = => this.count += 1`
| lexical `this` closure with explicit field update

| 3
| `log "ready"`
| `log "ready"` or `log("ready")`
| `log("ready")`

| 4
| `start() if ready`
| `start() if ready`
| `if ready { start() }`

| 5
| `[0..10]` and `[0...10]`
| `[0..10]` and `[0...10]`
| `rangeInclusive(0, 10)` and `range(0, 10)`

| 6
| `[x * x for x in xs when x > 0]`
| `[x * x for x in xs when x > 0]`
| `xs.filter(x => x > 0).map(x => x * x)`

| 7
| `"Hello #{name}"`
| `"Hello #{name}"`
| template/string interpolation expression

| 8
| `user?.profile?.name ? "anon"`
| `user?.profile?.name ?? "anon"`
| null-safe chain with fallback

| 9
| `{host, port = 5432} = cfg`
| `let {host, port = 5432} = cfg`
| destructuring with default values

| 10
| `class Repo extends Base`
| `class Repo extends Base`
| class declaration lowered to core object model
|===

== Error Vocabulary Mapping

[cols="1,2,3", options="header"]
|===
| Canonical code | Canonical meaning | CappauScripto wording

| `E1001`
| Type mismatch
| Type mismatch: expected `<Expected>`, got `<Actual>`.

| `E1002`
| Unknown identifier
| Unknown name `<id>` in this scope.

| `E1003`
| Immutable reassignment
| Cannot reassign immutable binding `<id>`.

| `E1004`
| Use-after-move
| Value `<id>` has been moved; clone or borrow before reuse.

| `E1005`
| Borrow conflict
| Mutable and shared access to `<id>` overlap in this scope.

| `E1006`
| Non-exhaustive match
| `match` is missing at least one case.

| `E1007`
| Effect boundary violation
| This call crosses an effect boundary; mark `await` or handle failure path.

| `E1008`
| Module resolution failure
| Cannot resolve module `<module>` from `<file>`.
|===

== Acceptance Notes

This card is a working draft and is valid only when backed by:

* face-specific fixtures and E2E tests,
* migration CLI behavior documentation,
* compatibility suite output,
* adoption evidence bundle links.

Related working artifacts:

* link:CAPPAUSCRIPTO-RELEASE-GATE-TRACKER.adoc[Release Gate Tracker]
* link:CAPPAUSCRIPTO-COMPATIBILITY-MATRIX.adoc[Compatibility Matrix]
* link:CAPPAUSCRIPTO-MIGRATION-SPEC.adoc[Migration Spec]
