@jskit-ai/jskit-cli 0.2.85 → 0.2.87
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/package.json +4 -4
- package/src/server/sessionRuntime/prompts/automated_checks.md +2 -1
- package/src/server/sessionRuntime/prompts/deep_ui_check.md +2 -0
- package/src/server/sessionRuntime/prompts/execute_plan.md +2 -0
- package/src/server/sessionRuntime/prompts/issue_details.md +3 -0
- package/src/server/sessionRuntime/prompts/new_issue.md +2 -0
- package/src/server/sessionRuntime/prompts/plan_issue.md +5 -0
- package/src/server/sessionRuntime/prompts/review_changes.md +1 -0
- package/src/server/sessionRuntime.js +29 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/jskit-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.87",
|
|
4
4
|
"description": "Bundle and package orchestration CLI for JSKIT apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "node --test"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
24
|
-
"@jskit-ai/kernel": "0.1.
|
|
25
|
-
"@jskit-ai/shell-web": "0.1.
|
|
23
|
+
"@jskit-ai/jskit-catalog": "0.1.86",
|
|
24
|
+
"@jskit-ai/kernel": "0.1.78",
|
|
25
|
+
"@jskit-ai/shell-web": "0.1.77",
|
|
26
26
|
"@vue/compiler-sfc": "^3.5.29",
|
|
27
27
|
"ts-morph": "^28.0.0"
|
|
28
28
|
},
|
|
@@ -13,7 +13,8 @@ Run the command in the session worktree. If it fails, diagnose the root cause, f
|
|
|
13
13
|
Rules:
|
|
14
14
|
|
|
15
15
|
- Fix the underlying cause. Do not remove checks, weaken verification, or hide failures to make the command pass.
|
|
16
|
-
- Prefer JSKIT-owned helpers, generators, package seams, and documented commands over local hacks.
|
|
16
|
+
- Prefer JSKIT-owned helpers, generators, package seams, agent docs, package descriptors, and documented commands over local hacks.
|
|
17
|
+
- If a failure involves JSKIT architecture, generator ownership, CRUD, surfaces, placements, client/server contracts, or UI verification, read the relevant docs under `node_modules/@jskit-ai/agent-docs/` or `packages/agent-docs/` before repairing it.
|
|
17
18
|
- Use `npx --no-install jskit ...` for JSKIT CLI commands you run directly from the shell.
|
|
18
19
|
- Keep fixes scoped to the current issue, issue details, and active plan.
|
|
19
20
|
- Do not create commits, branches, issues, pull requests, merges, or worktree cleanup. JSKIT session owns those steps.
|
|
@@ -16,6 +16,8 @@ Changed files since the session base:
|
|
|
16
16
|
|
|
17
17
|
Run a focused UI quality pass for the current worktree. If this is not UI-impacting after inspection, say exactly why and do not edit files. If the issue touches UI, inspect the changed routes, views, components, placements, layouts, and styles.
|
|
18
18
|
|
|
19
|
+
Before changing user-facing JSKIT UI, read the relevant JSKIT agent docs when available: `node_modules/@jskit-ai/agent-docs/patterns/ui-testing.md`, `node_modules/@jskit-ai/agent-docs/patterns/page-scaffolding.md`, `node_modules/@jskit-ai/agent-docs/patterns/placements.md`, and `node_modules/@jskit-ai/agent-docs/patterns/surfaces.md`. If working inside the JSKIT monorepo or a devlinked sibling, use the equivalent `packages/agent-docs/...` paths.
|
|
20
|
+
|
|
19
21
|
Check:
|
|
20
22
|
|
|
21
23
|
- Material Design quality.
|
|
@@ -22,6 +22,8 @@ Implementation rules:
|
|
|
22
22
|
|
|
23
23
|
- Inspect the current app before editing. App setup has already passed; if required JSKIT app files are missing, report setup failure rather than inventing recovery work.
|
|
24
24
|
- Follow both `{{issue_details_file}}` and `{{plan_file}}`. If they disagree, ask for clarification before changing files.
|
|
25
|
+
- Before implementing JSKIT app structure, generators, CRUD, surfaces, placements, app setup, package-owned workflows, or UI verification paths, read the relevant JSKIT agent docs. Start with `node_modules/@jskit-ai/agent-docs/DISTR_AGENT.md`, `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` when present. If working inside the JSKIT monorepo or a devlinked sibling, use `packages/agent-docs/...` as the source-tree equivalent.
|
|
26
|
+
- Read specific pattern docs before touching their lane, such as CRUD scaffolding/repository mapping, page scaffolding, surfaces, placements, client requests, live actions, generated UI contract tracking, and UI testing. Prefer these docs and package descriptors over reverse-engineering framework rules from source files.
|
|
25
27
|
- Read `.jskit/helper-map.md` when it exists before creating helpers, composables, service functions, maps, or package glue.
|
|
26
28
|
- Prefer existing JSKIT helpers, app-local helpers, package runtime seams, generated scaffolds, and documented generators over new local helpers.
|
|
27
29
|
- If the plan calls for a generator or package install, use the planned `npx --no-install jskit` command unless inspection proves it does not apply. If you skip a generator, explain the exact gap.
|
|
@@ -14,6 +14,7 @@ No stones unturned:
|
|
|
14
14
|
- Read the issue and inspect the app enough to understand the implementation surface.
|
|
15
15
|
- Read `.jskit/APP_BLUEPRINT.md` and `.jskit/helper-map.md` when present.
|
|
16
16
|
- Read package.json, `.jskit/lock.json`, `config/public.js`, relevant `src/`, relevant `packages/`, and relevant package docs or `npx --no-install jskit show ... --details`.
|
|
17
|
+
- Read JSKIT agent docs before inferring framework patterns from source. Start with `node_modules/@jskit-ai/agent-docs/DISTR_AGENT.md`, `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` when present. If working inside the JSKIT monorepo or a devlinked sibling, use `packages/agent-docs/...` as the source-tree equivalent. Then read the specific pattern docs that match the issue: CRUD, page scaffolding, surfaces, placements, client requests, live actions, generated UI contracts, or UI testing.
|
|
17
18
|
- Ask follow-up questions until all important issue details are known.
|
|
18
19
|
- Ask the user for whatever is still needed.
|
|
19
20
|
- Ask for final confirmation before emitting final details.
|
|
@@ -27,6 +28,8 @@ For server-only work, confirm endpoint/command/job shape, request/response shape
|
|
|
27
28
|
|
|
28
29
|
For package/generator work, confirm exact `npx --no-install jskit add` or `npx --no-install jskit generate` command, why it applies, expected generated files, and follow-up custom code areas.
|
|
29
30
|
|
|
31
|
+
When source files and docs appear to disagree, ask or record the discrepancy. Do not silently prefer code archaeology over package-owned JSKIT guide and pattern docs.
|
|
32
|
+
|
|
30
33
|
When the details are confirmed, output only the final classification, details, and decision notes surrounded by these exact markers:
|
|
31
34
|
|
|
32
35
|
[issue_category]
|
|
@@ -9,6 +9,7 @@ Allowed inspection:
|
|
|
9
9
|
- Read files with commands such as `pwd`, `ls`, `find`, `rg`, `cat`, `sed`, and `git status`.
|
|
10
10
|
- Read package.json, `.jskit/lock.json`, config, routes, packages, source files, `.jskit/APP_BLUEPRINT.md`, and `.jskit/helper-map.md` when available.
|
|
11
11
|
- Use non-mutating JSKIT inspection commands when available and relevant: `npx --no-install jskit list`, `npx --no-install jskit show <package> --details`, and `npx --no-install jskit list-placements`.
|
|
12
|
+
- Read JSKIT agent docs before inferring framework patterns from source. Start with `node_modules/@jskit-ai/agent-docs/DISTR_AGENT.md`, `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` when present. If working inside the JSKIT monorepo or a devlinked sibling, use `packages/agent-docs/...` as the source-tree equivalent. Then read only the relevant pattern docs for the request, such as CRUD, page scaffolding, surfaces, placements, client requests, live actions, or UI testing.
|
|
12
13
|
- If the filesystem contradicts a ready JSKIT app, stop and report that app setup must be rerun. Do not draft a recovery issue inside this session.
|
|
13
14
|
|
|
14
15
|
Do not run workflow, repair, or mutation commands during issue drafting:
|
|
@@ -27,6 +28,7 @@ Preserve these JSKIT boundaries:
|
|
|
27
28
|
- For persisted app-owned data, prefer generated/package ownership over direct hand-built persistence. A new ordinary table should usually become a server CRUD-owned entity before CRUD UI or route work.
|
|
28
29
|
- For non-CRUD app pages, prefer the JSKIT UI generator when it fits.
|
|
29
30
|
- Keep direct knex or low-level runtime work exceptional and explicitly justified.
|
|
31
|
+
- Prefer documented JSKIT guide and pattern docs over reverse-engineering framework architecture from source files. Use source inspection to understand this app and verify details, not as the first source of JSKIT design rules.
|
|
30
32
|
- Do not include workflow bookkeeping such as old workboards in the issue body. JSKIT session state and receipts are the workflow tracker.
|
|
31
33
|
|
|
32
34
|
Ask concise clarifying questions if the request is not specific enough to produce a useful implementation issue. Ask only for details that materially change the ticket.
|
|
@@ -28,6 +28,10 @@ Rework request:
|
|
|
28
28
|
|
|
29
29
|
Read the issue, confirmed issue details, rework request when present, agent decisions, and local app before planning. Use the issue files, issue details file, package.json, .jskit metadata, config, packages, routes, generated references, package docs, any saved app blueprint, and `.jskit/helper-map.md` when available.
|
|
30
30
|
|
|
31
|
+
Before deriving JSKIT architecture from source files, read the package-owned agent docs that apply to this work. Start with `node_modules/@jskit-ai/agent-docs/DISTR_AGENT.md`, `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` when present. If the worktree is the JSKIT monorepo or a devlinked sibling, use the equivalent `packages/agent-docs/...` paths. Then read the specific pattern docs needed for the lane, such as `patterns/crud-scaffolding.md`, `patterns/crud-repository-mapping.md`, `patterns/page-scaffolding.md`, `patterns/placements.md`, `patterns/surfaces.md`, `patterns/client-requests.md`, `patterns/live-actions.md`, `patterns/generated-ui-contract-tracking.md`, or `patterns/ui-testing.md`.
|
|
32
|
+
|
|
33
|
+
If these docs are unavailable, continue with app inspection and say that the agent docs were unavailable. Do not compensate by inventing framework rules from isolated source files.
|
|
34
|
+
|
|
31
35
|
Confirmed issue details:
|
|
32
36
|
|
|
33
37
|
{{issue_details_text}}
|
|
@@ -50,6 +54,7 @@ Planning rules:
|
|
|
50
54
|
- Prefer vertical slices that produce visible or end-to-end progress.
|
|
51
55
|
- If the work is too broad to review confidently, split it into clear chunks.
|
|
52
56
|
- Make generator decisions concrete. Name the exact `npx --no-install jskit` commands to run when a generator or package install applies.
|
|
57
|
+
- Base JSKIT lane and generator decisions on the agent docs and package descriptors first, then verify against the local codebase.
|
|
53
58
|
- For non-CRUD route page work, plan to check `npx --no-install jskit show ui-generator --details` and `npx --no-install jskit list-placements` before hand-writing pages or placement entries.
|
|
54
59
|
- For CRUD work, plan server ownership first. Name the `npx --no-install jskit generate crud-server-generator scaffold ...` command before any CRUD UI plan.
|
|
55
60
|
- For CRUD-owned tables, plan around the real database table shape. Do not plan a separate hand-written migration for a table that `crud-server-generator` will own.
|
|
@@ -32,6 +32,7 @@ Use four passes:
|
|
|
32
32
|
- broken flows, missing route wiring, missing migrations, or stale generated metadata
|
|
33
33
|
- surface or entity ownership mistakes: public, user, workspace, workspace_user
|
|
34
34
|
2. JSKIT review
|
|
35
|
+
- were relevant `@jskit-ai/agent-docs` guide or pattern docs consulted before inferring JSKIT architecture from source?
|
|
35
36
|
- existing helper/runtime seam available?
|
|
36
37
|
- was `.jskit/helper-map.md` checked before introducing helper-like code?
|
|
37
38
|
- should this have been a package install, generator step, or scaffold extension instead of hand code?
|
|
@@ -480,6 +480,20 @@ async function runSessionFinalizationGuard(paths, preconditions = []) {
|
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
async function runSessionProvisioningHook(paths, {
|
|
484
|
+
preferredPackageManager = "",
|
|
485
|
+
preconditions = []
|
|
486
|
+
} = {}) {
|
|
487
|
+
return runOptionalSessionPackageScript(paths, {
|
|
488
|
+
failureCode: "session_provision_failed",
|
|
489
|
+
failureMessage: `${SESSION_PROVISION_PACKAGE_SCRIPT} failed in the session worktree.`,
|
|
490
|
+
kind: "session_provision",
|
|
491
|
+
preferredPackageManager,
|
|
492
|
+
preconditions,
|
|
493
|
+
scriptName: SESSION_PROVISION_PACKAGE_SCRIPT
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
483
497
|
async function readIssueMetadata(paths) {
|
|
484
498
|
const source = await readTextIfExists(path.join(paths.sessionRoot, "issue_metadata.json"));
|
|
485
499
|
if (!source) {
|
|
@@ -945,13 +959,9 @@ async function installDependencies(paths, _options = {}, context = {}) {
|
|
|
945
959
|
preconditions
|
|
946
960
|
});
|
|
947
961
|
}
|
|
948
|
-
const provisionResult = await
|
|
949
|
-
failureCode: "session_provision_failed",
|
|
950
|
-
failureMessage: `${SESSION_PROVISION_PACKAGE_SCRIPT} failed in the session worktree.`,
|
|
951
|
-
kind: "session_provision",
|
|
962
|
+
const provisionResult = await runSessionProvisioningHook(paths, {
|
|
952
963
|
preferredPackageManager: command,
|
|
953
|
-
preconditions
|
|
954
|
-
scriptName: SESSION_PROVISION_PACKAGE_SCRIPT
|
|
964
|
+
preconditions
|
|
955
965
|
});
|
|
956
966
|
if (!provisionResult.ok) {
|
|
957
967
|
return provisionResult.response;
|
|
@@ -969,6 +979,7 @@ async function adoptDependenciesInstalled({
|
|
|
969
979
|
message = ""
|
|
970
980
|
} = {}) {
|
|
971
981
|
return withExistingSession({ targetRoot, sessionId }, async (paths, context = {}) => {
|
|
982
|
+
const preconditions = context.preconditions || [];
|
|
972
983
|
const artifacts = await readSessionArtifacts(paths);
|
|
973
984
|
if (artifacts.nextStep !== "dependencies_installed") {
|
|
974
985
|
return buildSessionResponse(paths, {
|
|
@@ -979,12 +990,21 @@ async function adoptDependenciesInstalled({
|
|
|
979
990
|
message: `Cannot record dependencies for ${paths.sessionId}; current step is ${artifacts.nextStep || "complete"}.`
|
|
980
991
|
})
|
|
981
992
|
],
|
|
982
|
-
preconditions
|
|
993
|
+
preconditions
|
|
983
994
|
});
|
|
984
995
|
}
|
|
996
|
+
const provisionResult = await runSessionProvisioningHook(paths, {
|
|
997
|
+
preconditions
|
|
998
|
+
});
|
|
999
|
+
if (!provisionResult.ok) {
|
|
1000
|
+
return provisionResult.response;
|
|
1001
|
+
}
|
|
1002
|
+
const receiptMessage = provisionResult.ran
|
|
1003
|
+
? `${normalizeText(message) || "Installed Node dependencies in the session worktree."}\n${SESSION_PROVISION_PACKAGE_SCRIPT} completed.`
|
|
1004
|
+
: message;
|
|
985
1005
|
return recordDependenciesInstalled(paths, {
|
|
986
|
-
message,
|
|
987
|
-
preconditions
|
|
1006
|
+
message: receiptMessage,
|
|
1007
|
+
preconditions
|
|
988
1008
|
});
|
|
989
1009
|
});
|
|
990
1010
|
}
|