@jetrabbits/agentic 0.4.0 → 0.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/AGENTS.md +8 -0
- package/CHANGELOG.md +3 -0
- package/Makefile +21 -5
- package/README.md +17 -4
- package/agentic +78 -7
- package/areas/devops/ci-cd/workflows/onboard-repo.md +29 -0
- package/areas/devops/ci-cd/workflows/pipeline-debug.md +26 -0
- package/areas/devops/ci-cd/workflows/release-pipeline.md +53 -0
- package/areas/devops/database-ops/workflows/backup-verify.md +27 -0
- package/areas/devops/database-ops/workflows/db-incident.md +30 -0
- package/areas/devops/devsecops/workflows/policy-onboard.md +34 -0
- package/areas/devops/devsecops/workflows/security-scan-pipeline.md +33 -0
- package/areas/devops/infrastructure/workflows/destroy-environment.md +31 -0
- package/areas/devops/infrastructure/workflows/drift-remediation.md +29 -0
- package/areas/devops/infrastructure/workflows/module-development.md +32 -0
- package/areas/devops/infrastructure/workflows/provision-environment.md +29 -0
- package/areas/devops/kubernetes/workflows/cluster-bootstrap.md +36 -0
- package/areas/devops/kubernetes/workflows/debug-workload.md +29 -0
- package/areas/devops/kubernetes/workflows/onboard-service.md +35 -0
- package/areas/devops/kubernetes/workflows/upgrade-cluster.md +30 -0
- package/areas/devops/networking/workflows/onboard-ingress.md +27 -0
- package/areas/devops/networking/workflows/service-mesh-onboard.md +27 -0
- package/areas/devops/observability/workflows/alert-investigation.md +29 -0
- package/areas/devops/observability/workflows/observability-stack-setup.md +33 -0
- package/areas/devops/observability/workflows/onboard-service-monitoring.md +31 -0
- package/areas/devops/sre/workflows/incident-response.md +48 -0
- package/areas/devops/sre/workflows/postmortem.md +32 -0
- package/areas/devops/sre/workflows/slo-review.md +35 -1
- package/areas/software/backend/workflows/add-migration.md +33 -0
- package/areas/software/backend/workflows/create-endpoint.md +40 -0
- package/areas/software/backend/workflows/debug-issue.md +31 -0
- package/areas/software/backend/workflows/develop-epic.md +37 -0
- package/areas/software/backend/workflows/develop-feature.md +44 -0
- package/areas/software/backend/workflows/refactor-module.md +35 -0
- package/areas/software/backend/workflows/test-feature.md +30 -0
- package/areas/software/data-engineering/workflows/backfill-data.md +25 -0
- package/areas/software/data-engineering/workflows/data-quality-incident.md +31 -0
- package/areas/software/data-engineering/workflows/lineage-trace.md +25 -0
- package/areas/software/data-engineering/workflows/new-model.md +30 -0
- package/areas/software/data-engineering/workflows/schema-migration.md +29 -0
- package/areas/software/frontend/workflows/a11y-fix.md +30 -0
- package/areas/software/frontend/workflows/bundle-analyze.md +28 -0
- package/areas/software/frontend/workflows/release-prep.md +33 -0
- package/areas/software/frontend/workflows/scaffold-component.md +32 -0
- package/areas/software/frontend/workflows/visual-regression.md +32 -0
- package/areas/software/full-stack/workflows/backend-project-full-cycle.md +47 -2
- package/areas/software/full-stack/workflows/debug-issue.md +29 -0
- package/areas/software/full-stack/workflows/develop-feature.md +38 -0
- package/areas/software/full-stack/workflows/feature-implementation-flow.md +38 -0
- package/areas/software/full-stack/workflows/testing-ci-pipeline.md +30 -0
- package/areas/software/general/workflows/code-review-workflow.md +31 -0
- package/areas/software/general/workflows/development-cycle-workflow.md +38 -0
- package/areas/software/general/workflows/project-setup-workflow.md +38 -0
- package/areas/software/mlops/workflows/champion-challenger.md +29 -0
- package/areas/software/mlops/workflows/deploy-endpoint.md +30 -0
- package/areas/software/mlops/workflows/evaluate-model.md +28 -0
- package/areas/software/mlops/workflows/model-incident.md +29 -0
- package/areas/software/mlops/workflows/train-experiment.md +25 -0
- package/areas/software/mobile/workflows/crash-triage.md +28 -0
- package/areas/software/mobile/workflows/device-testing.md +27 -0
- package/areas/software/mobile/workflows/ota-update.md +25 -0
- package/areas/software/mobile/workflows/release-build.md +30 -0
- package/areas/software/mobile/workflows/store-submission.md +29 -0
- package/areas/software/platform/workflows/cost-audit.md +28 -0
- package/areas/software/platform/workflows/deploy-production.md +30 -0
- package/areas/software/platform/workflows/drift-check.md +29 -0
- package/areas/software/platform/workflows/incident-response.md +33 -0
- package/areas/software/platform/workflows/provision-env.md +36 -0
- package/areas/software/qa/workflows/flakiness-investigation.md +30 -0
- package/areas/software/qa/workflows/performance-audit.md +29 -0
- package/areas/software/qa/workflows/regression-suite.md +28 -0
- package/areas/software/qa/workflows/smoke-test.md +31 -0
- package/areas/software/qa/workflows/test-coverage-report.md +28 -0
- package/areas/software/security/workflows/compliance-report.md +27 -0
- package/areas/software/security/workflows/pen-test-sim.md +28 -0
- package/areas/software/security/workflows/secret-rotation.md +33 -2
- package/areas/software/security/workflows/security-scan.md +29 -0
- package/areas/software/security/workflows/threat-model-review.md +30 -0
- package/docs/agentic-usage.md +1 -1
- package/docs/catalog.schema.json +5 -1
- package/docs/opencode_setup.md +10 -0
- package/docs/site/README.md +15 -1
- package/docs/site/app.js +68 -0
- package/docs/site/catalog.json +74 -1
- package/docs/site/index.html +5 -1
- package/docs/site/styles.css +52 -4
- package/extensions/opencode/opencode.json +0 -1
- package/extensions/opencode/profiles/githubcopilot/opencode.json +1 -2
- package/extensions/opencode/profiles/openai/opencode.json +20 -20
- package/package.json +1 -1
- package/scripts/build_docs_catalog.py +13 -1
- package/scripts/sync_workflow_diagrams.py +199 -0
- package/extensions/opencode/plugins/sound-notification.ts +0 -13
package/AGENTS.md
CHANGED
|
@@ -63,6 +63,14 @@ Cross-cutting practices that apply to every project regardless of area.
|
|
|
63
63
|
- Apply the `product-owner` role to confirm that docs describe the user-facing behavior, acceptance criteria, and
|
|
64
64
|
operational constraints of the change.
|
|
65
65
|
|
|
66
|
+
### Versioning And Changelog
|
|
67
|
+
|
|
68
|
+
- After every completed feature, update the project version in the appropriate version source for the repository.
|
|
69
|
+
- Update `CHANGELOG.md` in the same change set with a concise user-facing summary, operational notes, and any migration
|
|
70
|
+
or rollout considerations.
|
|
71
|
+
- Do not leave feature behavior documented only in implementation notes, rollout logs, or PR text; the version and
|
|
72
|
+
changelog are part of the feature completion contract.
|
|
73
|
+
|
|
66
74
|
### MCP Memory Providers
|
|
67
75
|
|
|
68
76
|
See [MEMORY.md](MEMORY.md) for the full protocol: provider roles, Context7 usage, MemPalace session-start queries,
|
package/CHANGELOG.md
CHANGED
package/Makefile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.PHONY: help install dev test test-all test-cli test-tui test-mcp test-cross test-doctor test-markers test-opencode-plugins test-telegram-plugin test-ubuntu-blackbox test-real-agent-doctor test-real-blackbox test-real-blackbox-codex test-real-blackbox-opencode test-real-blackbox-telegram test-real-opencode-mapper test-coverage _test-coverage-steps lint fmt clean build assess-areas
|
|
1
|
+
.PHONY: help install dev test test-all test-cli test-tui test-mcp test-cross test-doctor test-markers test-opencode-plugins test-telegram-plugin test-ubuntu-blackbox test-real-agent-doctor test-real-blackbox test-real-blackbox-codex test-real-blackbox-opencode test-real-blackbox-telegram test-real-opencode-mapper test-coverage _test-coverage-steps check-no-pycache lint fmt clean build sync-diagrams assess-areas
|
|
2
2
|
|
|
3
3
|
define timed_step
|
|
4
4
|
@label='$(1)'; \
|
|
@@ -41,10 +41,12 @@ help:
|
|
|
41
41
|
" test-real-blackbox-telegram Run real OpenCode Telegram blackbox test" \
|
|
42
42
|
" test-real-opencode-mapper Run real OpenCode mapper input blackbox" \
|
|
43
43
|
" test-coverage Run traced e2e coverage for agentic" \
|
|
44
|
+
" check-no-pycache Fail if Python bytecode/cache artifacts are present" \
|
|
44
45
|
" lint Run prompt and catalog validation" \
|
|
45
46
|
" fmt Check formatting hooks placeholder" \
|
|
46
47
|
" clean Remove generated reports" \
|
|
47
48
|
" build Build generated docs catalog" \
|
|
49
|
+
" sync-diagrams Generate workflow agent interaction diagrams" \
|
|
48
50
|
" assess-areas Generate area quality scorecards"
|
|
49
51
|
|
|
50
52
|
install:
|
|
@@ -136,11 +138,21 @@ _test-coverage-steps:
|
|
|
136
138
|
$(call timed_step,test-coverage-doctor,AGENTIC_COVERAGE_TRACE_FILE="$(AGENTIC_COVERAGE_TRACE_FILE)" AGENTIC_TEST_CLI="$(CURDIR)/tests/e2e/coverage_shim.sh" bash tests/e2e/doctor.e2e.sh >/tmp/agentic-coverage-doctor.log 2>&1)
|
|
137
139
|
$(call timed_step,test-coverage-parse,bash tests/e2e/coverage_parse.sh "$(AGENTIC_COVERAGE_TRACE_FILE)")
|
|
138
140
|
|
|
141
|
+
check-no-pycache:
|
|
142
|
+
@found="$$(find . -name .git -prune -o \( -type d -name __pycache__ -o -type f \( -name '*.pyc' -o -name '*.pyo' -o -name '*.pyd' \) \) -print)"; \
|
|
143
|
+
if [ -n "$$found" ]; then \
|
|
144
|
+
printf '%s\n' "Python bytecode/cache artifacts are not allowed:"; \
|
|
145
|
+
printf '%s\n' "$$found"; \
|
|
146
|
+
exit 1; \
|
|
147
|
+
fi
|
|
148
|
+
|
|
139
149
|
lint:
|
|
140
150
|
bash -n agentic
|
|
141
|
-
python3 -m py_compile scripts/build_docs_catalog.py scripts/lint_prompts.py scripts/assess_area_quality.py
|
|
142
|
-
python3 scripts/lint_prompts.py --strict
|
|
143
|
-
python3 scripts/
|
|
151
|
+
PYTHONPYCACHEPREFIX=/tmp/agentic-pycache-check python3 -m py_compile scripts/build_docs_catalog.py scripts/lint_prompts.py scripts/assess_area_quality.py scripts/sync_workflow_diagrams.py
|
|
152
|
+
PYTHONDONTWRITEBYTECODE=1 python3 scripts/lint_prompts.py --strict
|
|
153
|
+
PYTHONDONTWRITEBYTECODE=1 python3 scripts/sync_workflow_diagrams.py --check
|
|
154
|
+
PYTHONDONTWRITEBYTECODE=1 python3 scripts/build_docs_catalog.py --validate --output /tmp/agentic-catalog-check.json
|
|
155
|
+
$(MAKE) check-no-pycache
|
|
144
156
|
|
|
145
157
|
fmt:
|
|
146
158
|
@printf '%s\n' "No formatter configured."
|
|
@@ -149,7 +161,11 @@ clean:
|
|
|
149
161
|
rm -f reports/area-quality.json reports/area-quality.md
|
|
150
162
|
|
|
151
163
|
build:
|
|
152
|
-
python3 scripts/
|
|
164
|
+
PYTHONDONTWRITEBYTECODE=1 python3 scripts/sync_workflow_diagrams.py --check
|
|
165
|
+
PYTHONDONTWRITEBYTECODE=1 python3 scripts/build_docs_catalog.py --output docs/site/catalog.json --validate
|
|
166
|
+
|
|
167
|
+
sync-diagrams:
|
|
168
|
+
python3 scripts/sync_workflow_diagrams.py
|
|
153
169
|
|
|
154
170
|
assess-areas:
|
|
155
171
|
python3 scripts/assess_area_quality.py --json-output reports/area-quality.json --markdown-output reports/area-quality.md
|
package/README.md
CHANGED
|
@@ -205,10 +205,23 @@ project/.agent/
|
|
|
205
205
|
|
|
206
206
|
### OpenCode Plugins
|
|
207
207
|
|
|
208
|
-
- `
|
|
209
|
-
response or an attachment for long output.
|
|
210
|
-
- `
|
|
211
|
-
`agentic install`/`agentic tui`. OpenCode startup never prompts or writes
|
|
208
|
+
- `Telegram Notifications`: sends Telegram notifications when an OpenCode session becomes idle, including the final
|
|
209
|
+
response or an attachment for long output. Stored internally as `telegram-notification`.
|
|
210
|
+
- `Agent Model Mapping`: maps `.opencode/agents/*.md` roles to main and fallback OpenCode models during interactive
|
|
211
|
+
`agentic install`/`agentic tui`. Stored internally as `agent-model-mapper`; OpenCode startup never prompts or writes
|
|
212
|
+
project files.
|
|
213
|
+
|
|
214
|
+
### OpenCode Model Profiles
|
|
215
|
+
|
|
216
|
+
- `OpenAI Model Profile`: applies the bundled OpenAI model mapping from `extensions/opencode/profiles/openai/`.
|
|
217
|
+
- `GitHub Copilot Model Profile`: applies the bundled GitHub Copilot model mapping from
|
|
218
|
+
`extensions/opencode/profiles/githubcopilot/`.
|
|
219
|
+
- User profiles: place `opencode.json` files under `$HOME/.config/agentic/opencode/profiles/<profile-id>/`. For
|
|
220
|
+
example, `$HOME/.config/agentic/opencode/profiles/DT/opencode.json` appears in the optional OpenCode plugin menu as
|
|
221
|
+
`DT profile`, and `$HOME/.config/agentic/opencode/profiles/GH/opencode.json` appears as `GH profile`.
|
|
222
|
+
- `none`: applies no model profile and does not copy the baseline `extensions/opencode/opencode.json` just for profile
|
|
223
|
+
selection. OpenCode MCPs, Telegram notifications, and model mapping may still create or update `.opencode/opencode.json`
|
|
224
|
+
when those options are selected.
|
|
212
225
|
|
|
213
226
|
---
|
|
214
227
|
|
package/agentic
CHANGED
|
@@ -31,6 +31,7 @@ XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
|
31
31
|
APP_CONFIG_DIR="$XDG_CONFIG_HOME/$APP_NAME"
|
|
32
32
|
APP_CONFIG_FILE="$APP_CONFIG_DIR/config"
|
|
33
33
|
OPENCODE_PLUGIN_CONFIG_FILE="$APP_CONFIG_DIR/opencode-plugins.json"
|
|
34
|
+
OPENCODE_USER_PROFILES_DIR="$HOME/.config/$APP_NAME/opencode/profiles"
|
|
34
35
|
APP_DATA_DIR="$XDG_DATA_HOME/$APP_NAME"
|
|
35
36
|
APP_REPO_DIR="$APP_DATA_DIR/repo"
|
|
36
37
|
|
|
@@ -911,7 +912,7 @@ mcp_registry_json() {
|
|
|
911
912
|
JSON
|
|
912
913
|
}
|
|
913
914
|
|
|
914
|
-
|
|
915
|
+
opencode_builtin_profile_contains() {
|
|
915
916
|
local expected="$1"
|
|
916
917
|
local profile_id
|
|
917
918
|
for profile_id in "${OPENCODE_PROFILE_IDS[@]}"; do
|
|
@@ -920,11 +921,37 @@ opencode_profile_contains() {
|
|
|
920
921
|
return 1
|
|
921
922
|
}
|
|
922
923
|
|
|
924
|
+
opencode_profile_contains() {
|
|
925
|
+
local expected="$1"
|
|
926
|
+
opencode_builtin_profile_contains "$expected" && return 0
|
|
927
|
+
[[ -f "$OPENCODE_USER_PROFILES_DIR/$expected/opencode.json" ]] && return 0
|
|
928
|
+
return 1
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
opencode_user_profile_ids() {
|
|
932
|
+
[[ -d "$OPENCODE_USER_PROFILES_DIR" ]] || return 0
|
|
933
|
+
find "$OPENCODE_USER_PROFILES_DIR" -mindepth 2 -maxdepth 2 -type f -name opencode.json -print 2>/dev/null | \
|
|
934
|
+
while IFS= read -r profile_config; do
|
|
935
|
+
basename -- "$(dirname -- "$profile_config")"
|
|
936
|
+
done | sort
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
opencode_profile_source_path() {
|
|
940
|
+
local profile_id="$1"
|
|
941
|
+
local bundled_src="$EXTENSIONS_ROOT/opencode/profiles/$profile_id/opencode.json"
|
|
942
|
+
local user_src="$OPENCODE_USER_PROFILES_DIR/$profile_id/opencode.json"
|
|
943
|
+
if [[ -f "$bundled_src" ]]; then
|
|
944
|
+
printf '%s\n' "$bundled_src"
|
|
945
|
+
return
|
|
946
|
+
fi
|
|
947
|
+
printf '%s\n' "$user_src"
|
|
948
|
+
}
|
|
949
|
+
|
|
923
950
|
opencode_profile_label() {
|
|
924
951
|
case "$1" in
|
|
925
952
|
openai) echo "OpenAI Model Profile" ;;
|
|
926
953
|
githubcopilot) echo "GitHub Copilot Model Profile" ;;
|
|
927
|
-
*) echo "$1" ;;
|
|
954
|
+
*) echo "$1 profile" ;;
|
|
928
955
|
esac
|
|
929
956
|
}
|
|
930
957
|
|
|
@@ -937,6 +964,12 @@ opencode_profile_id_from_label() {
|
|
|
937
964
|
return
|
|
938
965
|
fi
|
|
939
966
|
done
|
|
967
|
+
case "$label" in
|
|
968
|
+
*" profile")
|
|
969
|
+
printf '%s\n' "${label%" profile"}"
|
|
970
|
+
return
|
|
971
|
+
;;
|
|
972
|
+
esac
|
|
940
973
|
printf '%s\n' "$label"
|
|
941
974
|
}
|
|
942
975
|
|
|
@@ -956,6 +989,15 @@ opencode_plugin_id_from_label() {
|
|
|
956
989
|
esac
|
|
957
990
|
}
|
|
958
991
|
|
|
992
|
+
opencode_profile_is_none() {
|
|
993
|
+
local profile_id
|
|
994
|
+
profile_id="$(trim "${1:-}")"
|
|
995
|
+
case "$profile_id" in
|
|
996
|
+
""|none|None|skip|Skip|no|No) return 0 ;;
|
|
997
|
+
*) return 1 ;;
|
|
998
|
+
esac
|
|
999
|
+
}
|
|
1000
|
+
|
|
959
1001
|
selected_agent_os_contains() {
|
|
960
1002
|
local expected="$1"
|
|
961
1003
|
local agent
|
|
@@ -1597,6 +1639,7 @@ ensure_bin_dir_in_shell_path() {
|
|
|
1597
1639
|
copy_dir_contents() {
|
|
1598
1640
|
local src="$1"
|
|
1599
1641
|
local dest="$2"
|
|
1642
|
+
local skip_opencode_base_config="${3:-false}"
|
|
1600
1643
|
ensure_dir "$dest"
|
|
1601
1644
|
if [[ "$DRY_RUN" == true ]]; then
|
|
1602
1645
|
log "DRY-RUN copy managed contents $src -> $dest"
|
|
@@ -1606,7 +1649,7 @@ copy_dir_contents() {
|
|
|
1606
1649
|
|
|
1607
1650
|
local event kind value events_file
|
|
1608
1651
|
events_file="$(mktemp "${TMPDIR:-/tmp}/agentic-copy-events.XXXXXX")"
|
|
1609
|
-
python3 - "$src" "$dest" "$REPO_ROOT" "$PROJECT_DIR" "$(project_manifest_path)" "$APP_REPO_LINK" "$(app_version_label)" > "$events_file" <<'PY'
|
|
1652
|
+
python3 - "$src" "$dest" "$REPO_ROOT" "$PROJECT_DIR" "$(project_manifest_path)" "$APP_REPO_LINK" "$(app_version_label)" "$skip_opencode_base_config" > "$events_file" <<'PY'
|
|
1610
1653
|
import hashlib
|
|
1611
1654
|
import json
|
|
1612
1655
|
import re
|
|
@@ -1620,6 +1663,7 @@ project_dir = Path(sys.argv[4])
|
|
|
1620
1663
|
manifest = Path(sys.argv[5])
|
|
1621
1664
|
repo = sys.argv[6]
|
|
1622
1665
|
version = sys.argv[7]
|
|
1666
|
+
skip_opencode_base_config = sys.argv[8].lower() == "true"
|
|
1623
1667
|
|
|
1624
1668
|
|
|
1625
1669
|
def emit(kind: str, value: str) -> None:
|
|
@@ -1727,6 +1771,10 @@ for file_path in sorted(p for p in src.rglob("*") if p.is_file()):
|
|
|
1727
1771
|
rel = file_path.relative_to(src)
|
|
1728
1772
|
if str(src).endswith("/extensions/opencode") and rel.parts and rel.parts[0] == "profiles":
|
|
1729
1773
|
continue
|
|
1774
|
+
if str(src).endswith("/extensions/opencode") and skip_opencode_base_config and rel == Path("opencode.json"):
|
|
1775
|
+
continue
|
|
1776
|
+
if str(src).endswith("/extensions/opencode") and skip_opencode_base_config and rel == Path("plugins/telegram-notification.ts"):
|
|
1777
|
+
continue
|
|
1730
1778
|
target = dest_root / rel
|
|
1731
1779
|
project_rel = rel_to_project(target)
|
|
1732
1780
|
source_ref = rel_to_repo(file_path)
|
|
@@ -2397,7 +2445,8 @@ configure_opencode_profile_if_needed() {
|
|
|
2397
2445
|
fi
|
|
2398
2446
|
SELECTED_OPENCODE_PROFILE="$profile_id"
|
|
2399
2447
|
|
|
2400
|
-
local src
|
|
2448
|
+
local src
|
|
2449
|
+
src="$(opencode_profile_source_path "$profile_id")"
|
|
2401
2450
|
local dest="$PROJECT_DIR/.opencode/opencode.json"
|
|
2402
2451
|
if [[ ! -f "$src" ]]; then
|
|
2403
2452
|
warn "OpenCode profile not found: $src"
|
|
@@ -3084,6 +3133,13 @@ configure_opencode_plugins_if_needed() {
|
|
|
3084
3133
|
"$(opencode_profile_label "openai")"
|
|
3085
3134
|
"$(opencode_profile_label "githubcopilot")"
|
|
3086
3135
|
)
|
|
3136
|
+
local user_profile_id
|
|
3137
|
+
while IFS= read -r user_profile_id; do
|
|
3138
|
+
[[ -z "$user_profile_id" ]] && continue
|
|
3139
|
+
opencode_builtin_profile_contains "$user_profile_id" && continue
|
|
3140
|
+
opencode_profile_contains "$user_profile_id" || continue
|
|
3141
|
+
plugin_options+=("$(opencode_profile_label "$user_profile_id")")
|
|
3142
|
+
done < <(opencode_user_profile_ids)
|
|
3087
3143
|
local selected_plugins=()
|
|
3088
3144
|
local use_fzf_plugins=false
|
|
3089
3145
|
if fzf_available; then
|
|
@@ -3109,8 +3165,13 @@ configure_opencode_plugins_if_needed() {
|
|
|
3109
3165
|
case "$selected_plugin" in
|
|
3110
3166
|
telegram-notification|telegram-opencode-notifier) enable_telegram="y" ;;
|
|
3111
3167
|
agent-model-mapper) enable_agent_model_mapper="y" ;;
|
|
3112
|
-
|
|
3113
|
-
|
|
3168
|
+
*)
|
|
3169
|
+
local selected_profile_id
|
|
3170
|
+
selected_profile_id="$(opencode_profile_id_from_label "$selected_plugin")"
|
|
3171
|
+
if opencode_profile_contains "$selected_profile_id"; then
|
|
3172
|
+
SELECTED_OPENCODE_PROFILE="$selected_profile_id"
|
|
3173
|
+
fi
|
|
3174
|
+
;;
|
|
3114
3175
|
esac
|
|
3115
3176
|
done
|
|
3116
3177
|
|
|
@@ -3605,7 +3666,17 @@ copy_extension_for_agent() {
|
|
|
3605
3666
|
return
|
|
3606
3667
|
fi
|
|
3607
3668
|
|
|
3608
|
-
|
|
3669
|
+
local skip_opencode_base_config=false
|
|
3670
|
+
if [[ "$agent_os" == "opencode" ]]; then
|
|
3671
|
+
local profile_id="${AGENTIC_OPENCODE_PROFILE:-$SELECTED_OPENCODE_PROFILE}"
|
|
3672
|
+
if opencode_profile_is_none "$profile_id" \
|
|
3673
|
+
&& [[ "$OPENCODE_TELEGRAM_ENABLED" != "true" ]] \
|
|
3674
|
+
&& [[ "$OPENCODE_AGENT_MODEL_MAPPER_ENABLED" != "true" ]]; then
|
|
3675
|
+
skip_opencode_base_config=true
|
|
3676
|
+
fi
|
|
3677
|
+
fi
|
|
3678
|
+
|
|
3679
|
+
copy_dir_contents "$src" "$dest" "$skip_opencode_base_config"
|
|
3609
3680
|
}
|
|
3610
3681
|
|
|
3611
3682
|
copy_extensions() {
|
|
@@ -69,5 +69,34 @@ quality-gates:
|
|
|
69
69
|
- Write `docs/ci-cd.md`: stages, how to run locally, how to add a new secret
|
|
70
70
|
- **Done when:** documentation committed
|
|
71
71
|
|
|
72
|
+
## Agent Interaction Diagram
|
|
73
|
+
|
|
74
|
+
<!-- agent-diagram:start -->
|
|
75
|
+
```mermaid
|
|
76
|
+
flowchart TD
|
|
77
|
+
start(["Start /onboard-repo"])
|
|
78
|
+
role_1["devops-engineer"]
|
|
79
|
+
role_2["developer"]
|
|
80
|
+
step_1["1. Assess & Plan"]
|
|
81
|
+
step_2["2. Secrets & Environments Setup"]
|
|
82
|
+
step_3["3. Write Pipeline Config"]
|
|
83
|
+
step_4["4. First Run & Debug"]
|
|
84
|
+
step_5["5. Document"]
|
|
85
|
+
exit(["Green pipeline + staging deploy + documentation = repo onboarded."])
|
|
86
|
+
start --> step_1
|
|
87
|
+
step_1 --> step_2
|
|
88
|
+
step_2 --> step_3
|
|
89
|
+
step_3 --> step_4
|
|
90
|
+
step_4 --> step_5
|
|
91
|
+
step_5 --> exit
|
|
92
|
+
role_1 -. owns .-> step_1
|
|
93
|
+
role_1 -. owns .-> step_2
|
|
94
|
+
role_1 -. owns .-> step_3
|
|
95
|
+
role_1 -. owns .-> step_4
|
|
96
|
+
role_2 -. owns .-> step_4
|
|
97
|
+
role_1 -. owns .-> step_5
|
|
98
|
+
```
|
|
99
|
+
<!-- agent-diagram:end -->
|
|
100
|
+
|
|
72
101
|
## Exit
|
|
73
102
|
Green pipeline + staging deploy + documentation = repo onboarded.
|
|
@@ -62,5 +62,31 @@ quality-gates:
|
|
|
62
62
|
- Merge fix; confirm pipeline green on main
|
|
63
63
|
- If flaky test: add to quarantine list; file follow-up ticket with `flaky-test` label
|
|
64
64
|
|
|
65
|
+
## Agent Interaction Diagram
|
|
66
|
+
|
|
67
|
+
<!-- agent-diagram:start -->
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart TD
|
|
70
|
+
start(["Start /pipeline-debug"])
|
|
71
|
+
role_1["devops-engineer"]
|
|
72
|
+
role_2["developer"]
|
|
73
|
+
step_1["1. Classify Failure"]
|
|
74
|
+
step_2["2. Diagnose by Category"]
|
|
75
|
+
step_3["3. Fix & Verify"]
|
|
76
|
+
step_4["4. Merge & Monitor"]
|
|
77
|
+
exit(["Pipeline green + root cause documented in ticket = debug complete."])
|
|
78
|
+
start --> step_1
|
|
79
|
+
step_1 --> step_2
|
|
80
|
+
step_2 --> step_3
|
|
81
|
+
step_3 --> step_4
|
|
82
|
+
step_4 --> exit
|
|
83
|
+
role_1 -. owns .-> step_1
|
|
84
|
+
role_2 -. owns .-> step_2
|
|
85
|
+
role_1 -. owns .-> step_2
|
|
86
|
+
role_1 -. owns .-> step_3
|
|
87
|
+
role_1 -. owns .-> step_4
|
|
88
|
+
```
|
|
89
|
+
<!-- agent-diagram:end -->
|
|
90
|
+
|
|
65
91
|
## Exit
|
|
66
92
|
Pipeline green + root cause documented in ticket = debug complete.
|
|
@@ -110,6 +110,59 @@ helm upgrade --install order-service charts/order-service \
|
|
|
110
110
|
- Verify business KPIs (conversion, checkout success, error funnel).
|
|
111
111
|
- Publish deployment report with links to metrics, logs, and release artifact metadata.
|
|
112
112
|
|
|
113
|
+
## Agent Interaction Diagram
|
|
114
|
+
|
|
115
|
+
<!-- agent-diagram:start -->
|
|
116
|
+
```mermaid
|
|
117
|
+
flowchart TD
|
|
118
|
+
start(["Start /release-pipeline"])
|
|
119
|
+
role_1["team-lead"]
|
|
120
|
+
role_2["pm"]
|
|
121
|
+
role_3["developer"]
|
|
122
|
+
role_4["devops-engineer"]
|
|
123
|
+
role_5["qa"]
|
|
124
|
+
step_1["1. Release Readiness and Freeze Check"]
|
|
125
|
+
step_2["2. Database Compatibility Gate"]
|
|
126
|
+
step_3["3. Tag Release"]
|
|
127
|
+
step_4["4. CI Release Pipeline (automated) — CI system"]
|
|
128
|
+
step_5["5. Deploy Staging"]
|
|
129
|
+
step_6["6. Production Gate"]
|
|
130
|
+
step_7["7. Canary Deployment"]
|
|
131
|
+
step_8["8. Feature Flag Progression"]
|
|
132
|
+
step_9["9. Post-Deploy Validation"]
|
|
133
|
+
exit(["Release is complete when 100% traffic is healthy, post-deploy checks pass,..."])
|
|
134
|
+
start --> step_1
|
|
135
|
+
step_1 --> step_2
|
|
136
|
+
step_2 --> step_3
|
|
137
|
+
step_3 --> step_4
|
|
138
|
+
step_4 --> step_5
|
|
139
|
+
step_5 --> step_6
|
|
140
|
+
step_6 --> step_7
|
|
141
|
+
step_7 --> step_8
|
|
142
|
+
step_8 --> step_9
|
|
143
|
+
step_9 --> exit
|
|
144
|
+
role_1 -. owns .-> step_1
|
|
145
|
+
role_2 -. owns .-> step_1
|
|
146
|
+
role_3 -. owns .-> step_2
|
|
147
|
+
role_4 -. owns .-> step_2
|
|
148
|
+
role_3 -. owns .-> step_3
|
|
149
|
+
role_3 -. owns .-> step_4
|
|
150
|
+
role_4 -. owns .-> step_4
|
|
151
|
+
role_1 -. owns .-> step_4
|
|
152
|
+
role_2 -. owns .-> step_4
|
|
153
|
+
role_5 -. owns .-> step_4
|
|
154
|
+
role_4 -. owns .-> step_5
|
|
155
|
+
role_1 -. owns .-> step_6
|
|
156
|
+
role_5 -. owns .-> step_6
|
|
157
|
+
role_4 -. owns .-> step_7
|
|
158
|
+
role_3 -. owns .-> step_8
|
|
159
|
+
role_5 -. owns .-> step_8
|
|
160
|
+
role_5 -. owns .-> step_9
|
|
161
|
+
role_2 -. owns .-> step_9
|
|
162
|
+
step_9 -. iterate if blocked .-> step_1
|
|
163
|
+
```
|
|
164
|
+
<!-- agent-diagram:end -->
|
|
165
|
+
|
|
113
166
|
## Rollback
|
|
114
167
|
|
|
115
168
|
```bash
|
|
@@ -103,5 +103,32 @@ curl -X POST $SLACK_WEBHOOK \
|
|
|
103
103
|
```
|
|
104
104
|
- **If any step fails:** post failure to Slack + page on-call → P1 incident
|
|
105
105
|
|
|
106
|
+
## Agent Interaction Diagram
|
|
107
|
+
|
|
108
|
+
<!-- agent-diagram:start -->
|
|
109
|
+
```mermaid
|
|
110
|
+
flowchart TD
|
|
111
|
+
start(["Start /backup-verify"])
|
|
112
|
+
role_1["devops-engineer"]
|
|
113
|
+
step_1["1. Pre-Check: Backup Catalog"]
|
|
114
|
+
step_2["2. Provision Test Environment"]
|
|
115
|
+
step_3["3. Restore Latest Backup"]
|
|
116
|
+
step_4["4. Row Count Validation"]
|
|
117
|
+
step_5["5. Report + Cleanup"]
|
|
118
|
+
exit(["Restore successful + row counts validated + test env destroyed + report pos..."])
|
|
119
|
+
start --> step_1
|
|
120
|
+
step_1 --> step_2
|
|
121
|
+
step_2 --> step_3
|
|
122
|
+
step_3 --> step_4
|
|
123
|
+
step_4 --> step_5
|
|
124
|
+
step_5 --> exit
|
|
125
|
+
role_1 -. owns .-> step_1
|
|
126
|
+
role_1 -. owns .-> step_2
|
|
127
|
+
role_1 -. owns .-> step_3
|
|
128
|
+
role_1 -. owns .-> step_4
|
|
129
|
+
role_1 -. owns .-> step_5
|
|
130
|
+
```
|
|
131
|
+
<!-- agent-diagram:end -->
|
|
132
|
+
|
|
106
133
|
## Exit
|
|
107
134
|
Restore successful + row counts validated + test env destroyed + report posted = backup verified.
|
|
@@ -82,5 +82,35 @@ SELECT pg_terminate_backend(<pid>); -- forceful
|
|
|
82
82
|
- Root cause + fix in incident ticket
|
|
83
83
|
- If query regression: create optimization ticket for development team
|
|
84
84
|
|
|
85
|
+
## Agent Interaction Diagram
|
|
86
|
+
|
|
87
|
+
<!-- agent-diagram:start -->
|
|
88
|
+
```mermaid
|
|
89
|
+
flowchart TD
|
|
90
|
+
start(["Start /db-incident"])
|
|
91
|
+
role_1["devops-engineer"]
|
|
92
|
+
role_2["developer"]
|
|
93
|
+
step_1["1. Triage"]
|
|
94
|
+
step_2["2. Immediate Mitigation by Type"]
|
|
95
|
+
step_3["3. Root Cause"]
|
|
96
|
+
step_4["4. Fix & Verify"]
|
|
97
|
+
step_5["5. Document"]
|
|
98
|
+
exit(["Metrics normal + root cause documented = db incident resolved."])
|
|
99
|
+
start --> step_1
|
|
100
|
+
step_1 --> step_2
|
|
101
|
+
step_2 --> step_3
|
|
102
|
+
step_3 --> step_4
|
|
103
|
+
step_4 --> step_5
|
|
104
|
+
step_5 --> exit
|
|
105
|
+
role_1 -. owns .-> step_1
|
|
106
|
+
role_2 -. owns .-> step_2
|
|
107
|
+
role_1 -. owns .-> step_2
|
|
108
|
+
role_1 -. owns .-> step_3
|
|
109
|
+
role_2 -. owns .-> step_3
|
|
110
|
+
role_1 -. owns .-> step_4
|
|
111
|
+
role_1 -. owns .-> step_5
|
|
112
|
+
```
|
|
113
|
+
<!-- agent-diagram:end -->
|
|
114
|
+
|
|
85
115
|
## Exit
|
|
86
116
|
Metrics normal + root cause documented = db incident resolved.
|
|
@@ -100,5 +100,39 @@ kubectl get constraint ${POLICY} -o jsonpath='{.status.byPod}'
|
|
|
100
100
|
# metric: gatekeeper_violations_total{enforcement_action="deny"}
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
## Agent Interaction Diagram
|
|
104
|
+
|
|
105
|
+
<!-- agent-diagram:start -->
|
|
106
|
+
```mermaid
|
|
107
|
+
flowchart TD
|
|
108
|
+
start(["Start /policy-onboard"])
|
|
109
|
+
role_1["devops-engineer"]
|
|
110
|
+
role_2["developer"]
|
|
111
|
+
role_3["team-lead"]
|
|
112
|
+
step_1["1. Design Policy"]
|
|
113
|
+
step_2["2. Unit Test"]
|
|
114
|
+
step_3["3. Dryrun in Staging"]
|
|
115
|
+
step_4["4. Fix Existing Violations"]
|
|
116
|
+
step_5["5. Switch to Enforce"]
|
|
117
|
+
step_6["6. Monitor Policy Health"]
|
|
118
|
+
exit(["Policy tested + existing violations resolved + enforce mode active + monito..."])
|
|
119
|
+
start --> step_1
|
|
120
|
+
step_1 --> step_2
|
|
121
|
+
step_2 --> step_3
|
|
122
|
+
step_3 --> step_4
|
|
123
|
+
step_4 --> step_5
|
|
124
|
+
step_5 --> step_6
|
|
125
|
+
step_6 --> exit
|
|
126
|
+
role_1 -. owns .-> step_1
|
|
127
|
+
role_1 -. owns .-> step_2
|
|
128
|
+
role_1 -. owns .-> step_3
|
|
129
|
+
role_2 -. owns .-> step_4
|
|
130
|
+
role_1 -. owns .-> step_4
|
|
131
|
+
role_1 -. owns .-> step_5
|
|
132
|
+
role_3 -. owns .-> step_5
|
|
133
|
+
role_1 -. owns .-> step_6
|
|
134
|
+
```
|
|
135
|
+
<!-- agent-diagram:end -->
|
|
136
|
+
|
|
103
137
|
## Exit
|
|
104
138
|
Policy tested + existing violations resolved + enforce mode active + monitoring in place = policy onboarded.
|
|
@@ -151,5 +151,38 @@ echo "IaC: $(cat iac-scan.sarif | jq '.runs[0].results | length') findi
|
|
|
151
151
|
echo "SBOM: attached to registry"
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
## Agent Interaction Diagram
|
|
155
|
+
|
|
156
|
+
<!-- agent-diagram:start -->
|
|
157
|
+
```mermaid
|
|
158
|
+
flowchart TD
|
|
159
|
+
start(["Start /security-scan-pipeline"])
|
|
160
|
+
role_1["devops-engineer"]
|
|
161
|
+
step_1["1. Secrets Scan"]
|
|
162
|
+
step_2["2. SAST (Static Analysis)"]
|
|
163
|
+
step_3["3. Dependency CVE Scan"]
|
|
164
|
+
step_4["4. Container Image Scan"]
|
|
165
|
+
step_5["5. IaC Security Scan"]
|
|
166
|
+
step_6["6. Generate SBOM"]
|
|
167
|
+
step_7["7. Collate Report"]
|
|
168
|
+
exit(["Zero unresolved Critical/High + SBOM attached + scan report filed = securit..."])
|
|
169
|
+
start --> step_1
|
|
170
|
+
step_1 --> step_2
|
|
171
|
+
step_2 --> step_3
|
|
172
|
+
step_3 --> step_4
|
|
173
|
+
step_4 --> step_5
|
|
174
|
+
step_5 --> step_6
|
|
175
|
+
step_6 --> step_7
|
|
176
|
+
step_7 --> exit
|
|
177
|
+
role_1 -. owns .-> step_1
|
|
178
|
+
role_1 -. owns .-> step_2
|
|
179
|
+
role_1 -. owns .-> step_3
|
|
180
|
+
role_1 -. owns .-> step_4
|
|
181
|
+
role_1 -. owns .-> step_5
|
|
182
|
+
role_1 -. owns .-> step_6
|
|
183
|
+
role_1 -. owns .-> step_7
|
|
184
|
+
```
|
|
185
|
+
<!-- agent-diagram:end -->
|
|
186
|
+
|
|
154
187
|
## Exit
|
|
155
188
|
Zero unresolved Critical/High + SBOM attached + scan report filed = security scan complete.
|
|
@@ -92,5 +92,36 @@ aws dynamodb delete-item \
|
|
|
92
92
|
### 6. Document — `@devops-engineer`
|
|
93
93
|
- Record in decommission log: environment, date, approver, reason, data disposition
|
|
94
94
|
|
|
95
|
+
## Agent Interaction Diagram
|
|
96
|
+
|
|
97
|
+
<!-- agent-diagram:start -->
|
|
98
|
+
```mermaid
|
|
99
|
+
flowchart TD
|
|
100
|
+
start(["Start /destroy-environment"])
|
|
101
|
+
role_1["devops-engineer"]
|
|
102
|
+
role_2["team-lead"]
|
|
103
|
+
step_1["1. Confirm Scope"]
|
|
104
|
+
step_2["2. Approval"]
|
|
105
|
+
step_3["3. Pre-Destroy Backup"]
|
|
106
|
+
step_4["4. Ordered Teardown"]
|
|
107
|
+
step_5["5. Verify & Cleanup"]
|
|
108
|
+
step_6["6. Document"]
|
|
109
|
+
exit(["Terraform state empty + cloud console clean + documentation filed = environ..."])
|
|
110
|
+
start --> step_1
|
|
111
|
+
step_1 --> step_2
|
|
112
|
+
step_2 --> step_3
|
|
113
|
+
step_3 --> step_4
|
|
114
|
+
step_4 --> step_5
|
|
115
|
+
step_5 --> step_6
|
|
116
|
+
step_6 --> exit
|
|
117
|
+
role_1 -. owns .-> step_1
|
|
118
|
+
role_2 -. owns .-> step_2
|
|
119
|
+
role_1 -. owns .-> step_3
|
|
120
|
+
role_1 -. owns .-> step_4
|
|
121
|
+
role_1 -. owns .-> step_5
|
|
122
|
+
role_1 -. owns .-> step_6
|
|
123
|
+
```
|
|
124
|
+
<!-- agent-diagram:end -->
|
|
125
|
+
|
|
95
126
|
## Exit
|
|
96
127
|
Terraform state empty + cloud console clean + documentation filed = environment destroyed.
|
|
@@ -62,5 +62,34 @@ terraform apply remediation.plan
|
|
|
62
62
|
### 5. Report — `@devops-engineer`
|
|
63
63
|
- Update `drift-log.md` with date, resources affected, classification, action taken
|
|
64
64
|
|
|
65
|
+
## Agent Interaction Diagram
|
|
66
|
+
|
|
67
|
+
<!-- agent-diagram:start -->
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart TD
|
|
70
|
+
start(["Start /drift-remediation"])
|
|
71
|
+
role_1["devops-engineer"]
|
|
72
|
+
role_2["team-lead"]
|
|
73
|
+
step_1["1. Detect Drift"]
|
|
74
|
+
step_2["2. Classify Findings"]
|
|
75
|
+
step_3["3. Remediate (if REMEDIATE class)"]
|
|
76
|
+
step_4["4. Investigate (if INVESTIGATE class)"]
|
|
77
|
+
step_5["5. Report"]
|
|
78
|
+
exit(["All drift classified + REMEDIATE resolved + INVESTIGATE escalated = drift c..."])
|
|
79
|
+
start --> step_1
|
|
80
|
+
step_1 --> step_2
|
|
81
|
+
step_2 --> step_3
|
|
82
|
+
step_3 --> step_4
|
|
83
|
+
step_4 --> step_5
|
|
84
|
+
step_5 --> exit
|
|
85
|
+
role_1 -. owns .-> step_1
|
|
86
|
+
role_1 -. owns .-> step_2
|
|
87
|
+
role_2 -. owns .-> step_2
|
|
88
|
+
role_1 -. owns .-> step_3
|
|
89
|
+
role_1 -. owns .-> step_4
|
|
90
|
+
role_1 -. owns .-> step_5
|
|
91
|
+
```
|
|
92
|
+
<!-- agent-diagram:end -->
|
|
93
|
+
|
|
65
94
|
## Exit
|
|
66
95
|
All drift classified + REMEDIATE resolved + INVESTIGATE escalated = drift cycle complete.
|
|
@@ -97,5 +97,37 @@ git push origin modules/<module-name>/v1.0.0
|
|
|
97
97
|
# Reference in other modules: ?ref=v1.0.0 (never ?ref=main)
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
## Agent Interaction Diagram
|
|
101
|
+
|
|
102
|
+
<!-- agent-diagram:start -->
|
|
103
|
+
```mermaid
|
|
104
|
+
flowchart TD
|
|
105
|
+
start(["Start /module-development"])
|
|
106
|
+
role_1["devops-engineer"]
|
|
107
|
+
role_2["team-lead"]
|
|
108
|
+
step_1["1. Design Interface"]
|
|
109
|
+
step_2["2. Implement Module"]
|
|
110
|
+
step_3["3. Write Examples"]
|
|
111
|
+
step_4["4. Test"]
|
|
112
|
+
step_5["5. Code Review"]
|
|
113
|
+
step_6["6. Release"]
|
|
114
|
+
exit(["Module published + examples tested + documentation complete = module released."])
|
|
115
|
+
start --> step_1
|
|
116
|
+
step_1 --> step_2
|
|
117
|
+
step_2 --> step_3
|
|
118
|
+
step_3 --> step_4
|
|
119
|
+
step_4 --> step_5
|
|
120
|
+
step_5 --> step_6
|
|
121
|
+
step_6 --> exit
|
|
122
|
+
role_1 -. owns .-> step_1
|
|
123
|
+
role_2 -. owns .-> step_1
|
|
124
|
+
role_1 -. owns .-> step_2
|
|
125
|
+
role_1 -. owns .-> step_3
|
|
126
|
+
role_1 -. owns .-> step_4
|
|
127
|
+
role_2 -. owns .-> step_5
|
|
128
|
+
role_1 -. owns .-> step_6
|
|
129
|
+
```
|
|
130
|
+
<!-- agent-diagram:end -->
|
|
131
|
+
|
|
100
132
|
## Exit
|
|
101
133
|
Module published + examples tested + documentation complete = module released.
|