rrce-workflow 0.3.12 → 0.3.14

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.
Files changed (42) hide show
  1. package/README.md +12 -0
  2. package/agent-core/prompts/_base.md +8 -1
  3. package/agent-core/prompts/doctor.md +2 -2
  4. package/agent-core/prompts/documentation.md +1 -1
  5. package/agent-core/prompts/executor.md +1 -1
  6. package/agent-core/prompts/init.md +1 -1
  7. package/agent-core/prompts/orchestrator.md +13 -3
  8. package/agent-core/prompts/planning_discussion.md +1 -1
  9. package/agent-core/prompts/research_discussion.md +2 -2
  10. package/agent-core/prompts/sync.md +1 -1
  11. package/dist/index.js +469 -519
  12. package/docs/AI_AGENT_GUIDE.md +65 -0
  13. package/package.json +1 -1
  14. package/dist/commands/selector.d.ts +0 -1
  15. package/dist/commands/selector.js +0 -29
  16. package/dist/commands/wizard/index.d.ts +0 -1
  17. package/dist/commands/wizard/index.js +0 -86
  18. package/dist/commands/wizard/link-flow.d.ts +0 -5
  19. package/dist/commands/wizard/link-flow.js +0 -97
  20. package/dist/commands/wizard/setup-flow.d.ts +0 -4
  21. package/dist/commands/wizard/setup-flow.js +0 -262
  22. package/dist/commands/wizard/sync-flow.d.ts +0 -4
  23. package/dist/commands/wizard/sync-flow.js +0 -67
  24. package/dist/commands/wizard/update-flow.d.ts +0 -4
  25. package/dist/commands/wizard/update-flow.js +0 -85
  26. package/dist/commands/wizard/utils.d.ts +0 -9
  27. package/dist/commands/wizard/utils.js +0 -33
  28. package/dist/commands/wizard/vscode.d.ts +0 -15
  29. package/dist/commands/wizard/vscode.js +0 -148
  30. package/dist/index.d.ts +0 -1
  31. package/dist/lib/autocomplete-prompt.d.ts +0 -14
  32. package/dist/lib/autocomplete-prompt.js +0 -167
  33. package/dist/lib/detection.d.ts +0 -44
  34. package/dist/lib/detection.js +0 -185
  35. package/dist/lib/git.d.ts +0 -12
  36. package/dist/lib/git.js +0 -37
  37. package/dist/lib/paths.d.ts +0 -108
  38. package/dist/lib/paths.js +0 -296
  39. package/dist/lib/prompts.d.ts +0 -18
  40. package/dist/lib/prompts.js +0 -62
  41. package/dist/types/prompt.d.ts +0 -54
  42. package/dist/types/prompt.js +0 -20
