@jskit-ai/agent-docs 0.1.30 → 0.1.32
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/DISTR_AGENT.md +9 -39
- package/guide/agent/app-setup/initial-scaffolding.md +1 -1
- package/package.json +5 -6
- package/patterns/page-scaffolding.md +3 -3
- package/patterns/surfaces.md +1 -1
- package/reference/autogen/packages/users-web.md +5 -3
- package/reference/autogen/tooling/jskit-cli.md +167 -0
- package/skills/jskit-review/SKILL.md +6 -7
- package/templates/app/AGENTS.md +10 -99
- package/templates/APP_BLUEPRINT.md +0 -81
- package/templates/WORKBOARD.md +0 -46
- package/workflow/app-state.md +0 -34
- package/workflow/bootstrap.md +0 -62
- package/workflow/feature-delivery.md +0 -82
- package/workflow/review.md +0 -56
- package/workflow/scoping.md +0 -53
- package/workflow/workboard.md +0 -29
package/DISTR_AGENT.md
CHANGED
|
@@ -1,45 +1,15 @@
|
|
|
1
1
|
# Distributed Agent Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
JSKIT issue work is driven by the executable session workflow.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
2. `workflow/bootstrap.md` if the workspace is empty or no JSKIT app exists yet
|
|
7
|
-
3. `workflow/scoping.md`
|
|
8
|
-
4. `workflow/workboard.md`
|
|
9
|
-
5. `workflow/feature-delivery.md`
|
|
10
|
-
6. `workflow/review.md`
|
|
5
|
+
Use:
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
- `jskit session` to list sessions.
|
|
8
|
+
- `jskit session create` to start a session.
|
|
9
|
+
- `jskit session <session_id>` to inspect state.
|
|
10
|
+
- `jskit session <session_id> step` to run the next step or render the next prompt.
|
|
11
|
+
- `jskit session <session_id> step --json` for machine-readable output.
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
- `reference/autogen/README.md`
|
|
16
|
-
- `patterns/INDEX.md`
|
|
17
|
-
- `guide/agent/index.md`
|
|
18
|
-
- `site/guide/index.md` when compressed guidance is ambiguous or missing nuance
|
|
19
|
-
- `templates/APP_BLUEPRINT.md`
|
|
20
|
-
- `templates/WORKBOARD.md`
|
|
21
|
-
- `skills/jskit-review/SKILL.md` for review passes when your Codex environment supports packaged skills
|
|
13
|
+
Do not use the old prose workflow model. Session state, receipts, prompt rendering, issue creation, review loops, doctor checks, PR creation, merge, cleanup, and final receipts belong to `jskit session`.
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- Inspect the workspace before assuming a JSKIT app exists.
|
|
26
|
-
- Before non-trivial edits, print a short visible checkpoint using this format:
|
|
27
|
-
- `Problem: ...`
|
|
28
|
-
- `Fix: ...`
|
|
29
|
-
- `Why this sticks: ...`
|
|
30
|
-
- `Not doing: ...`
|
|
31
|
-
- Keep that checkpoint compact. Do not expand it into a long preamble unless the developer asks for detail.
|
|
32
|
-
- When a request involves JSKIT UI, routing, surfaces, CRUDs, filters, placements, live actions, or similar implementation details, scan `patterns/INDEX.md` for matching keywords and read only the relevant pattern files.
|
|
33
|
-
- Reuse existing JSKIT helpers and runtime seams before adding new local helpers.
|
|
34
|
-
- If `npm install` is run while the app is using local JSKIT checkout links, run `npm run devlinks` immediately afterward.
|
|
35
|
-
- A freshly scaffolded JSKIT app can still be in Stage 1. If platform decisions are not settled yet, continue with the initialize workflow before adding runtime packages.
|
|
36
|
-
- Do not treat a missing `config.tenancyMode` line or an untouched minimal scaffold as a final tenancy decision.
|
|
37
|
-
- Do not install tenancy-sensitive packages until Stage 1 decisions are complete and the chosen tenancy is written into `config/public.js`.
|
|
38
|
-
- Treat standard JSKIT package-owned workflows as the default baseline once the relevant package stack is chosen. Do not ask the developer to redesign those flows unless they want overrides, restrictions, or custom additions.
|
|
39
|
-
- Example: if the app is workspace-capable and uses `workspaces-core` plus `workspaces-web`, assume the standard workspace invite flow is part of the baseline package behavior.
|
|
40
|
-
- For baseline package setup, ask plainly for the exact local development values needed for the next install step, but only for the modules or packages that are actually selected.
|
|
41
|
-
- Use the real env var names or option names instead of vague requests for "credentials". Values such as `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `AUTH_SUPABASE_URL`, `AUTH_SUPABASE_PUBLISHABLE_KEY`, and `APP_PUBLIC_URL` are routine setup inputs when the relevant package stack needs them.
|
|
42
|
-
- Do not implement app features before the blueprint has the database, surfaces, ownership model, and route/screen plan written down.
|
|
43
|
-
- For substantial or multi-chunk work, create or update `.jskit/WORKBOARD.md` as the per-request execution tracker.
|
|
44
|
-
- Use the compressed guide first for speed; fall back to the human guide when a workflow trap, migration caveat, or architectural boundary needs exact wording.
|
|
45
|
-
- Treat generated reference maps and guide copies as vendor reference. Do not edit them manually.
|
|
15
|
+
Use package docs, generated references, patterns, and guides only as technical references.
|
|
@@ -28,7 +28,7 @@ npx @jskit-ai/create-app exampleapp --target . --force --tenancy-mode <mode>
|
|
|
28
28
|
npm install
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
After that promotion, the overwritten app `AGENTS.md`
|
|
31
|
+
After that promotion, the overwritten app `AGENTS.md` stays deliberately small. Use `jskit session` for issue-driven work; session state and prompts live under `.jskit/sessions/` in the target app.
|
|
32
32
|
|
|
33
33
|
After creating the real app scaffolding (the base shell, not the seed wrapper), you will need to run `npm install` to install dependencies.
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/agent-docs",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Distributed JSKIT agent
|
|
3
|
+
"version": "0.1.32",
|
|
4
|
+
"description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"DISTR_AGENT.md",
|
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
"patterns",
|
|
10
10
|
"reference",
|
|
11
11
|
"skills",
|
|
12
|
-
"templates"
|
|
13
|
-
"workflow"
|
|
12
|
+
"templates"
|
|
14
13
|
],
|
|
15
14
|
"scripts": {
|
|
16
15
|
"test": "node --test"
|
|
17
16
|
},
|
|
18
17
|
"engines": {
|
|
19
|
-
"node": "20
|
|
18
|
+
"node": ">=20 <23"
|
|
20
19
|
},
|
|
21
20
|
"publishConfig": {
|
|
22
21
|
"access": "public"
|
|
@@ -25,6 +24,6 @@
|
|
|
25
24
|
"jskit",
|
|
26
25
|
"agent",
|
|
27
26
|
"docs",
|
|
28
|
-
"
|
|
27
|
+
"session"
|
|
29
28
|
]
|
|
30
29
|
}
|
|
@@ -9,7 +9,7 @@ Use when:
|
|
|
9
9
|
|
|
10
10
|
Check first:
|
|
11
11
|
|
|
12
|
-
- the blueprint route family and chosen surface
|
|
12
|
+
- the app blueprint route family and chosen surface
|
|
13
13
|
- `jskit show ui-generator --details`
|
|
14
14
|
- `jskit list-placements`
|
|
15
15
|
- the nearest existing routed host under `src/pages`
|
|
@@ -23,7 +23,7 @@ Rules:
|
|
|
23
23
|
- If you need the concrete outlet inventory, use `jskit list-placements --concrete`; do not target concrete outlets by default.
|
|
24
24
|
- If the page sits under an existing routed host, check whether `ui-generator page` can infer the correct `page.section-nav` owner before writing a custom link by hand.
|
|
25
25
|
- If you do not use `ui-generator page`, state exactly why the generator does not fit before editing code.
|
|
26
|
-
- For a small placeholder route inside an existing route family,
|
|
26
|
+
- For a small placeholder route inside an existing route family, keep the change scoped unless the durable route or surface plan in the app blueprint changed.
|
|
27
27
|
- Generated live pages must be usable screens, not instructional scaffolds. Do not ship copy such as "replace this", "use this area", or "this page is ready".
|
|
28
28
|
- Prefer a page header plus a direct `v-sheet` working region. Do not wrap every generated page in a generic `v-card`.
|
|
29
29
|
- If the screen is not implemented yet, use a product-shaped empty state with one clear next action or status, not developer instructions.
|
|
@@ -42,7 +42,7 @@ Generated UI contract:
|
|
|
42
42
|
Avoid:
|
|
43
43
|
|
|
44
44
|
- hand-writing both `src/pages/...` and `src/placement.js` for a normal non-CRUD page before checking `ui-generator`
|
|
45
|
-
- treating a small page stub as permission to rewrite marketing copy, route architecture, or blueprint scope
|
|
45
|
+
- treating a small page stub as permission to rewrite marketing copy, route architecture, or app blueprint scope
|
|
46
46
|
- claiming that no generator exists without checking the actual `jskit` generator inventory first
|
|
47
47
|
- adding cards inside cards or repeating the page title inside a card title
|
|
48
48
|
- treating Vuetify component defaults as the product architecture
|
package/patterns/surfaces.md
CHANGED
|
@@ -223,7 +223,7 @@ Local functions
|
|
|
223
223
|
|
|
224
224
|
### `src/client/composables/records/useCrudList.js`
|
|
225
225
|
Exports
|
|
226
|
-
- `useCrudList({ resource = null, requestQueryParams = null, parentBinding = null, recordIdParam = "recordId", route = null, ...listOptions } = {})`
|
|
226
|
+
- `useCrudList({ resource = null, requestQueryParams = null, parentBinding = null, recordIdParam = "recordId", route = null, realtime = undefined, ...listOptions } = {})`
|
|
227
227
|
Local functions
|
|
228
228
|
- `resolveRequestQueryParamsInput(requestQueryParams, context = {})`
|
|
229
229
|
- `resolveCrudParentRequestQueryParams({ resource = {}, route = null, recordIdParam = "recordId" } = {})`
|
|
@@ -238,7 +238,7 @@ Exports
|
|
|
238
238
|
|
|
239
239
|
### `src/client/composables/records/useView.js`
|
|
240
240
|
Exports
|
|
241
|
-
- `useView({ ownershipFilter = ROUTE_VISIBILITY_WORKSPACE, surfaceId = "", access = "auto", apiSuffix = "", queryKeyFactory = null, viewPermissions = [], readMethod = "GET", readEnabled = true, transport = null, placementSource = "users-web.view", fallbackLoadError = "Unable to load resource.", notFoundStatuses = [404], notFoundMessage = "Record not found.", model, mapLoadedToModel, requestQueryParams = null, recordIdParam = "recordId", routeParams = null, routeRecordId = null, apiUrlTemplate = "", listUrlTemplate = "", editUrlTemplate = "", includeRecordIdInQueryKey = false, realtime =
|
|
241
|
+
- `useView({ ownershipFilter = ROUTE_VISIBILITY_WORKSPACE, surfaceId = "", access = "auto", apiSuffix = "", queryKeyFactory = null, viewPermissions = [], readMethod = "GET", readEnabled = true, transport = null, placementSource = "users-web.view", fallbackLoadError = "Unable to load resource.", notFoundStatuses = [404], notFoundMessage = "Record not found.", model, mapLoadedToModel, requestQueryParams = null, recordIdParam = "recordId", routeParams = null, routeRecordId = null, apiUrlTemplate = "", listUrlTemplate = "", editUrlTemplate = "", includeRecordIdInQueryKey = false, realtime = undefined, adapter = null } = {})`
|
|
242
242
|
|
|
243
243
|
### `src/client/composables/runtime/addEditUiRuntime.js`
|
|
244
244
|
Exports
|
|
@@ -290,7 +290,7 @@ Exports
|
|
|
290
290
|
Exports
|
|
291
291
|
- `buildEndpointReadRequestOptions({ method = "GET", query = null, transport = null } = {})`
|
|
292
292
|
- `buildEndpointWriteRequestOptions({ method = "PATCH", body = undefined, options = null, transport = null } = {})`
|
|
293
|
-
- `useEndpointResource({ queryKey, path = "", enabled = true, client = usersWebHttpClient, readMethod = "GET", writeMethod = "PATCH", readQuery = null, transport = null, refreshOnPull = false, queryOptions = null, mutationOptions = null, fallbackLoadError = "Unable to load resource.", fallbackSaveError = "Unable to save resource." } = {})`
|
|
293
|
+
- `useEndpointResource({ queryKey, path = "", enabled = true, client = usersWebHttpClient, readMethod = "GET", writeMethod = "PATCH", readQuery = null, transport = null, refreshOnPull = false, realtime = null, queryOptions = null, mutationOptions = null, fallbackLoadError = "Unable to load resource.", fallbackSaveError = "Unable to save resource." } = {})`
|
|
294
294
|
Local functions
|
|
295
295
|
- `resolveRequestQuery(value = null)`
|
|
296
296
|
|
|
@@ -501,10 +501,12 @@ Local functions
|
|
|
501
501
|
|
|
502
502
|
### `src/client/composables/useRealtimeQueryInvalidation.js`
|
|
503
503
|
Exports
|
|
504
|
+
- `resolveOperationRealtimeOptions({ realtime = undefined, fallbackRealtime = null } = {})`
|
|
504
505
|
- `useRealtimeQueryInvalidation({ event = "", enabled = true, matches = null, queryKey = null, onEvent = null } = {})`
|
|
505
506
|
- `useOperationRealtime({ realtime = null, queryKey = null, enabled = true } = {})`
|
|
506
507
|
Local functions
|
|
507
508
|
- `normalizeRealtimeOptions(value = {})`
|
|
509
|
+
- `hasRealtimeEventConfig(value = {})`
|
|
508
510
|
- `resolveEnabled(value)`
|
|
509
511
|
- `toQueryKeyList(value)`
|
|
510
512
|
|
|
@@ -22,6 +22,19 @@ Exports
|
|
|
22
22
|
Exports
|
|
23
23
|
- None
|
|
24
24
|
|
|
25
|
+
### `src/server/appBlueprint.js`
|
|
26
|
+
Exports
|
|
27
|
+
- `APP_BLUEPRINT_RELATIVE_PATH`
|
|
28
|
+
- `APP_PROMPT_OVERRIDE_RELATIVE_ROOT`
|
|
29
|
+
- `extractAppBlueprintText(value = "")`
|
|
30
|
+
- `readAppBlueprint({ targetRoot = process.cwd() } = {})`
|
|
31
|
+
- `readTextInputFile(cwd, inputPath)`
|
|
32
|
+
- `renderAppBlueprintPrompt({ targetRoot = process.cwd(), appBrief = "" } = {})`
|
|
33
|
+
- `resolveAppBlueprintPaths(targetRoot = process.cwd())`
|
|
34
|
+
- `writeAppBlueprint({ targetRoot = process.cwd(), appBlueprint = "" } = {})`
|
|
35
|
+
Local functions
|
|
36
|
+
- `readAppPromptTemplate(paths, templateName)`
|
|
37
|
+
|
|
25
38
|
### `src/server/cliEntrypoint.js`
|
|
26
39
|
Exports
|
|
27
40
|
- `runCliEntrypoint(runCli, argv = process.argv.slice(2))`
|
|
@@ -209,6 +222,7 @@ Local functions
|
|
|
209
222
|
Exports
|
|
210
223
|
- `normalizeMutationExtension(value)`
|
|
211
224
|
- `normalizeTemplateContextRecord(value)`
|
|
225
|
+
- `normalizeDependencyMutationRecord(value)`
|
|
212
226
|
- `normalizeFileMutationRecord(value)`
|
|
213
227
|
- `normalizeMutationWhen(value)`
|
|
214
228
|
- `readObjectPath(source, rawPath)`
|
|
@@ -234,6 +248,7 @@ Local functions
|
|
|
234
248
|
- `isWorkspaceCapableTenancyMode(value = "")`
|
|
235
249
|
- `collectInstallWarnings({ packageEntry, appRoot, appPackageJson })`
|
|
236
250
|
- `resolveManagedSourceRecord(packageEntry, existingInstall = {})`
|
|
251
|
+
- `dependencyMutationUsesWhen(entries = [])`
|
|
237
252
|
|
|
238
253
|
### `src/server/cliRuntime/packageIntrospection.js`
|
|
239
254
|
Exports
|
|
@@ -417,6 +432,15 @@ Exports
|
|
|
417
432
|
Exports
|
|
418
433
|
- `runAppVerifyUiCommand(ctx = {}, { appRoot = "", options = {}, stdout, stderr })`
|
|
419
434
|
|
|
435
|
+
### `src/server/commandHandlers/blueprint.js`
|
|
436
|
+
Exports
|
|
437
|
+
- `createBlueprintCommands(ctx = {})`
|
|
438
|
+
Local functions
|
|
439
|
+
- `writeJson(stdout, payload)`
|
|
440
|
+
- `writeBlueprintText(stdout, payload)`
|
|
441
|
+
- `readStream(stream)`
|
|
442
|
+
- `resolveTextInput({ cwd, fileOption, inlineOptions = {}, io = {}, stdinOption = "-", textOption })`
|
|
443
|
+
|
|
420
444
|
### `src/server/commandHandlers/completion.js`
|
|
421
445
|
Exports
|
|
422
446
|
- `createCompletionCommands(ctx = {})`
|
|
@@ -638,6 +662,18 @@ Local functions
|
|
|
638
662
|
Exports
|
|
639
663
|
- `runPackageUpdateCommand(ctx = {}, { positional, options, cwd, io }, { runCommandAdd })`
|
|
640
664
|
|
|
665
|
+
### `src/server/commandHandlers/session.js`
|
|
666
|
+
Exports
|
|
667
|
+
- `createSessionCommands()`
|
|
668
|
+
Local functions
|
|
669
|
+
- `writeJson(stdout, payload)`
|
|
670
|
+
- `writeSessionText(stdout, payload)`
|
|
671
|
+
- `readStream(stream)`
|
|
672
|
+
- `resolveInputFilePath(cwd, filePath)`
|
|
673
|
+
- `resolveTextInput({ codePrefix, fileOption, inlineOptions = {}, io = {}, repairCommand, cwd, stdinOption, textOption, sessionId })`
|
|
674
|
+
- `resolveStepInputs({ inlineOptions = {}, io = {}, cwd, sessionId })`
|
|
675
|
+
- `normalizeStepOptions(inlineOptions = {})`
|
|
676
|
+
|
|
641
677
|
### `src/server/commandHandlers/shared.js`
|
|
642
678
|
Exports
|
|
643
679
|
- `createCommandHandlerShared(ctx = {})`
|
|
@@ -678,6 +714,7 @@ Exports
|
|
|
678
714
|
Local functions
|
|
679
715
|
- `resolveGeneratorSubcommandRows(payload = {})`
|
|
680
716
|
- `resolveOwnershipGuidance(payload = {})`
|
|
717
|
+
- `renderDependencyMutationSpec(versionSpec)`
|
|
681
718
|
|
|
682
719
|
### `src/server/core/argParser.js`
|
|
683
720
|
Exports
|
|
@@ -731,6 +768,136 @@ Local functions
|
|
|
731
768
|
Exports
|
|
732
769
|
- `runCli`
|
|
733
770
|
|
|
771
|
+
### `src/server/sessionRuntime.js`
|
|
772
|
+
Exports
|
|
773
|
+
- `SESSION_STATUS`
|
|
774
|
+
- `STEP_DEFINITIONS`
|
|
775
|
+
- `STEP_IDS`
|
|
776
|
+
- `STEP_PRECONDITION_NAMES`
|
|
777
|
+
- `abandonSession({ targetRoot = process.cwd(), sessionId } = {})`
|
|
778
|
+
- `adoptCodexThreadId({ targetRoot = process.cwd(), sessionId, codexThreadId } = {})`
|
|
779
|
+
- `buildSessionResponse`
|
|
780
|
+
- `buildSessionErrorResponse`
|
|
781
|
+
- `createSession({ targetRoot = process.cwd(), sessionId = "", now = new Date() } = {})`
|
|
782
|
+
- `createSessionId`
|
|
783
|
+
- `extractIssueText(value = "")`
|
|
784
|
+
- `inspectSession({ targetRoot = process.cwd(), sessionId } = {})`
|
|
785
|
+
- `inspectSessionDetails({ targetRoot = process.cwd(), sessionId } = {})`
|
|
786
|
+
- `isValidSessionId`
|
|
787
|
+
- `listSessions({ targetRoot = process.cwd() } = {})`
|
|
788
|
+
- `renderTemplate`
|
|
789
|
+
- `resolveSessionPaths`
|
|
790
|
+
- `runSessionStep({ targetRoot = process.cwd(), sessionId, options = {} } = {})`
|
|
791
|
+
Local functions
|
|
792
|
+
- `invalidSessionIdError(sessionId = "")`
|
|
793
|
+
- `invalidSessionIdResponse({ targetRoot, sessionId })`
|
|
794
|
+
- `existingSessionContext({ targetRoot = process.cwd(), sessionId } = {})`
|
|
795
|
+
- `withExistingSession(input, handler)`
|
|
796
|
+
- `emptySessionDetails(response)`
|
|
797
|
+
- `createWorktree(paths, _options = {}, context = {})`
|
|
798
|
+
- `renderIssuePrompt(paths, options = {})`
|
|
799
|
+
- `draftIssue(paths, options = {})`
|
|
800
|
+
- `titleFromIssue(issueText)`
|
|
801
|
+
- `createIssue(paths, _options = {}, context = {})`
|
|
802
|
+
- `renderImplementationPrompt(paths)`
|
|
803
|
+
- `worktreeStatus(worktree)`
|
|
804
|
+
- `detectChanges(paths)`
|
|
805
|
+
- `commitWorktree(paths, { message, allowNoChanges = false } = {})`
|
|
806
|
+
- `commitImplementation(paths)`
|
|
807
|
+
- `changedFilesFromLastCommit(paths)`
|
|
808
|
+
- `reviewPromptStepId(passNumber)`
|
|
809
|
+
- `renderReviewPrompt(paths, passNumber)`
|
|
810
|
+
- `reviewChangesStepId(passNumber)`
|
|
811
|
+
- `detectAndCommitReviewChanges(paths, passNumber)`
|
|
812
|
+
- `userCheckStepId(passNumber)`
|
|
813
|
+
- `userCheck(paths, passNumber, options = {})`
|
|
814
|
+
- `readPackageJson(root)`
|
|
815
|
+
- `doctorCommandForWorktree(worktree)`
|
|
816
|
+
- `runDoctor(paths)`
|
|
817
|
+
- `pushBranch(paths)`
|
|
818
|
+
- `issueNumberFromUrl(issueUrl)`
|
|
819
|
+
- `createPr(paths)`
|
|
820
|
+
- `mergePr(paths)`
|
|
821
|
+
- `removeWorktree(paths)`
|
|
822
|
+
- `finishSession(paths)`
|
|
823
|
+
- `runNamedPreconditions(paths, names = [])`
|
|
824
|
+
|
|
825
|
+
### `src/server/sessionRuntime/constants.js`
|
|
826
|
+
Exports
|
|
827
|
+
- `PROMPT_DIRECTORY`
|
|
828
|
+
- `SESSION_ID_PATTERN`
|
|
829
|
+
- `SESSION_STATUS`
|
|
830
|
+
- `STEP_DEFINITIONS`
|
|
831
|
+
- `STEP_IDS`
|
|
832
|
+
- `STEP_LABEL_BY_ID`
|
|
833
|
+
- `SESSION_STATE_RELATIVE_PATH`
|
|
834
|
+
|
|
835
|
+
### `src/server/sessionRuntime/io.js`
|
|
836
|
+
Exports
|
|
837
|
+
- `fileExists(filePath)`
|
|
838
|
+
- `normalizeText(value)`
|
|
839
|
+
- `readTextIfExists(filePath)`
|
|
840
|
+
- `readTrimmedFile(filePath)`
|
|
841
|
+
- `runCommand(command, args = [], { cwd, env = {}, timeout = 30000 } = {})`
|
|
842
|
+
- `runGit(targetRoot, args = [], options = {})`
|
|
843
|
+
- `runGitInWorktree(worktree, args = [], options = {})`
|
|
844
|
+
- `timestampForReceipt(now = new Date())`
|
|
845
|
+
- `writeTextFile(filePath, value)`
|
|
846
|
+
|
|
847
|
+
### `src/server/sessionRuntime/paths.js`
|
|
848
|
+
Exports
|
|
849
|
+
- `archiveSession(paths, archive)`
|
|
850
|
+
- `createAvailableSessionId(targetRoot, now = new Date())`
|
|
851
|
+
- `createSessionId(now = new Date())`
|
|
852
|
+
- `isValidSessionId(sessionId = "")`
|
|
853
|
+
- `normalizeSessionId(sessionId = "")`
|
|
854
|
+
- `resolveExistingSessionRoot(paths)`
|
|
855
|
+
- `resolveSessionPaths({ targetRoot, sessionId = "" } = {})`
|
|
856
|
+
- `pathsForExistingSession(paths)`
|
|
857
|
+
Local functions
|
|
858
|
+
- `formatDatePart(value)`
|
|
859
|
+
|
|
860
|
+
### `src/server/sessionRuntime/preconditions.js`
|
|
861
|
+
Exports
|
|
862
|
+
- `applyPreconditions(paths, checks = [])`
|
|
863
|
+
- `assertGhAuth(targetRoot)`
|
|
864
|
+
- `assertGitCurrentBranch(targetRoot)`
|
|
865
|
+
- `assertGitRepository(targetRoot)`
|
|
866
|
+
- `assertGithubOrigin(targetRoot)`
|
|
867
|
+
- `assertIssueArtifacts(paths)`
|
|
868
|
+
- `assertIssueTextExists(paths)`
|
|
869
|
+
- `assertPrUrlExists(paths)`
|
|
870
|
+
- `assertSessionExists(paths)`
|
|
871
|
+
- `assertTargetRootWritable(targetRoot)`
|
|
872
|
+
- `assertWorktreeExists(paths)`
|
|
873
|
+
- `ensureStudioGitExclude(targetRoot)`
|
|
874
|
+
- `hasWorktree(paths)`
|
|
875
|
+
Local functions
|
|
876
|
+
- `resolveGitCommonDirectory(targetRoot)`
|
|
877
|
+
|
|
878
|
+
### `src/server/sessionRuntime/promptRenderer.js`
|
|
879
|
+
Exports
|
|
880
|
+
- `readPromptTemplate(targetRoot, name)`
|
|
881
|
+
- `renderPrompt(paths, templateName, values = {})`
|
|
882
|
+
- `renderTemplate(source, values = {})`
|
|
883
|
+
|
|
884
|
+
### `src/server/sessionRuntime/responses.js`
|
|
885
|
+
Exports
|
|
886
|
+
- `buildSessionErrorResponse({ targetRoot = process.cwd(), sessionId = "", code, message, repairCommand = "", status = SESSION_STATUS.BLOCKED, preconditions = [], errors = undefined } = {})`
|
|
887
|
+
- `buildSessionResponse(paths, { ok = true, errors = [], preconditions = [], prompt = undefined, status = undefined } = {})`
|
|
888
|
+
- `createError({ code, message, repairCommand = "" })`
|
|
889
|
+
- `createPrecondition({ id, ok, message })`
|
|
890
|
+
- `failSession(paths, { code, message, repairCommand = "", preconditions = [], status = SESSION_STATUS.BLOCKED, prompt = "" })`
|
|
891
|
+
- `markCurrentStep(paths, stepId)`
|
|
892
|
+
- `markStatus(paths, status)`
|
|
893
|
+
- `readReceiptSteps(paths)`
|
|
894
|
+
- `readSessionArtifacts(paths)`
|
|
895
|
+
- `writeReceipt(paths, stepId, message)`
|
|
896
|
+
Local functions
|
|
897
|
+
- `readCompletedSteps(sessionRoot)`
|
|
898
|
+
- `resolveNextStep(completedSteps = [])`
|
|
899
|
+
- `buildNextCommand(sessionId, stepId)`
|
|
900
|
+
|
|
734
901
|
### `src/server/shared/cliError.js`
|
|
735
902
|
Exports
|
|
736
903
|
- `createCliError(message, { showUsage = false, exitCode = 1, renderUsage = null } = {})`
|
|
@@ -13,10 +13,9 @@ Preferred execution mode:
|
|
|
13
13
|
- Use the current agent only when delegation is unavailable.
|
|
14
14
|
- The same rule applies to chunk review and whole-changeset review.
|
|
15
15
|
|
|
16
|
-
## Read
|
|
16
|
+
## Read First
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
2. `../../workflow/feature-delivery.md`
|
|
18
|
+
Use the current `jskit session` review prompt as the source of truth when the review is part of a session.
|
|
20
19
|
|
|
21
20
|
Read these on demand:
|
|
22
21
|
|
|
@@ -25,10 +24,10 @@ Read these on demand:
|
|
|
25
24
|
- `../../guide/agent/index.md`
|
|
26
25
|
- `../../site/guide/index.md` when compressed guidance is ambiguous
|
|
27
26
|
|
|
28
|
-
Inspect app-local files when they exist:
|
|
27
|
+
Inspect app-local session files when they exist:
|
|
29
28
|
|
|
30
|
-
- `.jskit/
|
|
31
|
-
- `.jskit/
|
|
29
|
+
- `.jskit/sessions/active/<session_id>/prompt.md`
|
|
30
|
+
- `.jskit/sessions/active/<session_id>/issue.md`
|
|
32
31
|
|
|
33
32
|
## Review target
|
|
34
33
|
|
|
@@ -37,7 +36,7 @@ Determine whether the target is:
|
|
|
37
36
|
- the current chunk
|
|
38
37
|
- or the whole changeset
|
|
39
38
|
|
|
40
|
-
Use
|
|
39
|
+
Use the active `jskit session` state to determine the current pass when available.
|
|
41
40
|
|
|
42
41
|
## Required passes
|
|
43
42
|
|
package/templates/app/AGENTS.md
CHANGED
|
@@ -1,106 +1,17 @@
|
|
|
1
1
|
# App Agent Instructions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
JSKIT issue work is driven by the executable session workflow.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
6. `node_modules/@jskit-ai/agent-docs/workflow/review.md`
|
|
7
|
+
- `jskit session` to list existing sessions.
|
|
8
|
+
- `jskit session create` to start a new issue session.
|
|
9
|
+
- `jskit session <session_id>` to inspect durable session state.
|
|
10
|
+
- `jskit session <session_id> step` to run the next workflow step or get the next prompt.
|
|
11
|
+
- `jskit session <session_id> step --json` when a tool or UI needs machine-readable state.
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Do not invent a parallel manual issue workflow. Follow the current session step output.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
- `node_modules/@jskit-ai/agent-docs/reference/autogen/README.md`
|
|
18
|
-
- `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md`
|
|
19
|
-
- `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`
|
|
20
|
-
- `node_modules/@jskit-ai/agent-docs/site/guide/index.md` when compressed guidance is ambiguous or missing nuance
|
|
21
|
-
- `node_modules/@jskit-ai/agent-docs/templates/APP_BLUEPRINT.md`
|
|
22
|
-
- `node_modules/@jskit-ai/agent-docs/templates/WORKBOARD.md`
|
|
23
|
-
- `node_modules/@jskit-ai/agent-docs/skills/jskit-review/SKILL.md` for review passes when your Codex environment supports packaged skills
|
|
15
|
+
If dependencies are missing, install them first. If `npm install` is run while this app uses local JSKIT checkout links, run `npm run devlinks` immediately afterward.
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Before any non-trivial change:
|
|
28
|
-
|
|
29
|
-
1. Read this file and the workflow files above in the current turn. Do not rely on memory alone.
|
|
30
|
-
2. If the task involves JSKIT UI, routing, surfaces, CRUDs, filters, placements, live actions, or similar implementation details, scan `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` and read the relevant pattern files before editing.
|
|
31
|
-
3. For substantial or multi-chunk work, create or update `.jskit/WORKBOARD.md` before editing.
|
|
32
|
-
4. Before editing, print a compact read receipt with:
|
|
33
|
-
- `Read receipt: ...`
|
|
34
|
-
- `Active chunk: ...`
|
|
35
|
-
- `Generator decision: ...` with the exact `jskit` command to run, or the exact generator/placement discovery commands checked and why no generator applies
|
|
36
|
-
- `Relevant patterns: ...`
|
|
37
|
-
- `Active rules from docs: ...`
|
|
38
|
-
5. When files need to be created, prefer `jskit generate ...` over creating them from scratch, even if the generated output will need follow-up adaptation. For a new non-CRUD route page or menu-linked screen, default to `jskit generate ui-generator page ...`. If not using a generator, say why.
|
|
39
|
-
6. Do not edit code until the read receipt is printed and the workboard step is complete when it applies.
|
|
40
|
-
|
|
41
|
-
## Mandatory Done Gate
|
|
42
|
-
|
|
43
|
-
Before calling a chunk done, report:
|
|
44
|
-
|
|
45
|
-
- `Deslop review: ...`
|
|
46
|
-
- `JSKIT review: ...`
|
|
47
|
-
- `Material/Vuetify review: ...`
|
|
48
|
-
- `Playwright: ...` for any chunk that adds or changes user-facing UI
|
|
49
|
-
- `Verification: ...`
|
|
50
|
-
- `Files changed: ...`
|
|
51
|
-
- `Commands run: ...`
|
|
52
|
-
- `Remaining unverified: ...`
|
|
53
|
-
|
|
54
|
-
If a feature spans more than one chunk, repeat those passes on the whole changeset after the final chunk.
|
|
55
|
-
|
|
56
|
-
Core rules:
|
|
57
|
-
|
|
58
|
-
- Inspect the workspace before assuming a JSKIT app exists.
|
|
59
|
-
- Before non-trivial edits, print a short visible checkpoint using this format:
|
|
60
|
-
- `Problem: ...`
|
|
61
|
-
- `Fix: ...`
|
|
62
|
-
- `Why this sticks: ...`
|
|
63
|
-
- `Not doing: ...`
|
|
64
|
-
- Keep that checkpoint compact. Do not expand it into a long preamble unless the developer asks for detail.
|
|
65
|
-
- Reuse existing JSKIT helpers and runtime seams before adding new local helpers.
|
|
66
|
-
- If `npm install` is run while the app is using local JSKIT checkout links, run `npm run devlinks` immediately afterward.
|
|
67
|
-
- A freshly scaffolded JSKIT app can still be in Stage 1. If the app was just created and platform decisions are not settled yet, continue with the initialize workflow before adding runtime packages.
|
|
68
|
-
- Do not treat a missing `config.tenancyMode` line or an untouched minimal scaffold as a final tenancy decision.
|
|
69
|
-
- Do not install tenancy-sensitive packages until Stage 1 decisions are complete and the chosen tenancy is written into `config/public.js`.
|
|
70
|
-
- Treat standard JSKIT package-owned workflows as the default baseline once the relevant package stack is chosen. Do not ask the developer to redesign those flows unless they want overrides, restrictions, or custom additions.
|
|
71
|
-
- Example: if the app is workspace-capable and uses `workspaces-core` plus `workspaces-web`, assume the standard workspace invite flow is part of the baseline package behavior.
|
|
72
|
-
- For baseline package setup, ask plainly for the exact local development values needed for the next install step, but only for the modules or packages that are actually selected.
|
|
73
|
-
- Use the real env var names or option names instead of vague requests for "credentials". Values such as `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `AUTH_SUPABASE_URL`, `AUTH_SUPABASE_PUBLISHABLE_KEY`, and `APP_PUBLIC_URL` are routine setup inputs when the relevant package stack needs them.
|
|
74
|
-
- For CRUD chunks, creating the server CRUD with `jskit generate crud-server-generator scaffold ...` is the crucial first step even if no CRUD UI will be created yet.
|
|
75
|
-
- Unless a table is already owned by a JSKIT baseline package or is an explicit narrow exception recorded in `.jskit/table-ownership.json`, every persisted app-owned table must have its own server CRUD package created first with `jskit generate crud-server-generator scaffold ...`, even if no CRUD UI will ever exist.
|
|
76
|
-
- Treat that as a hard invariant, not a style preference. If a persisted app-owned table does not have generated CRUD ownership, `jskit doctor` is expected to fail.
|
|
77
|
-
- If the table should be CRUD-owned but should not expose public CRUD HTTP routes yet, use `jskit generate crud-server-generator scaffold ... --internal` rather than dropping to direct knex or a hand-built pseudo-repository.
|
|
78
|
-
- For a CRUD table that `crud-server-generator` will own, do not hand-write a separate migration. Create the real table directly in the database first, then scaffold the server CRUD so JSKIT can install and manage the CRUD migration scaffold itself.
|
|
79
|
-
- Do not generate CRUD UI or hand-build CRUD routes before the server CRUD package and shared resource file exist.
|
|
80
|
-
- `feature-server-generator` is for workflows, orchestration, and other non-CRUD server features. Do not use it as the starting point for ordinary persisted entity tables.
|
|
81
|
-
- Keep direct knex minimal and exceptional. Outside generated CRUD packages and explicit weird-custom feature lanes, app-owned runtime code should use internal `json-rest-api` seams instead of talking to knex directly.
|
|
82
|
-
- For CRUD chunks, ask the developer which operations are allowed, which fields belong in the list view if one exists, and the intended look of the view and edit/new forms before generating code.
|
|
83
|
-
- Every user-facing screen must pass a Material Design and Vuetify quality review before the chunk is considered done.
|
|
84
|
-
- Any chunk that adds or changes user-facing UI must include a Playwright check that exercises the changed behavior before the chunk is considered done.
|
|
85
|
-
- Record that Playwright run with `jskit app verify-ui --command "<playwright command>" --feature "<label>" --auth-mode <mode>` so `jskit doctor` can verify the receipt. For local pre-merge review, normally follow it with `jskit doctor --against <base-ref>`. Advanced CI setups may also use `--against <base-ref>`, but that is app-specific.
|
|
86
|
-
- If the UI flow requires login, use the app's development-only auth bypass or session bootstrap path instead of a live external auth login flow.
|
|
87
|
-
- In JSKIT apps using the standard auth stack, that means enabling the dev auth bypass in development and using `POST /api/dev-auth/login-as` during Playwright setup.
|
|
88
|
-
- If authenticated UI work has no usable local auth bootstrap path yet, treat that as a testability gap and call it out before the chunk can be considered complete.
|
|
89
|
-
- Do not implement app features before the blueprint has the database, surfaces, ownership model, and route/screen plan written down.
|
|
90
|
-
- Plan implementation work as vertical slices. Each chunk should deliver a user-visible or end-to-end outcome that the developer can recognize in the app or behavior, not just an isolated layer change.
|
|
91
|
-
- Do not churn `.jskit/APP_BLUEPRINT.md` for a small placeholder page or route stub that fits an existing route family unless the durable route/surface plan actually changed. Track request-level movement in `.jskit/WORKBOARD.md` instead.
|
|
92
|
-
- Break planned work into reviewable chunks before implementing. One CRUD is usually one chunk, but auth/platform setup, shell work, and cross-cutting integrations can be their own chunks.
|
|
93
|
-
- Avoid horizontal chunk plans like "all migrations first", "all routes next", or "all UI last" unless platform setup truly forces that order. Prefer slices the developer can inspect as real progress.
|
|
94
|
-
- Do not move to the next chunk until the current chunk has passed implementation, deslop review, JSKIT best-practices review, Material Design/Vuetify review, and verification.
|
|
95
|
-
- If a feature spans more than one chunk, run a final whole-changeset deslop pass, JSKIT pass, Material Design/Vuetify pass, and verification pass after the last chunk.
|
|
96
|
-
- Prefer a fresh review agent for chunk and whole-changeset review when the runtime supports delegation.
|
|
97
|
-
- Have that fresh review agent use the packaged `jskit-review` skill when it is available to the runtime.
|
|
98
|
-
- If delegation or skills are unavailable, follow `workflow/review.md` manually in the current agent.
|
|
99
|
-
- Use the compressed guide first for speed; fall back to the human guide when a workflow trap, migration caveat, or architectural boundary needs exact wording.
|
|
100
|
-
- Treat generated reference maps and guide copies as vendor reference. Do not edit them manually.
|
|
101
|
-
|
|
102
|
-
If dependencies are not installed yet:
|
|
103
|
-
|
|
104
|
-
- install dependencies so `node_modules/@jskit-ai/agent-docs/` exists
|
|
105
|
-
- inspect the workspace before assuming a JSKIT app already exists
|
|
106
|
-
- if the workspace is empty and the user wants a new app, start with the initialize workflow at a high level first
|
|
17
|
+
For JSKIT implementation details, use package docs, generated references, and `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md` only as technical references. They are not the issue workflow source of truth.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# App Blueprint
|
|
2
|
-
|
|
3
|
-
## Product
|
|
4
|
-
|
|
5
|
-
- App purpose:
|
|
6
|
-
- Primary users:
|
|
7
|
-
- Success criteria:
|
|
8
|
-
|
|
9
|
-
## Platform Choices
|
|
10
|
-
|
|
11
|
-
- Tenancy mode:
|
|
12
|
-
- Database engine:
|
|
13
|
-
- Auth provider:
|
|
14
|
-
- Optional extras: realtime / assistant / uploads / other
|
|
15
|
-
|
|
16
|
-
## Actors And Access
|
|
17
|
-
|
|
18
|
-
- Actor list:
|
|
19
|
-
- Permission boundaries:
|
|
20
|
-
- Console/admin-only areas:
|
|
21
|
-
|
|
22
|
-
## Surfaces
|
|
23
|
-
|
|
24
|
-
- Global surfaces:
|
|
25
|
-
- Workspace surfaces:
|
|
26
|
-
- Settings surfaces:
|
|
27
|
-
|
|
28
|
-
## Data Model
|
|
29
|
-
|
|
30
|
-
| Entity | Purpose | Ownership | Notes |
|
|
31
|
-
| --- | --- | --- | --- |
|
|
32
|
-
| | | | |
|
|
33
|
-
|
|
34
|
-
## Route And Screen Plan
|
|
35
|
-
|
|
36
|
-
- Home/global routes:
|
|
37
|
-
- Account routes:
|
|
38
|
-
- Console routes:
|
|
39
|
-
- Workspace app routes:
|
|
40
|
-
- Workspace admin routes:
|
|
41
|
-
|
|
42
|
-
## Package Plan
|
|
43
|
-
|
|
44
|
-
- Baseline runtime packages:
|
|
45
|
-
- Optional runtime packages:
|
|
46
|
-
- Generator packages to use:
|
|
47
|
-
- Package-owned workflows to accept as baseline:
|
|
48
|
-
- Package-owned workflows to override or extend:
|
|
49
|
-
|
|
50
|
-
## Implementation Notes
|
|
51
|
-
|
|
52
|
-
- CRUDs to scaffold:
|
|
53
|
-
- Non-CRUD pages to scaffold:
|
|
54
|
-
- Custom code areas:
|
|
55
|
-
|
|
56
|
-
## CRUD Planning
|
|
57
|
-
|
|
58
|
-
| CRUD | Operations | List Fields | View Form Shape | Edit/New Form Shape | Notes |
|
|
59
|
-
| --- | --- | --- | --- | --- | --- |
|
|
60
|
-
| | | | | | |
|
|
61
|
-
|
|
62
|
-
## Delivery Plan
|
|
63
|
-
|
|
64
|
-
| Chunk | Goal | Type | Depends on | Done when |
|
|
65
|
-
| --- | --- | --- | --- | --- |
|
|
66
|
-
| | | | | |
|
|
67
|
-
|
|
68
|
-
Chunk notes:
|
|
69
|
-
|
|
70
|
-
- One CRUD is usually one chunk.
|
|
71
|
-
- Platform/auth/shell work may be its own chunk.
|
|
72
|
-
- Prefer vertical slices that produce visible or end-to-end progress the developer can inspect.
|
|
73
|
-
- Each chunk must be independently reviewable and testable.
|
|
74
|
-
|
|
75
|
-
## Verification
|
|
76
|
-
|
|
77
|
-
- Commands to run:
|
|
78
|
-
- Playwright coverage plan:
|
|
79
|
-
- Test auth strategy:
|
|
80
|
-
- UI review expectations:
|
|
81
|
-
- Known open questions:
|
package/templates/WORKBOARD.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Workboard
|
|
2
|
-
|
|
3
|
-
## Request
|
|
4
|
-
|
|
5
|
-
- Request summary:
|
|
6
|
-
- Current stage:
|
|
7
|
-
- Current status:
|
|
8
|
-
|
|
9
|
-
## Scope Snapshot
|
|
10
|
-
|
|
11
|
-
- Platform decisions:
|
|
12
|
-
- Current blueprint path:
|
|
13
|
-
- Current workboard owner:
|
|
14
|
-
|
|
15
|
-
## Chunk Tracker
|
|
16
|
-
|
|
17
|
-
| Chunk | Goal | Status | Deslop | JSKIT Review | UI Review | Verification | Notes |
|
|
18
|
-
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
19
|
-
| | | | | | | | |
|
|
20
|
-
|
|
21
|
-
Status guide:
|
|
22
|
-
|
|
23
|
-
- `planned`
|
|
24
|
-
- `active`
|
|
25
|
-
- `implemented`
|
|
26
|
-
- `reviewed`
|
|
27
|
-
- `verified`
|
|
28
|
-
- `done`
|
|
29
|
-
- `blocked`
|
|
30
|
-
|
|
31
|
-
## Current Focus
|
|
32
|
-
|
|
33
|
-
- Active chunk:
|
|
34
|
-
- Next action:
|
|
35
|
-
- Blockers:
|
|
36
|
-
|
|
37
|
-
## Verification Log
|
|
38
|
-
|
|
39
|
-
- Commands run:
|
|
40
|
-
- Playwright status:
|
|
41
|
-
- Remaining unverified:
|
|
42
|
-
|
|
43
|
-
## Notes
|
|
44
|
-
|
|
45
|
-
- Decisions made:
|
|
46
|
-
- Open questions:
|
package/workflow/app-state.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# App State Gate
|
|
2
|
-
|
|
3
|
-
Before planning, scaffolding, or implementing, classify the workspace into one of these states:
|
|
4
|
-
|
|
5
|
-
- `empty`
|
|
6
|
-
- `non_jskit_repo`
|
|
7
|
-
- `partial_jskit_app`
|
|
8
|
-
- `jskit_app`
|
|
9
|
-
|
|
10
|
-
Use these markers for a real JSKIT app:
|
|
11
|
-
|
|
12
|
-
- `package.json`
|
|
13
|
-
- `config/public.js`
|
|
14
|
-
- `src/main.js`
|
|
15
|
-
- `packages/main/package.descriptor.mjs`
|
|
16
|
-
- `.jskit/lock.json`
|
|
17
|
-
|
|
18
|
-
State handling:
|
|
19
|
-
|
|
20
|
-
- `empty`
|
|
21
|
-
- Start the initialize workflow.
|
|
22
|
-
- Ask only high-level questions first: app goal, tenancy shape, database engine, auth provider, optional assistant/realtime needs.
|
|
23
|
-
- Do not jump straight into detailed feature implementation.
|
|
24
|
-
- `non_jskit_repo`
|
|
25
|
-
- Ask whether the JSKIT app should live here or in a new subdirectory.
|
|
26
|
-
- Do not overwrite unrelated project files.
|
|
27
|
-
- `partial_jskit_app`
|
|
28
|
-
- Explain which scaffold markers are missing.
|
|
29
|
-
- Recover or finish the scaffold instead of re-initializing from scratch.
|
|
30
|
-
- `jskit_app`
|
|
31
|
-
- If this is a fresh minimal scaffold and Stage 1 platform decisions are not settled yet, continue with the initialize workflow first.
|
|
32
|
-
- Otherwise continue with scoping or feature delivery.
|
|
33
|
-
|
|
34
|
-
This state gate is intentionally strict. The agent must inspect first and only then choose initialize, recover, or extend.
|
package/workflow/bootstrap.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Initialize Workflow
|
|
2
|
-
|
|
3
|
-
Use this when:
|
|
4
|
-
|
|
5
|
-
- the app state gate resolves to `empty`
|
|
6
|
-
- the user explicitly wants a brand-new JSKIT app in a new directory
|
|
7
|
-
- or a fresh minimal JSKIT scaffold exists but Stage 1 platform decisions are not settled yet
|
|
8
|
-
|
|
9
|
-
Safe bootstrap paths:
|
|
10
|
-
|
|
11
|
-
1. Empty directory path
|
|
12
|
-
- Ask the Stage 1 platform questions first.
|
|
13
|
-
- Once the high-level shape is clear, run `create-app` with the chosen tenancy mode.
|
|
14
|
-
2. Fresh scaffold path
|
|
15
|
-
- If the app was just created with `npx @jskit-ai/create-app <app-name>` and `npm install`, treat that scaffold as provisional.
|
|
16
|
-
- Ask the Stage 1 platform questions before adding tenancy-sensitive packages.
|
|
17
|
-
- If the chosen tenancy is `personal` or `workspaces`, write it into `config/public.js` before installing workspace packages.
|
|
18
|
-
- Once a baseline package stack is chosen, assume its standard package-owned workflows unless the developer asks for overrides.
|
|
19
|
-
|
|
20
|
-
Important constraint:
|
|
21
|
-
|
|
22
|
-
- Do not install tenancy-sensitive packages while tenancy is still provisional.
|
|
23
|
-
- In practice, that means `workspaces-core` and `workspaces-web` must wait until the Stage 1 tenancy decision is complete.
|
|
24
|
-
- A missing `config.tenancyMode` line behaves like `none` at runtime. Treat it as provisional only if no tenancy-sensitive package install has happened yet.
|
|
25
|
-
|
|
26
|
-
Version 0 sketch:
|
|
27
|
-
|
|
28
|
-
1. Define the broad app shape before running generators.
|
|
29
|
-
2. Capture only the first-round decisions:
|
|
30
|
-
- app purpose
|
|
31
|
-
- tenancy mode: `none`, `personal`, or `workspaces`
|
|
32
|
-
- database engine: MySQL or Postgres
|
|
33
|
-
- auth provider, with Supabase as the default documented path
|
|
34
|
-
- whether the first baseline should include workspaces, realtime, or assistant
|
|
35
|
-
3. Treat Stage 1 as a package-stack decision, not a blank-slate workflow design exercise.
|
|
36
|
-
4. Once those high-level choices are clear, continue into deeper scoping questions later.
|
|
37
|
-
|
|
38
|
-
Ask setup values plainly:
|
|
39
|
-
|
|
40
|
-
- Only ask for setup values that correspond to the modules or packages already chosen for the baseline.
|
|
41
|
-
- When the next package install needs concrete local development values, ask for them directly using the exact env var names or option names.
|
|
42
|
-
- Do not hide behind vague requests for "credentials" or "values after that boundary".
|
|
43
|
-
- If MySQL or Postgres is selected, confirm that the target database already exists before the runtime install, or that the developer has enough local admin or create-database access to create it now.
|
|
44
|
-
- Do not proceed as if `DB_NAME` alone means the database is ready. The actual database must exist before the database runtime install and migration flow can be treated as valid.
|
|
45
|
-
- In this workflow, these are routine setup inputs:
|
|
46
|
-
- If the MySQL runtime is selected: `DB_NAME`, `DB_USER`, `DB_PASSWORD`
|
|
47
|
-
- If the MySQL host or port differs from the local default `127.0.0.1:3306`: `DB_HOST`, `DB_PORT`
|
|
48
|
-
- If Supabase auth is selected: `AUTH_SUPABASE_URL`, `AUTH_SUPABASE_PUBLISHABLE_KEY`
|
|
49
|
-
- If browser-facing auth callbacks are relevant: confirm whether `APP_PUBLIC_URL` should stay `http://localhost:5173`
|
|
50
|
-
- Ask in plain language and continue once the developer provides the values.
|
|
51
|
-
|
|
52
|
-
Baseline expectations after initialization:
|
|
53
|
-
|
|
54
|
-
- create the app scaffold
|
|
55
|
-
- install the baseline runtime packages in the documented order
|
|
56
|
-
- install dependencies
|
|
57
|
-
- run `npm run devlinks` immediately after `npm install` when the app is using local JSKIT checkout links
|
|
58
|
-
- run database migrations when the chosen package set requires them
|
|
59
|
-
- use the standard packaged workflows that come with those packages unless the blueprint records an override
|
|
60
|
-
- leave the app in a reproducible, verified baseline state
|
|
61
|
-
|
|
62
|
-
Do not improvise package order. Use the distributed guide chapters under `guide/agent/app-setup/` or `site/guide/app-setup/`.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Feature Delivery Workflow
|
|
2
|
-
|
|
3
|
-
Before implementation, break the planned work into chunks.
|
|
4
|
-
|
|
5
|
-
Chunk rules:
|
|
6
|
-
|
|
7
|
-
- One CRUD is usually one chunk.
|
|
8
|
-
- Platform setup, shell/navigation, and cross-cutting integrations may be separate chunks.
|
|
9
|
-
- A chunk must be independently reviewable and testable.
|
|
10
|
-
- Prefer vertical slices. A chunk should usually produce a user-visible or end-to-end outcome, not just a hidden layer-only milestone.
|
|
11
|
-
- If a chunk is too broad to review confidently, split it before coding.
|
|
12
|
-
- Avoid horizontal plans like "database first, then routes, then UI" unless the work is foundational platform setup that genuinely cannot be sliced vertically yet.
|
|
13
|
-
|
|
14
|
-
For each chunk, follow this order:
|
|
15
|
-
|
|
16
|
-
1. Scope the chunk inside the blueprint.
|
|
17
|
-
2. Mark the chunk as active in `.jskit/WORKBOARD.md`.
|
|
18
|
-
3. Decide whether it is:
|
|
19
|
-
- package install
|
|
20
|
-
- generator scaffolding
|
|
21
|
-
- custom local code
|
|
22
|
-
- or a combination
|
|
23
|
-
Record the exact `jskit` commands that will be used if generators or package installs apply.
|
|
24
|
-
4. Implement the smallest correct change.
|
|
25
|
-
5. Deslop the chunk.
|
|
26
|
-
6. Review the chunk against JSKIT reuse and best practices.
|
|
27
|
-
7. Review user-facing screens against Material Design and Vuetify best practices, and improve any screens that do not meet that bar.
|
|
28
|
-
8. Verify the chunk with the relevant commands. Any chunk that adds or changes user-facing UI must include a Playwright flow that exercises the changed behavior, and that run must be recorded with `jskit app verify-ui`.
|
|
29
|
-
9. Update `.jskit/WORKBOARD.md` with status, commands run, and anything still unverified.
|
|
30
|
-
10. Only then move to the next chunk.
|
|
31
|
-
|
|
32
|
-
For CRUD chunks:
|
|
33
|
-
|
|
34
|
-
1. Decide the table shape first.
|
|
35
|
-
2. Create the real table directly in the database before scaffolding. `crud-server-generator` reads the live table shape; it does not invent the table for you.
|
|
36
|
-
3. Unless the table is already owned by a JSKIT baseline package or is a narrow explicit exception recorded in `.jskit/table-ownership.json`, every persisted app-owned table must have a server CRUD package. Do not let a new table exist without that ownership decision.
|
|
37
|
-
4. If `crud-server-generator` is going to own the CRUD schema, do not hand-write a separate migration for that CRUD table. The server generator installs and manages the CRUD migration scaffold itself.
|
|
38
|
-
5. Scaffold the server side first with `crud-server-generator`, even if no CRUD UI will be created yet.
|
|
39
|
-
6. Only after the shared resource file exists, scaffold the client side against that resource.
|
|
40
|
-
7. Treat that shared resource file as the canonical CRUD definition. Put field and ownership changes there instead of hand-duplicating derived CRUD validators elsewhere.
|
|
41
|
-
8. Do not guess CRUD operations or screen shape. Ask the developer:
|
|
42
|
-
- which operations are allowed
|
|
43
|
-
- which fields belong in the list view if one exists
|
|
44
|
-
- what the view form should look like
|
|
45
|
-
- what the edit/new form should look like
|
|
46
|
-
|
|
47
|
-
During implementation:
|
|
48
|
-
|
|
49
|
-
- Prefer existing JSKIT helpers over local helper duplication.
|
|
50
|
-
- If a selected JSKIT package already ships the required baseline workflow, install and verify that workflow before inventing custom code around it.
|
|
51
|
-
- Ask only about overrides, restrictions, or app-specific additions to packaged baseline workflows.
|
|
52
|
-
- Use generated CRUD/UI scaffolds only after the route and ownership model are decided.
|
|
53
|
-
- Do not hand-build CRUD routes, CRUD endpoints, or CRUD page trees before `crud-server-generator` has created the server package and shared resource file.
|
|
54
|
-
- `feature-server-generator` is for non-CRUD workflows and orchestration. Do not use it as the first persistence lane for ordinary entity tables.
|
|
55
|
-
- For app-owned non-CRUD route pages, default to `jskit generate ui-generator page ...` instead of hand-writing both `src/pages/...` and `src/placement.js`.
|
|
56
|
-
- Before hand-writing a route page or placement entry, check `jskit show ui-generator --details` and `jskit list-placements`.
|
|
57
|
-
- If `ui-generator page` applies and you still choose not to use it, stop and explain the exact gap before coding.
|
|
58
|
-
- Keep runtime, UI, and data concerns separated.
|
|
59
|
-
- Keep direct knex exceptional and minimal. Outside generated CRUD packages and explicit weird-custom feature lanes, app-owned runtime code should stay on internal `json-rest-api` seams.
|
|
60
|
-
- Avoid “while I’m here” scope creep unless it is required for correctness.
|
|
61
|
-
- Do not turn a small placeholder or route stub into a copy-polish or blueprint-rewrite task unless the developer asked for that broader work.
|
|
62
|
-
|
|
63
|
-
After the last chunk:
|
|
64
|
-
|
|
65
|
-
- If there was only one chunk, the chunk review is the final review.
|
|
66
|
-
- If there was more than one chunk, run one more whole-changeset pass:
|
|
67
|
-
- deslop the whole changeset
|
|
68
|
-
- review the whole changeset against JSKIT best practices
|
|
69
|
-
- review the whole changeset against Material Design and Vuetify best practices
|
|
70
|
-
- run the widest relevant verification, including Playwright
|
|
71
|
-
- update `.jskit/WORKBOARD.md` with the final result and any remaining gaps
|
|
72
|
-
|
|
73
|
-
Playwright note:
|
|
74
|
-
|
|
75
|
-
- When login is required, use a test-only auth bypass or session bootstrap path instead of dependence on a live external auth provider.
|
|
76
|
-
- Record the run through `jskit app verify-ui --command "<playwright command>" --feature "<label>" --auth-mode <mode>` so `jskit doctor` can verify the receipt against the current changed UI files.
|
|
77
|
-
- In local pre-merge review, use `jskit doctor --against <base-ref>` after the recorded Playwright run so JSKIT compares against the branch delta, not only the current dirty worktree.
|
|
78
|
-
- Advanced CI setups may also use `--against <base-ref>`, but JSKIT does not scaffold hosted browser/auth/database verification by default.
|
|
79
|
-
- In the standard JSKIT auth stack, the default development path is `POST /api/dev-auth/login-as`, guarded by `AUTH_DEV_BYPASS_ENABLED=true` and `AUTH_DEV_BYPASS_SECRET=...`.
|
|
80
|
-
- That route is development-only and must not be enabled in production.
|
|
81
|
-
- Because it is still an unsafe POST, fetch `csrfToken` from `/api/session`, send it as the `csrf-token` header, and make the request in the same browser context that will run the Playwright assertions so the session cookies land in the page session.
|
|
82
|
-
- If such a path does not exist yet, treat that as a testability gap and decide whether the chunk must add it before the feature is considered complete.
|
package/workflow/review.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Review Workflow
|
|
2
|
-
|
|
3
|
-
Preferred review mode:
|
|
4
|
-
|
|
5
|
-
- Prefer a fresh review agent for chunk and whole-changeset review when the runtime supports delegation.
|
|
6
|
-
- Have that fresh review agent use the packaged `jskit-review` skill when it is available.
|
|
7
|
-
- If delegation or skills are unavailable, follow this file manually in the current agent.
|
|
8
|
-
|
|
9
|
-
Before calling a chunk or a whole changeset done, review it in four passes:
|
|
10
|
-
|
|
11
|
-
1. Deslop review
|
|
12
|
-
- repeated functions or duplicated local helpers
|
|
13
|
-
- helpers reimplemented locally when a kernel/runtime seam already exists
|
|
14
|
-
- placeholder, fake-complete, or vague UI/copy/code structure
|
|
15
|
-
- dead code, unused props/imports, TODO-shaped gaps, or accidental abstractions
|
|
16
|
-
- missing loading, empty, error, permission, or ownership states
|
|
17
|
-
- broken flows, missing route wiring, or missing migrations
|
|
18
|
-
- surface or entity ownership mistakes: `public`, `user`, `workspace`, `workspace_user`
|
|
19
|
-
2. JSKIT review
|
|
20
|
-
- existing helper/runtime seam available?
|
|
21
|
-
- duplicate local code that should reuse kernel/runtime support?
|
|
22
|
-
- should this have been a package install, generator step, or scaffold extension instead of hand code?
|
|
23
|
-
- if a generator existed, was the exact `jskit` command used or was the gap documented clearly before hand-coding?
|
|
24
|
-
- for CRUD work, was `crud-server-generator scaffold` used before any CRUD UI or CRUD route hand-coding?
|
|
25
|
-
- for CRUD tables owned by JSKIT, did the change avoid a separate hand-written CRUD migration?
|
|
26
|
-
- does every live app-owned table now have either declared generated/package CRUD ownership or an explicit narrow `.jskit/table-ownership.json` exception?
|
|
27
|
-
- is any direct app-owned knex usage limited to generated CRUD packages or explicit weird-custom feature lanes?
|
|
28
|
-
- are surface, route, ownership, and migration choices aligned with JSKIT conventions?
|
|
29
|
-
- package metadata and actual behavior still aligned?
|
|
30
|
-
3. UI standards review
|
|
31
|
-
- every user-facing screen follows Material Design and Vuetify best practices
|
|
32
|
-
- list screens use clear hierarchy, actions, density, empty states, and table/list patterns
|
|
33
|
-
- view and edit/new screens use clear form grouping, labels, helper text, validation, spacing, and action placement
|
|
34
|
-
- responsive layout, loading, disabled, success, and error states are coherent
|
|
35
|
-
- improve weak screens before sign-off; do not just note the problem and move on
|
|
36
|
-
4. Verification review
|
|
37
|
-
- run the smallest relevant verification commands for a chunk
|
|
38
|
-
- run the widest relevant verification commands for a whole changeset
|
|
39
|
-
- any added or changed user-facing UI must be exercised with Playwright
|
|
40
|
-
- that Playwright run should normally be recorded through `jskit app verify-ui`
|
|
41
|
-
- for local pre-merge review, prefer following that receipt with `jskit doctor --against <base-ref>`
|
|
42
|
-
- if login is required, use the chosen local test-auth path instead of live external auth
|
|
43
|
-
- in the standard JSKIT auth stack, prefer the development-only `POST /api/dev-auth/login-as` path
|
|
44
|
-
- if there is no usable local auth bootstrap path, explicitly record that as a blocking testability gap
|
|
45
|
-
- note anything left unverified
|
|
46
|
-
|
|
47
|
-
Minimum expectation:
|
|
48
|
-
|
|
49
|
-
- list the files changed
|
|
50
|
-
- list the commands run
|
|
51
|
-
- list anything still unverified
|
|
52
|
-
- update `.jskit/WORKBOARD.md` with the review outcome
|
|
53
|
-
|
|
54
|
-
Whole-changeset rule:
|
|
55
|
-
|
|
56
|
-
- If the work was split into more than one chunk, repeat all four passes over the whole changeset after the final chunk is complete.
|
package/workflow/scoping.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Scoping Workflow
|
|
2
|
-
|
|
3
|
-
Before implementing any feature or batch of features, create or update an app-local working blueprint using `templates/APP_BLUEPRINT.md` as the template.
|
|
4
|
-
|
|
5
|
-
Recommended location:
|
|
6
|
-
|
|
7
|
-
- `.jskit/APP_BLUEPRINT.md`
|
|
8
|
-
- `.jskit/WORKBOARD.md` for per-request progress tracking
|
|
9
|
-
|
|
10
|
-
Do not edit the vendor template in `node_modules/` directly.
|
|
11
|
-
|
|
12
|
-
The blueprint must capture at least:
|
|
13
|
-
|
|
14
|
-
- product purpose
|
|
15
|
-
- actors and permissions
|
|
16
|
-
- tenancy mode
|
|
17
|
-
- database engine
|
|
18
|
-
- auth choice
|
|
19
|
-
- core surfaces and route families
|
|
20
|
-
- core entities
|
|
21
|
-
- ownership model per entity: `public`, `user`, `workspace`, or `workspace_user`
|
|
22
|
-
- package install plan
|
|
23
|
-
- generator plan
|
|
24
|
-
- custom-code areas
|
|
25
|
-
- baseline package-owned workflows and any intended overrides
|
|
26
|
-
- delivery plan broken into chunks
|
|
27
|
-
- CRUD-specific operation and screen decisions where relevant
|
|
28
|
-
|
|
29
|
-
Scoping rules:
|
|
30
|
-
|
|
31
|
-
- Use `guide/agent/index.md` for fast navigation and `site/guide/index.md` for exact details.
|
|
32
|
-
- Inspect packages and generators before choosing them.
|
|
33
|
-
- Make the generator plan concrete. Name the exact `jskit` commands expected for the chunk, not just a package or a general idea.
|
|
34
|
-
- For non-CRUD route page work, check `jskit show ui-generator --details` and `jskit list-placements` before deciding that custom page or placement code is necessary.
|
|
35
|
-
- For CRUD work, make the server-first plan explicit. Name the exact `jskit generate crud-server-generator scaffold ...` command before any CRUD UI plan.
|
|
36
|
-
- Before accepting a new persisted app-owned table, decide whether it is CRUD-owned or a narrow explicit exception. If it is not already owned by a JSKIT baseline package, the default answer should be server CRUD ownership.
|
|
37
|
-
- If a CRUD will be owned by `crud-server-generator`, plan around a real table that already exists in the database. Do not plan a separate hand-written CRUD migration for that table.
|
|
38
|
-
- Decide ownership early; do not treat it as a UI-only detail.
|
|
39
|
-
- If Stage 1 platform choices are still provisional, finish them before installing tenancy-sensitive runtime packages.
|
|
40
|
-
- Record which selected JSKIT package-owned workflows are accepted as baseline and which, if any, need custom behavior.
|
|
41
|
-
- Do not ask the developer to redesign package-owned baseline workflows from scratch. Ask only whether the default behavior is accepted or whether the app needs overrides, restrictions, or extensions.
|
|
42
|
-
- Create or refresh `.jskit/WORKBOARD.md` for substantial or multi-chunk work so the request has an explicit execution tracker.
|
|
43
|
-
- Do not rewrite `.jskit/APP_BLUEPRINT.md` for a one-off placeholder page inside an already planned route family unless the durable route plan, surface plan, or ownership model changed.
|
|
44
|
-
- Break delivery into chunks that can be independently reviewed and tested.
|
|
45
|
-
- One CRUD is usually one chunk. Platform setup, shell work, and cross-cutting integrations may also be separate chunks.
|
|
46
|
-
- For each CRUD chunk, decide these before implementation:
|
|
47
|
-
- which operations exist: `list`, `view`, `new`, `edit`, `delete`, or a narrower set
|
|
48
|
-
- which fields appear in the list view if a list exists
|
|
49
|
-
- the intended structure and visual hierarchy of the view form
|
|
50
|
-
- the intended structure and visual hierarchy of the edit/new form
|
|
51
|
-
- If the package/runtime choice is unclear, stop and resolve it before writing implementation code.
|
|
52
|
-
|
|
53
|
-
No feature implementation should start until the blueprint covers database, screens, functional boundaries, and chunk plan well enough that the implementation path is obvious.
|
package/workflow/workboard.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Workboard Workflow
|
|
2
|
-
|
|
3
|
-
Use a workboard for any substantial request, especially:
|
|
4
|
-
|
|
5
|
-
- new app builds
|
|
6
|
-
- multi-chunk feature work
|
|
7
|
-
- requests that need scoping before coding
|
|
8
|
-
- requests where verification spans several steps
|
|
9
|
-
|
|
10
|
-
Recommended location:
|
|
11
|
-
|
|
12
|
-
- `.jskit/WORKBOARD.md`
|
|
13
|
-
|
|
14
|
-
Use `templates/WORKBOARD.md` as the starting template.
|
|
15
|
-
|
|
16
|
-
Purpose:
|
|
17
|
-
|
|
18
|
-
- track the current request
|
|
19
|
-
- record the current stage and current chunk
|
|
20
|
-
- track chunk status across implementation, deslop, JSKIT review, UI review, and verification
|
|
21
|
-
- record blockers, open questions, and remaining gaps
|
|
22
|
-
|
|
23
|
-
Workboard rules:
|
|
24
|
-
|
|
25
|
-
- The workboard is the execution tracker for the current request.
|
|
26
|
-
- The blueprint remains the durable product and architecture record.
|
|
27
|
-
- Keep the workboard concise and current.
|
|
28
|
-
- Update it when stage, chunk, blockers, or verification state changes.
|
|
29
|
-
- When the request finishes, either reset it for the next request or leave a short final state that makes completion obvious.
|