create-koppajs 1.2.2 → 1.2.3
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 +37 -0
- package/README.md +12 -10
- package/bin/create-koppajs.js +0 -14
- package/package.json +4 -4
- package/template/README.md +19 -206
- package/template/_gitignore +0 -3
- package/template/index.html +1 -1
- package/template/package.json +9 -46
- package/template/public/favicon.png +0 -0
- package/template/public/koppajs-logo.png +0 -0
- package/template/src/app-view.kpa +1 -3
- package/template/tsconfig.json +2 -9
- package/template-overlays/router/README.md +25 -200
- package/template-overlays/router/index.html +1 -1
- package/template-overlays/router/package.json +10 -47
- package/template-overlays/router/src/app-view.kpa +21 -78
- package/template-overlays/router/src/home-page.kpa +23 -60
- package/template-overlays/router/src/main.ts +0 -9
- package/template-overlays/router/src/not-found-page.kpa +16 -48
- package/template-overlays/router/src/router-page.kpa +34 -69
- package/template-overlays/router/src/style.css +5 -29
- package/template/AI_CONSTITUTION.md +0 -50
- package/template/ARCHITECTURE.md +0 -84
- package/template/CHANGELOG.md +0 -35
- package/template/CONTRIBUTING.md +0 -89
- package/template/DECISION_HIERARCHY.md +0 -32
- package/template/DEVELOPMENT_RULES.md +0 -57
- package/template/LICENSE +0 -201
- package/template/RELEASE.md +0 -227
- package/template/ROADMAP.md +0 -34
- package/template/TESTING_STRATEGY.md +0 -96
- package/template/_editorconfig +0 -12
- package/template/_github/instructions/ai-workflow.md +0 -33
- package/template/_github/workflows/ci.yml +0 -41
- package/template/_github/workflows/release.yml +0 -58
- package/template/_husky/commit-msg +0 -8
- package/template/_husky/pre-commit +0 -1
- package/template/_prettierignore +0 -7
- package/template/commitlint.config.mjs +0 -6
- package/template/docs/adr/0001-keep-the-starter-minimal.md +0 -32
- package/template/docs/adr/0002-adopt-a-living-meta-layer.md +0 -30
- package/template/docs/adr/0003-rely-on-upstream-kpa-es-module-output.md +0 -32
- package/template/docs/adr/0004-adopt-an-automated-quality-baseline.md +0 -31
- package/template/docs/adr/0005-adopt-a-tag-driven-release-baseline.md +0 -45
- package/template/docs/adr/0006-adopt-commit-message-conventions.md +0 -39
- package/template/docs/adr/README.md +0 -37
- package/template/docs/adr/TEMPLATE.md +0 -18
- package/template/docs/architecture/module-boundaries.md +0 -47
- package/template/docs/meta/maintenance.md +0 -40
- package/template/docs/quality/quality-gates.md +0 -39
- package/template/docs/specs/README.md +0 -36
- package/template/docs/specs/TEMPLATE.md +0 -34
- package/template/docs/specs/app-bootstrap.md +0 -46
- package/template/docs/specs/counter-component.md +0 -48
- package/template/docs/specs/quality-workflow.md +0 -62
- package/template/eslint.config.mjs +0 -54
- package/template/playwright.config.ts +0 -31
- package/template/pnpm-lock.yaml +0 -3777
- package/template/prettier.config.mjs +0 -6
- package/template/public/favicon.svg +0 -15
- package/template/tests/e2e/app.spec.ts +0 -18
- package/template/tests/integration/main-bootstrap.test.ts +0 -33
- package/template/vite.config.d.mts +0 -5
- package/template/vitest.config.mjs +0 -19
- package/template-overlays/router/ARCHITECTURE.md +0 -86
- package/template-overlays/router/CHANGELOG.md +0 -50
- package/template-overlays/router/DEVELOPMENT_RULES.md +0 -57
- package/template-overlays/router/ROADMAP.md +0 -34
- package/template-overlays/router/TESTING_STRATEGY.md +0 -67
- package/template-overlays/router/docs/adr/0001-keep-the-starter-minimal.md +0 -32
- package/template-overlays/router/docs/architecture/module-boundaries.md +0 -39
- package/template-overlays/router/docs/meta/maintenance.md +0 -38
- package/template-overlays/router/docs/specs/README.md +0 -19
- package/template-overlays/router/docs/specs/app-bootstrap.md +0 -42
- package/template-overlays/router/docs/specs/router-navigation.md +0 -41
- package/template-overlays/router/pnpm-lock.yaml +0 -3786
- package/template-overlays/router/tests/e2e/app.spec.ts +0 -38
- package/template-overlays/router/tests/integration/main-bootstrap.test.ts +0 -150
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "v*.*.*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
name: Create GitHub Release
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
permissions:
|
|
13
|
-
contents: write
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- name: Check out repository
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
with:
|
|
19
|
-
fetch-depth: 0
|
|
20
|
-
|
|
21
|
-
- name: Set up pnpm
|
|
22
|
-
uses: pnpm/action-setup@v4
|
|
23
|
-
with:
|
|
24
|
-
version: 10.12.1
|
|
25
|
-
|
|
26
|
-
- name: Set up Node.js
|
|
27
|
-
uses: actions/setup-node@v4
|
|
28
|
-
with:
|
|
29
|
-
node-version: 22
|
|
30
|
-
cache: pnpm
|
|
31
|
-
|
|
32
|
-
- name: Install dependencies
|
|
33
|
-
run: pnpm install --frozen-lockfile
|
|
34
|
-
|
|
35
|
-
- name: Install Playwright browser
|
|
36
|
-
run: pnpm exec playwright install --with-deps chromium
|
|
37
|
-
|
|
38
|
-
- name: Validate repository
|
|
39
|
-
run: pnpm validate
|
|
40
|
-
|
|
41
|
-
- name: Verify tag matches package.json version
|
|
42
|
-
run: |
|
|
43
|
-
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
|
44
|
-
PKG_VERSION=$(node -p "require('./package.json').version")
|
|
45
|
-
echo "Tag version: $TAG_VERSION"
|
|
46
|
-
echo "Package.json version: $PKG_VERSION"
|
|
47
|
-
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
|
|
48
|
-
echo "::error::Version mismatch! Tag ($TAG_VERSION) does not match package.json ($PKG_VERSION)"
|
|
49
|
-
exit 1
|
|
50
|
-
fi
|
|
51
|
-
echo "Versions match: $TAG_VERSION"
|
|
52
|
-
|
|
53
|
-
- name: Create GitHub Release
|
|
54
|
-
uses: softprops/action-gh-release@v2
|
|
55
|
-
with:
|
|
56
|
-
generate_release_notes: true
|
|
57
|
-
env:
|
|
58
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pnpm exec lint-staged
|
package/template/_prettierignore
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# ADR 0001: Keep the starter minimal
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
This repository starts from the maintained minimal starter baseline for KoppaJS
|
|
6
|
-
applications. Its primary audience needs a runnable reference with as little
|
|
7
|
-
incidental complexity as possible.
|
|
8
|
-
|
|
9
|
-
## Decision
|
|
10
|
-
|
|
11
|
-
The starter remains intentionally small:
|
|
12
|
-
|
|
13
|
-
- one HTML shell,
|
|
14
|
-
- one TypeScript bootstrap file,
|
|
15
|
-
- one root KoppaJS view,
|
|
16
|
-
- one stateful child component,
|
|
17
|
-
- published npm packages instead of local monorepo `file:` dependencies,
|
|
18
|
-
- no routing, persistence, shared state, or extra demo subsystems by default.
|
|
19
|
-
|
|
20
|
-
Any expansion beyond that baseline requires a spec and ADR.
|
|
21
|
-
|
|
22
|
-
## Consequences
|
|
23
|
-
|
|
24
|
-
- New users get a fast, low-noise example.
|
|
25
|
-
- The repository stays easy to audit and maintain.
|
|
26
|
-
- More advanced features must be introduced deliberately rather than accumulating ad hoc.
|
|
27
|
-
- Some capabilities are intentionally absent until justified.
|
|
28
|
-
|
|
29
|
-
## Alternatives considered
|
|
30
|
-
|
|
31
|
-
- A feature-rich demo app that showcases many KoppaJS patterns at once
|
|
32
|
-
- A monorepo-linked starter that depends on local sibling packages
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# ADR 0002: Adopt a living meta layer
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
The repository previously lacked a formal architecture memory, contributor governance, testing philosophy, decision hierarchy, and AI workflow guidance. That made it easy for the implementation and the documentation to drift apart.
|
|
6
|
-
|
|
7
|
-
## Decision
|
|
8
|
-
|
|
9
|
-
The project will maintain an in-repository meta layer consisting of:
|
|
10
|
-
|
|
11
|
-
- root governance documents,
|
|
12
|
-
- architecture support documents under `docs/architecture/`,
|
|
13
|
-
- ADRs under `docs/adr/`,
|
|
14
|
-
- specs under `docs/specs/`,
|
|
15
|
-
- quality and maintenance guidance under `docs/quality/` and `docs/meta/`,
|
|
16
|
-
- AI-specific workflow guidance under `.github/instructions/`.
|
|
17
|
-
|
|
18
|
-
Whenever architecture, module boundaries, workflow, or quality expectations change, the relevant meta documents must be updated in the same change.
|
|
19
|
-
|
|
20
|
-
## Consequences
|
|
21
|
-
|
|
22
|
-
- Contributors and AI agents have a single source of truth inside the repository.
|
|
23
|
-
- Architectural drift becomes easier to detect.
|
|
24
|
-
- Every meaningful change carries a small documentation obligation.
|
|
25
|
-
- The repository gains governance overhead, but the overhead is intentionally light and local.
|
|
26
|
-
|
|
27
|
-
## Alternatives considered
|
|
28
|
-
|
|
29
|
-
- Relying on README-only guidance
|
|
30
|
-
- Keeping architectural decisions in issues or chat history instead of versioned documents
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# ADR 0003: Rely on upstream KPA ES module output
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
The starter depends on `@koppajs/koppajs-vite-plugin` to transform `.kpa`
|
|
6
|
-
files for both development and production builds.
|
|
7
|
-
|
|
8
|
-
Earlier starter revisions carried a repo-local compatibility wrapper in
|
|
9
|
-
`vite.config.mjs` because the plugin emitted raw object literals instead of ES
|
|
10
|
-
modules.
|
|
11
|
-
|
|
12
|
-
The current upstream plugin now emits `export default ...` modules directly, so
|
|
13
|
-
keeping the local wrapper would only duplicate behavior and create drift
|
|
14
|
-
between the starter and the official plugin contract.
|
|
15
|
-
|
|
16
|
-
## Decision
|
|
17
|
-
|
|
18
|
-
Use the upstream KoppaJS Vite plugin output directly and keep `vite.config.mjs`
|
|
19
|
-
limited to plugin wiring.
|
|
20
|
-
|
|
21
|
-
## Consequences
|
|
22
|
-
|
|
23
|
-
- The starter stays aligned with the official Vite plugin behavior instead of
|
|
24
|
-
carrying a stale local workaround.
|
|
25
|
-
- Build configuration stays smaller and easier to reason about.
|
|
26
|
-
- Future maintainers must update the starter and the plugin together if the
|
|
27
|
-
`.kpa` module contract changes again.
|
|
28
|
-
|
|
29
|
-
## Alternatives considered
|
|
30
|
-
|
|
31
|
-
- Keeping a repo-local post-transform in `vite.config.mjs`
|
|
32
|
-
- Forking the plugin behavior inside the starter
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# ADR 0004: Adopt an automated quality baseline
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
The repository already had a living meta layer and a real interactive UI, but its practical quality gates were still limited to `pnpm typecheck`, `pnpm build`, and manual smoke testing. That left bootstrap wiring and browser-visible starter behavior exposed to easy regression.
|
|
6
|
-
|
|
7
|
-
## Decision
|
|
8
|
-
|
|
9
|
-
Adopt a proportional automated quality baseline for the starter:
|
|
10
|
-
|
|
11
|
-
- ESLint for TypeScript source and tooling files,
|
|
12
|
-
- Prettier and `.editorconfig` for supported text formats,
|
|
13
|
-
- Vitest for unit and integration coverage of local tooling and bootstrap behavior,
|
|
14
|
-
- Playwright for one Chromium smoke path against `vite preview`,
|
|
15
|
-
- Husky and lint-staged for fast staged-file checks,
|
|
16
|
-
- GitHub Actions CI that runs the same validation flow as local contributors.
|
|
17
|
-
|
|
18
|
-
Do not add Stylelint yet. The meaningful styles live inside `.kpa` blocks, and a CSS-file-only lint setup would give false confidence while adding maintenance overhead.
|
|
19
|
-
|
|
20
|
-
## Consequences
|
|
21
|
-
|
|
22
|
-
- The starter gets repeatable local and CI validation without inflating the runtime architecture.
|
|
23
|
-
- Browser-visible regressions are caught automatically instead of relying only on manual smoke tests.
|
|
24
|
-
- Contributors have a clearer script contract: `check` for the fast baseline and `validate` for the full suite.
|
|
25
|
-
- Future maintainers must keep the test, hook, CI, and documentation layers aligned when the quality stack changes.
|
|
26
|
-
- Stylelint remains an explicit future decision instead of an accidental omission.
|
|
27
|
-
|
|
28
|
-
## Alternatives considered
|
|
29
|
-
|
|
30
|
-
- Staying on `typecheck + build + manual smoke test`
|
|
31
|
-
- Adding a heavier test and lint stack, including Stylelint, before the repository has enough surface area to justify it
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# ADR 0005: Adopt a tag-driven release baseline
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
The repository had gained a real quality baseline, governance documents, and a
|
|
6
|
-
`develop`/`main` branch model, but it still lacked an explicit release contract.
|
|
7
|
-
That left version bumps, changelog updates, and GitHub tagging behavior too
|
|
8
|
-
implicit for a maintained official starter.
|
|
9
|
-
|
|
10
|
-
`koppajs-core` already uses a documented tag-driven release path with guarded
|
|
11
|
-
automation. This starter benefits from the same clarity, but its release target
|
|
12
|
-
is different because the repository currently stays `private` and is not
|
|
13
|
-
published to npm.
|
|
14
|
-
|
|
15
|
-
## Decision
|
|
16
|
-
|
|
17
|
-
Adopt a manual, tag-driven release baseline for this repository:
|
|
18
|
-
|
|
19
|
-
- maintain `CHANGELOG.md` for official tagged milestones,
|
|
20
|
-
- document the maintainer procedure in `RELEASE.md`,
|
|
21
|
-
- create a GitHub Actions release workflow that runs on `vX.Y.Z` tags,
|
|
22
|
-
- rerun full repository validation during the release workflow,
|
|
23
|
-
- fail the workflow when the pushed tag does not match `package.json`,
|
|
24
|
-
- create GitHub Releases only while the repository remains `private`.
|
|
25
|
-
|
|
26
|
-
Release content is prepared on `develop`, moved through `release/*`, merged into
|
|
27
|
-
`main`, tagged on `main`, and merged back into `develop` after a successful
|
|
28
|
-
release.
|
|
29
|
-
|
|
30
|
-
## Consequences
|
|
31
|
-
|
|
32
|
-
- The repository now has an explicit versioning and release contract.
|
|
33
|
-
- Maintainers must update `package.json`, `CHANGELOG.md`, and `RELEASE.md` in
|
|
34
|
-
sync when release practice changes.
|
|
35
|
-
- Tagged releases are guarded against accidental version mismatches.
|
|
36
|
-
- The release workflow improves traceability without forcing npm publishing.
|
|
37
|
-
- If this repository later becomes publishable, a new ADR must extend or
|
|
38
|
-
replace this baseline rather than silently changing the release target.
|
|
39
|
-
|
|
40
|
-
## Alternatives considered
|
|
41
|
-
|
|
42
|
-
- Keeping releases informal and undocumented
|
|
43
|
-
- Adding automated versioning via Changesets or semantic-release
|
|
44
|
-
- Copying the npm publish path from `koppajs-core` even though this repository
|
|
45
|
-
is currently `private`
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# ADR 0006: Adopt commit message conventions
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
The repository now has staged-file checks, CI validation, and a documented
|
|
6
|
-
release process, but commit history still had no enforced structure.
|
|
7
|
-
|
|
8
|
-
That makes release review, changelog preparation, and future maintenance harder
|
|
9
|
-
than necessary, especially for an official starter that should model a clear
|
|
10
|
-
workflow for contributors.
|
|
11
|
-
|
|
12
|
-
`koppajs-core` already enforces conventional commit messages with `commitlint`.
|
|
13
|
-
The same baseline is appropriate here because it adds little overhead while
|
|
14
|
-
improving traceability.
|
|
15
|
-
|
|
16
|
-
## Decision
|
|
17
|
-
|
|
18
|
-
Adopt Conventional Commits enforcement through `commitlint`:
|
|
19
|
-
|
|
20
|
-
- add `@commitlint/cli` and `@commitlint/config-conventional`,
|
|
21
|
-
- validate commit messages in `.husky/commit-msg`,
|
|
22
|
-
- keep the rule set intentionally small,
|
|
23
|
-
- enforce a maximum header length of 72 characters,
|
|
24
|
-
- allow the existing fast `pre-commit` hook to stay focused on staged files.
|
|
25
|
-
|
|
26
|
-
## Consequences
|
|
27
|
-
|
|
28
|
-
- Contributors now need to use structured commit headers such as
|
|
29
|
-
`feat: add release workflow` or `docs: update quality workflow`.
|
|
30
|
-
- Invalid commit messages are rejected before the commit is created.
|
|
31
|
-
- The repository gains a cleaner history for release review and maintenance.
|
|
32
|
-
- If the project later needs custom commit types or scopes, the change should go
|
|
33
|
-
through `commitlint.config.mjs` and matching documentation updates.
|
|
34
|
-
|
|
35
|
-
## Alternatives considered
|
|
36
|
-
|
|
37
|
-
- Keeping commit messages informal
|
|
38
|
-
- Enforcing commit conventions only socially without a hook
|
|
39
|
-
- Adding heavier release automation before stabilizing the commit baseline
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Architecture Decision Records
|
|
2
|
-
|
|
3
|
-
This directory stores durable architectural and workflow decisions.
|
|
4
|
-
|
|
5
|
-
## When to write an ADR
|
|
6
|
-
|
|
7
|
-
Write an ADR when a change:
|
|
8
|
-
|
|
9
|
-
- changes repository structure,
|
|
10
|
-
- introduces or removes a subsystem,
|
|
11
|
-
- changes dependency sourcing or build tooling,
|
|
12
|
-
- changes public starter behavior in a lasting way,
|
|
13
|
-
- adds a new rule that future contributors must follow.
|
|
14
|
-
|
|
15
|
-
## Format
|
|
16
|
-
|
|
17
|
-
Use [`TEMPLATE.md`](./TEMPLATE.md). Every ADR must contain:
|
|
18
|
-
|
|
19
|
-
- Context
|
|
20
|
-
- Decision
|
|
21
|
-
- Consequences
|
|
22
|
-
- Alternatives considered
|
|
23
|
-
|
|
24
|
-
## Naming
|
|
25
|
-
|
|
26
|
-
- Prefix files with a four-digit sequence number.
|
|
27
|
-
- Use a short kebab-case slug.
|
|
28
|
-
- Never rewrite history silently; supersede older ADRs with new ones when decisions change.
|
|
29
|
-
|
|
30
|
-
## Current ADRs
|
|
31
|
-
|
|
32
|
-
- [`0001-keep-the-starter-minimal.md`](./0001-keep-the-starter-minimal.md)
|
|
33
|
-
- [`0002-adopt-a-living-meta-layer.md`](./0002-adopt-a-living-meta-layer.md)
|
|
34
|
-
- [`0003-rely-on-upstream-kpa-es-module-output.md`](./0003-rely-on-upstream-kpa-es-module-output.md)
|
|
35
|
-
- [`0004-adopt-an-automated-quality-baseline.md`](./0004-adopt-an-automated-quality-baseline.md)
|
|
36
|
-
- [`0005-adopt-a-tag-driven-release-baseline.md`](./0005-adopt-a-tag-driven-release-baseline.md)
|
|
37
|
-
- [`0006-adopt-commit-message-conventions.md`](./0006-adopt-commit-message-conventions.md)
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# ADR XXXX: Title
|
|
2
|
-
|
|
3
|
-
## Context
|
|
4
|
-
|
|
5
|
-
Describe the situation, constraints, and forces that make a decision necessary.
|
|
6
|
-
|
|
7
|
-
## Decision
|
|
8
|
-
|
|
9
|
-
Describe the chosen approach in direct, testable language.
|
|
10
|
-
|
|
11
|
-
## Consequences
|
|
12
|
-
|
|
13
|
-
Explain the expected benefits, tradeoffs, and follow-up obligations.
|
|
14
|
-
|
|
15
|
-
## Alternatives considered
|
|
16
|
-
|
|
17
|
-
- Alternative 1
|
|
18
|
-
- Alternative 2
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Module Boundaries
|
|
2
|
-
|
|
3
|
-
## Repository boundary model
|
|
4
|
-
|
|
5
|
-
This repository is intentionally shallow. Its boundaries are designed to keep the starter easy to understand.
|
|
6
|
-
|
|
7
|
-
| Path | Responsibility | Allowed dependencies | Must not depend on |
|
|
8
|
-
| ------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------- |
|
|
9
|
-
| `index.html` | Document shell, root element, asset references | Static assets, `src/main.ts`, `src/style.css` | Feature logic, extra scripts, framework-specific behavior |
|
|
10
|
-
| `CHANGELOG.md` | Tagged release history | Release notes, versioned milestones | Unreleased planning notes or unrelated contributor guidance |
|
|
11
|
-
| `RELEASE.md` | Maintainer release procedure | `package.json`, `CHANGELOG.md`, GitHub workflows | Runtime code or undocumented branch conventions |
|
|
12
|
-
| `commitlint.config.mjs` | Commit message rules | Conventional commit policy | Source-code linting or release branching rules |
|
|
13
|
-
| `src/main.ts` | Application bootstrap and component registration | `@koppajs/koppajs-core`, local `.kpa` modules | UI business logic, ad hoc DOM manipulation, network code |
|
|
14
|
-
| `src/app-view.kpa` | Root page layout and composition | Local markup, local CSS, child components | Global bootstrap concerns, unrelated feature orchestration |
|
|
15
|
-
| `src/counter-component.kpa` | Example local state and interaction | Local markup, local methods, local CSS | Shared infrastructure, global state, direct root DOM coordination |
|
|
16
|
-
| `src/style.css` | Global reset and truly global base rules | Standard CSS | Component-specific visual rules |
|
|
17
|
-
| `public/` | Static assets served as-is | Static files only | Source code or generated artifacts |
|
|
18
|
-
| `tests/integration/` | Bootstrap and boundary-level integration tests | Vitest, local modules, selective mocks | Browser-only smoke assertions |
|
|
19
|
-
| `tests/e2e/` | Real-browser smoke coverage | Playwright, preview server | Implementation-detail assertions |
|
|
20
|
-
| `vite.config.mjs` | Build and dev server integration through the upstream KoppaJS Vite plugin | Vite and the KoppaJS Vite plugin | Application runtime logic |
|
|
21
|
-
| `vitest.config.mjs` | Vitest orchestration merged with the Vite config | Vitest and Vite config | Application runtime logic |
|
|
22
|
-
| `playwright.config.ts` | Playwright orchestration against preview output | Playwright and preview server script | Application runtime logic |
|
|
23
|
-
| `.github/workflows/release.yml` | Tag-triggered validation and GitHub Release creation | GitHub Actions, `package.json`, validation scripts | npm publishing while `package.json` is `private` |
|
|
24
|
-
| `tsconfig.json` | TypeScript compiler behavior for source, tests, and TS config files | TypeScript compiler options | Application runtime logic |
|
|
25
|
-
|
|
26
|
-
## Boundary rules
|
|
27
|
-
|
|
28
|
-
- Registration happens in `src/main.ts`, not inside component modules.
|
|
29
|
-
- `app-view.kpa` may compose child components but should not become a global state hub by accident.
|
|
30
|
-
- Component-local behavior stays inside the component until reuse or complexity makes extraction worthwhile.
|
|
31
|
-
- Shared logic, once introduced, belongs in dedicated `.ts` modules with tests when justified.
|
|
32
|
-
- Vitest owns helper-level and bootstrap-level confidence; Playwright owns browser smoke confidence.
|
|
33
|
-
- Pre-commit checks stay limited to staged-file hygiene. Heavy validation belongs to `pnpm validate` and CI.
|
|
34
|
-
- Commit-message validation lives in `.husky/commit-msg` and `commitlint.config.mjs`, not in ad hoc contributor lore.
|
|
35
|
-
- Release metadata stays aligned across `package.json`, `CHANGELOG.md`, `RELEASE.md`, and `.github/workflows/release.yml`.
|
|
36
|
-
|
|
37
|
-
## Escalation rules
|
|
38
|
-
|
|
39
|
-
Before crossing existing boundaries, add a spec and ADR if the change introduces:
|
|
40
|
-
|
|
41
|
-
- routing,
|
|
42
|
-
- shared state,
|
|
43
|
-
- async workflows,
|
|
44
|
-
- persistence,
|
|
45
|
-
- more than one root entrypoint,
|
|
46
|
-
- npm publishing or deployment automation,
|
|
47
|
-
- new top-level source folders.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Meta-Layer Maintenance
|
|
2
|
-
|
|
3
|
-
The meta layer is a living system. Any change that alters the real system must update the corresponding governance document in the same change.
|
|
4
|
-
|
|
5
|
-
## Update matrix
|
|
6
|
-
|
|
7
|
-
| Change | Required updates |
|
|
8
|
-
| ------------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
|
9
|
-
| New feature or behavior | Add or update a spec in `docs/specs/`; update `README.md` if setup or visible behavior changes |
|
|
10
|
-
| New enduring technical decision | Add or update an ADR in `docs/adr/` |
|
|
11
|
-
| New module, folder, or data flow | Update `ARCHITECTURE.md` and `docs/architecture/module-boundaries.md` |
|
|
12
|
-
| New coding pattern or dependency rule | Update `DEVELOPMENT_RULES.md` |
|
|
13
|
-
| New test tooling or quality gate | Update `TESTING_STRATEGY.md` and `docs/quality/quality-gates.md` |
|
|
14
|
-
| New hook, CI step, or contributor workflow | Update `CONTRIBUTING.md` and `.github/instructions/ai-workflow.md` |
|
|
15
|
-
| Version, changelog, or release workflow | Update `CHANGELOG.md`, `RELEASE.md`, `package.json`, and affected GitHub workflow files |
|
|
16
|
-
|
|
17
|
-
## Review triggers
|
|
18
|
-
|
|
19
|
-
Perform a meta-layer review when:
|
|
20
|
-
|
|
21
|
-
- a pull request changes the repo structure,
|
|
22
|
-
- a new dependency is added,
|
|
23
|
-
- a public component tag changes,
|
|
24
|
-
- a build or test command changes,
|
|
25
|
-
- a hook or CI workflow changes,
|
|
26
|
-
- a subsystem such as routing or data fetching is introduced,
|
|
27
|
-
- a README section no longer matches the actual code.
|
|
28
|
-
|
|
29
|
-
## Periodic review checklist
|
|
30
|
-
|
|
31
|
-
- Does [ARCHITECTURE.md](../../ARCHITECTURE.md) still match the runtime flow?
|
|
32
|
-
- Do current specs cover the user-visible behaviors in the repo?
|
|
33
|
-
- Do ADRs still represent active decisions?
|
|
34
|
-
- Do contributor instructions still match the actual toolchain?
|
|
35
|
-
- Did a recent change deserve a new quality gate?
|
|
36
|
-
- Do `CHANGELOG.md`, `RELEASE.md`, and the release workflow still match actual branch and tag practice?
|
|
37
|
-
- Do commit message examples and hook behavior still match `commitlint.config.mjs`?
|
|
38
|
-
- Is any omitted tooling, such as Stylelint, still intentionally omitted for good reason?
|
|
39
|
-
|
|
40
|
-
If any answer is "no", update the meta layer before considering the repository aligned.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Quality Gates
|
|
2
|
-
|
|
3
|
-
## Baseline gates
|
|
4
|
-
|
|
5
|
-
For the current repository scope, the baseline gates are:
|
|
6
|
-
|
|
7
|
-
- staged files: `lint-staged` via `.husky/pre-commit`
|
|
8
|
-
- commit messages: `commitlint` via `.husky/commit-msg`
|
|
9
|
-
- fast local repository check: `pnpm check`
|
|
10
|
-
- full repository validation: `pnpm validate`
|
|
11
|
-
- release candidate verification: `pnpm release:check`
|
|
12
|
-
- `pnpm typecheck`
|
|
13
|
-
- `pnpm build`
|
|
14
|
-
- `pnpm test:run`
|
|
15
|
-
- `pnpm test:e2e` for UI, bootstrap, or preview-sensitive changes
|
|
16
|
-
- tagged release automation: `.github/workflows/release.yml` reruns validation and checks tag/version alignment
|
|
17
|
-
|
|
18
|
-
## Gate escalation rules
|
|
19
|
-
|
|
20
|
-
Raise the quality bar when the repository grows:
|
|
21
|
-
|
|
22
|
-
- New extracted logic modules: add unit tests.
|
|
23
|
-
- Multi-component behavior: add integration or component tests.
|
|
24
|
-
- Routing, async workflows, persistence, or deployment-sensitive behavior: expand end-to-end coverage beyond the current smoke scope.
|
|
25
|
-
- If component-local `.kpa` styling grows more complex and a credible linting path appears, revisit the current decision to omit Stylelint.
|
|
26
|
-
|
|
27
|
-
## Review checklist
|
|
28
|
-
|
|
29
|
-
- Do setup instructions still work from a clean checkout?
|
|
30
|
-
- Does the documented architecture still match the code layout?
|
|
31
|
-
- Do specs still match observable behavior?
|
|
32
|
-
- Are current quality gates enough for the newest change?
|
|
33
|
-
- Do `CHANGELOG.md`, `RELEASE.md`, and the release workflow still agree on the release path?
|
|
34
|
-
- Do commit message rules and contributor examples still match `commitlint.config.mjs`?
|
|
35
|
-
- Are hooks still fast enough to help rather than hinder contributors?
|
|
36
|
-
|
|
37
|
-
## Ownership rule
|
|
38
|
-
|
|
39
|
-
Anyone changing code, tooling, or workflow is responsible for updating the quality gates if the risk profile changes.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Specifications
|
|
2
|
-
|
|
3
|
-
Specs define expected behavior before or alongside implementation. They are the highest-precedence project documents.
|
|
4
|
-
|
|
5
|
-
## When a spec is required
|
|
6
|
-
|
|
7
|
-
Create or update a spec when a change:
|
|
8
|
-
|
|
9
|
-
- introduces or changes user-visible behavior,
|
|
10
|
-
- adds a subsystem,
|
|
11
|
-
- changes public setup or bootstrap behavior,
|
|
12
|
-
- changes a feature in a way that needs explicit acceptance criteria.
|
|
13
|
-
|
|
14
|
-
## Required structure
|
|
15
|
-
|
|
16
|
-
Use [`TEMPLATE.md`](./TEMPLATE.md). Each spec should define:
|
|
17
|
-
|
|
18
|
-
- purpose
|
|
19
|
-
- behavior
|
|
20
|
-
- inputs
|
|
21
|
-
- outputs
|
|
22
|
-
- constraints
|
|
23
|
-
- edge cases
|
|
24
|
-
- acceptance criteria
|
|
25
|
-
|
|
26
|
-
## Lifecycle
|
|
27
|
-
|
|
28
|
-
- Draft or update the relevant spec before implementing a non-trivial change.
|
|
29
|
-
- Keep the spec narrow and testable.
|
|
30
|
-
- If implementation diverges from the spec, reconcile them immediately.
|
|
31
|
-
|
|
32
|
-
## Current specs
|
|
33
|
-
|
|
34
|
-
- [`app-bootstrap.md`](./app-bootstrap.md)
|
|
35
|
-
- [`counter-component.md`](./counter-component.md)
|
|
36
|
-
- [`quality-workflow.md`](./quality-workflow.md)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Spec: Title
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
|
|
5
|
-
Draft | Approved | Superseded
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Describe why this behavior exists.
|
|
10
|
-
|
|
11
|
-
## Behavior
|
|
12
|
-
|
|
13
|
-
Describe the observable behavior.
|
|
14
|
-
|
|
15
|
-
## Inputs
|
|
16
|
-
|
|
17
|
-
Describe user, system, or configuration inputs.
|
|
18
|
-
|
|
19
|
-
## Outputs
|
|
20
|
-
|
|
21
|
-
Describe rendered output, state changes, or side effects.
|
|
22
|
-
|
|
23
|
-
## Constraints
|
|
24
|
-
|
|
25
|
-
List constraints that implementation must respect.
|
|
26
|
-
|
|
27
|
-
## Edge cases
|
|
28
|
-
|
|
29
|
-
List the important boundary conditions.
|
|
30
|
-
|
|
31
|
-
## Acceptance criteria
|
|
32
|
-
|
|
33
|
-
- Criterion 1
|
|
34
|
-
- Criterion 2
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Spec: App bootstrap
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
|
|
5
|
-
Approved
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Provide a predictable, minimal startup path for a standalone KoppaJS application.
|
|
10
|
-
|
|
11
|
-
## Behavior
|
|
12
|
-
|
|
13
|
-
- The application starts from `index.html`.
|
|
14
|
-
- The HTML shell loads one global stylesheet and one module entrypoint.
|
|
15
|
-
- The document declares exactly one root custom element: `<app-view>`.
|
|
16
|
-
- `src/main.ts` registers `app-view` and `counter-component` with KoppaJS Core.
|
|
17
|
-
- `src/main.ts` invokes `Core()` once to bootstrap the application.
|
|
18
|
-
|
|
19
|
-
## Inputs
|
|
20
|
-
|
|
21
|
-
- Browser loading `index.html`
|
|
22
|
-
- Static asset and source file paths resolved by Vite
|
|
23
|
-
|
|
24
|
-
## Outputs
|
|
25
|
-
|
|
26
|
-
- A rendered `<app-view>` application shell
|
|
27
|
-
- A registered `<counter-component>` available to the root view
|
|
28
|
-
|
|
29
|
-
## Constraints
|
|
30
|
-
|
|
31
|
-
- There must be a single bootstrap entrypoint.
|
|
32
|
-
- The root tag in `index.html` must stay aligned with the component registered in `src/main.ts`.
|
|
33
|
-
- No hidden self-registration inside component modules.
|
|
34
|
-
- Bootstrap must rely on the public KoppaJS root API via `Core()` rather than non-public setup helpers.
|
|
35
|
-
- No extra runtime dependencies are required beyond the declared npm packages.
|
|
36
|
-
|
|
37
|
-
## Edge cases
|
|
38
|
-
|
|
39
|
-
- If a component tag changes, both `index.html` and `src/main.ts` must be updated together.
|
|
40
|
-
- If more bootstrap behavior is added, it must not introduce a second source of truth for initialization.
|
|
41
|
-
|
|
42
|
-
## Acceptance criteria
|
|
43
|
-
|
|
44
|
-
- Opening the app through Vite renders the root view without manual DOM scripting.
|
|
45
|
-
- `src/main.ts` remains the only location that calls `Core()`.
|
|
46
|
-
- The root view can render the counter component immediately after bootstrap.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Spec: Counter component
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
|
|
5
|
-
Approved
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Demonstrate local interactive state in a minimal KoppaJS component.
|
|
10
|
-
|
|
11
|
-
## Behavior
|
|
12
|
-
|
|
13
|
-
- The component renders a "Counter" label, a numeric count, and increment/decrement buttons.
|
|
14
|
-
- The initial count is `0`.
|
|
15
|
-
- Clicking the increment button increases the count by `1`.
|
|
16
|
-
- Clicking the decrement button decreases the count by `1`.
|
|
17
|
-
- The displayed count updates immediately after each click.
|
|
18
|
-
- The increment and decrement buttons expose stable accessible names.
|
|
19
|
-
- The rendered count is announced politely to assistive technology when it changes.
|
|
20
|
-
|
|
21
|
-
## Inputs
|
|
22
|
-
|
|
23
|
-
- User clicks on the increment button
|
|
24
|
-
- User clicks on the decrement button
|
|
25
|
-
|
|
26
|
-
## Outputs
|
|
27
|
-
|
|
28
|
-
- Updated numeric text rendered in the component
|
|
29
|
-
- No external side effects
|
|
30
|
-
|
|
31
|
-
## Constraints
|
|
32
|
-
|
|
33
|
-
- State is local to the component.
|
|
34
|
-
- The component performs no persistence, networking, or cross-component coordination.
|
|
35
|
-
- The component remains embeddable inside the root app shell.
|
|
36
|
-
|
|
37
|
-
## Edge cases
|
|
38
|
-
|
|
39
|
-
- Negative values are allowed.
|
|
40
|
-
- Repeated clicks continue to update the count linearly within normal JavaScript number behavior.
|
|
41
|
-
|
|
42
|
-
## Acceptance criteria
|
|
43
|
-
|
|
44
|
-
- The counter is visible inside the app shell when the starter loads.
|
|
45
|
-
- The first rendered value is `0`.
|
|
46
|
-
- A single click on `+` changes the value from `0` to `1`.
|
|
47
|
-
- A single click on `-` changes the value from `0` to `-1`.
|
|
48
|
-
- Assistive technology can distinguish the increment and decrement actions without relying on symbol glyphs alone.
|