@torus-engineering/tas-kit 1.9.0 → 1.10.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/commands/tas-security.md +7 -1
- package/.tas/README.md +334 -1588
- package/.tas/hooks/README.md +138 -0
- package/.tas/hooks/pre-commit +26 -0
- package/.tas/hooks/security-scan.js +599 -0
- package/.tas/tas-example.yaml +126 -109
- package/CLAUDE-Example.md +61 -58
- package/README.md +334 -82
- package/bin/cli.js +24 -7
- package/lib/install.js +161 -47
- package/package.json +1 -1
package/.tas/tas-example.yaml
CHANGED
|
@@ -1,109 +1,126 @@
|
|
|
1
|
-
# .tas/tas-example.yaml - Reference template cho tas.yaml ở root
|
|
2
|
-
# Copy file này ra root (tas.yaml) và điền thông tin dự án.
|
|
3
|
-
# File này CHỈ chứa flow và logic của TAS.
|
|
4
|
-
# Tech stack, coding conventions, build commands thuộc về CLAUDE.md.
|
|
5
|
-
|
|
6
|
-
project:
|
|
7
|
-
name: "My Project"
|
|
8
|
-
code: "PROJ" # Prefix for file naming: PROJ-Epic-001, PROJ-Feature-001, etc.
|
|
9
|
-
type: greenfield # greenfield | brownfield
|
|
10
|
-
description: "Mô tả ngắn về dự án"
|
|
11
|
-
|
|
12
|
-
# Azure DevOps integration
|
|
13
|
-
ado:
|
|
14
|
-
enabled: true # false nếu project không dùng ADO
|
|
15
|
-
organization: "https://dev.azure.com/torus-bellesoft"
|
|
16
|
-
project_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
17
|
-
|
|
18
|
-
team:
|
|
19
|
-
- name: "Nguyen Van A"
|
|
20
|
-
role: pe
|
|
21
|
-
ado_id: "nguyenvana@torus.vn"
|
|
22
|
-
- name: "Tran Van B"
|
|
23
|
-
role: se
|
|
24
|
-
ado_id: "tranvanb@torus.vn"
|
|
25
|
-
- name: "Le Van C"
|
|
26
|
-
role: dse
|
|
27
|
-
ado_id: "levanc@torus.vn"
|
|
28
|
-
|
|
29
|
-
# Flow configuration
|
|
30
|
-
workflow:
|
|
31
|
-
# Phase 0: Discovery & Design (Human-led, AI-powered)
|
|
32
|
-
discovery:
|
|
33
|
-
enabled: true
|
|
34
|
-
lead: pe
|
|
35
|
-
artifacts:
|
|
36
|
-
- prd
|
|
37
|
-
- design_spec
|
|
38
|
-
- sad
|
|
39
|
-
- adr
|
|
40
|
-
- epic
|
|
41
|
-
- feature
|
|
42
|
-
- story
|
|
43
|
-
gate: ready_for_development
|
|
44
|
-
|
|
45
|
-
# Phase 1: Develop (Orchestrated Agentic)
|
|
46
|
-
develop:
|
|
47
|
-
enabled: true
|
|
48
|
-
lead: se
|
|
49
|
-
environment: test
|
|
50
|
-
use_tdd: true
|
|
51
|
-
auto_review: true
|
|
52
|
-
|
|
53
|
-
# Phase 2: Verify (Agentic + PE Review)
|
|
54
|
-
verify:
|
|
55
|
-
enabled: true
|
|
56
|
-
lead: pe
|
|
57
|
-
environment: staging
|
|
58
|
-
auto_integration_test: true
|
|
59
|
-
gate: pe_approved
|
|
60
|
-
|
|
61
|
-
# Phase 3: Deploy with Feature Flag (Agentic)
|
|
62
|
-
deploy:
|
|
63
|
-
enabled: true
|
|
64
|
-
lead: dse
|
|
65
|
-
environment: production
|
|
66
|
-
feature_flag: true
|
|
67
|
-
gate: pe_approved_production
|
|
68
|
-
|
|
69
|
-
# Phase 4: Operate (Autonomous)
|
|
70
|
-
operate:
|
|
71
|
-
enabled: false
|
|
72
|
-
lead: dse
|
|
73
|
-
environment: production
|
|
74
|
-
security_check: true
|
|
75
|
-
performance_monitor: true
|
|
76
|
-
|
|
77
|
-
# Brownfield-specific config
|
|
78
|
-
brownfield:
|
|
79
|
-
existing_docs_path: "docs/"
|
|
80
|
-
codebase_scan_on_init: true
|
|
81
|
-
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
# .tas/tas-example.yaml - Reference template cho tas.yaml ở root
|
|
2
|
+
# Copy file này ra root (tas.yaml) và điền thông tin dự án.
|
|
3
|
+
# File này CHỈ chứa flow và logic của TAS.
|
|
4
|
+
# Tech stack, coding conventions, build commands thuộc về CLAUDE.md.
|
|
5
|
+
|
|
6
|
+
project:
|
|
7
|
+
name: "My Project"
|
|
8
|
+
code: "PROJ" # Prefix for file naming: PROJ-Epic-001, PROJ-Feature-001, etc.
|
|
9
|
+
type: greenfield # greenfield | brownfield
|
|
10
|
+
description: "Mô tả ngắn về dự án"
|
|
11
|
+
|
|
12
|
+
# Azure DevOps integration
|
|
13
|
+
ado:
|
|
14
|
+
enabled: true # false nếu project không dùng ADO
|
|
15
|
+
organization: "https://dev.azure.com/torus-bellesoft"
|
|
16
|
+
project_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
17
|
+
|
|
18
|
+
team:
|
|
19
|
+
- name: "Nguyen Van A"
|
|
20
|
+
role: pe
|
|
21
|
+
ado_id: "nguyenvana@torus.vn"
|
|
22
|
+
- name: "Tran Van B"
|
|
23
|
+
role: se
|
|
24
|
+
ado_id: "tranvanb@torus.vn"
|
|
25
|
+
- name: "Le Van C"
|
|
26
|
+
role: dse
|
|
27
|
+
ado_id: "levanc@torus.vn"
|
|
28
|
+
|
|
29
|
+
# Flow configuration
|
|
30
|
+
workflow:
|
|
31
|
+
# Phase 0: Discovery & Design (Human-led, AI-powered)
|
|
32
|
+
discovery:
|
|
33
|
+
enabled: true
|
|
34
|
+
lead: pe
|
|
35
|
+
artifacts:
|
|
36
|
+
- prd
|
|
37
|
+
- design_spec
|
|
38
|
+
- sad
|
|
39
|
+
- adr
|
|
40
|
+
- epic
|
|
41
|
+
- feature
|
|
42
|
+
- story
|
|
43
|
+
gate: ready_for_development
|
|
44
|
+
|
|
45
|
+
# Phase 1: Develop (Orchestrated Agentic)
|
|
46
|
+
develop:
|
|
47
|
+
enabled: true
|
|
48
|
+
lead: se
|
|
49
|
+
environment: test
|
|
50
|
+
use_tdd: true
|
|
51
|
+
auto_review: true
|
|
52
|
+
|
|
53
|
+
# Phase 2: Verify (Agentic + PE Review)
|
|
54
|
+
verify:
|
|
55
|
+
enabled: true
|
|
56
|
+
lead: pe
|
|
57
|
+
environment: staging
|
|
58
|
+
auto_integration_test: true
|
|
59
|
+
gate: pe_approved
|
|
60
|
+
|
|
61
|
+
# Phase 3: Deploy with Feature Flag (Agentic)
|
|
62
|
+
deploy:
|
|
63
|
+
enabled: true
|
|
64
|
+
lead: dse
|
|
65
|
+
environment: production
|
|
66
|
+
feature_flag: true
|
|
67
|
+
gate: pe_approved_production
|
|
68
|
+
|
|
69
|
+
# Phase 4: Operate (Autonomous)
|
|
70
|
+
operate:
|
|
71
|
+
enabled: false
|
|
72
|
+
lead: dse
|
|
73
|
+
environment: production
|
|
74
|
+
security_check: true
|
|
75
|
+
performance_monitor: true
|
|
76
|
+
|
|
77
|
+
# Brownfield-specific config
|
|
78
|
+
brownfield:
|
|
79
|
+
existing_docs_path: "docs/"
|
|
80
|
+
codebase_scan_on_init: true
|
|
81
|
+
|
|
82
|
+
# Pre-commit security hook (installed via tas-kit install --security-hook=husky|native)
|
|
83
|
+
# See .tas/hooks/README.md for details
|
|
84
|
+
#
|
|
85
|
+
# 3-tier scan:
|
|
86
|
+
# Tier 1 (always): built-in regex scan for ~45 secret patterns — blocks
|
|
87
|
+
# Tier 2 (if on PATH): gitleaks / trufflehog — only runs if installed — blocks
|
|
88
|
+
# Tier 3 (opt-in, LOCAL ONLY): AI deep scan → writes docs/security-report.md;
|
|
89
|
+
# does NOT block. Use a personal Claude Code
|
|
90
|
+
# subscription (no API charges). Not for CI.
|
|
91
|
+
security:
|
|
92
|
+
pre_commit_hook: true # master switch; false to disable without uninstalling
|
|
93
|
+
external_scanner: auto # auto | gitleaks | trufflehog | none — tier 2
|
|
94
|
+
tool: claude # claude | codex | gemini | none — tier 3 AI (report-only)
|
|
95
|
+
deep_scan_on_every_commit: false # true = opt into tier 3 AI review each local commit
|
|
96
|
+
block_on: [critical, high] # severities that block commit (tier 1 & 2 only)
|
|
97
|
+
allow_bypass: true # print hint about SKIP_SECURITY_SCAN / --no-verify
|
|
98
|
+
|
|
99
|
+
# Template overrides (optional)
|
|
100
|
+
templates:
|
|
101
|
+
sad: ".tas/templates/SAD.md"
|
|
102
|
+
adr: ".tas/templates/ADR.md"
|
|
103
|
+
prd: ".tas/templates/PRD.md"
|
|
104
|
+
epic: ".tas/templates/Epic.md"
|
|
105
|
+
feature: ".tas/templates/Feature.md"
|
|
106
|
+
story: ".tas/templates/Story.md"
|
|
107
|
+
bug: ".tas/templates/Bug.md"
|
|
108
|
+
|
|
109
|
+
# Model mapping
|
|
110
|
+
models:
|
|
111
|
+
default: sonnet
|
|
112
|
+
commands:
|
|
113
|
+
tas-prd: sonnet
|
|
114
|
+
tas-design: sonnet
|
|
115
|
+
tas-sad: opus
|
|
116
|
+
tas-adr: opus
|
|
117
|
+
tas-epic: sonnet
|
|
118
|
+
tas-feature: sonnet
|
|
119
|
+
tas-story: sonnet
|
|
120
|
+
tas-dev: sonnet
|
|
121
|
+
tas-review-code: opus
|
|
122
|
+
tas-brainstorm: opus
|
|
123
|
+
tas-bug: sonnet
|
|
124
|
+
tas-verify: haiku
|
|
125
|
+
tas-status: haiku
|
|
126
|
+
tas-security-check: opus
|
package/CLAUDE-Example.md
CHANGED
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
# Project Context
|
|
2
|
-
|
|
3
|
-
## Tech Stack
|
|
4
|
-
- Backend: .NET 8, C#, Entity Framework Core
|
|
5
|
-
- Frontend: ReactJS
|
|
6
|
-
- Database: MySQL
|
|
7
|
-
- Infrastructure: AWS
|
|
8
|
-
- CI/CD: Azure DevOps Pipelines
|
|
9
|
-
|
|
10
|
-
## Conventions
|
|
11
|
-
- Branching: git-flow
|
|
12
|
-
- Commit: conventional commits
|
|
13
|
-
- Namespace: Torus.{ProjectName}.{Layer}
|
|
14
|
-
- Naming: PascalCase for classes/methods, camelCase for variables
|
|
15
|
-
- Test framework: xUnit
|
|
16
|
-
|
|
17
|
-
## Legacy Patterns to Avoid (Brownfield)
|
|
18
|
-
- Repository pattern without interface
|
|
19
|
-
- Direct SQL queries in controllers
|
|
20
|
-
|
|
21
|
-
## Mermaid Rules (AzureDevops Wiki)
|
|
22
|
-
- Always wrap with :::mermaid and :::
|
|
23
|
-
- NEVER use () in node labels, use [] instead
|
|
24
|
-
- Example: A["Web App"] --> B["API Gateway"]
|
|
25
|
-
|
|
26
|
-
## Build & Test
|
|
27
|
-
- Build: dotnet build
|
|
28
|
-
- Test: dotnet test
|
|
29
|
-
- Lint: dotnet format --verify-no-changes
|
|
30
|
-
|
|
31
|
-
## TAS Kit
|
|
32
|
-
This project uses Torus-Agentic-SDLC (TAS) kit.
|
|
33
|
-
- Flow config: root/tas.yaml
|
|
34
|
-
- Templates: .tas/templates/
|
|
35
|
-
- Generated docs: docs/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Type /tas-
|
|
46
|
-
Type /tas-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Type /
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Type /ado-
|
|
53
|
-
Type /ado-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
# Project Context
|
|
2
|
+
|
|
3
|
+
## Tech Stack
|
|
4
|
+
- Backend: .NET 8, C#, Entity Framework Core
|
|
5
|
+
- Frontend: ReactJS
|
|
6
|
+
- Database: MySQL
|
|
7
|
+
- Infrastructure: AWS
|
|
8
|
+
- CI/CD: Azure DevOps Pipelines
|
|
9
|
+
|
|
10
|
+
## Conventions
|
|
11
|
+
- Branching: git-flow
|
|
12
|
+
- Commit: conventional commits
|
|
13
|
+
- Namespace: Torus.{ProjectName}.{Layer}
|
|
14
|
+
- Naming: PascalCase for classes/methods, camelCase for variables
|
|
15
|
+
- Test framework: xUnit
|
|
16
|
+
|
|
17
|
+
## Legacy Patterns to Avoid (Brownfield)
|
|
18
|
+
- Repository pattern without interface
|
|
19
|
+
- Direct SQL queries in controllers
|
|
20
|
+
|
|
21
|
+
## Mermaid Rules (AzureDevops Wiki)
|
|
22
|
+
- Always wrap with :::mermaid and :::
|
|
23
|
+
- NEVER use () in node labels, use [] instead
|
|
24
|
+
- Example: A["Web App"] --> B["API Gateway"]
|
|
25
|
+
|
|
26
|
+
## Build & Test
|
|
27
|
+
- Build: dotnet build
|
|
28
|
+
- Test: dotnet test
|
|
29
|
+
- Lint: dotnet format --verify-no-changes
|
|
30
|
+
|
|
31
|
+
## TAS Kit
|
|
32
|
+
This project uses Torus-Agentic-SDLC (TAS) kit.
|
|
33
|
+
- Flow config: root/tas.yaml
|
|
34
|
+
- Templates: .tas/templates/
|
|
35
|
+
- Generated docs: docs/
|
|
36
|
+
- Pre-commit security hook: .tas/hooks/ (see README.md there)
|
|
37
|
+
- Config: `security:` section in tas.yaml
|
|
38
|
+
- Bypass: `SKIP_SECURITY_SCAN=1 git commit ...` or `git commit --no-verify`
|
|
39
|
+
|
|
40
|
+
## Key Rules
|
|
41
|
+
- Architecture: see docs/sad.md
|
|
42
|
+
- Decisions: see docs/adr/
|
|
43
|
+
|
|
44
|
+
## Commands
|
|
45
|
+
Type /tas-status to see current project state.
|
|
46
|
+
Type /tas-[artifact] to create or update artifacts (prd, sad, adr, epic, feature, story, design).
|
|
47
|
+
Type /tas-dev to implement a story.
|
|
48
|
+
Type /tas-verify to verify a Feature on Staging (Phase 2).
|
|
49
|
+
Type /tas-review-code, /tas-brainstorm, /tas-bug, /tas-security-check for dev workflows.
|
|
50
|
+
|
|
51
|
+
## ADO Commands
|
|
52
|
+
Type /ado-create <type> <temp-id> [--parent-id <id>] to create work item on ADO.
|
|
53
|
+
Type /ado-get <ado-id> to pull work item from ADO.
|
|
54
|
+
Type /ado-update <type> <ado-id> [--assign <n>] [--status <state>] to update on ADO.
|
|
55
|
+
Type /ado-status <ado-id> --status <state> to quick update status on ADO.
|
|
56
|
+
Type /ado-delete <type> <ado-id> to delete work item on ADO.
|
|
57
|
+
|
|
58
|
+
## ADO Prerequisites
|
|
59
|
+
- Azure CLI + azure-devops extension: az extension add --name azure-devops --upgrade
|
|
60
|
+
- Python 3.8+ with pyyaml: pip install pyyaml
|
|
61
|
+
- PAT configured in .env file: AzureDevops_Personal_AccessToken=your-pat-here
|