agent-knowledge-cli 0.1.2__py3-none-any.whl

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.
Files changed (88) hide show
  1. agent_knowledge/__init__.py +3 -0
  2. agent_knowledge/__main__.py +3 -0
  3. agent_knowledge/assets/__init__.py +0 -0
  4. agent_knowledge/assets/claude/global.md +44 -0
  5. agent_knowledge/assets/claude/project-template.md +46 -0
  6. agent_knowledge/assets/claude/scripts/install.sh +85 -0
  7. agent_knowledge/assets/commands/doctor.md +21 -0
  8. agent_knowledge/assets/commands/global-knowledge-sync.md +27 -0
  9. agent_knowledge/assets/commands/graphify-sync.md +26 -0
  10. agent_knowledge/assets/commands/knowledge-sync.md +26 -0
  11. agent_knowledge/assets/commands/ship.md +29 -0
  12. agent_knowledge/assets/rules/generate-architecture-doc.mdc +87 -0
  13. agent_knowledge/assets/rules/history-backfill.mdc +67 -0
  14. agent_knowledge/assets/rules/memory-bootstrap.mdc +53 -0
  15. agent_knowledge/assets/rules/memory-writeback.mdc +90 -0
  16. agent_knowledge/assets/rules/shared-memory.mdc +102 -0
  17. agent_knowledge/assets/rules/workflow-orchestration.mdc +93 -0
  18. agent_knowledge/assets/rules-global/action-first.mdc +26 -0
  19. agent_knowledge/assets/rules-global/no-icons-emojis.mdc +16 -0
  20. agent_knowledge/assets/rules-global/no-unsolicited-docs.mdc +20 -0
  21. agent_knowledge/assets/scripts/bootstrap-memory-tree.sh +389 -0
  22. agent_knowledge/assets/scripts/compact-memory.sh +191 -0
  23. agent_knowledge/assets/scripts/doctor.sh +137 -0
  24. agent_knowledge/assets/scripts/global-knowledge-sync.sh +372 -0
  25. agent_knowledge/assets/scripts/graphify-sync.sh +397 -0
  26. agent_knowledge/assets/scripts/import-agent-history.sh +706 -0
  27. agent_knowledge/assets/scripts/install-project-links.sh +258 -0
  28. agent_knowledge/assets/scripts/lib/knowledge-common.sh +875 -0
  29. agent_knowledge/assets/scripts/measure-token-savings.py +540 -0
  30. agent_knowledge/assets/scripts/ship.sh +256 -0
  31. agent_knowledge/assets/scripts/update-knowledge.sh +341 -0
  32. agent_knowledge/assets/scripts/validate-knowledge.sh +265 -0
  33. agent_knowledge/assets/skills/decision-recording/SKILL.md +124 -0
  34. agent_knowledge/assets/skills/history-backfill/SKILL.md +115 -0
  35. agent_knowledge/assets/skills/memory-compaction/SKILL.md +115 -0
  36. agent_knowledge/assets/skills/memory-management/SKILL.md +134 -0
  37. agent_knowledge/assets/skills/project-ontology-bootstrap/SKILL.md +173 -0
  38. agent_knowledge/assets/skills/session-management/SKILL.md +116 -0
  39. agent_knowledge/assets/skills-cursor/create-rule/SKILL.md +164 -0
  40. agent_knowledge/assets/skills-cursor/create-skill/SKILL.md +498 -0
  41. agent_knowledge/assets/skills-cursor/create-subagent/SKILL.md +225 -0
  42. agent_knowledge/assets/skills-cursor/migrate-to-skills/SKILL.md +134 -0
  43. agent_knowledge/assets/skills-cursor/shell/SKILL.md +24 -0
  44. agent_knowledge/assets/skills-cursor/update-cursor-settings/SKILL.md +122 -0
  45. agent_knowledge/assets/templates/dashboards/project-overview.template.md +24 -0
  46. agent_knowledge/assets/templates/dashboards/session-rollup.template.md +23 -0
  47. agent_knowledge/assets/templates/hooks/hooks.json.template +11 -0
  48. agent_knowledge/assets/templates/integrations/claude/CLAUDE.md +7 -0
  49. agent_knowledge/assets/templates/integrations/codex/AGENTS.md +7 -0
  50. agent_knowledge/assets/templates/integrations/cursor/agent-knowledge.mdc +11 -0
  51. agent_knowledge/assets/templates/integrations/cursor/hooks.json +11 -0
  52. agent_knowledge/assets/templates/memory/MEMORY.root.template.md +36 -0
  53. agent_knowledge/assets/templates/memory/branch.template.md +33 -0
  54. agent_knowledge/assets/templates/memory/decision.template.md +33 -0
  55. agent_knowledge/assets/templates/memory/profile.hybrid.yaml +16 -0
  56. agent_knowledge/assets/templates/memory/profile.ml-platform.yaml +18 -0
  57. agent_knowledge/assets/templates/memory/profile.robotics.yaml +19 -0
  58. agent_knowledge/assets/templates/memory/profile.web-app.yaml +16 -0
  59. agent_knowledge/assets/templates/portfolio/.obsidian/README.md +21 -0
  60. agent_knowledge/assets/templates/portfolio/.obsidian/app.json +5 -0
  61. agent_knowledge/assets/templates/portfolio/.obsidian/core-plugins.json +7 -0
  62. agent_knowledge/assets/templates/project/.agent-project.yaml +36 -0
  63. agent_knowledge/assets/templates/project/.agentknowledgeignore +10 -0
  64. agent_knowledge/assets/templates/project/AGENTS.md +87 -0
  65. agent_knowledge/assets/templates/project/agent-knowledge/.obsidian/README.md +23 -0
  66. agent_knowledge/assets/templates/project/agent-knowledge/.obsidian/app.json +5 -0
  67. agent_knowledge/assets/templates/project/agent-knowledge/.obsidian/core-plugins.json +7 -0
  68. agent_knowledge/assets/templates/project/agent-knowledge/Evidence/README.md +34 -0
  69. agent_knowledge/assets/templates/project/agent-knowledge/Evidence/imports/README.md +29 -0
  70. agent_knowledge/assets/templates/project/agent-knowledge/Evidence/raw/README.md +25 -0
  71. agent_knowledge/assets/templates/project/agent-knowledge/Memory/MEMORY.md +37 -0
  72. agent_knowledge/assets/templates/project/agent-knowledge/Memory/decisions/decisions.md +31 -0
  73. agent_knowledge/assets/templates/project/agent-knowledge/Outputs/README.md +24 -0
  74. agent_knowledge/assets/templates/project/agent-knowledge/STATUS.md +43 -0
  75. agent_knowledge/assets/templates/project/agent-knowledge/Sessions/README.md +21 -0
  76. agent_knowledge/assets/templates/project/agent-knowledge/Templates/README.md +19 -0
  77. agent_knowledge/assets/templates/project/gitignore.agent-knowledge +13 -0
  78. agent_knowledge/cli.py +457 -0
  79. agent_knowledge/runtime/__init__.py +0 -0
  80. agent_knowledge/runtime/integrations.py +154 -0
  81. agent_knowledge/runtime/paths.py +46 -0
  82. agent_knowledge/runtime/shell.py +22 -0
  83. agent_knowledge/runtime/sync.py +255 -0
  84. agent_knowledge_cli-0.1.2.dist-info/METADATA +155 -0
  85. agent_knowledge_cli-0.1.2.dist-info/RECORD +88 -0
  86. agent_knowledge_cli-0.1.2.dist-info/WHEEL +4 -0
  87. agent_knowledge_cli-0.1.2.dist-info/entry_points.txt +2 -0
  88. agent_knowledge_cli-0.1.2.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,397 @@
