Meaning · Connect · Express · Validate

Bone Flow #001 - Bone Core Guide

This is the starting point for understanding the Bone Flow concept and the Core shared by every component.

1. First: What is Bone Flow?

Bone Flow treats UI not merely as a collection of visual controls, but as a flow of meaning → connection → expression → validation.

One sentence to remember: A Bone carries meaning, a Joint connects and delivers that meaning, UI components express it visually, and Validation verifies that the flow can operate correctly.
#001 Bone CoreSmallest unit of meaning
id / type / value
→
#002 JointConnects Bones
Port / Compatibility / State / Delivery
→
UI ComponentsText / Icon / Image / Shape / Input ...
Express meaning in a visible, operable form
ValidationChecks structure, values, connection and state, and classifies failures
EditorCreates and edits Bones, connections and component settings

2. Why separate these responsibilities?

In conventional UI implementations, data, events, DOM, CSS, connections and error handling can become entangled inside one component. A visual change can then break data processing, connection failures become difficult to diagnose, and reuse across screens becomes harder.

01 Define meaningDefine what the application is handling as a Bone.
02 ConnectJoint carries meaning to the next destination.
03 Express visuallyA UI component converts it into display and interaction.
04 ValidateSmoke / Validation verify that it is operating correctly.

This separation allows the same meaning to be expressed as Text, Icon, or on another screen, while keeping visual concerns separate from meaning.

3. What does #001 Bone Core do?

#001 is the foundational runtime loaded first in Bone Flow. It does not draw later UI components; it defines the unit of meaning handled by Bone Flow and its lifecycle.

#001 is responsible for#001 is not responsible for
✓ Validate and hold id / type / value× Joint lines, ports, or connection states
✓ create / clone / update / replace× Rendering Text / Icon / Image
✓ normalize / serialize / deserialize× Property Editor UI
✓ destroy / isDestroyed× Animation / Transition
✓ Core errors and non-destructive behavior× Joint WAIT / FIFO / BLOCKED

4. Minimum Bone structure

{
  "id": "customer-name",
  "type": "text",
  "value": "Yamada Taro"
}
PropertyMeaningCore behavior
idIdentifier of the BoneRequired string. Missing, empty, or invalid types are rejected.
typeDescribes what the Bone meansRequired string. Missing, empty, or invalid types are rejected.
valueThe actual value being carriedRequired. Supports null, primitive, array, and object values; circular references and unsupported values are rejected.

A Bone itself does not own color, font, lines, animation, or DOM. Those belong to the expression layer.

5. How #001 connects to #002 Joint

Creating a Bone with #001 does not yet deliver information to another component. #002 Joint connects Source/Target endpoints and ports, then handles compatibility, state and delivery.

Important: Joint diagrams in the #001 Guide are for conceptual understanding. They do not mean that #001 implements Joint behavior.
const bone = BoneCore.create({
  id: "title",
  type: "text",
  value: "Hello"
});

// Joint delivers this Bone to the next component,
// where a UI component such as Text expresses value visually.

6. Component QA vs. “000 Development Order Cumulative Regression Test”

Bone Flow separates tests for the component itself from the cumulative regression test for the integrated boneflow.js / boneflow.css.

CheckTargetPurpose
Smoke Test#001 Bone Core onlyQuickly checks major APIs and basic behavior.
Validation Report#001 Bone Core onlyChecks invalid inputs, error classification, non-destructive behavior, and specification conditions in detail.
000 Development Order Cumulative Regression TestIntegrated Bone FlowAfter adding #002 and later components and regenerating boneflow.js / boneflow.css, confirms that earlier components such as #001 have not been broken.
Development flow: Component QA → add authoritative source to src → regenerate boneflow.js / boneflow.css → run 000 cumulative regression.

7. BoneCore Public API

BoneCore.create()Create a new Bone from input.
BoneCore.clone()Create an independent copy of a Bone.
BoneCore.update()Return a Bone with selected fields updated.
BoneCore.replace()Replace the entire Bone.
BoneCore.normalize()Normalize input into the official Core structure.
BoneCore.serialize()Convert a Bone into JSON text.
BoneCore.deserialize()Restore a Bone from JSON text.
BoneCore.destroy()Move a Bone into the destroyed state.
BoneCore.isDestroyed()Check whether a Bone is destroyed.

