MCPcopy Create free account
hub / github.com/dyoshikawa/rulesync / createSampleFiles

Function createSampleFiles

src/lib/init.ts:76–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76async function createSampleFiles(): Promise<InitFileResult[]> {
77 const results: InitFileResult[] = [];
78
79 // Sample file contents
80 const sampleRuleFile = {
81 filename: RULESYNC_OVERVIEW_FILE_NAME,
82 content: `---
83root: true
84targets: ["*"]
85description: "Project overview and general development guidelines"
86globs: ["**/*"]
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",

Callers 1

initFunction · 0.85

Calls 3

ensureDirFunction · 0.85
writeIfNotExistsFunction · 0.85
getSettablePathsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…