Skip to content

Commit cd6f565

Browse files
Alex Holmbergclaude
authored andcommitted
feat: rewrite workflow skills with --agent and cross-step retrieval
All 4 workflow skills now use --agent and teach agents to reuse ref_ids across steps via sync-ctl retrieve. Security gate in deploy pipeline uses compressed output status field instead of raw JSON parsing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d83841a commit cd6f565

4 files changed

Lines changed: 111 additions & 22 deletions

File tree

skills/workflows/syncable-deploy-pipeline.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,25 @@ sync-ctl env select <ENV_ID>
4747
### Step 2: Analyze the project
4848
4949
```bash
50-
sync-ctl analyze <PATH> --json
50+
sync-ctl analyze <PATH> --agent
5151
```
5252
53+
Save the `full_data_ref` from the analyze output — do not re-run analyze in later steps; use `sync-ctl retrieve` with this ref_id instead.
54+
5355
### Step 3: Pre-deploy security audit
5456
5557
Execute the `syncable-security-audit` workflow inline (all its steps and decision logic). **Note:** Step 2's analyze output is reused here — do not re-run analyze.
5658
57-
1. `sync-ctl security <PATH> --mode paranoid --format json`
58-
2. `sync-ctl vulnerabilities <PATH> --format json`
59+
1. `sync-ctl security <PATH> --mode paranoid --agent`
60+
2. `sync-ctl vulnerabilities <PATH> --agent`
5961
3. `sync-ctl validate <PATH>` (if IaC files exist per Step 2's analysis)
6062
61-
**CRITICAL GATE:** If the security audit finds **critical** findings:
62-
- Present all critical findings to the user
63-
- Explicitly warn: "Critical security findings detected. Deploying with these issues is not recommended."
64-
- Ask the user whether to proceed or abort
65-
- **Never deploy silently when critical findings exist**
63+
**CRITICAL GATE:** Check the security output's `status` field:
64+
- If `status` is "CRITICAL_ISSUES_FOUND": present findings to user, warn, require confirmation
65+
- If `status` is "HIGH_ISSUES_FOUND": warn but allow deployment
66+
- If `status` is "CLEAN": proceed to deploy
67+
68+
All critical findings are in the `critical_issues` array of the compressed output — no retrieval needed for the gate decision.
6669
6770
### Step 4: Deploy
6871
@@ -90,3 +93,23 @@ sync-ctl deploy status <TASK_ID> --watch
9093
- **Never deploy without the security gate.** Even if the user says "just deploy", run at least a fast security scan.
9194
- **Always confirm with the user before triggering deployment.** Show them what will be deployed, to which environment.
9295
- **Monitor deployment status** after triggering — don't fire-and-forget.
96+
97+
## Cross-Step Retrieval
98+
99+
Each step produces a `full_data_ref` in its output. You can retrieve details from any previous step at any time:
100+
101+
```bash
102+
# Check what data is available from all steps
103+
sync-ctl retrieve --list
104+
105+
# Get framework details from Step 2 (analyze)
106+
sync-ctl retrieve <analyze_ref_id> --query "section:frameworks"
107+
108+
# Get critical security findings from Step 3
109+
sync-ctl retrieve <security_ref_id> --query "severity:critical"
110+
111+
# Get vulnerability details from Step 3
112+
sync-ctl retrieve <vuln_ref_id> --query "severity:high"
113+
```
114+
115+
Do NOT re-run a command just to get more detail — use `sync-ctl retrieve` instead.

skills/workflows/syncable-iac-pipeline.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ Validate all infrastructure-as-code files in a project by chaining IaC linting w
1818
### Step 1: Analyze the project
1919

2020
```bash
21-
sync-ctl analyze <PATH> --json
21+
sync-ctl analyze <PATH> --agent
2222
```
2323

2424
Parse the output to determine:
2525
- Which IaC types exist (Dockerfile, Compose, Terraform, K8s manifests)
2626
- Whether K8s manifests are present — needed for step 3
2727

28+
Save the `full_data_ref` from the analyze output — the ref_id from this step can be reused in later steps to retrieve IaC file details without re-running analyze.
29+
2830
### Step 2: Validate IaC files
2931

3032
```bash
@@ -41,7 +43,7 @@ sync-ctl validate <PATH> --types dockerfile,compose,terraform
4143
**Decision point:** Only run if step 1 detected Kubernetes manifests or Helm charts.
4244

4345
```bash
44-
sync-ctl optimize <PATH> --full --format json
46+
sync-ctl optimize <PATH> --full --agent
4547
```
4648

4749
The `--full` flag includes kubelint security checks and helmlint validation on top of resource optimization.
@@ -62,3 +64,23 @@ Produce an IaC validation report:
6264
3. **Terraform Issues** — validation errors
6365
4. **Kubernetes Issues** — kubelint security findings and resource optimization recommendations (if step 3 ran)
6466
5. **Actionable Fixes** — which issues can be auto-fixed with `--fix`
67+
68+
## Cross-Step Retrieval
69+
70+
Each step produces a `full_data_ref` in its output. You can retrieve details from any previous step at any time:
71+
72+
```bash
73+
# Check what data is available from all steps
74+
sync-ctl retrieve --list
75+
76+
# Get framework details from Step 1 (analyze)
77+
sync-ctl retrieve <analyze_ref_id> --query "section:frameworks"
78+
79+
# Get critical security findings from Step 2
80+
sync-ctl retrieve <security_ref_id> --query "severity:critical"
81+
82+
# Get vulnerability details from Step 3
83+
sync-ctl retrieve <vuln_ref_id> --query "severity:high"
84+
```
85+
86+
Do NOT re-run a command just to get more detail — use `sync-ctl retrieve` instead.

skills/workflows/syncable-project-assessment.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,36 @@ Run a comprehensive project health check by chaining multiple Syncable CLI comma
1717
### Step 1: Analyze the project stack
1818

1919
```bash
20-
sync-ctl analyze <PATH> --json
20+
sync-ctl analyze <PATH> --agent
2121
```
2222

2323
Parse the output to understand:
2424
- What languages and frameworks are present
2525
- Whether dependencies exist (needed for steps 3 and 4)
2626
- Whether secrets-capable files exist (affects step 2 mode)
2727

28+
Save the `full_data_ref` from the analyze output — you'll use it to retrieve details without re-running analyze.
29+
2830
### Step 2: Security scan
2931

3032
```bash
31-
sync-ctl security <PATH> --mode balanced --format json
33+
sync-ctl security <PATH> --mode balanced --agent
3234
```
3335

3436
**Decision point:** If step 1 shows no config files, secrets files, or environment files, use `--mode lightning` instead of `--mode balanced` to save time.
3537

3638
### Step 3: Vulnerability scan
3739

3840
```bash
39-
sync-ctl vulnerabilities <PATH> --format json
41+
sync-ctl vulnerabilities <PATH> --agent
4042
```
4143

4244
**Decision point:** If step 1 detected no dependencies (no package.json, requirements.txt, Cargo.toml, go.mod, etc.), **skip this step entirely** and note "No dependencies detected" in the report.
4345

4446
### Step 4: Dependency audit
4547

4648
```bash
47-
sync-ctl dependencies <PATH> --licenses --format json
49+
sync-ctl dependencies <PATH> --licenses --agent
4850
```
4951

5052
**Decision point:** Same as step 3 — skip if no dependencies detected.
@@ -74,10 +76,30 @@ After all steps complete, synthesize a unified report for the user:
7476
The agent runs these commands in sequence, skipping steps based on decision points:
7577

7678
```bash
77-
sync-ctl analyze . --json
78-
sync-ctl security . --mode balanced --format json
79-
sync-ctl vulnerabilities . --format json
80-
sync-ctl dependencies . --licenses --format json
79+
sync-ctl analyze . --agent
80+
sync-ctl security . --mode balanced --agent
81+
sync-ctl vulnerabilities . --agent
82+
sync-ctl dependencies . --licenses --agent
8183
```
8284

8385
Then synthesizes the results into a single report for the user.
86+
87+
## Cross-Step Retrieval
88+
89+
Each step produces a `full_data_ref` in its output. You can retrieve details from any previous step at any time:
90+
91+
```bash
92+
# Check what data is available from all steps
93+
sync-ctl retrieve --list
94+
95+
# Get framework details from Step 1 (analyze)
96+
sync-ctl retrieve <analyze_ref_id> --query "section:frameworks"
97+
98+
# Get critical security findings from Step 2
99+
sync-ctl retrieve <security_ref_id> --query "severity:critical"
100+
101+
# Get vulnerability details from Step 3
102+
sync-ctl retrieve <vuln_ref_id> --query "severity:high"
103+
```
104+
105+
Do NOT re-run a command just to get more detail — use `sync-ctl retrieve` instead.

skills/workflows/syncable-security-audit.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,33 @@ Perform a deep, multi-layered security review suitable for pre-deployment gates
1717
### Step 1: Analyze the project
1818

1919
```bash
20-
sync-ctl analyze <PATH> --json
20+
sync-ctl analyze <PATH> --agent
2121
```
2222

2323
Parse the output to determine:
2424
- What IaC files exist (Dockerfiles, Compose, Terraform, K8s manifests) — needed for step 4
2525
- What dependencies exist — needed for step 3
2626

27+
Save the `full_data_ref` from the analyze output — you'll use it to retrieve details without re-running analyze.
28+
2729
### Step 2: Deep security scan
2830

2931
Choose mode based on context:
3032

3133
**For PR reviews / pre-merge:**
3234
```bash
33-
sync-ctl security <PATH> --mode thorough --format json
35+
sync-ctl security <PATH> --mode thorough --agent
3436
```
3537

3638
**For production deployment / compliance:**
3739
```bash
38-
sync-ctl security <PATH> --mode paranoid --format json
40+
sync-ctl security <PATH> --mode paranoid --agent
3941
```
4042

4143
### Step 3: Vulnerability scan
4244

4345
```bash
44-
sync-ctl vulnerabilities <PATH> --format json
46+
sync-ctl vulnerabilities <PATH> --agent
4547
```
4648

4749
### Step 4: IaC validation
@@ -77,3 +79,23 @@ Produce a security audit report:
7779
5. **Remediation Priority** — ordered list of actions to resolve findings
7880

7981
**If critical findings exist:** Explicitly warn the user. If this audit is part of a deploy pipeline, recommend blocking deployment until critical issues are resolved.
82+
83+
## Cross-Step Retrieval
84+
85+
Each step produces a `full_data_ref` in its output. You can retrieve details from any previous step at any time:
86+
87+
```bash
88+
# Check what data is available from all steps
89+
sync-ctl retrieve --list
90+
91+
# Get framework details from Step 1 (analyze)
92+
sync-ctl retrieve <analyze_ref_id> --query "section:frameworks"
93+
94+
# Get critical security findings from Step 2
95+
sync-ctl retrieve <security_ref_id> --query "severity:critical"
96+
97+
# Get vulnerability details from Step 3
98+
sync-ctl retrieve <vuln_ref_id> --query "severity:high"
99+
```
100+
101+
Do NOT re-run a command just to get more detail — use `sync-ctl retrieve` instead.

0 commit comments

Comments
 (0)