syntra 0.1.3 → 0.2.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/README.md +55 -6
- package/dist/commands/template.js +1 -1
- package/dist/commands/template.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Syntra CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Syntra is a CLI that scaffolds, manages, validates, and syncs an AI-assisted development framework across tools like GitHub Copilot, Claude Code, and Cursor.
|
|
4
4
|
|
|
5
5
|
Core principle: **`ai/` is the source of truth**. Adapter folders (`.github/`, `.claude/`, `.cursor/`) are generated artifacts.
|
|
6
6
|
|
|
@@ -101,11 +101,19 @@ syntra add skill api-pagination
|
|
|
101
101
|
|
|
102
102
|
If `sync.autoSync: true` in `ai/config.yml`, add operations trigger silent adapter sync.
|
|
103
103
|
|
|
104
|
+
For `task`, task IDs and task directories are read from `ai/config.yml`:
|
|
105
|
+
|
|
106
|
+
- `tasks.idPrefix` (default: `TASK-`)
|
|
107
|
+
- `tasks.activeDir` (default: `active`)
|
|
108
|
+
- `tasks.doneDir` (default: `done`)
|
|
109
|
+
|
|
110
|
+
Task file format requirements are documented in **Task Template Contract** below.
|
|
111
|
+
|
|
104
112
|
---
|
|
105
113
|
|
|
106
114
|
## `syntra done <taskId>`
|
|
107
115
|
|
|
108
|
-
Moves a task from active to done:
|
|
116
|
+
Moves a task from the configured active directory to the configured done directory:
|
|
109
117
|
|
|
110
118
|
```bash
|
|
111
119
|
syntra done TASK-001
|
|
@@ -146,7 +154,7 @@ Checks include:
|
|
|
146
154
|
- `ai/config.yml` schema basics
|
|
147
155
|
- instruction naming/format
|
|
148
156
|
- agent references to instructions
|
|
149
|
-
- task structure and references
|
|
157
|
+
- task structure and references (requires `Context`, `References`, `Dependencies`, `Steps`, `Acceptance Criteria`, `Notes`)
|
|
150
158
|
- sync freshness/manual edit risk signals
|
|
151
159
|
|
|
152
160
|
```bash
|
|
@@ -169,10 +177,10 @@ syntra template save my-team-template
|
|
|
169
177
|
syntra template list
|
|
170
178
|
```
|
|
171
179
|
|
|
172
|
-
Saved templates are stored in:
|
|
180
|
+
Saved templates are currently stored in:
|
|
173
181
|
|
|
174
182
|
```text
|
|
175
|
-
~/.
|
|
183
|
+
~/.syntra/templates/
|
|
176
184
|
```
|
|
177
185
|
|
|
178
186
|
---
|
|
@@ -191,6 +199,47 @@ Typical sections:
|
|
|
191
199
|
|
|
192
200
|
---
|
|
193
201
|
|
|
202
|
+
## Task Template Contract
|
|
203
|
+
|
|
204
|
+
Task files must follow this structure to pass validation:
|
|
205
|
+
|
|
206
|
+
- Required headings: `Context`, `References`, `Dependencies`, `Steps`, `Acceptance Criteria`, `Notes`
|
|
207
|
+
- File location: `ai/tasks/{tasks.activeDir}/{taskId}.task.md` while active
|
|
208
|
+
- Task ID prefix: must match `tasks.idPrefix` from `ai/config.yml`
|
|
209
|
+
|
|
210
|
+
Example:
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
# TASK-001: Add date utility validation
|
|
214
|
+
|
|
215
|
+
## Context
|
|
216
|
+
Add a reusable date validation helper used by form input checks.
|
|
217
|
+
|
|
218
|
+
## References
|
|
219
|
+
- **Agent**: [code-generator](../agents/code-generator.agent.md)
|
|
220
|
+
- **Instructions**:
|
|
221
|
+
- [architecture](../instructions/architecture.instructions.md)
|
|
222
|
+
- [testing](../instructions/testing.instructions.md)
|
|
223
|
+
|
|
224
|
+
## Dependencies
|
|
225
|
+
None
|
|
226
|
+
|
|
227
|
+
## Steps
|
|
228
|
+
1. [ ] Add `isDateAfterToday` in `src/utils/date.ts`
|
|
229
|
+
2. [ ] Add unit tests for happy path and edge cases
|
|
230
|
+
3. [ ] Use helper in form validation flow
|
|
231
|
+
|
|
232
|
+
## Acceptance Criteria
|
|
233
|
+
- [ ] Returns `true` only for strictly future dates
|
|
234
|
+
- [ ] Returns `false` for invalid or empty input
|
|
235
|
+
- [ ] Unit tests cover new logic and pass
|
|
236
|
+
|
|
237
|
+
## Notes
|
|
238
|
+
Keep changes scoped to utility + tests + call site.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
194
243
|
## Typical Workflow
|
|
195
244
|
|
|
196
245
|
```bash
|
|
@@ -4,7 +4,7 @@ import path from 'path';
|
|
|
4
4
|
import { fsUtils } from '../utils/fs.js';
|
|
5
5
|
import { logger } from '../utils/logger.js';
|
|
6
6
|
function getTemplateRoot() {
|
|
7
|
-
return path.join(os.homedir(), '.
|
|
7
|
+
return path.join(os.homedir(), '.syntra', 'templates');
|
|
8
8
|
}
|
|
9
9
|
function ensureTemplateRoot() {
|
|
10
10
|
fsUtils.mkdir(getTemplateRoot());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,SAAS,eAAe;IACpB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,SAAS,eAAe;IACpB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,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