Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions openspec/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
schema: spec-driven

context: |
Tech stack: TypeScript, Node.js (≥20.19.0), ESM modules
Package manager: pnpm
CLI framework: Commander.js

Cross-platform requirements:
- This tool runs on macOS, Linux, AND Windows
- Always use path.join() or path.resolve() for file paths - never hardcode slashes
- Never assume forward-slash path separators
- Tests must use path.join() for expected path values, not hardcoded strings
- Consider case sensitivity differences in file systems

rules:
specs:
- Include scenarios for Windows path handling when dealing with file paths
- Requirements involving paths must specify cross-platform behavior
tasks:
- Add Windows CI verification as a task when changes involve file paths
- Include cross-platform testing considerations
design:
- Document any platform-specific behavior or limitations
- Prefer Node.js path module over string manipulation for paths
4 changes: 2 additions & 2 deletions test/core/artifact-graph/resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ version: [[[invalid yaml
it('should return correct path', () => {
const projectRoot = '/path/to/project';
const schemasDir = getProjectSchemasDir(projectRoot);
expect(schemasDir).toBe('/path/to/project/openspec/schemas');
expect(schemasDir).toBe(path.join('/path/to/project', 'openspec', 'schemas'));
});

it('should work with relative-looking paths', () => {
const schemasDir = getProjectSchemasDir('./my-project');
expect(schemasDir).toBe('my-project/openspec/schemas');
expect(schemasDir).toBe(path.join('my-project', 'openspec', 'schemas'));
});
});

Expand Down
Loading