specchain-pro 0.1.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/CHANGELOG.md +68 -0
- package/CONTRIBUTING.md +397 -0
- package/DEPLOYMENT_OPTIONS.md +358 -0
- package/DEPLOY_WITHOUT_NPM.md +443 -0
- package/ENABLE_2FA.md +133 -0
- package/LICENSE +21 -0
- package/NPM_PUBLISH_STEPS.md +432 -0
- package/PUBLISH_COMMANDS.txt +61 -0
- package/QUICK_DEPLOY.md +206 -0
- package/README.md +264 -0
- package/YOUR_DEPLOYMENT_CHECKLIST.md +268 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +182 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/config.d.ts +14 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +143 -0
- package/dist/core/config.js.map +1 -0
- package/dist/types/index.d.ts +142 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +46 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/logger.d.ts +9 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +79 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +69 -0
- package/scripts/deploy-github.ps1 +108 -0
- package/scripts/deploy-github.sh +96 -0
- package/scripts/deploy.ps1 +183 -0
- package/scripts/deploy.sh +159 -0
- package/setup-git.ps1 +30 -0
- package/setup-git.sh +32 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to SpecChain Pro will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Planned
|
|
11
|
+
- Local storage layer implementation
|
|
12
|
+
- Cryptographic hashing with SHA-256
|
|
13
|
+
- Blockchain proof layer
|
|
14
|
+
- AI spec engine integration
|
|
15
|
+
- Export system
|
|
16
|
+
|
|
17
|
+
## [0.1.0] - 2025-01-28
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- Initial project structure and build system
|
|
21
|
+
- TypeScript configuration with strict mode
|
|
22
|
+
- CLI interface skeleton with Commander.js
|
|
23
|
+
- Configuration management system
|
|
24
|
+
- Error handling framework with Winston logging
|
|
25
|
+
- Sensitive data redaction in logs
|
|
26
|
+
- Type definitions for all core data structures
|
|
27
|
+
- Complete project documentation suite:
|
|
28
|
+
- Problem statement
|
|
29
|
+
- Solution proposal
|
|
30
|
+
- Product roadmap (18 months)
|
|
31
|
+
- Requirements document
|
|
32
|
+
- Design document
|
|
33
|
+
- Implementation tasks (173+ tasks)
|
|
34
|
+
- Development tooling:
|
|
35
|
+
- ESLint for code linting
|
|
36
|
+
- Prettier for code formatting
|
|
37
|
+
- Jest for testing framework
|
|
38
|
+
- CLI commands (skeleton implementation):
|
|
39
|
+
- `spec new` - Generate specification
|
|
40
|
+
- `spec sign` - Create blockchain proof
|
|
41
|
+
- `spec verify` - Verify specification
|
|
42
|
+
- `spec list` - List specifications
|
|
43
|
+
- `spec export` - Export specification
|
|
44
|
+
- `spec config` - Manage configuration
|
|
45
|
+
|
|
46
|
+
### Infrastructure
|
|
47
|
+
- npm package configuration
|
|
48
|
+
- Git repository setup
|
|
49
|
+
- CI/CD pipeline ready
|
|
50
|
+
- Deployment guide
|
|
51
|
+
- Getting started guide
|
|
52
|
+
|
|
53
|
+
### Notes
|
|
54
|
+
This is the MVP base version with foundational infrastructure. Core features (storage, blockchain, AI) are planned for upcoming releases.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Release Types
|
|
59
|
+
|
|
60
|
+
- **MAJOR**: Breaking changes
|
|
61
|
+
- **MINOR**: New features, backward compatible
|
|
62
|
+
- **PATCH**: Bug fixes
|
|
63
|
+
|
|
64
|
+
## Links
|
|
65
|
+
|
|
66
|
+
- [GitHub Repository](https://github.com/yourusername/specchain-pro)
|
|
67
|
+
- [npm Package](https://www.npmjs.com/package/specchain-pro)
|
|
68
|
+
- [Documentation](.kiro/specs/specchain-pro/)
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# Contributing to SpecChain Pro
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to SpecChain Pro! This document provides guidelines and instructions for contributing.
|
|
4
|
+
|
|
5
|
+
## 🎯 How to Contribute
|
|
6
|
+
|
|
7
|
+
### 1. Find an Issue or Task
|
|
8
|
+
|
|
9
|
+
- Check [GitHub Issues](https://github.com/yourusername/specchain-pro/issues)
|
|
10
|
+
- Review [tasks.md](.kiro/specs/specchain-pro/tasks.md) for implementation tasks
|
|
11
|
+
- Look for issues labeled `good first issue` or `help wanted`
|
|
12
|
+
|
|
13
|
+
### 2. Fork and Clone
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Fork the repository on GitHub
|
|
17
|
+
# Then clone your fork
|
|
18
|
+
git clone https://github.com/YOUR_USERNAME/specchain-pro.git
|
|
19
|
+
cd specchain-pro
|
|
20
|
+
|
|
21
|
+
# Add upstream remote
|
|
22
|
+
git remote add upstream https://github.com/yourusername/specchain-pro.git
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 3. Create a Branch
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Create a feature branch
|
|
29
|
+
git checkout -b feature/your-feature-name
|
|
30
|
+
|
|
31
|
+
# Or for bug fixes
|
|
32
|
+
git checkout -b fix/bug-description
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 4. Make Changes
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Install dependencies
|
|
39
|
+
npm install
|
|
40
|
+
|
|
41
|
+
# Make your changes
|
|
42
|
+
# ...
|
|
43
|
+
|
|
44
|
+
# Test your changes
|
|
45
|
+
npm run build
|
|
46
|
+
npm test
|
|
47
|
+
npm run lint
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 5. Commit Changes
|
|
51
|
+
|
|
52
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Format: <type>(<scope>): <description>
|
|
56
|
+
|
|
57
|
+
git commit -m "feat(storage): implement file-based storage layer"
|
|
58
|
+
git commit -m "fix(cli): resolve config loading issue"
|
|
59
|
+
git commit -m "docs(readme): update installation instructions"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Types:**
|
|
63
|
+
- `feat`: New feature
|
|
64
|
+
- `fix`: Bug fix
|
|
65
|
+
- `docs`: Documentation changes
|
|
66
|
+
- `style`: Code style changes (formatting, etc.)
|
|
67
|
+
- `refactor`: Code refactoring
|
|
68
|
+
- `test`: Adding or updating tests
|
|
69
|
+
- `chore`: Maintenance tasks
|
|
70
|
+
|
|
71
|
+
### 6. Push and Create Pull Request
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Push to your fork
|
|
75
|
+
git push origin feature/your-feature-name
|
|
76
|
+
|
|
77
|
+
# Create Pull Request on GitHub
|
|
78
|
+
# Fill out the PR template
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 📋 Development Guidelines
|
|
82
|
+
|
|
83
|
+
### Code Style
|
|
84
|
+
|
|
85
|
+
- Follow TypeScript best practices
|
|
86
|
+
- Use ESLint and Prettier (configured in project)
|
|
87
|
+
- Write clear, self-documenting code
|
|
88
|
+
- Add comments for complex logic
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Format code
|
|
92
|
+
npm run format
|
|
93
|
+
|
|
94
|
+
# Lint code
|
|
95
|
+
npm run lint
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Testing
|
|
99
|
+
|
|
100
|
+
- Write unit tests for new features
|
|
101
|
+
- Ensure all tests pass before submitting PR
|
|
102
|
+
- Aim for 80%+ code coverage
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Run tests
|
|
106
|
+
npm test
|
|
107
|
+
|
|
108
|
+
# Run tests with coverage
|
|
109
|
+
npm test -- --coverage
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Documentation
|
|
113
|
+
|
|
114
|
+
- Update README.md if adding user-facing features
|
|
115
|
+
- Update relevant documentation in `.kiro/specs/`
|
|
116
|
+
- Add JSDoc comments for public APIs
|
|
117
|
+
- Update CHANGELOG.md
|
|
118
|
+
|
|
119
|
+
### Commit Messages
|
|
120
|
+
|
|
121
|
+
Good commit messages:
|
|
122
|
+
```
|
|
123
|
+
feat(ai): add OpenAI GPT-4 integration
|
|
124
|
+
fix(blockchain): resolve transaction retry logic
|
|
125
|
+
docs(api): document storage layer interface
|
|
126
|
+
test(hash): add property tests for canonicalization
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Bad commit messages:
|
|
130
|
+
```
|
|
131
|
+
update code
|
|
132
|
+
fix bug
|
|
133
|
+
changes
|
|
134
|
+
wip
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 🏗️ Project Structure
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
specchain-pro/
|
|
141
|
+
├── src/
|
|
142
|
+
│ ├── cli/ # CLI interface
|
|
143
|
+
│ ├── core/ # Core orchestration
|
|
144
|
+
│ ├── ai/ # AI spec engine
|
|
145
|
+
│ ├── blockchain/ # Blockchain proof layer
|
|
146
|
+
│ ├── storage/ # Local storage
|
|
147
|
+
│ ├── export/ # Export system
|
|
148
|
+
│ ├── utils/ # Utilities
|
|
149
|
+
│ └── types/ # TypeScript types
|
|
150
|
+
├── tests/ # Test files
|
|
151
|
+
└── .kiro/specs/ # Documentation
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 🎨 Coding Standards
|
|
155
|
+
|
|
156
|
+
### TypeScript
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
// Use explicit types
|
|
160
|
+
function generateSpec(idea: string): SpecDocument {
|
|
161
|
+
// ...
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Use interfaces for objects
|
|
165
|
+
interface SpecMetadata {
|
|
166
|
+
id: string;
|
|
167
|
+
author: string;
|
|
168
|
+
createdAt: Date;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Use enums for constants
|
|
172
|
+
enum ErrorCode {
|
|
173
|
+
AI_GENERATION_FAILED = 'AI_001',
|
|
174
|
+
BLOCKCHAIN_NETWORK_ERROR = 'BC_001',
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Handle errors properly
|
|
178
|
+
try {
|
|
179
|
+
await someOperation();
|
|
180
|
+
} catch (error) {
|
|
181
|
+
log.error('Operation failed', { error });
|
|
182
|
+
throw new SpecChainError(
|
|
183
|
+
ErrorCode.OPERATION_FAILED,
|
|
184
|
+
'Descriptive message',
|
|
185
|
+
error,
|
|
186
|
+
true,
|
|
187
|
+
'Suggested action'
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Async/Await
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// Prefer async/await over promises
|
|
196
|
+
async function loadConfig(): Promise<AppConfig> {
|
|
197
|
+
const data = await fs.readFile(CONFIG_FILE, 'utf-8');
|
|
198
|
+
return JSON.parse(data);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Handle errors
|
|
202
|
+
async function safeOperation() {
|
|
203
|
+
try {
|
|
204
|
+
return await riskyOperation();
|
|
205
|
+
} catch (error) {
|
|
206
|
+
log.error('Operation failed', { error });
|
|
207
|
+
throw error;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## 🧪 Testing Guidelines
|
|
213
|
+
|
|
214
|
+
### Unit Tests
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
describe('ConfigManager', () => {
|
|
218
|
+
it('should load default configuration', async () => {
|
|
219
|
+
const config = await configManager.load();
|
|
220
|
+
expect(config.ai.provider).toBe('openai');
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it('should validate configuration', () => {
|
|
224
|
+
const invalidConfig = { ai: { provider: 'invalid' } };
|
|
225
|
+
expect(() => configManager.validate(invalidConfig)).toThrow();
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Property-Based Tests
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
import fc from 'fast-check';
|
|
234
|
+
|
|
235
|
+
describe('Hash Consistency', () => {
|
|
236
|
+
it('should produce same hash for identical content', async () => {
|
|
237
|
+
await fc.assert(
|
|
238
|
+
fc.asyncProperty(fc.string(), async (content) => {
|
|
239
|
+
const hash1 = await computeHash(content);
|
|
240
|
+
const hash2 = await computeHash(content);
|
|
241
|
+
expect(hash1).toBe(hash2);
|
|
242
|
+
}),
|
|
243
|
+
{ numRuns: 100 }
|
|
244
|
+
);
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## 📝 Pull Request Process
|
|
250
|
+
|
|
251
|
+
### Before Submitting
|
|
252
|
+
|
|
253
|
+
- [ ] Code builds successfully (`npm run build`)
|
|
254
|
+
- [ ] All tests pass (`npm test`)
|
|
255
|
+
- [ ] Code is linted (`npm run lint`)
|
|
256
|
+
- [ ] Code is formatted (`npm run format`)
|
|
257
|
+
- [ ] Documentation is updated
|
|
258
|
+
- [ ] CHANGELOG.md is updated
|
|
259
|
+
- [ ] Commit messages follow conventions
|
|
260
|
+
|
|
261
|
+
### PR Template
|
|
262
|
+
|
|
263
|
+
When creating a PR, include:
|
|
264
|
+
|
|
265
|
+
```markdown
|
|
266
|
+
## Description
|
|
267
|
+
Brief description of changes
|
|
268
|
+
|
|
269
|
+
## Type of Change
|
|
270
|
+
- [ ] Bug fix
|
|
271
|
+
- [ ] New feature
|
|
272
|
+
- [ ] Breaking change
|
|
273
|
+
- [ ] Documentation update
|
|
274
|
+
|
|
275
|
+
## Related Issue
|
|
276
|
+
Closes #123
|
|
277
|
+
|
|
278
|
+
## Testing
|
|
279
|
+
Describe testing performed
|
|
280
|
+
|
|
281
|
+
## Checklist
|
|
282
|
+
- [ ] Tests pass
|
|
283
|
+
- [ ] Code is linted
|
|
284
|
+
- [ ] Documentation updated
|
|
285
|
+
- [ ] CHANGELOG updated
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Review Process
|
|
289
|
+
|
|
290
|
+
1. Automated checks run (CI/CD)
|
|
291
|
+
2. Code review by maintainers
|
|
292
|
+
3. Address feedback
|
|
293
|
+
4. Approval and merge
|
|
294
|
+
|
|
295
|
+
## 🐛 Reporting Bugs
|
|
296
|
+
|
|
297
|
+
### Before Reporting
|
|
298
|
+
|
|
299
|
+
- Check existing issues
|
|
300
|
+
- Verify it's reproducible
|
|
301
|
+
- Gather relevant information
|
|
302
|
+
|
|
303
|
+
### Bug Report Template
|
|
304
|
+
|
|
305
|
+
```markdown
|
|
306
|
+
**Describe the bug**
|
|
307
|
+
Clear description of the bug
|
|
308
|
+
|
|
309
|
+
**To Reproduce**
|
|
310
|
+
Steps to reproduce:
|
|
311
|
+
1. Run command '...'
|
|
312
|
+
2. See error
|
|
313
|
+
|
|
314
|
+
**Expected behavior**
|
|
315
|
+
What should happen
|
|
316
|
+
|
|
317
|
+
**Actual behavior**
|
|
318
|
+
What actually happens
|
|
319
|
+
|
|
320
|
+
**Environment**
|
|
321
|
+
- OS: [e.g., Windows 11]
|
|
322
|
+
- Node version: [e.g., 18.0.0]
|
|
323
|
+
- Package version: [e.g., 0.1.0]
|
|
324
|
+
|
|
325
|
+
**Additional context**
|
|
326
|
+
Any other relevant information
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## 💡 Feature Requests
|
|
330
|
+
|
|
331
|
+
### Before Requesting
|
|
332
|
+
|
|
333
|
+
- Check if feature already exists
|
|
334
|
+
- Review roadmap in `.kiro/specs/specchain-pro/roadmap.md`
|
|
335
|
+
- Check if similar request exists
|
|
336
|
+
|
|
337
|
+
### Feature Request Template
|
|
338
|
+
|
|
339
|
+
```markdown
|
|
340
|
+
**Is your feature request related to a problem?**
|
|
341
|
+
Description of the problem
|
|
342
|
+
|
|
343
|
+
**Describe the solution you'd like**
|
|
344
|
+
Clear description of desired feature
|
|
345
|
+
|
|
346
|
+
**Describe alternatives you've considered**
|
|
347
|
+
Alternative solutions or features
|
|
348
|
+
|
|
349
|
+
**Additional context**
|
|
350
|
+
Any other relevant information
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## 📚 Resources
|
|
354
|
+
|
|
355
|
+
- [Project Documentation](.kiro/specs/specchain-pro/)
|
|
356
|
+
- [Design Document](.kiro/specs/specchain-pro/design.md)
|
|
357
|
+
- [Requirements](.kiro/specs/specchain-pro/requirements.md)
|
|
358
|
+
- [Tasks](.kiro/specs/specchain-pro/tasks.md)
|
|
359
|
+
- [Roadmap](.kiro/specs/specchain-pro/roadmap.md)
|
|
360
|
+
|
|
361
|
+
## 🤝 Code of Conduct
|
|
362
|
+
|
|
363
|
+
### Our Pledge
|
|
364
|
+
|
|
365
|
+
We pledge to make participation in our project a harassment-free experience for everyone.
|
|
366
|
+
|
|
367
|
+
### Our Standards
|
|
368
|
+
|
|
369
|
+
**Positive behavior:**
|
|
370
|
+
- Using welcoming and inclusive language
|
|
371
|
+
- Being respectful of differing viewpoints
|
|
372
|
+
- Gracefully accepting constructive criticism
|
|
373
|
+
- Focusing on what is best for the community
|
|
374
|
+
|
|
375
|
+
**Unacceptable behavior:**
|
|
376
|
+
- Trolling, insulting/derogatory comments
|
|
377
|
+
- Public or private harassment
|
|
378
|
+
- Publishing others' private information
|
|
379
|
+
- Other conduct which could reasonably be considered inappropriate
|
|
380
|
+
|
|
381
|
+
### Enforcement
|
|
382
|
+
|
|
383
|
+
Instances of abusive behavior may be reported to project maintainers. All complaints will be reviewed and investigated.
|
|
384
|
+
|
|
385
|
+
## 📞 Questions?
|
|
386
|
+
|
|
387
|
+
- Open a [GitHub Discussion](https://github.com/yourusername/specchain-pro/discussions)
|
|
388
|
+
- Check [Getting Started Guide](GETTING_STARTED.md)
|
|
389
|
+
- Review [Documentation](.kiro/specs/specchain-pro/)
|
|
390
|
+
|
|
391
|
+
## 🎉 Thank You!
|
|
392
|
+
|
|
393
|
+
Your contributions make SpecChain Pro better for everyone. We appreciate your time and effort!
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
**Happy Contributing! 🚀**
|