ketatlas 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/LICENSE +1 -1
- package/NOTICE.md +1 -1
- package/README.md +42 -33
- package/docs/agent-mockups.md +85 -0
- package/docs/architecture.md +6 -0
- package/docs/cli.md +3 -1
- package/docs/migration.md +2 -1
- package/docs/releasing.md +45 -16
- package/package.json +4 -3
- package/skills/ketatlas/SKILL.md +137 -0
- package/templates/basic/README.md +1 -1
- package/templates/process/README.md +1 -1
- package/templates/web/README.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.1 — 2026-09-04
|
|
4
|
+
|
|
5
|
+
- Publish the tested archive through an absolute file path; support guarded retries after a CI workflow fix.
|
|
6
|
+
|
|
7
|
+
- Clarify the consumer contract: JSON, product screens, assets, and docs only; verify global and npx usage without project manifests or dependencies.
|
|
8
|
+
|
|
9
|
+
- Portable KetAtlas agent skill and a product-brief workflow for generating compatible interactive HTML mockups.
|
|
10
|
+
- Automatically publish verified stable version increases from `develop`, with duplicate-release protection and npm provenance.
|
|
11
|
+
|
|
12
|
+
## 0.1.0 — 2026-09-04
|
|
4
13
|
|
|
5
14
|
- Standalone `ketatlas scaffold`, `serve <atlas.json>`, `audit`, and `validate` commands.
|
|
6
15
|
- Basic, web and screenless process templates with a local configuration schema.
|
|
@@ -10,4 +19,4 @@
|
|
|
10
19
|
- Canonical KetJS design system with pinned provenance and offline assets.
|
|
11
20
|
- Static audits, CLI/server tests, browser evidence and packed-install verification.
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Published to [npm](https://www.npmjs.com/package/ketatlas/v/0.1.0).
|
package/LICENSE
CHANGED
package/NOTICE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
KetAtlas is maintained by
|
|
3
|
+
KetAtlas is maintained by KET VIET JSC, VN under the MIT license.
|
|
4
4
|
|
|
5
5
|
- The viewer originated from KétSuite's HTML flow-map prototype, then was extracted into this independent package. No mobile app code or business data is bundled.
|
|
6
6
|
- Default tokens and UI primitives: `@ketvietlab/design-system` from [KetJS](https://github.com/ketvietlab/ketjs), MIT. Exact source revision and file hashes are recorded in `assets/design-system.lock.json`. Generated output only adapts root selectors to a Shadow DOM host; token values are unchanged. See `assets/KETJS-LICENSE`.
|
package/README.md
CHANGED
|
@@ -6,56 +6,48 @@ Turn a JSON file and your existing HTML screens into a canvas you can drag, zoom
|
|
|
6
6
|
|
|
7
7
|
KetAtlas has an English UI, zero runtime npm dependencies, and no build step. Node.js **22+** is needed for the CLI. Viewers use native ES modules and run on an HTTP server.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Demo
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
npm ci
|
|
15
|
-
npm run dev
|
|
16
|
-
```
|
|
11
|
+
See a mobile workflow map in action: explore connected screens and try the HTML prototype.
|
|
12
|
+
|
|
13
|
+
https://github.com/user-attachments/assets/13f24fc8-7b8e-4bda-9e02-364c120ee163
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
## Run without a project install
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
[KetAtlas is available on npm](https://www.npmjs.com/package/ketatlas). Use Node.js 22+ and run it from any directory:
|
|
21
18
|
|
|
22
19
|
```sh
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
npx --yes ketatlas@0.1.1 scaffold my-atlas --template web
|
|
21
|
+
npx --yes ketatlas@0.1.1 serve my-atlas/atlas.json
|
|
22
|
+
npx --yes ketatlas@0.1.1 audit my-atlas/atlas.json --strict
|
|
26
23
|
```
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Run through npx
|
|
31
|
-
|
|
32
|
-
Run immediately from a local checkout, including before the first push or npm release:
|
|
25
|
+
Or install the CLI once for your user account:
|
|
33
26
|
|
|
34
27
|
```sh
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
npm install --global ketatlas@0.1.1
|
|
29
|
+
ketatlas scaffold my-atlas
|
|
30
|
+
ketatlas serve my-atlas/atlas.json
|
|
31
|
+
ketatlas audit my-atlas/atlas.json --strict
|
|
38
32
|
```
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
The consumer folder contains `atlas.json`, its schema, product HTML/CSS/JavaScript, local assets, and documentation. It needs no `package.json`, lockfile, `node_modules`, build step, or copy of the viewer. The CLI supplies scaffold, serving, and static audit from its own installation. `serve` and `audit` leave project files unchanged unless an audit output file is explicitly requested.
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
Pin the version in run commands or the global installation for reproducible team workflows. Product scripts implement mock screen interactions; they are authored content, not a local installation of KetAtlas. Framework tooling and tests stay in the KetAtlas repository.
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npx --yes --package=github:ketvietlab/ketatlas ketatlas audit my-atlas/atlas.json
|
|
48
|
-
```
|
|
38
|
+
Edit the JSON and screen files, then refresh the browser. The default viewer address is **http://127.0.0.1:4178**.
|
|
39
|
+
|
|
40
|
+
## Create mockups with an agent
|
|
49
41
|
|
|
50
|
-
|
|
42
|
+
Install the KetAtlas skill in your product project:
|
|
51
43
|
|
|
52
44
|
```sh
|
|
53
|
-
npx
|
|
54
|
-
npx ketatlas serve my-atlas/atlas.json
|
|
55
|
-
npx ketatlas audit my-atlas/atlas.json --strict
|
|
45
|
+
npx skills add ketvietlab/ketatlas --skill ketatlas
|
|
56
46
|
```
|
|
57
47
|
|
|
58
|
-
|
|
48
|
+
Ask your agent to use the skill with a product brief: requested flows, target platforms, design references, and output directory. The agent creates actual HTML screens, a version 1 `atlas.json`, and run instructions, then audits the result.
|
|
49
|
+
|
|
50
|
+
See [Agent mockups](docs/agent-mockups.md) for installation options, a ready-to-use request, and a reusable brief template. Agents without skill support can read the [single skill file](skills/ketatlas/SKILL.md) directly.
|
|
59
51
|
|
|
60
52
|
## One file describes the journey
|
|
61
53
|
|
|
@@ -109,6 +101,19 @@ Give the container a height. Ship `src/`, `styles/`, and `assets/` together. Sha
|
|
|
109
101
|
|
|
110
102
|
## Explore and contribute
|
|
111
103
|
|
|
104
|
+
To develop KetAtlas itself, clone this repository and install its development dependencies:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
git clone git@github.com:ketvietlab/ketatlas.git
|
|
108
|
+
cd ketatlas
|
|
109
|
+
npm ci
|
|
110
|
+
npm run dev
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The playground includes mobile sign-in, desktop approval, and a fulfilment process. These development dependencies are not required in consumer projects. To try an unpublished checkout, use `npx --yes --package ~/dev/ketatlas ketatlas serve /path/to/my-atlas/atlas.json`.
|
|
114
|
+
|
|
115
|
+
Stable version increases merged into `develop` are automatically published after CI verifies the package. See [Releasing](docs/releasing.md).
|
|
116
|
+
|
|
112
117
|
- [Authoring guide](docs/authoring.md): screens, processes, branching, reuse, and viewport sizes.
|
|
113
118
|
- [Configuration reference](docs/configuration.md): schema and defaults.
|
|
114
119
|
- [CLI and audit](docs/cli.md): commands, exit codes, and audit boundaries.
|
|
@@ -127,4 +132,8 @@ npm run test:package
|
|
|
127
132
|
|
|
128
133
|
Audit is static analysis. It does not execute product code or prove that native apps, external services, or embedded pages behave correctly. Arrows describe the authored workflow; the embedded HTML retains its own interactions.
|
|
129
134
|
|
|
130
|
-
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
KetAtlas is a project of **KET VIET JSC, VN**, distributed under the [MIT License](LICENSE).
|
|
138
|
+
|
|
139
|
+
Copyright (c) 2026 KET VIET JSC, VN. See [third-party notices](NOTICE.md) for bundled dependencies.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Create mockups with an agent
|
|
2
|
+
|
|
3
|
+
Give an agent the KetAtlas skill and a product brief. The agent produces real HTML screens plus `atlas.json`; KetAtlas opens those files as an interactive workflow map. The brief describes the product, while the generated JSON schema and CLI audit check the output format.
|
|
4
|
+
|
|
5
|
+
## Install the skill once
|
|
6
|
+
|
|
7
|
+
From the project in which you want to create mockups:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx skills add ketvietlab/ketatlas --skill ketatlas
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Choose your agent when prompted, or target it directly:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx skills add ketvietlab/ketatlas --skill ketatlas --agent codex
|
|
17
|
+
npx skills add ketvietlab/ketatlas --skill ketatlas --agent claude-code
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
These commands use the separate [open agent skills CLI](https://github.com/vercel-labs/skills). Installation is project-scoped by default. The skill is a single portable [SKILL.md](../skills/ketatlas/SKILL.md), not a new KetAtlas command or a hosted generation service.
|
|
21
|
+
|
|
22
|
+
If the agent does not support skill installation, attach that file or ask it to read [the skill on GitHub](https://github.com/ketvietlab/ketatlas/blob/develop/skills/ketatlas/SKILL.md) before working. Installing a skill does not require changing the product repository's runtime dependencies.
|
|
23
|
+
|
|
24
|
+
## Ask for a mockup
|
|
25
|
+
|
|
26
|
+
For a short request, invoke the skill and include the product, target, design reference, and flows:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
Use $ketatlas to create one shared HTML mobile prototype for Northstar Tasks
|
|
30
|
+
in ./tasks/mobile. Use 390 × 844 screens, English product copy, and the design
|
|
31
|
+
system in ./design-system. Include sign-in, password recovery, task list,
|
|
32
|
+
task details, and task completion. Map entry points, actions, outcomes, and
|
|
33
|
+
relevant error/recovery states. Implement the main interactions, then audit
|
|
34
|
+
and preview the result. Return the serve command and verification results.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`$ketatlas` is the explicit skill invocation in Codex. In other agents, use that agent's skill selector or explicitly ask it to use the installed KetAtlas skill. Keep the same product brief.
|
|
38
|
+
|
|
39
|
+
The deliverable is data and product screen assets: JSON/schema, HTML/CSS/JavaScript, local assets, and documentation. Do not add a package manifest, lockfile, node_modules, or copied viewer/test tooling to make the atlas runnable. Use a global KetAtlas installation or a version-pinned npx command. Browser checks can use the agent's existing tooling outside the atlas folder.
|
|
40
|
+
|
|
41
|
+
The agent should infer routine details and record assumptions. Provide an exact list when “all screens” means a defined inventory, so missing coverage can be checked against a source.
|
|
42
|
+
|
|
43
|
+
## Use a saved brief for larger projects
|
|
44
|
+
|
|
45
|
+
Save this template as `mockup-brief.md`, fill in the relevant fields, and ask: **“Use the KetAtlas skill to implement mockup-brief.md.”** The brief stays Markdown; do not add its planning fields to `atlas.json`.
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
# Mockup brief
|
|
49
|
+
|
|
50
|
+
- Product and audience:
|
|
51
|
+
- User goal:
|
|
52
|
+
- Output directory:
|
|
53
|
+
- Target platforms and viewport sizes:
|
|
54
|
+
- Product content language:
|
|
55
|
+
- Design system, existing HTML, and reference files/URLs:
|
|
56
|
+
- Requested flows and screen inventory:
|
|
57
|
+
- Relevant loading, empty, validation, error, and recovery states:
|
|
58
|
+
- Interactions to demonstrate and synthetic demo inputs:
|
|
59
|
+
- Scope exclusions and any intentional remote dependencies:
|
|
60
|
+
|
|
61
|
+
## Expected delivery
|
|
62
|
+
|
|
63
|
+
Create actual HTML screens and one KetAtlas version 1 atlas.json. Reuse
|
|
64
|
+
screens and styles across flows. Set explicit flow starts, outcomes, and
|
|
65
|
+
labelled transitions. Each named screen state must open directly.
|
|
66
|
+
|
|
67
|
+
Use the generated ketatlas.schema.json. Run KetAtlas audit, test the
|
|
68
|
+
important interactions in the viewer when browser automation is available,
|
|
69
|
+
and report results or limitations. Include a README with run commands,
|
|
70
|
+
flow coverage, demo inputs, and assumptions. Keep the output free of package
|
|
71
|
+
manifests, lockfiles, local dependencies, and copied viewer/test tooling.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
For an existing prototype, ask the agent to reuse its HTML and add or update the atlas instead of rebuilding it. For later changes, name the flow or screen IDs to preserve, for example: **“Add an expired-code recovery branch to sign-in; keep existing screen IDs and audit the updated project.”**
|
|
75
|
+
|
|
76
|
+
## Review the result
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npx ketatlas serve ./tasks/mobile/atlas.json
|
|
80
|
+
npx ketatlas audit ./tasks/mobile/atlas.json --strict
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Check the delivered flow coverage against the brief. Open **Try this screen** to test the actual HTML. A successful audit confirms structural and local-file checks, not visual quality, full product coverage, or working production integrations. Intentional remote URLs require separate verification and produce strict-audit warnings.
|
|
84
|
+
|
|
85
|
+
The skill lives in this repository so teams can review and evolve it alongside the schema and CLI. It works with the published `ketatlas@0.1.1` format; the skill itself can be distributed through GitHub without waiting for a new npm release.
|
package/docs/architecture.md
CHANGED
|
@@ -15,6 +15,12 @@ atlas.json + screen HTML
|
|
|
15
15
|
└── lazy HTML iframes + interactive inspector
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## Consumer boundary
|
|
19
|
+
|
|
20
|
+
KetAtlas is installed globally or executed through npx. Consumers provide JSON, a schema, HTML/CSS/JavaScript mock screens, assets, and documentation. They do not need a Node package, lockfile, development dependencies, viewer implementation, or build/test scripts to scaffold, serve, or audit a map.
|
|
21
|
+
|
|
22
|
+
The package owns the CLI, viewer, validation, and framework verification. A product may have its own application tests elsewhere; those are independent of the map format. Static audit does not simulate product interactions. Agent browser checks can run through external tooling without adding a test harness to the delivered atlas folder.
|
|
23
|
+
|
|
18
24
|
## Ownership
|
|
19
25
|
|
|
20
26
|
| Directory | Responsibility |
|
package/docs/cli.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# CLI reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install once with `npm install --global ketatlas@0.1.1`, or prefix commands with `npx --yes ketatlas@0.1.1`. No dependency installation is required in the consumer directory. `node /path/to/ketatlas/bin/ketatlas.js` is also available to framework maintainers.
|
|
4
|
+
|
|
5
|
+
A consumer keeps only its JSON/schema, product HTML/CSS/JavaScript, assets, and documentation. The package manifest, lockfile, development scripts, and browser test dependencies belong to the tool. Normal `serve`, `validate`, and `audit` calls do not create files in the consumer; `audit --output` is an explicit exception.
|
|
4
6
|
|
|
5
7
|
## Scaffold
|
|
6
8
|
|
package/docs/migration.md
CHANGED
|
@@ -30,6 +30,7 @@ Keep the existing screen IDs. Give repeated states unique node IDs, but reuse th
|
|
|
30
30
|
3. Set the default viewport to 390 × 844. Keep DOC/TARGET source labels if useful to reviewers.
|
|
31
31
|
4. Run `ketatlas audit atlas.json --root <project-root>` and resolve diagnostics.
|
|
32
32
|
5. Run `ketatlas serve atlas.json --root <project-root>` and compare the existing 22 journeys, 108 screen IDs, and 162 edges against the exported graph.
|
|
33
|
-
6.
|
|
33
|
+
6. Recheck product interactions with external browser tooling under the default iframe sandbox; use portable HTML rather than weakening the sandbox.
|
|
34
|
+
7. Remove the old viewer tooling, package manifest, lockfile, and local build/test dependencies from the atlas folder. Keep screen HTML/CSS/JavaScript and its assets. Use global or version-pinned npx commands for serving and auditing. Record any earlier browser reports as historical evidence rather than requiring the old harness to run the map.
|
|
34
35
|
|
|
35
36
|
KetAtlas UI is English. Vietnamese business labels inside the project's configuration and HTML can remain Vietnamese.
|
package/docs/releasing.md
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
# Releasing KetAtlas
|
|
2
2
|
|
|
3
|
-
The npm package
|
|
3
|
+
The npm package and executable are both **ketatlas**. Releases come from `develop` and use the stable `latest` distribution tag.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## One-time setup
|
|
6
|
+
|
|
7
|
+
Add a GitHub Actions repository secret named **NPM_PUBLISH_TOKEN** in **Settings → Secrets and variables → Actions**. Use an npm granular access token with package **Read and write** permissions for `ketatlas` and **Bypass two-factor authentication** enabled. Keep its expiry current. The local `.env.local` file is ignored by Git and is never loaded by CI.
|
|
8
|
+
|
|
9
|
+
Only the publish step receives the token. Pull requests, verification, and registry checks do not receive it. The publish job also requests an OIDC identity to attach npm provenance; publishing authentication uses the repository secret. See [GitHub's npm publishing guide](https://docs.github.com/en/actions/tutorials/publish-packages/publish-nodejs-packages).
|
|
10
|
+
|
|
11
|
+
## Release through develop
|
|
12
|
+
|
|
13
|
+
On your feature branch, bump the package and lockfile together:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm version patch --no-git-tag-version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use `minor` or `major` when appropriate. Move the relevant changelog entries under the new version, commit both version files with the changes, and merge the pull request into `develop`.
|
|
20
|
+
|
|
21
|
+
The [CI workflow](../.github/workflows/ci.yml) runs on pull requests and branch pushes. Automatic publishing runs on pushes to `develop`, including merge commits, squash merges, and direct pushes. An explicit workflow dispatch on `develop` can retry an unpublished release after a workflow fix:
|
|
22
|
+
|
|
23
|
+
1. Formatting, configuration audits, unit tests, browser tests, and a packed-install test must pass.
|
|
24
|
+
2. The version must increase from `package.json` at the push event's previous commit. The lockfile must agree. Automatic releases accept stable `major.minor.patch` versions; prereleases fail with an explanation.
|
|
25
|
+
3. The version must be absent from npm and greater than npm's current `latest`. An unchanged or already published version is skipped. Version decreases, registry failures, and mismatched version files fail the job.
|
|
26
|
+
4. The publish job downloads and publishes the exact `.tgz` archive that passed the packed-install test, with public access and provenance.
|
|
27
|
+
5. CI checks that the version is visible on npm and records the result in the workflow summary.
|
|
28
|
+
|
|
29
|
+
Publish jobs are queued and run one at a time. The npm check happens after entering the queue, so an older run cannot move `latest` backwards. The first push creating `develop` has no previous commit; it uses the npm comparison instead. Pushing the existing `0.1.0` release therefore skips publication.
|
|
30
|
+
|
|
31
|
+
## Verify locally
|
|
6
32
|
|
|
7
33
|
```sh
|
|
8
34
|
npm ci
|
|
@@ -13,28 +39,31 @@ npm run format:check
|
|
|
13
39
|
npm pack --dry-run
|
|
14
40
|
```
|
|
15
41
|
|
|
16
|
-
The package test creates a real archive, invokes its CLI through `npm exec` without a registry lookup, scaffolds a project outside the repository, audits it, and starts its JSON viewer. This catches missing files and
|
|
42
|
+
The package test creates a real archive, invokes its CLI through `npm exec` without a registry lookup, scaffolds a project outside the repository, audits it, and starts its JSON viewer. This catches missing files and reliance on a maintainer checkout.
|
|
17
43
|
|
|
18
|
-
##
|
|
44
|
+
## Retry a failed release
|
|
19
45
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
For interactive publishing, [configure two-factor authentication on your npm account](https://docs.npmjs.com/configuring-two-factor-authentication/) and complete the verification requested during publication. A successful `npm whoami` confirms login but does not guarantee that publishing authentication requirements are met. Keep recovery codes and credentials private.
|
|
46
|
+
For a missing or expired repository secret, fix the secret and rerun the failed workflow. If the workflow itself needed a fix in a later commit, dispatch the updated workflow on `develop` with the **previous commit SHA from the original failed release push**:
|
|
23
47
|
|
|
24
48
|
```sh
|
|
25
|
-
|
|
26
|
-
npm publish --access public
|
|
49
|
+
gh workflow run ci.yml --ref develop -f before_sha=<original-40-character-before-sha>
|
|
27
50
|
```
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
The supplied SHA must be an ancestor of the checked-out release commit. The version must still increase from that baseline, all verification runs again, and npm must not already contain that version. This retry uses the same tested archive and provenance path; it does not disable release gates.
|
|
53
|
+
|
|
54
|
+
If npm already accepted the version, the rerun skips publication. Check npm before changing the version after a timeout: a publish may have succeeded even if the final visibility check failed.
|
|
30
55
|
|
|
31
|
-
|
|
56
|
+
Do not reuse a published version for changed package contents. Bump the version again for the next release. A failed verification must be fixed and all checks rerun before publishing.
|
|
57
|
+
|
|
58
|
+
After a successful release, verify outside the checkout with the released version:
|
|
32
59
|
|
|
33
60
|
```sh
|
|
34
|
-
npx ketatlas@0.1.
|
|
35
|
-
npx ketatlas@0.1.
|
|
36
|
-
npx ketatlas@0.1.
|
|
37
|
-
npx ketatlas@0.1.
|
|
61
|
+
npx ketatlas@0.1.1 --version
|
|
62
|
+
npx ketatlas@0.1.1 scaffold /tmp/ketatlas-release-check
|
|
63
|
+
npx ketatlas@0.1.1 audit /tmp/ketatlas-release-check/atlas.json --strict
|
|
64
|
+
npx ketatlas@0.1.1 serve /tmp/ketatlas-release-check/atlas.json
|
|
38
65
|
```
|
|
39
66
|
|
|
40
|
-
|
|
67
|
+
## Token maintenance
|
|
68
|
+
|
|
69
|
+
GitHub Actions secrets do not refresh when a local token changes. Replace the repository secret before the token expires. npm has announced changes to direct publishing with bypass-2FA tokens targeted for January 2027; migrate publishing authentication to [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) before that change takes effect. See the [npm announcement](https://github.blog/changelog/2026-07-31-restricting-npm-bypass-2fa-granular-access-tokens/).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ketatlas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Interactive HTML maps for screens, workflows, and user journeys.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"LICENSE",
|
|
34
34
|
"NOTICE.md",
|
|
35
35
|
"templates",
|
|
36
|
+
"skills",
|
|
36
37
|
"docs",
|
|
37
38
|
"CHANGELOG.md"
|
|
38
39
|
],
|
|
@@ -42,8 +43,8 @@
|
|
|
42
43
|
"test": "node --test tests/*.test.js",
|
|
43
44
|
"test:e2e": "node tests/browser.mjs",
|
|
44
45
|
"check": "npm run validate && npm test && npm run test:e2e",
|
|
45
|
-
"format": "prettier --write src styles/ketatlas.css bin scripts docs examples starter templates tests '*.md' '*.json' .github/workflows",
|
|
46
|
-
"format:check": "prettier --check src styles/ketatlas.css bin scripts docs examples starter templates tests '*.md' '*.json' .github/workflows",
|
|
46
|
+
"format": "prettier --write src styles/ketatlas.css bin scripts docs examples starter templates skills tests '*.md' '*.json' .github/workflows",
|
|
47
|
+
"format:check": "prettier --check src styles/ketatlas.css bin scripts docs examples starter templates skills tests '*.md' '*.json' .github/workflows",
|
|
47
48
|
"prepare:assets": "node scripts/prepare-assets.mjs",
|
|
48
49
|
"prepack": "node scripts/verify-assets.mjs",
|
|
49
50
|
"prepare:templates": "node scripts/schema.mjs && node scripts/prepare-templates.mjs",
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ketatlas
|
|
3
|
+
description: Create or update interactive HTML mockups and workflow maps in KetAtlas format. Use when a user requests KetAtlas output, an atlas.json project, or draggable flows connecting real HTML screens; also use to scaffold, serve, or audit an existing atlas.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# KetAtlas
|
|
7
|
+
|
|
8
|
+
Deliver an editable project containing actual HTML screens and a version 1 `atlas.json` that `npx ketatlas serve` can open. KetAtlas supplies the draggable viewer; the agent authors the product mockups and their flow graph. A screenshot gallery or a Mermaid diagram alone is not this deliverable.
|
|
9
|
+
|
|
10
|
+
## Read the brief and choose the scope
|
|
11
|
+
|
|
12
|
+
Use the user's requirements, existing project files, and design references to determine:
|
|
13
|
+
|
|
14
|
+
- Product, audience, requested flows, and the goal of each flow.
|
|
15
|
+
- Platform and viewport: mobile, web, mixed screens, or a process without screens.
|
|
16
|
+
- Design system and product content language. KetAtlas's own viewer is English; authored content can use the requested language.
|
|
17
|
+
- Output directory, existing screens to reuse, and the intended depth of interaction.
|
|
18
|
+
|
|
19
|
+
A brief may be a chat message or a Markdown file; it is not another KetAtlas JSON format. If details are missing, use reasonable defaults and record assumptions. Ask only for information that materially blocks the requested result. Do not introduce unrelated flows or build a production backend to make a mockup work.
|
|
20
|
+
|
|
21
|
+
Use the supplied product design system when one exists. The starter uses KetJS styles, but KetAtlas can embed product HTML using any design system. For one shared iOS/Android prototype, create one HTML implementation with reusable styles and states unless separate variants were requested.
|
|
22
|
+
|
|
23
|
+
## Scaffold or extend
|
|
24
|
+
|
|
25
|
+
Node.js 22 or newer is required. For a new, empty destination:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx --yes ketatlas scaffold ./tasks/mockups --template basic
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Choose `basic` for mobile, `web` for desktop, or `process` for steps without UI. These are starting examples, not required product flows. Replace their sample content with the requested product.
|
|
32
|
+
|
|
33
|
+
For an existing atlas, read and edit its JSON and screen files directly. Preserve useful IDs and URLs; scaffold refuses a nonempty directory and has no `--force` option. Pin the CLI version in the README commands (for example `npx --yes ketatlas@0.1.1 serve atlas.json`) or use a global installation. A consumer atlas does not need a local package installation.
|
|
34
|
+
|
|
35
|
+
A self-contained project typically has:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
tasks/mockups/
|
|
39
|
+
atlas.json
|
|
40
|
+
ketatlas.schema.json
|
|
41
|
+
screens/ HTML pages and shared CSS/JavaScript
|
|
42
|
+
styles/ Starter design assets, when used
|
|
43
|
+
README.md Run commands, flow coverage, assumptions, verification
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Keep product assets inside the served directory when practical. Deliver JSON/schema, screen HTML/CSS/JavaScript, assets, and documentation. Do not scaffold a `package.json`, lockfile, `node_modules`, asset build scripts, or a copied viewer/test harness in the atlas folder just to use KetAtlas. The installed CLI supplies scaffold, serve, validate, and audit. Browser verification can use the agent's external tooling. Preserve unrelated application tooling when extending an existing repository.
|
|
47
|
+
|
|
48
|
+
Do not create a wrapper viewer or a custom canvas: `serve atlas.json` provides it.
|
|
49
|
+
|
|
50
|
+
## Model the journey
|
|
51
|
+
|
|
52
|
+
Sketch the requested flow inventory before implementing screens: start, user action, condition, destination, and outcome. Include the relevant success, validation, empty, loading, error, and recovery states supported by the brief; do not multiply every screen into states that have no meaning for that product.
|
|
53
|
+
|
|
54
|
+
Use the generated `ketatlas.schema.json` as the field reference. `version: 1` is the atlas format version, not the npm package version. Unknown properties are rejected. Store requirements, coverage notes, and backlog items in Markdown rather than inventing JSON fields.
|
|
55
|
+
|
|
56
|
+
Core rules:
|
|
57
|
+
|
|
58
|
+
- Register each reusable screen once in `screens` with `id`, `title`, and `url`. Paths resolve relative to `atlas.json`.
|
|
59
|
+
- Give each flow an `id`, `title`, nonempty `nodes`, and `edges`. Set `start` and `ends` explicitly when authoring a journey so entry and outcomes are unambiguous.
|
|
60
|
+
- A screen node references a screen ID. A repeated occurrence gets a new node ID and may override `url`, for example `./screens/sign-in.html?state=invalid`.
|
|
61
|
+
- For a decision or off-screen operation, use a node with `type: "note"`, `title`, and optionally `description`. Use `type: "external"` for a handoff. There is no `decision` node type.
|
|
62
|
+
- Edges require `from`, `to`, and a nonempty `label` describing the action or condition. `kind` is `primary`, `conditional`, or `recovery`.
|
|
63
|
+
- Edge endpoints, `start`, and `ends` reference node IDs within the same flow. Cross-flow edges are unsupported; reuse the destination screen or explain the handoff with a note.
|
|
64
|
+
- IDs start with a letter or digit and contain only letters, digits, dots, underscores, or hyphens. Screen and flow IDs are unique across the atlas; node IDs are unique within their flow.
|
|
65
|
+
- Set `column` and `row` explicitly for branches. Both are integers from 0 to 100; no two nodes in a flow share a cell. This is a grid, not an automatic graph layout engine.
|
|
66
|
+
- Set the atlas `viewport` or a screen override to the intended layout size. The mobile default is 390 × 844; choose desktop dimensions from the brief. Width and height are integers from 160 to 4096.
|
|
67
|
+
|
|
68
|
+
Example structure, to adapt to the actual product and HTML files:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"$schema": "./ketatlas.schema.json",
|
|
73
|
+
"version": 1,
|
|
74
|
+
"title": "Account access",
|
|
75
|
+
"viewport": { "width": 390, "height": 844 },
|
|
76
|
+
"screens": [
|
|
77
|
+
{ "id": "sign-in", "title": "Sign in", "url": "./screens/sign-in.html" },
|
|
78
|
+
{ "id": "home", "title": "Home", "url": "./screens/home.html" }
|
|
79
|
+
],
|
|
80
|
+
"flows": [
|
|
81
|
+
{
|
|
82
|
+
"id": "sign-in",
|
|
83
|
+
"title": "Sign in",
|
|
84
|
+
"start": "entry",
|
|
85
|
+
"ends": ["success"],
|
|
86
|
+
"nodes": [
|
|
87
|
+
{ "id": "entry", "screen": "sign-in", "column": 0, "row": 0 },
|
|
88
|
+
{
|
|
89
|
+
"id": "invalid",
|
|
90
|
+
"screen": "sign-in",
|
|
91
|
+
"title": "Invalid credentials",
|
|
92
|
+
"url": "./screens/sign-in.html?state=invalid",
|
|
93
|
+
"column": 1,
|
|
94
|
+
"row": 1
|
|
95
|
+
},
|
|
96
|
+
{ "id": "success", "screen": "home", "column": 2, "row": 0 }
|
|
97
|
+
],
|
|
98
|
+
"edges": [
|
|
99
|
+
{ "from": "entry", "to": "success", "label": "Credentials accepted" },
|
|
100
|
+
{
|
|
101
|
+
"from": "entry",
|
|
102
|
+
"to": "invalid",
|
|
103
|
+
"label": "Credentials rejected",
|
|
104
|
+
"kind": "conditional"
|
|
105
|
+
},
|
|
106
|
+
{ "from": "invalid", "to": "entry", "label": "Try again", "kind": "recovery" }
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Build the actual screens
|
|
114
|
+
|
|
115
|
+
Make each screen a complete HTML document with a viewport meta tag and `body { margin: 0; }`. Keep product content padding, but do not wrap the page in a second phone bezel, presentation frame, reviewer sidebar, or outer mockup margin. The iframe is the screen boundary.
|
|
116
|
+
|
|
117
|
+
Use shared CSS/components and deterministic mock data. States referenced by node URLs must render directly when opened or refreshed, without requiring a previous login or click. Implement the relevant buttons, forms, validation feedback, and navigation in HTML/JavaScript: graph arrows do not wire screen interactions automatically.
|
|
118
|
+
|
|
119
|
+
The default iframe sandbox allows scripts and forms but gives the page an opaque origin. Prefer ordinary links, classic scripts, inline mock data, URL parameters, and in-memory state for portable prototypes. Storage, authenticated fetch, and some module imports can fail in this sandbox. Test in **Try this screen**, not just a standalone tab; do not solve a prototype issue by weakening the viewer's sandbox.
|
|
120
|
+
|
|
121
|
+
## Validate and hand off
|
|
122
|
+
|
|
123
|
+
Run from the user's project with the same root for audit and serve:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
npx --yes ketatlas validate ./tasks/mockups/atlas.json
|
|
127
|
+
npx --yes ketatlas audit ./tasks/mockups/atlas.json --strict
|
|
128
|
+
npx --yes ketatlas serve ./tasks/mockups/atlas.json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Use `--root .` on both audit and serve if screens or assets intentionally live outside the atlas directory but inside the project. Use `--port 4180` or another free port when necessary. Refresh after file edits; there is no hot reload.
|
|
132
|
+
|
|
133
|
+
For local projects, fix structural errors, missing assets, and unreachable nodes until strict audit passes. Remote screen/assets URLs produce warnings and are not fetched by audit: when those are intentional, run the normal audit, report the warnings, and verify embedding separately rather than claiming a strict pass. With `audit --json --strict`, check the exit status and warnings as well as `valid`.
|
|
134
|
+
|
|
135
|
+
When browser automation is available, inspect the map and actual HTML at the declared viewport. Exercise each requested flow's primary route and relevant recovery route, and check for console errors and accidental clipping. Audit alone does not prove interaction, appearance, or complete coverage. If browser verification is unavailable, state that limit and still deliver the auditable files.
|
|
136
|
+
|
|
137
|
+
Update the project's README with flow-to-screen/state coverage, assumptions, demo inputs, and run commands. Return the output location, the serve command or live preview URL, audit results, and any remaining limitations. Do not claim that a mockup implements production APIs or native application behavior.
|
|
@@ -7,7 +7,7 @@ npx ketatlas serve atlas.json
|
|
|
7
7
|
npx ketatlas audit atlas.json --strict
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML or build step is needed.
|
|
10
|
+
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML, package manifest, lockfile, node_modules, or build step is needed. Alternatively, install the CLI once with npm install --global ketatlas@0.1.1 and use ketatlas serve atlas.json.
|
|
11
11
|
|
|
12
12
|
Edit the HTML files in screens/ to replace the sample product. styles/design-system.css is generated from the pinned KetJS design system; do not manually fork its tokens.
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ npx ketatlas serve atlas.json
|
|
|
7
7
|
npx ketatlas audit atlas.json --strict
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML or build step is needed.
|
|
10
|
+
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML, package manifest, lockfile, node_modules, or build step is needed. Alternatively, install the CLI once with npm install --global ketatlas@0.1.1 and use ketatlas serve atlas.json.
|
|
11
11
|
|
|
12
12
|
This template models a process without HTML screens. Add a screen registry and screen nodes when needed.
|
|
13
13
|
|
package/templates/web/README.md
CHANGED
|
@@ -7,7 +7,7 @@ npx ketatlas serve atlas.json
|
|
|
7
7
|
npx ketatlas audit atlas.json --strict
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML or build step is needed.
|
|
10
|
+
Edit `atlas.json` to change nodes, edges, and screen URLs. Screen URLs are relative to that file. Refresh the browser after editing. No wrapper HTML, package manifest, lockfile, node_modules, or build step is needed. Alternatively, install the CLI once with npm install --global ketatlas@0.1.1 and use ketatlas serve atlas.json.
|
|
11
11
|
|
|
12
12
|
Edit the HTML files in screens/ to replace the sample product. styles/design-system.css is generated from the pinned KetJS design system; do not manually fork its tokens.
|
|
13
13
|
|