()
| 74 | } |
| 75 | |
| 76 | async function createSampleFiles(): Promise<InitFileResult[]> { |
| 77 | const results: InitFileResult[] = []; |
| 78 | |
| 79 | // Sample file contents |
| 80 | const sampleRuleFile = { |
| 81 | filename: RULESYNC_OVERVIEW_FILE_NAME, |
| 82 | content: `--- |
| 83 | root: true |
| 84 | targets: ["*"] |
| 85 | description: "Project overview and general development guidelines" |
| 86 | globs: ["**/*"] |
| 87 | --- |
| 88 | |
| 89 | # Project Overview |
| 90 | |
| 91 | ## General Guidelines |
| 92 | |
| 93 | - Use TypeScript for all new code |
| 94 | - Follow consistent naming conventions |
| 95 | - Write self-documenting code with clear variable and function names |
| 96 | - Prefer composition over inheritance |
| 97 | - Use meaningful comments for complex business logic |
| 98 | |
| 99 | ## Code Style |
| 100 | |
| 101 | - Use 2 spaces for indentation |
| 102 | - Use semicolons |
| 103 | - Use double quotes for strings |
| 104 | - Use trailing commas in multi-line objects and arrays |
| 105 | |
| 106 | ## Architecture Principles |
| 107 | |
| 108 | - Organize code by feature, not by file type |
| 109 | - Keep related files close together |
| 110 | - Use dependency injection for better testability |
| 111 | - Implement proper error handling |
| 112 | - Follow single responsibility principle |
| 113 | `, |
| 114 | }; |
| 115 | |
| 116 | const sampleMcpFile = { |
| 117 | filename: "mcp.json", |
| 118 | content: `{ |
| 119 | "$schema": "${RULESYNC_MCP_SCHEMA_URL}", |
| 120 | "mcpServers": { |
| 121 | "serena": { |
| 122 | "type": "stdio", |
| 123 | "command": "uvx", |
| 124 | "args": [ |
| 125 | "--from", |
| 126 | "git+https://github.com/oraios/serena", |
| 127 | "serena", |
| 128 | "start-mcp-server", |
| 129 | "--context", |
| 130 | "ide-assistant", |
| 131 | "--enable-web-dashboard", |
| 132 | "false", |
| 133 | "--project", |
no test coverage detected
searching dependent graphs…