1
+ #!/bin/bash
2
+ #
3
+ # Optional structural evidence sync for graph-style discovery outputs.
4
+ #
5
+
6
+ set -euo pipefail
7
+
8
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
9
+ # shellcheck source=/dev/null
10
+ . "$SCRIPT_DIR/lib/knowledge-common.sh"
11
+
12
+ usage() {
13
+ cat <<'EOF'
14
+ Usage:
15
+ scripts/graphify-sync.sh [project-dir]
16
+ scripts/graphify-sync.sh --project <dir> [--source <path>] [--dry-run] [--json] [--summary-file <file>]
17
+ EOF
18
+ }
19
+
20
+ TARGET_PROJECT_ARG="."
21
+ SOURCE_OVERRIDE=""
22
+ POSITIONAL=()
23
+ SCANNED=()
24
+ IMPORTED=()
25
+ OUTPUTS_GENERATED=()
26
+ CACHED=()
27
+ SKIPPED=()
28
+ WARNINGS=()
29
+ GENERATED_AT="$(kc_now_utc)"
30
+
31
+ while [ "$#" -gt 0 ]; do
32
+ if kc_parse_common_flag "$@" ; then
33
+ shift
34
+ continue
35
+ fi
36
+ flag_status=$?
37
+ if [ "$flag_status" -eq 2 ]; then
38
+ shift 2
39
+ continue
40
+ fi
41
+
42
+ case "$1" in
43
+ --project)
44
+ TARGET_PROJECT_ARG="${2:-.}"
45
+ shift 2
46
+ ;;
47
+ --source)
48
+ SOURCE_OVERRIDE="${2:-}"
49
+ shift 2
50
+ ;;
51
+ *)
52
+ POSITIONAL+=("$1")
53
+ shift
54
+ ;;
55
+ esac
56
+ done
57
+
58
+ if [ "$SHOW_HELP" -eq 1 ]; then
59
+ usage
60
+ exit 0
61
+ fi
62
+
63
+ if [ ${#POSITIONAL[@]} -ge 1 ]; then
64
+ TARGET_PROJECT_ARG="${POSITIONAL[0]}"
65
+ fi
66
+
67
+ kc_load_project_context "$TARGET_PROJECT_ARG"
68
+ kc_require_knowledge_pointer
69
+
70
+ GRAPHIFY_EVIDENCE_DIR="$EVIDENCE_IMPORTS_DIR/graphify"
71
+ GRAPHIFY_OUTPUTS_DIR="$OUTPUTS_DIR/graphify"
72
+
73
+ kc_ensure_dir "$GRAPHIFY_EVIDENCE_DIR" "agent-knowledge/Evidence/imports/graphify"
74
+ kc_ensure_dir "$GRAPHIFY_OUTPUTS_DIR" "agent-knowledge/Outputs/graphify"
75
+ kc_ensure_dir "$EVIDENCE_CACHE_DIR" "agent-knowledge/Evidence/.cache"
76
+
77
+ normalize_source() {
78
+ local path="$1"
79
+ kc_resolve_relative "$TARGET_PROJECT" "$path"
80
+ }
81
+
82
+ project_relpath() {
83
+ local abs="$1"
84
+ case "$abs" in
85
+ "$TARGET_PROJECT"/*)
86
+ printf '%s\n' "${abs#$TARGET_PROJECT/}"
87
+ ;;
88
+ *)
89
+ printf '%s\n' "$abs"
90
+ ;;
91
+ esac
92
+ }
93
+
94
+ safe_graphify_artifact() {
95
+ local path="$1"
96
+ case "$path" in
97
+ *.json|*.md|*.txt|*.yaml|*.yml|*.csv|*.dot|*.mermaid|*.mmd)
98
+ return 0
99
+ ;;
100
+ *)
101
+ return 1
102
+ ;;
103
+ esac
104
+ }
105
+
106
+ candidate_sources() {
107
+ local candidate=""
108
+ local normalized=""
109
+ local rel=""
110
+
111
+ if [ -n "$SOURCE_OVERRIDE" ]; then
112
+ normalized="$(normalize_source "$SOURCE_OVERRIDE")"
113
+ [ -e "$normalized" ] && printf '%s\n' "$normalized"
114
+ fi
115
+
116
+ if [ -n "${GRAPHIFY_EXPORT_DIR:-}" ]; then
117
+ normalized="$(normalize_source "$GRAPHIFY_EXPORT_DIR")"
118
+ [ -e "$normalized" ] && printf '%s\n' "$normalized"
119
+ fi
120
+
121
+ for candidate in \
122
+ .graphify \
123
+ graphify \
124
+ graphify-output \
125
+ graphify-report.json \
126
+ graphify-report.md \
127
+ graphify-report.txt \
128
+ structural-graph.json \
129
+ graph.json \
130
+ graph/report.json \
131
+ graph/report.md \
132
+ graph/report.txt \
133
+ codegraph.json \
134
+ codegraph; do
135
+ normalized="$TARGET_PROJECT/$candidate"
136
+ [ -e "$normalized" ] || continue
137
+ rel="$(project_relpath "$normalized")"
138
+ if kc_path_is_ignored "$rel"; then
139
+ SKIPPED+=("$rel")
140
+ continue
141
+ fi
142
+ printf '%s\n' "$normalized"
143
+ done
144
+ }
145
+
146
+ import_graph_artifact() {
147
+ local src="$1"
148
+ local rel_src="$2"
149
+ local dst="$GRAPHIFY_EVIDENCE_DIR/$rel_src"
150
+ local meta_dst="$dst.meta.json"
151
+ local signature=""
152
+ local changed=0
153
+
154
+ signature="$(kc_signature_from_paths "$src")"
155
+ if kc_cache_is_current "graphify-import" "$rel_src" "$signature" "$dst" "$meta_dst"; then
156
+ CACHED+=("agent-knowledge/Evidence/imports/graphify/$rel_src")
157
+ return 0
158
+ fi
159
+
160
+ kc_copy_file "$src" "$dst" "agent-knowledge/Evidence/imports/graphify/$rel_src"
161
+ case "$KC_LAST_ACTION" in
162
+ created|updated|would-create|would-update)
163
+ changed=1
164
+ ;;
165
+ esac
166
+
167
+ kc_write_metadata_json "$meta_dst" "agent-knowledge/Evidence/imports/graphify/$rel_src.meta.json" "$rel_src" "graph-artifact" "EXTRACTED" "$GENERATED_AT" "$rel_src" "Imported machine-generated structural artifact. Review before promoting any claim into Memory."
168
+ case "$KC_LAST_ACTION" in
169
+ created|updated|would-create|would-update)
170
+ changed=1
171
+ ;;
172
+ esac
173
+
174
+ kc_cache_store "graphify-import" "$rel_src" "$signature"
175
+
176
+ if [ "$changed" -eq 1 ]; then
177
+ IMPORTED+=("agent-knowledge/Evidence/imports/graphify/$rel_src")
178
+ fi
179
+ }
180
+
181
+ capture_graphify_note() {
182
+ local key="$1"
183
+ local dst="$2"
184
+ local label="$3"
185
+ local bucket="$4"
186
+ local signature="$5"
187
+ local changed=0
188
+ local tmp_file
189
+
190
+ if kc_cache_is_current "graphify-note" "$key" "$signature" "$dst"; then
191
+ CACHED+=("$label")
192
+ return 0
193
+ fi
194
+
195
+ tmp_file="$(mktemp)"
196
+ cat > "$tmp_file"
197
+ kc_apply_temp_file "$tmp_file" "$dst" "$label"
198
+ case "$KC_LAST_ACTION" in
199
+ created|updated|would-create|would-update)
200
+ changed=1
201
+ ;;
202
+ esac
203
+ kc_cache_store "graphify-note" "$key" "$signature"
204
+ if [ "$changed" -eq 1 ]; then
205
+ case "$bucket" in
206
+ imports)
207
+ IMPORTED+=("$label")
208
+ ;;
209
+ outputs)
210
+ OUTPUTS_GENERATED+=("$label")
211
+ ;;
212
+ esac
213
+ fi
214
+ }
215
+
216
+ GRAPHIFY_AVAILABLE=0
217
+ if command -v graphify >/dev/null 2>&1; then
218
+ GRAPHIFY_AVAILABLE=1
219
+ fi
220
+
221
+ SOURCE_CANDIDATES="$(candidate_sources | awk 'NF && !seen[$0]++ { print $0 }')"
222
+ if [ -z "$SOURCE_CANDIDATES" ]; then
223
+ if [ "$GRAPHIFY_AVAILABLE" -eq 1 ]; then
224
+ WARNINGS+=("graphify is available but no export artifacts or source override were found")
225
+ else
226
+ WARNINGS+=("graphify artifacts were not found and graphify is not installed")
227
+ fi
228
+ else
229
+ while IFS= read -r source_path; do
230
+ [ -n "$source_path" ] || continue
231
+ SCANNED+=("$source_path")
232
+ if [ -d "$source_path" ]; then
233
+ while IFS= read -r artifact; do
234
+ [ -n "$artifact" ] || continue
235
+ if ! safe_graphify_artifact "$artifact"; then
236
+ SKIPPED+=("$(project_relpath "$artifact")")
237
+ continue
238
+ fi
239
+ rel_artifact="$(project_relpath "$artifact")"
240
+ case "$artifact" in
241
+ "$TARGET_PROJECT"/*)
242
+ if kc_path_is_ignored "$rel_artifact"; then
243
+ SKIPPED+=("$rel_artifact")
244
+ continue
245
+ fi
246
+ rel_import="${rel_artifact#$(project_relpath "$source_path")/}"
247
+ ;;
248
+ *)
249
+ rel_import="${artifact#$source_path/}"
250
+ ;;
251
+ esac
252
+ import_graph_artifact "$artifact" "$rel_import"
253
+ done <<EOF
254
+ $(find "$source_path" -type f 2>/dev/null | sort)
255
+ EOF
256
+ else
257
+ if ! safe_graphify_artifact "$source_path"; then
258
+ SKIPPED+=("$(project_relpath "$source_path")")
259
+ continue
260
+ fi
261
+ import_graph_artifact "$source_path" "$(basename "$source_path")"
262
+ fi
263
+ done <<EOF
264
+ $SOURCE_CANDIDATES
265
+ EOF
266
+ fi
267
+
268
+ IMPORTED_LIST="$(printf '%s\n' "${IMPORTED[@]+"${IMPORTED[@]}"}" | awk 'NF')"
269
+ SKIPPED_LIST="$(printf '%s\n' "${SKIPPED[@]+"${SKIPPED[@]}"}" | awk 'NF')"
270
+ SUMMARY_SIGNATURE="$(kc_signature_from_lines "$(printf '%s\n---\n%s\n---\n%s\n---\n%s\n' "$SOURCE_CANDIDATES" "$IMPORTED_LIST" "$GRAPHIFY_AVAILABLE" "$SKIPPED_LIST")")"
271
+ capture_graphify_note "evidence-summary" "$GRAPHIFY_EVIDENCE_DIR/SUMMARY.md" "agent-knowledge/Evidence/imports/graphify/SUMMARY.md" "imports" "$SUMMARY_SIGNATURE" <<EOF
272
+ ---
273
+ note_type: structural-evidence
274
+ project: $PROJECT_NAME
275
+ profile: ${PROJECT_PROFILE:-unknown}
276
+ source: graphify-sync.sh
277
+ kind: graphify-summary
278
+ confidence: EXTRACTED
279
+ generated_at: $GENERATED_AT
280
+ related_paths:
281
+ $(kc_yaml_list "$(printf '%s\n' "$SOURCE_CANDIDATES" | while IFS= read -r p; do [ -n "$p" ] || continue; project_relpath "$p"; done)" 2)
282
+ notes:
283
+ - Optional machine-generated structural imports.
284
+ - Evidence only. Do not promote automatically into Memory.
285
+ tags:
286
+ - agent-knowledge
287
+ - evidence
288
+ - graphify
289
+ ---
290
+
291
+ # Graphify Evidence Summary
292
+
293
+ ## Purpose
294
+
295
+ - Index optional machine-generated structure imports for later review.
296
+
297
+ ## Current State
298
+
299
+ - Graphify command available: \`$(if [ "$GRAPHIFY_AVAILABLE" -eq 1 ]; then echo yes; else echo no; fi)\`
300
+ - Imported artifacts: \`$(printf '%s\n' "$IMPORTED_LIST" | awk 'NF { count++ } END { print count + 0 }')\`
301
+ - Cached artifacts: \`$(printf '%s\n' "${CACHED[@]+"${CACHED[@]}"}" | awk 'NF { count++ } END { print count + 0 }')\`
302
+
303
+ ## Imported Files
304
+
305
+ $(if [ -n "$IMPORTED_LIST" ]; then printf '%s\n' "$IMPORTED_LIST" | awk 'NF { sub(/^agent-knowledge\/Evidence\/imports\/graphify\//, "", $0); printf "- [%s](%s)\n", $0, $0 }'; else echo "- None."; fi)
306
+
307
+ ## Promotion Rule
308
+
309
+ - Graph exports are structural evidence first.
310
+ - Promote a claim into \`Memory/\` only after agent review confirms it is durable and useful.
311
+ EOF
312
+
313
+ capture_graphify_note "output-summary" "$GRAPHIFY_OUTPUTS_DIR/structural-summary.md" "agent-knowledge/Outputs/graphify/structural-summary.md" "outputs" "$SUMMARY_SIGNATURE" <<EOF
314
+ ---
315
+ note_type: generated-output
316
+ project: $PROJECT_NAME
317
+ profile: ${PROJECT_PROFILE:-unknown}
318
+ source: Evidence/imports/graphify/SUMMARY.md
319
+ kind: graphify-structural-summary
320
+ confidence: INFERRED
321
+ generated_at: $GENERATED_AT
322
+ related_paths:
323
+ $(kc_yaml_list "$(printf '%s\n' "$SOURCE_CANDIDATES" | while IFS= read -r p; do [ -n "$p" ] || continue; project_relpath "$p"; done)" 2)
324
+ notes:
325
+ - Derived from optional graph/discovery artifacts.
326
+ - Output only. Do not treat as durable memory without review.
327
+ tags:
328
+ - agent-knowledge
329
+ - outputs
330
+ - graphify
331
+ ---
332
+
333
+ # Graphify Structural Summary
334
+
335
+ ## Purpose
336
+
337
+ - Fast orientation note for optional graph-style discovery imports.
338
+
339
+ ## Current Signal
340
+
341
+ - Graphify command available: \`$(if [ "$GRAPHIFY_AVAILABLE" -eq 1 ]; then echo yes; else echo no; fi)\`
342
+ - Source candidates scanned: \`$(printf '%s\n' "$SOURCE_CANDIDATES" | awk 'NF { count++ } END { print count + 0 }')\`
343
+ - Imported artifacts: \`$(printf '%s\n' "$IMPORTED_LIST" | awk 'NF { count++ } END { print count + 0 }')\`
344
+
345
+ ## Evidence Location
346
+
347
+ - [../../Evidence/imports/graphify/SUMMARY.md](../../Evidence/imports/graphify/SUMMARY.md)
348
+
349
+ ## Promotion Rule
350
+
351
+ - Keep graph outputs in \`Evidence/\` or \`Outputs/\` by default.
352
+ - Promote only curated, durable conclusions into \`Memory/\`.
353
+ EOF
354
+
355
+ kc_status_load
356
+ if [ "${DRY_RUN:-0}" -eq 0 ] && { [ ${#IMPORTED[@]} -gt 0 ] || [ ${#OUTPUTS_GENERATED[@]} -gt 0 ]; }; then
357
+ STATUS_LAST_GRAPH_SYNC="$(kc_now_utc)"
358
+ fi
359
+ STATUS_WARNING_LINES="$(printf '%s\n' "${WARNINGS[@]+"${WARNINGS[@]}"}")"
360
+ kc_status_write "$STATUS_WARNING_LINES"
361
+
362
+ json_summary="{"
363
+ json_summary="$json_summary\"script\":\"graphify-sync\","
364
+ json_summary="$json_summary\"project_root\":\"$(kc_json_escape "$TARGET_PROJECT")\","
365
+ json_summary="$json_summary\"dry_run\":$(kc_json_bool "$DRY_RUN"),"
366
+ json_summary="$json_summary\"graphify_available\":$(kc_json_bool "$GRAPHIFY_AVAILABLE"),"
367
+ json_summary="$json_summary\"scanned\":$(kc_json_array "${SCANNED[@]+"${SCANNED[@]}"}"),"
368
+ json_summary="$json_summary\"imported\":$(kc_json_array "${IMPORTED[@]+"${IMPORTED[@]}"}"),"
369
+ json_summary="$json_summary\"outputs\":$(kc_json_array "${OUTPUTS_GENERATED[@]+"${OUTPUTS_GENERATED[@]}"}"),"
370
+ json_summary="$json_summary\"cached\":$(kc_json_array "${CACHED[@]+"${CACHED[@]}"}"),"
371
+ json_summary="$json_summary\"skipped\":$(kc_json_array "${SKIPPED[@]+"${SKIPPED[@]}"}"),"
372
+ json_summary="$json_summary\"warnings\":$(kc_json_array "${WARNINGS[@]+"${WARNINGS[@]}"}")"
373
+ json_summary="$json_summary}"
374
+ kc_write_json_output "$json_summary"
375
+
376
+ if [ "$JSON_MODE" -ne 1 ]; then
377
+ kc_log "Graphify sync: $TARGET_PROJECT"
378
+ if [ ${#SCANNED[@]} -gt 0 ]; then
379
+ kc_log "Scanned:"
380
+ printf ' %s\n' "${SCANNED[@]+"${SCANNED[@]}"}"
381
+ fi
382
+ if [ ${#IMPORTED[@]} -gt 0 ]; then
383
+ kc_log ""
384
+ kc_log "Imported:"
385
+ printf ' %s\n' "${IMPORTED[@]+"${IMPORTED[@]}"}"
386
+ fi
387
+ if [ ${#CACHED[@]} -gt 0 ]; then
388
+ kc_log ""
389
+ kc_log "Cached:"
390
+ printf ' %s\n' "${CACHED[@]+"${CACHED[@]}"}"
391
+ fi
392
+ if [ ${#WARNINGS[@]} -gt 0 ]; then
393
+ kc_log ""
394
+ kc_log "Warnings:"
395
+ printf ' %s\n' "${WARNINGS[@]+"${WARNINGS[@]}"}"
396
+ fi
397
+ fi