@torus-engineering/tas-kit 1.5.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/.claude/agents/ado-agent.md +39 -0
- package/.claude/agents/code-reviewer.md +41 -0
- package/.claude/commands/ado-create.md +26 -0
- package/.claude/commands/ado-delete.md +20 -0
- package/.claude/commands/ado-get.md +19 -0
- package/.claude/commands/ado-status.md +17 -0
- package/.claude/commands/ado-update.md +25 -0
- package/.claude/commands/tas-adr.md +28 -0
- package/.claude/commands/tas-brainstorm.md +19 -0
- package/.claude/commands/tas-bug.md +62 -0
- package/.claude/commands/tas-design.md +31 -0
- package/.claude/commands/tas-dev-story.md +61 -0
- package/.claude/commands/tas-epic.md +29 -0
- package/.claude/commands/tas-feature.md +41 -0
- package/.claude/commands/tas-init.md +17 -0
- package/.claude/commands/tas-prd.md +31 -0
- package/.claude/commands/tas-review-code.md +42 -0
- package/.claude/commands/tas-sad.md +37 -0
- package/.claude/commands/tas-security-check.md +30 -0
- package/.claude/commands/tas-status.md +16 -0
- package/.claude/commands/tas-story.md +50 -0
- package/.claude/commands/tas-verify.md +33 -0
- package/.claude/settings.json +21 -0
- package/.claude/skills/ado-integration/SKILL.md +32 -0
- package/.claude/skills/tas-conventions/SKILL.md +17 -0
- package/.claude/skills/tas-tdd/SKILL.md +26 -0
- package/.env.example +1 -0
- package/.tas/README.md +1583 -0
- package/.tas/checklists/code-review.md +29 -0
- package/.tas/checklists/security.md +21 -0
- package/.tas/checklists/story-done.md +23 -0
- package/.tas/project-status-example.yaml +17 -0
- package/.tas/tas-example.yaml +108 -0
- package/.tas/templates/ADR.md +47 -0
- package/.tas/templates/Bug.md +67 -0
- package/.tas/templates/Design-Spec.md +36 -0
- package/.tas/templates/Epic.md +46 -0
- package/.tas/templates/Feature.md +55 -0
- package/.tas/templates/PRD.md +142 -0
- package/.tas/templates/Performance-Report.md +30 -0
- package/.tas/templates/SAD.md +64 -0
- package/.tas/templates/Security-Report.md +27 -0
- package/.tas/templates/Story.md +88 -0
- package/.tas/tools/tas-ado-readme.md +169 -0
- package/.tas/tools/tas-ado.py +621 -0
- package/CLAUDE-Example.md +58 -0
- package/README.md +67 -0
- package/bin/cli.js +49 -0
- package/lib/install.js +114 -0
- package/package.json +34 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Security Report
|
|
2
|
+
|
|
3
|
+
> **Last Scan:** {Date}
|
|
4
|
+
> **Scope:** {Full scan | File/Module specific}
|
|
5
|
+
> **Scanned by:** {DSE name}
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
| Severity | Open | Fixed | Accepted Risk | Total |
|
|
9
|
+
|----------|------|-------|---------------|-------|
|
|
10
|
+
| Critical | 0 | 0 | 0 | 0 |
|
|
11
|
+
| High | 0 | 0 | 0 | 0 |
|
|
12
|
+
| Medium | 0 | 0 | 0 | 0 |
|
|
13
|
+
| Low | 0 | 0 | 0 | 0 |
|
|
14
|
+
|
|
15
|
+
## Findings
|
|
16
|
+
|
|
17
|
+
### SEC-001: {Title}
|
|
18
|
+
- **Severity:** Critical | High | Medium | Low
|
|
19
|
+
- **Status:** Open | In Progress | Fixed | Accepted Risk
|
|
20
|
+
- **Location:** {file:line}
|
|
21
|
+
- **Description:** {Mô tả vấn đề}
|
|
22
|
+
- **Recommended Fix:** {Cách fix cụ thể}
|
|
23
|
+
- **Fixed Date:** {Date, nếu đã fix}
|
|
24
|
+
|
|
25
|
+
## Scan History
|
|
26
|
+
| Date | Scope | New Findings | Fixed | Remaining |
|
|
27
|
+
|------|-------|-------------|-------|-----------|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
ado_id:
|
|
3
|
+
ado_type: User Story
|
|
4
|
+
ado_title: "{Title}"
|
|
5
|
+
ado_state: New
|
|
6
|
+
ado_assigned_to:
|
|
7
|
+
ado_created:
|
|
8
|
+
last_ado_sync:
|
|
9
|
+
parent_ado_id:
|
|
10
|
+
---
|
|
11
|
+
# Story-{NNN}: {Title}
|
|
12
|
+
|
|
13
|
+
> **Status:** New | Committed | In Progress | Deploy Test | Verify Test | Deploy Stag | Verify Stag | Deploy Prod | Verify Prod | Done
|
|
14
|
+
> **Feature:** Feature-{NNN}
|
|
15
|
+
> **Assigned to:** {SE name}
|
|
16
|
+
> **Estimate:** {S/M/L}
|
|
17
|
+
> **Created:** {Date}
|
|
18
|
+
|
|
19
|
+
## User Story
|
|
20
|
+
As a {role}, I want {goal}, so that {benefit}.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
## Context from PRD (nếu có)
|
|
24
|
+
*(Chỉ thêm section này khi Story có business requirements đặc biệt cần lưu ý)*
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
## Context from SAD/ADR (nếu có)
|
|
28
|
+
*(Chỉ thêm section này khi Story có architecture decisions, patterns, hoặc constraints cần tuân thủ)*
|
|
29
|
+
|
|
30
|
+
- **Relevant Components:** {components liên quan}
|
|
31
|
+
- **Patterns to follow:** {patterns từ SAD/ADR}
|
|
32
|
+
- **Constraints:** {nếu có}
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
## Prerequisites from Feature (nếu có)
|
|
36
|
+
*(Chỉ thêm section này khi Story có dependency từ Stories khác hoặc prerequisites)*
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
## Implementation Context
|
|
40
|
+
|
|
41
|
+
## Acceptance Criteria
|
|
42
|
+
### AC-1: {title}
|
|
43
|
+
- **Given** {precondition}
|
|
44
|
+
- **When** {action}
|
|
45
|
+
- **Then** {expected result}
|
|
46
|
+
|
|
47
|
+
### AC-2: {title}
|
|
48
|
+
- **Given** {precondition}
|
|
49
|
+
- **When** {action}
|
|
50
|
+
- **Then** {expected result}
|
|
51
|
+
|
|
52
|
+
## Technical Notes
|
|
53
|
+
- **Files to modify:** {list}
|
|
54
|
+
- **Patterns:** {reference to SAD/ADR}
|
|
55
|
+
- **Database changes:** {if any}
|
|
56
|
+
|
|
57
|
+
## Unit Test Cases
|
|
58
|
+
SE implement trong code. PE thiết kế happy path + edge cases + negative cases khi tạo Story.
|
|
59
|
+
|
|
60
|
+
### Happy Path
|
|
61
|
+
| ID | Description | Input | Expected Output |
|
|
62
|
+
|----|-------------|-------|-----------------|
|
|
63
|
+
| UT-1 | {description} | {input} | {expected} |
|
|
64
|
+
|
|
65
|
+
### Edge Cases
|
|
66
|
+
| ID | Description | Input | Expected Output |
|
|
67
|
+
|----|-------------|-------|-----------------|
|
|
68
|
+
| UT-E1 | {description} | {input} | {expected} |
|
|
69
|
+
|
|
70
|
+
### Negative Cases
|
|
71
|
+
| ID | Description | Input | Expected Output |
|
|
72
|
+
|----|-------------|-------|-----------------|
|
|
73
|
+
| UT-N1 | {description} | {input} | {expected} |
|
|
74
|
+
|
|
75
|
+
### Dependencies to Mock
|
|
76
|
+
- {external API, database state, third-party service...}
|
|
77
|
+
|
|
78
|
+
## Definition of Done
|
|
79
|
+
- [ ] Code implemented
|
|
80
|
+
- [ ] Unit tests pass
|
|
81
|
+
- [ ] Code review passed
|
|
82
|
+
- [ ] Acceptance criteria verified
|
|
83
|
+
- [ ] No regression
|
|
84
|
+
- [ ] Documentation updated (if needed)
|
|
85
|
+
|
|
86
|
+
## Changelog
|
|
87
|
+
| Date | Changes | Author |
|
|
88
|
+
|------|---------|--------|
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# TAS Kit Skill Specification: ado-integration
|
|
2
|
+
|
|
3
|
+
**Skill name**: ado-integration
|
|
4
|
+
**Version**: 0.2 (concept & spec date: March 17, 2026)
|
|
5
|
+
**Purpose**:
|
|
6
|
+
Cho phép AI agent trong môi trường coding (Claude Code, Cursor, VS Code + terminal) thực hiện **CRUD** và đồng bộ hai chiều giữa các file Markdown (.md) trong repository và work items trên Azure DevOps (Epic, Feature, User Story, Bug), bao gồm tự động quản lý hierarchy (parent-child relations).
|
|
7
|
+
|
|
8
|
+
Mục tiêu chính:
|
|
9
|
+
- Biến AI thành "thành viên đội ngũ" có khả năng tự quản lý backlog mà không cần rời khỏi editor
|
|
10
|
+
- Đảm bảo file .md là single source of truth (local ↔ ADO sync)
|
|
11
|
+
- Ghi dấu thời gian đồng bộ để agent biết dữ liệu mới/cũ
|
|
12
|
+
|
|
13
|
+
## 1. Yêu cầu môi trường & Dependencies
|
|
14
|
+
|
|
15
|
+
**Bắt buộc**:
|
|
16
|
+
- Azure CLI đã cài + extension `azure-devops`
|
|
17
|
+
```bash
|
|
18
|
+
az extension add --name azure-devops --upgrade
|
|
19
|
+
```
|
|
20
|
+
- Python 3.8+
|
|
21
|
+
- Package: `pyyaml` (`pip install pyyaml`)
|
|
22
|
+
|
|
23
|
+
**Cấu hình** (file `tas.yaml` ở root repo):
|
|
24
|
+
```yaml
|
|
25
|
+
ado:
|
|
26
|
+
organization: https://dev.azure.com/your-org-name
|
|
27
|
+
project: Your-Project-Name
|
|
28
|
+
# pat: PAT với scope Work Items (Full) + optional Read & manage wiki
|
|
29
|
+
# Nếu không có pat trong file → dùng biến môi trường AZURE_DEVOPS_PAT
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 2. File chính cần tạo
|
|
33
|
+
|
|
34
|
+
- `tools/tas-ado.py` → script Python thực thi tất cả lệnh
|
|
35
|
+
- `skills/ado-integration.md` → tài liệu hướng dẫn sử dụng (giống file bạn đang đọc)
|
|
36
|
+
|
|
37
|
+
## 3. Các lệnh CLI được hỗ trợ
|
|
38
|
+
|
|
39
|
+
Tất cả lệnh đều chạy dạng:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
python tools/tas-ado.py <command> [arguments]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Create commands (tạo mới + tự rename file + optional parent)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
create-epic <temp-id> [--parent-id <id>]
|
|
49
|
+
create-feature <temp-id> [--parent-id <id>]
|
|
50
|
+
create-story <temp-id> [--parent-id <id>]
|
|
51
|
+
create-bug <temp-id> [--parent-id <id>]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Ví dụ:
|
|
55
|
+
```bash
|
|
56
|
+
python tools/tas-ado.py create-story 789 --parent-id 456
|
|
57
|
+
# → đọc epic-789-*.md → tạo User Story → rename thành story-1234-*.md → add parent relation đến 456
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Pull / Get commands
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
get <ado-id>
|
|
64
|
+
pull <ado-id> # alias
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Ví dụ:
|
|
68
|
+
```bash
|
|
69
|
+
python tools/tas-ado.py get 5345
|
|
70
|
+
# → tạo/tạo lại file epic-5345-slug-title.md với frontmatter + nội dung
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Update commands
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
update-epic <ado-id> [--assign <name/email>] [--status <state>]
|
|
77
|
+
update-feature <ado-id> [--assign <...>] [--status <...>]
|
|
78
|
+
update-story <ado-id> [--assign <...>] [--status <...>]
|
|
79
|
+
update-bug <ado-id> [--assign <...>] [--status <...>]
|
|
80
|
+
|
|
81
|
+
update-status <ado-id> --status <state> [--assign <name/email>]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Delete commands
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
delete-epic <ado-id>
|
|
88
|
+
delete-feature <ado-id>
|
|
89
|
+
delete-story <ado-id>
|
|
90
|
+
delete-bug <ado-id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 4. Quy ước file .md
|
|
94
|
+
|
|
95
|
+
- Pattern tên file: `{type}-{ado_id hoặc temp_id}-{slug-title}.md`
|
|
96
|
+
- type: epic / feature / story / bug
|
|
97
|
+
- slug-title: lowercase, thay space bằng -, loại ký tự đặc biệt
|
|
98
|
+
|
|
99
|
+
- Frontmatter YAML (luôn ở đầu file):
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
---
|
|
103
|
+
ado_id: 5345
|
|
104
|
+
ado_type: Epic # Epic / Feature / User Story / Bug
|
|
105
|
+
ado_title: Landing Page Redesign
|
|
106
|
+
ado_state: Active
|
|
107
|
+
ado_assigned_to: Nguyen Van A <email@domain.com>
|
|
108
|
+
ado_created: 2026-03-10
|
|
109
|
+
last_ado_sync: 2026-03-17 15:42:08
|
|
110
|
+
# optional: parent_ado_id: 100 (nếu muốn hỗ trợ detect parent tự động sau này)
|
|
111
|
+
---
|
|
112
|
+
# Tiêu đề (phải trùng ado_title)
|
|
113
|
+
|
|
114
|
+
Nội dung mô tả, acceptance criteria, steps to reproduce, v.v.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Quan trọng**:
|
|
118
|
+
- Mỗi lần **create / pull / update / update-status** thành công → **cập nhật** (hoặc thêm) trường `last_ado_sync` với thời gian hiện tại (format: YYYY-MM-DD HH:MM:SS)
|
|
119
|
+
|
|
120
|
+
## 5. Yêu cầu logic chi tiết
|
|
121
|
+
|
|
122
|
+
### Khi create:
|
|
123
|
+
1. Tìm file theo pattern `{type}-{temp_id}-*.md`
|
|
124
|
+
2. Extract title (dòng # đầu tiên), description (phần còn lại)
|
|
125
|
+
3. Tạo work item bằng `az boards work-item create`
|
|
126
|
+
4. Lấy ID mới → rename file thành `{type}-{new_id}-*.md`
|
|
127
|
+
5. Nếu có `--parent-id` → chạy `az boards work-item relation add --id <new_id> --relation-type parent --target-id <parent_id>`
|
|
128
|
+
6. Tự động detect parent_id từ frontmatter `parent_ado_id` hoặc tên file
|
|
129
|
+
7. Cập nhật `last_ado_sync` trong frontmatter
|
|
130
|
+
|
|
131
|
+
### Khi pull/get:
|
|
132
|
+
1. Lấy work item bằng `az boards work-item show --id <id> --expand fields`
|
|
133
|
+
2. Convert description (HTML → Markdown cơ bản)
|
|
134
|
+
3. Tạo file `{type}-{id}-{slug}.md`
|
|
135
|
+
4. Ghi frontmatter + nội dung
|
|
136
|
+
5. Cập nhật `last_ado_sync`
|
|
137
|
+
|
|
138
|
+
### Khi update:
|
|
139
|
+
1. Tìm file theo pattern `*-<id>-*.md`
|
|
140
|
+
2. Đọc title & description từ file
|
|
141
|
+
3. Cập nhật bằng `az boards work-item update`
|
|
142
|
+
4. Cập nhật `last_ado_sync`
|
|
143
|
+
|
|
144
|
+
### Khi update-status:
|
|
145
|
+
1. Tìm file theo pattern
|
|
146
|
+
2. Chỉ update state &/hoặc assigned-to
|
|
147
|
+
3. Cập nhật `last_ado_sync` nếu tìm thấy file
|
|
148
|
+
|
|
149
|
+
### Khi delete:
|
|
150
|
+
- Chỉ xóa trên ADO, không động đến file local
|
|
151
|
+
|
|
152
|
+
## 6. Gợi ý mở rộng (không bắt buộc cho v0.2)
|
|
153
|
+
|
|
154
|
+
- Hỗ trợ thêm fields: priority, effort, labels, acceptance criteria
|
|
155
|
+
- Tự động git add/commit/push sau sync
|
|
156
|
+
- Convert HTML → Markdown tốt hơn (table, code block, list)
|
|
157
|
+
|
|
158
|
+
## 7. Cách sử dụng trong agent prompt
|
|
159
|
+
|
|
160
|
+
Ví dụ prompt mẫu cho AI agent:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
/ado-create-feature 042 --parent-id 100
|
|
164
|
+
/ado-create-story 789 --parent-id <feature-id vừa tạo>
|
|
165
|
+
/ado-get 1234 # lấy bug mới về để fix
|
|
166
|
+
/ado-update-bug 1234 --status Resolved
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Skill này được thiết kế để tích hợp mượt mà vào các framework agentic như TAS Kit, Superpowers, BMAD.
|