Basic example

const bone = BoneCore.create({ id:"message", type:"text", value:"Hello" });
const cloned = BoneCore.clone(bone);
const updated = BoneCore.update(bone, { value:"Hello Bone Flow" });
const json = BoneCore.serialize(updated);
const restored = BoneCore.deserialize(json);

8. Non-destructive behavior and lifecycle

#001 must not unexpectedly mutate source input or an earlier Bone. Across clone/update/replace/serialize/deserialize, callers must be able to identify which Bone represents the current value.

9. Core Error / Validation

Core does not silently repair invalid input and continue. It reports classified error codes so the cause can be identified.

BONE_INPUT_UNDEFINEDBONE_INPUT_NULLBONE_INPUT_NOT_OBJECTBONE_ID_REQUIREDBONE_ID_TYPEBONE_ID_EMPTYBONE_TYPE_REQUIREDBONE_TYPE_TYPEBONE_TYPE_EMPTYBONE_VALUE_REQUIREDBONE_VALUE_CIRCULARBONE_DESTROYEDBONE_UPDATE_DESTROYEDBONE_SERIALIZE_DESTROYEDBONE_JSON_BROKEN

The Test page separates normal-path checks into Smoke Test and invalid/rejection checks into Validation. Completion remains unavailable until both pass.

10. What are boneflow.js and boneflow.css?

The common distribution files used by applications are boneflow.js and boneflow.css.

FileRole
boneflow.jsThe final JavaScript bundle that contains verified component runtimes and HTML Functional Classes in the defined order starting at #001.
boneflow.cssThe final CSS bundle built from verified component styles. Component-specific rules are scoped so they do not leak into other components.

Rule: Do not hand-edit the final bundles. Authoritative sources live under src/; bundles are regenerated by the build process.

11. Source layout of the rebuilt Bone Flow

public/ ├─ index.html ← overall index at http://localhost/ └─ boneflow/ ├─ boneflow.js ← final JS bundle ├─ boneflow.css ← final CSS bundle ├─ src/ │ ├─ js/001-core/ ← authoritative #001 JS source │ └─ css/001-core/ ← authoritative #001 CSS source ├─ tools/ │ ├─ BUNDLE-JS.txt ← JS bundle order │ ├─ BUNDLE-CSS.txt ← CSS bundle order │ └─ build-boneflow.ps1/bat ← bundle build ├─ test/bone-core.html └─ docs/001-Bone-Core.html

Later components are added to src only after authoritative-source verification, Smoke/Validation, and browser checks, then accumulated into the bundle.

12. CSS themes: Light / Dark / Neon

Bone Flow provides Light / Dark / Neon. Light and Dark are conventional display themes. Neon is the distinctive Bone Flow visual language based on the existing #002 Joint screen.

Neon does not mean making every element glow. It uses neon colors selectively for connections, state, selection and important information.

13. Smoke Test / Validation / Completion

Bone Flow is not complete merely because the runtime loads. The #001 Test page independently shows normal-path Smoke, abnormal-path Validation, reports, Runtime Console and Completion.

  1. Run Smoke Test.
  2. Run Validation.
  3. Check total tests / PASS / FAIL / elapsed time / Version.
  4. Save JSON / MD reports when needed.
  5. Local completion becomes available only when both pass.
  6. Do not mark formal Completed / Specification Frozen before user localhost verification.

14. Recommended learning order after #001

After understanding “meaning” in #001, continue to #002 Joint to understand “connection”. Then look at expression components such as Text / Icon / Image / Shape to see how responsibility separation works across Bone Flow.

Learning order: #001 Core → #002 Joint → expression components → input components → Editor / Validation → Motion components

15. Position of #001 in Bone Flow

#001 Bone Core is not simply the first small component. It defines the meaning model on which Bone Flow is built. Later components must not move Core responsibility into UI code or alter the Bone structure merely for presentation convenience.

Understanding Bone Flow starts with understanding the #001 rule: keep meaning small and explicit.