@@ -1,62 +0,0 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- import { fileURLToPath } from 'url';
4
- import matter from 'gray-matter';
5
- import { PromptFrontmatterSchema } from '../types/prompt';
6
- // Get __dirname equivalent for ESM (works with both npm/tsx and Bun)
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
- /**
10
- * Parse a prompt file and extract frontmatter + content
11
- */
12
- export function parsePromptFile(filePath) {
13
- try {
14
- const fileContent = fs.readFileSync(filePath, 'utf-8');
15
- const { data, content } = matter(fileContent);
16
- const parsed = PromptFrontmatterSchema.safeParse(data);
17
- if (!parsed.success) {
18
- console.error(`Failed to parse frontmatter in ${filePath}:`, parsed.error);
19
- return null;
20
- }
21
- return {
22
- frontmatter: parsed.data,
23
- content: content.trim(),
24
- filePath,
25
- };
26
- }
27
- catch (error) {
28
- console.error(`Error reading prompt file ${filePath}:`, error);
29
- return null;
30
- }
31
- }
32
- /**
33
- * Load all prompts from a directory
34
- */
35
- export function loadPromptsFromDir(dirPath) {
36
- if (!fs.existsSync(dirPath)) {
37
- return [];
38
- }
39
- const files = fs.readdirSync(dirPath).filter(f => f.endsWith('.md'));
40
- const prompts = [];
41
- for (const file of files) {
42
- const prompt = parsePromptFile(path.join(dirPath, file));
43
- if (prompt) {
44
- prompts.push(prompt);
45
- }
46
- }
47
- return prompts;
48
- }
49
- /**
50
- * Get the agent-core root directory
51
- * Works with both npm/tsx and Bun
52
- */
53
- export function getAgentCoreDir() {
54
- // Relative to this file: src/lib/prompts.ts -> ../../agent-core
55
- return path.join(__dirname, '..', '..', 'agent-core');
56
- }
57
- /**
58
- * Get the agent-core prompts directory
59
- */
60
- export function getAgentCorePromptsDir() {
61
- return path.join(getAgentCoreDir(), 'prompts');
62
- }
@@ -1,54 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const PromptArgSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- default: z.ZodOptional<z.ZodString>;
5
- prompt: z.ZodOptional<z.ZodString>;
6
- }, z.core.$strip>;
7
- export declare const AutoIdentitySchema: z.ZodObject<{
8
- user: z.ZodString;
9
- model: z.ZodString;
10
- }, z.core.$strip>;
11
- export declare const PromptFrontmatterSchema: z.ZodObject<{
12
- name: z.ZodString;
13
- description: z.ZodString;
14
- 'argument-hint': z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
15
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
- 'required-args': z.ZodOptional<z.ZodArray<z.ZodObject<{
17
- name: z.ZodString;
18
- default: z.ZodOptional<z.ZodString>;
19
- prompt: z.ZodOptional<z.ZodString>;
20
- }, z.core.$strip>>>;
21
- 'optional-args': z.ZodOptional<z.ZodArray<z.ZodObject<{
22
- name: z.ZodString;
23
- default: z.ZodOptional<z.ZodString>;
24
- prompt: z.ZodOptional<z.ZodString>;
25
- }, z.core.$strip>>>;
26
- 'auto-identity': z.ZodOptional<z.ZodObject<{
27
- user: z.ZodString;
28
- model: z.ZodString;
29
- }, z.core.$strip>>;
30
- }, z.core.$strip>;
31
- export type PromptArg = z.infer<typeof PromptArgSchema>;
32
- export type AutoIdentity = z.infer<typeof AutoIdentitySchema>;
33
- export type PromptFrontmatter = z.infer<typeof PromptFrontmatterSchema>;
34
- export interface ParsedPrompt {
35
- frontmatter: PromptFrontmatter;
36
- content: string;
37
- filePath: string;
38
- }
39
- export type StorageMode = 'global' | 'workspace' | 'both';
40
- export interface RRCEConfig {
41
- version: number;
42
- storage: {
43
- mode: StorageMode;
44
- globalPath?: string;
45
- };
46
- project: {
47
- name: string;
48
- };
49
- tools: {
50
- copilot: boolean;
51
- antigravity: boolean;
52
- };
53
- linked_projects?: string[];
54
- }
@@ -1,20 +0,0 @@
1
- import { z } from 'zod';
2
- // Prompt frontmatter schema
3
- export const PromptArgSchema = z.object({
4
- name: z.string(),
5
- default: z.string().optional(),
6
- prompt: z.string().optional(),
7
- });
8
- export const AutoIdentitySchema = z.object({
9
- user: z.string(),
10
- model: z.string(),
11
- });
12
- export const PromptFrontmatterSchema = z.object({
13
- name: z.string(),
14
- description: z.string(),
15
- 'argument-hint': z.union([z.string(), z.array(z.string())]).optional(),
16
- tools: z.array(z.string()).optional(),
17
- 'required-args': z.array(PromptArgSchema).optional(),
18
- 'optional-args': z.array(PromptArgSchema).optional(),
19
- 'auto-identity': AutoIdentitySchema.optional(),
20
- });