praxis-agent 0.13.0 → 0.14.0

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
@@ -94,8 +94,9 @@ troubleshooting. Run `praxis --help` for the authoritative command surface.
94
94
  `/background` terminal handoff, unified `/status`/`/config`/`/usage` settings
95
95
  tabs, `/sandbox` mode/dependency/override/config controls, local cached
96
96
  `/release-notes`, Claude-compatible `/statusline` command execution and setup
97
- agent, `/mcp`, `/memory` shared instruction and auto-memory access, and live
98
- extension-reload controls,
97
+ agent, source-aligned `/init` project-instruction onboarding with its enhanced
98
+ skills/hooks flow, `/mcp`, `/memory` shared instruction and auto-memory
99
+ access, and live extension-reload controls,
99
100
  cursor/history composer, per-session model/effort/permission controls,
100
101
  context/status/skill/task dashboards, prompt stash and continuation shortcuts,
101
102
  filterable `@` file and agent references, composer undo, `Ctrl+G` external
@@ -184,8 +185,9 @@ for exact shared data, version boundaries, exclusions, and verification gates.
184
185
 
185
186
  Praxis targets one local OS user working across multiple repositories and
186
187
  sessions. It is CLI-only and provider-capability-aware. Organization, tenant,
187
- RBAC, billing, enterprise gateway, IDE, Chrome, Remote Control, Claude Desktop
188
- import, and hosted review-product surfaces are permanent non-goals.
188
+ RBAC, subscription authentication and billing, enterprise gateway,
189
+ IDE/Desktop/mobile clients, Remote Control, Claude Desktop import, and hosted
190
+ review-product surfaces are permanent non-goals.
189
191
 
190
192
  ## Security and support
191
193
 
