jetic-cli 0.2.3 → 0.2.4

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/README.md CHANGED
@@ -95,10 +95,39 @@ Jetic comes with a built-in **Model Context Protocol (MCP)** server so your edit
95
95
  ```
96
96
  *(On Windows, use `"command": ["cmd", "/c", "jetic", "mcp"]`)*
97
97
 
98
- ### Recommended Agent Prompts:
99
- > 1. *"Run `jetic_get_session_phase` and guide me through building the API model for this project."*
100
- > 2. *"Scan the backend, check endpoint completeness, fill missing descriptions/tags, and run `jetic_verify_model`."*
101
- > 3. *"What workflow or integration test would you like to simulate against local environment?"*
98
+ ### 💬 Example Prompts for AI IDE
99
+
100
+ Use these prompt templates with your editor's AI assistant (opencode, Antigravity, Cursor, Claude Code, VS Code) to manage initialization, model creation, and workflow simulation:
101
+
102
+ #### 🚀 Phase 1: Initialize Project (`init`)
103
+ > **Session Health & Quickstart:**
104
+ > *"Call `jetic_get_session_phase`. If the model is not initialized, run `jetic_init` to scaffold `.jetic/` and guide me through setting up the API."*
105
+
106
+ > **Fresh Repository Scaffold:**
107
+ > *"Initialize Jetic in this workspace (`jetic_init`), configure project metadata for our TypeScript backend, and verify that `.jetic/model.json` exists."*
108
+
109
+ #### 📐 Phase 2 & 3: Create & Verify Model (`create model`)
110
+ > **Automated AST Scan & Verification:**
111
+ > *"Scan our backend codebase (`jetic_scan`) to populate endpoints. Then run `jetic_verify_model` to highlight any missing descriptions, schemas, or tags."*
112
+
113
+ > **Model Completeness & Audit:**
114
+ > *"Run `jetic_verify_model`. Update every endpoint with missing descriptions or tags using `jetic_update_endpoint`, and re-verify until the model status is 100% complete and valid."*
115
+
116
+ > **Selective AI Re-Modelling via Change Log (`changes.json`):**
117
+ > *"Check recent file changes (`jetic_get_changes`). Re-analyse ONLY those modified files to update `.jetic/model.json` instead of reading the entire codebase, then clear the change log (`jetic_clear_changes`)."*
118
+
119
+ #### ⚡ Phase 4: Create & Run Workflows (`create workflow`)
120
+ > **Scaffold & Create Workflow:**
121
+ > *"Scaffold a user onboarding workflow (`jetic_scaffold_workflow`) with `POST /api/auth/register` and `GET /api/users/me`. Automatically inject the auth token, validate the workflow, and save it to `.jetic/workflows/user-onboarding.json`."*
122
+
123
+ > **Advanced Workflow with Conditions & Retry Logic:**
124
+ > *"Build an order fulfillment workflow. Step 1: Login. Step 2: Create Order. Step 3: Payment (add step condition `if {{workflow:userRole}} equals "admin"` and `retry` up to 3 times on failure). Validate (`jetic_validate_workflow`) and save it."*
125
+
126
+ > **Human Input Workflow (2FA / OTP):**
127
+ > *"Build a sensitive transfer workflow that requires human 2FA. Scaffold the steps, use `{{human:otp_code}}` for the verification payload, set `retry: { "times": 2, "delayMs": 1000 }`, and save to `.jetic/workflows/transfer.json`."*
128
+
129
+ #### 🎯 All-in-One Master Prompt
130
+ > *"Run `jetic_get_session_phase` and follow the Jetic 4-Phase protocol: 1. Initialize `.jetic/` if missing. 2. Scan the source code and verify the model until all endpoint descriptions are complete. 3. Ask me what integration scenario I want to test, then scaffold, validate, and save the workflow."*
102
131
 
103
132
  ---
104
133
 
@@ -111,9 +140,9 @@ Jetic comes with a built-in **Model Context Protocol (MCP)** server so your edit
111
140
  | `jetic inspect` | Inspect summary metrics or specific endpoint schemas in terminal |
112
141
  | `jetic simulate endpoint` | Test live HTTP endpoints against local/staging server |
113
142
  | `jetic simulate workflow` | Execute multi-step stateful workflows from `.jetic/workflows/` |
114
- | `jetic dev` | Launch local **Jetic Studio** dashboard UI on port `8787` |
143
+ | `jetic dev` | Launch local **Jetic Studio** dashboard UI on port `8787` with real-time SSE file watcher & `changes.json` live stream |
115
144
  | `jetic memory` | View, set, or clear runtime variable memory (`.jetic/memory.json`) |
116
- | `jetic mcp` | Start stdio MCP server for AI IDE integration |
145
+ | `jetic mcp` | Start stdio MCP server for AI IDE integration (includes `jetic_get_changes` & `jetic_clear_changes`) |
117
146
 
118
147
  ---
119
148
 
@@ -123,12 +152,15 @@ Run `jetic dev` to open the local web developer studio:
123
152
 
124
153
  - **Behavioral Model (`/model`)**: Explore endpoints, request/response schemas, and AST source code lines.
125
154
  - **AI Simulations (`/simulations`)**: Visual step-by-step workflow runner with real-time SSE execution logs.
155
+ - **Files Changes (`/changes`)**: Real-time SSE stream observer for `.jetic/changes.json` — track modified source files live without browser reloads.
126
156
  - **Memory Inspector (`/memory`)**: Edit captured tokens, fake test data, and session variables.
127
157
  - **Visual Traces (`/traces`)**: Interactive node-graph execution visualizer powered by ReactFlow.
128
158
 
129
159
  ---
130
160
 
131
- ## 📄 Behavioral Model Preview (`.jetic/model.json`)
161
+ ## 📄 Artifact Schemas
162
+
163
+ ### `.jetic/model.json` (Behavioral Model)
132
164
 
133
165
  ```json
134
166
  {
@@ -156,6 +188,24 @@ Run `jetic dev` to open the local web developer studio:
156
188
  }
157
189
  ```
158
190
 
191
+ ### `.jetic/changes.json` (File Changes Tracking Log)
192
+
193
+ ```json
194
+ {
195
+ "version": 1,
196
+ "watchedSince": "2026-09-18T10:00:00.000Z",
197
+ "projectRoot": "C:/projects/my-api",
198
+ "changes": [
199
+ {
200
+ "filePath": "src/routes/user.routes.ts",
201
+ "absolutePath": "C:/projects/my-api/src/routes/user.routes.ts",
202
+ "changedAt": "2026-09-18T14:20:00.000Z",
203
+ "eventType": "change"
204
+ }
205
+ ]
206
+ }
207
+ ```
208
+
159
209
  ---
160
210
 
161
211
  <p align="center">