@@ -2268,10 +2268,14 @@ export function InteractiveApp({ factory, initialSessions, initialPrompt, initia
2268
2268
  setBusy(true);
2269
2269
  setTurnDuration(undefined);
2270
2270
  setCommandPaletteOpen(false);
2271
- setStatus('assembling-context');
2271
+ const submittedCommandName = /^\/([^\s]+)/u.exec(prompt)?.[1]?.toLowerCase();
2272
+ const commandProgressMessage = submittedCommandName
2273
+ ? allSlashCommands.find((command) => command.name.toLowerCase() === submittedCommandName)?.progressMessage
2274
+ : undefined;
2275
+ setStatus(commandProgressMessage ?? 'assembling-context');
2272
2276
  setActiveText('');
2273
2277
  setActiveThinking('');
2274
- if (runtimeSettingsRef.current.tips) {
2278
+ if (runtimeSettingsRef.current.tips && !commandProgressMessage) {
2275
2279
  setStatus(spinnerTip(runtimeSettingsRef.current) ?? 'assembling-context');
2276
2280
  }
2277
2281
  if (shellCommand === undefined)
@@ -3,6 +3,7 @@ export interface TuiSlashCommand {
3
3
  name: string;
4
4
  description: string;
5
5
  source: TuiSlashCommandSource;
6
+ progressMessage?: string;
6
7
  }
7
8
  export declare const BUILTIN_TUI_SLASH_COMMANDS: readonly TuiSlashCommand[];
8
9
  export declare function mergeTuiSlashCommands(commands: readonly TuiSlashCommand[]): readonly TuiSlashCommand[];
package/dist/cli.js CHANGED
@@ -1359,7 +1359,10 @@ const createDefaultService = async ({ eventSink, requireProvider, hooksOnly = fa
1359
1359
  slashCommands: () => extensions.slashCommandDefinitions().map((definition) => ({
1360
1360
  name: definition.name,
1361
1361
  description: definition.description,
1362
- source: definition.kind,
1362
+ source: definition.builtin === true ? 'builtin' : definition.kind,
1363
+ ...(definition.progressMessage === undefined
1364
+ ? {}
1365
+ : { progressMessage: definition.progressMessage }),
1363
1366
  })),
1364
1367
  hookConfiguration: async () => projectTuiHooks(settings),
1365
1368
  mcpInspect: () => service.mcpInspect(),
@@ -9,11 +9,15 @@ export interface ClaudeExtensionDefinition extends ClaudeTextResource {
9
9
  body: string;
10
10
  modelInvocable: boolean;
11
11
  permissionSafe: boolean;
12
+ progressMessage?: string;
13
+ builtin?: boolean;
12
14
  }
13
15
  export interface ClaudeSlashCommandDefinition {
14
16
  name: string;
15
17
  description: string;
16
18
  kind: 'command' | 'skill' | 'mcp';
19
+ progressMessage?: string;
20
+ builtin?: boolean;
17
21
  }
18
22
  export interface ClaudeAgentDefinition {
19
23
  name: string;
@@ -1,5 +1,6 @@
1
1
  import { basename, dirname, extname } from 'node:path';
2
2
  import { parse as parseYaml } from 'yaml';
3
+ import { claudeInitDescription, claudeInitPrompt, } from './claude-init-command.js';
3
4
  const BUILTIN_LOOP = {
4
5
  path: '/__praxis_builtin__/commands/loop.md',
5
6
  scope: 'user',
@@ -9,6 +10,7 @@ const BUILTIN_LOOP = {
9
10
  description: 'Run a prompt or slash command on a recurring interval; defaults to 10 minutes.',
10
11
  modelInvocable: true,
11
12
  permissionSafe: true,
13
+ builtin: true,
12
14
  body: `# /loop — schedule a recurring prompt
13
15
 
14
16
  Parse the input into an optional interval followed by a prompt, then schedule it with CronCreate.
@@ -34,6 +36,21 @@ Call CronCreate with the derived cron, the parsed prompt verbatim, and recurring
34
36
  Input:
35
37
  $ARGUMENTS`,
36
38
  };
39
+ function builtinInitCommand() {
40
+ return {
41
+ path: '/__praxis_builtin__/commands/init.md',
42
+ scope: 'user',
43
+ content: '',
44
+ kind: 'command',
45
+ name: 'init',
46
+ description: claudeInitDescription(),
47
+ modelInvocable: false,
48
+ permissionSafe: true,
49
+ progressMessage: 'analyzing your codebase',
50
+ builtin: true,
51
+ body: claudeInitPrompt(),
52
+ };
53
+ }
37
54
  const BUILTIN_STATUSLINE_COMMAND = {
38
55
  path: '/__praxis_builtin__/commands/statusline.md',
39
56
  scope: 'user',
@@ -41,8 +58,9 @@ const BUILTIN_STATUSLINE_COMMAND = {
41
58
  kind: 'command',
42
59
  name: 'statusline',
43
60
  description: "Set up Claude Code's status line UI",
44
- modelInvocable: true,
61
+ modelInvocable: false,
45
62
  permissionSafe: true,
63
+ builtin: true,
46
64
  body: `Create an Agent with subagent_type "statusline-setup" and the prompt "$ARGUMENTS"`,
47
65
  };
48
66
  export const BUILTIN_STATUSLINE_AGENT_PATH = '/__praxis_builtin__/agents/statusline-setup.md';
@@ -220,6 +238,7 @@ export class ClaudeExtensionCatalog {
220
238
  ? new Map()
221
239
  : new Map([
222
240
  ['loop', BUILTIN_LOOP],
241
+ ['init', builtinInitCommand()],
223
242
  ['statusline', BUILTIN_STATUSLINE_COMMAND],
224
243
  ]);
225
244
  if (!options.disableSlashCommands) {
@@ -322,6 +341,10 @@ export class ClaudeExtensionCatalog {
322
341
  name: definition.name,
323
342
  description: definition.description,
324
343
  kind: definition.kind === 'skill' ? 'skill' : 'command',
344
+ ...(definition.progressMessage === undefined
345
+ ? {}
346
+ : { progressMessage: definition.progressMessage }),
347
+ ...(definition.builtin === true ? { builtin: true } : {}),
325
348
  })),
326
349
  ...[...this.mcpPrompts.values()].map((prompt) => ({
327
350
  name: prompt.userFacingName,
@@ -0,0 +1,4 @@
1
+ export declare function enhancedClaudeInitEnabled(environment?: NodeJS.ProcessEnv): boolean;
2
+ export declare function claudeInitDescription(environment?: NodeJS.ProcessEnv): string;
3
+ export declare function claudeInitPrompt(environment?: NodeJS.ProcessEnv): string;
4
+ //# sourceMappingURL=claude-init-command.d.ts.map
@@ -0,0 +1,72 @@
1
+ const LEGACY_DESCRIPTION = 'Initialize a new CLAUDE.md file with codebase documentation';
2
+ const ENHANCED_DESCRIPTION = 'Initialize new CLAUDE.md file(s) and optional skills/hooks with codebase documentation';
3
+ const LEGACY_PROMPT = `Analyze this repository and create a CLAUDE.md that will guide future coding-agent sessions in this project.
4
+
5
+ Document only information that requires repository-wide investigation:
6
+ - the commands developers actually use to build, lint, test, and run one focused test;
7
+ - the high-level architecture and relationships that are not obvious from opening a single file.
8
+
9
+ Read the README, manifests, build configuration, and any existing instructions for Cursor, Copilot, Windsurf, Cline, or other coding agents. Preserve useful project-specific guidance from them.
10
+
11
+ If CLAUDE.md already exists, inspect it and propose targeted improvements instead of replacing it silently. Do not invent workflows, repeat facts, enumerate an easily discoverable file tree, or add generic advice about testing, security, clean code, or error handling.
12
+
13
+ When creating the file, begin with exactly:
14
+
15
+ # CLAUDE.md
16
+
17
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.`;
18
+ const ENHANCED_PROMPT = `Set up concise Claude Code instructions for this repository. The result may include a project CLAUDE.md, a private CLAUDE.local.md, project skills, and hooks, but only the artifacts the user chooses. Instructions load on every session, so retain only information whose absence would cause mistakes.
19
+
20
+ Phase 1 — choose the scope
21
+ Use AskUserQuestion to ask both of these before exploring:
22
+ 1. Which instruction files to configure: the team-shared project CLAUDE.md, the private CLAUDE.local.md, or both. Explain that the project file is committed and contains shared architecture, conventions, and workflows, while the local file is gitignored and contains personal role, sandbox, test-data, and communication preferences.
23
+ 2. Whether to add skills and hooks: both, skills only, hooks only, or neither. Explain that skills are invoked on demand and hooks are deterministic commands tied to tool events.
24
+ Do not label any scope choice as recommended.
25
+
26
+ Phase 2 — survey the repository
27
+ Launch an Agent to inspect relevant manifests, README and build files, CI, existing CLAUDE.md and .claude/rules, AGENTS.md, other coding-assistant instructions, .mcp.json, existing skills, formatter configuration, and git worktrees. Determine languages, frameworks, package manager, project layout, nonstandard build/test/lint commands, single-test syntax, style deviations, required environment setup, hidden gotchas, and whether personal instructions must work across sibling worktrees. Record only questions the files cannot answer.
28
+
29
+ Phase 3 — resolve unknowns and approve a proposal
30
+ Ask focused follow-up questions for facts that were not discoverable. Project questions concern team conventions and repository quirks; personal questions concern the user's role, familiarity, private test setup, and response preferences. If sibling or external worktrees exist, determine whether a shared home-directory personal-instructions file is required.
31
+
32
+ Build a compact proposal from the findings. Classify deterministic per-edit enforcement as a hook, reusable workflows as skills, and behavioral preferences as instruction-file notes. Treat the user's skills/hooks choice as a hard constraint and downgrade suggestions to an allowed artifact type when necessary. Present the proposal only through AskUserQuestion option previews: one concise markdown line per item, no separate preceding explanation, with short accept/drop labels.
33
+
34
+ Phase 4 — project instructions
35
+ If selected, create or improve the repository-root CLAUDE.md. Include only non-obvious commands, testing quirks, style differences, repository etiquette, required setup, architectural decisions, and important existing assistant rules. Prefer @path imports for long or frequently changing references. Do not include generic practices, tutorials, obvious manifest commands, exhaustive file listings, or invented sections. Begin a new file with:
36
+
37
+ # CLAUDE.md
38
+
39
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
40
+
41
+ If the file exists, show specific proposed diffs and explain them before editing. For separate concerns, offer scoped .claude/rules files; for monorepos, offer subdirectory CLAUDE.md files.
42
+
43
+ Phase 5 — personal instructions
44
+ If selected, create or improve a minimal repository-root CLAUDE.local.md and ensure CLAUDE.local.md is ignored by git. Store role, familiarity, private local setup, and personal communication/workflow preferences there. Never overwrite an existing file silently. For sibling or external worktrees, place the real private content in ~/.claude/<project-name>-instructions.md and make each CLAUDE.local.md a one-line @ import; never add that private import to the shared CLAUDE.md.
45
+
46
+ Phase 6 — skills
47
+ If selected, turn every approved skill proposal into .claude/skills/<name>/SKILL.md with valid name and description frontmatter and repository-specific instructions. Review existing skills first and never overwrite them. Add disable-model-invocation: true to side-effecting workflows and use $ARGUMENTS when input is needed. Suggest extra skills only for repeatable workflows or specialist reference knowledge genuinely present in this repository.
48
+
49
+ Phase 7 — environment and hooks
50
+ Check for GitHub remotes and gh, an appropriate linter, tests, and a formatter. Offer only missing, relevant improvements. If hooks were selected, consume approved hook proposals and optionally offer format-on-edit when a formatter exists. Choose project settings.json for shared hooks and settings.local.json for personal hooks; ask once if ambiguous. Map after-edit behavior to PostToolUse Write|Edit, end-of-turn behavior to Stop, and pre-shell behavior to PreToolUse Bash. A literal pre-commit check belongs in the repository's git hook system, not a Bash matcher. Use the update-config skill's hooks-only flow when it is available; otherwise apply the same deduplicate, construct, pipe-test, JSON-validate, live-proof, and cleanup sequence directly. Act on each accepted improvement before continuing.
51
+
52
+ Phase 8 — handoff
53
+ List every file created or changed and summarize its important contents. Tell the user to review and tune the result and that /init may be rerun. Then provide one prioritized list of repository-specific next improvements. Always mention the official skill-creator plugin for creating or evaluating skills and /plugin for browsing official plugins; suggest frontend-design or Playwright plugins only when the detected project makes them relevant.`;
54
+ function envEnabled(value) {
55
+ if (value === undefined)
56
+ return false;
57
+ return ['1', 'true', 'yes', 'on'].includes(value.trim().toLowerCase());
58
+ }
59
+ export function enhancedClaudeInitEnabled(environment = process.env) {
60
+ return envEnabled(environment.CLAUDE_CODE_NEW_INIT);
61
+ }
62
+ export function claudeInitDescription(environment = process.env) {
63
+ return enhancedClaudeInitEnabled(environment)
64
+ ? ENHANCED_DESCRIPTION
65
+ : LEGACY_DESCRIPTION;
66
+ }
67
+ export function claudeInitPrompt(environment = process.env) {
68
+ return enhancedClaudeInitEnabled(environment)
69
+ ? ENHANCED_PROMPT
70
+ : LEGACY_PROMPT;
71
+ }
72
+ //# sourceMappingURL=claude-init-command.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "praxis-agent",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Local-first, single-user general agent for the command line.",
5
5
  "license": "MIT",
6
6
  "author": "wuqisen",