-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCRIPTS.json
More file actions
3198 lines (3198 loc) · 148 KB
/
Copy pathSCRIPTS.json
File metadata and controls
3198 lines (3198 loc) · 148 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"index": [
"add_changelog_entry.py",
"audit_docs.py",
"audit_docs.py",
"audit_json_docs.py",
"check_code_context_gate.py",
"check_ai_compiled_context.py",
"check_ai_compiled_context.py",
"check_evals.py",
"check_evals.py",
"check_pipeline_featurelist_update.py",
"check_pipeline_feature_contracts.py",
"check_pipeline_feature_contracts.py",
"check_sensitive_reference_leaks.py",
"check_sensitive_reference_leaks.py",
"check_python_syntax.py",
"check_runtime.py",
"script_runtime_gate.py",
"python_runtime.py",
"pipeline_package.py",
"ai_native_contract_dry_run.py",
"check_task.py",
"check_utf8_writes.py",
"legacy_commit_task_compatibility_wrapper.py",
"compile_pipeline_context.py",
"compile_pipeline_context.py",
"generate_installed_agent_instructions.py",
"console_summary.py",
"context_tags.py",
"context_tags.py",
"detect_project_stack.py",
"build_document_cache.py",
"build_document_cache.py",
"document_item_edit_engine.py",
"bulk_insert_document_items.py",
"insert_document_item.py",
"migrate_document_item.py",
"move_document_item.py",
"list_document_keys.py",
"check_document_list_item_duplicates.py",
"insert_document_list_item.py",
"insert_checked_document_list_item.py",
"document_list_item_edit_engine.py",
"review_document_list_candidates.py",
"json_list_doc.py",
"json_wrapper_entrypoints.py",
"smoke_json_tools.py",
"json_refresh_index.py",
"json_refresh_index.py",
"json_migrate_content.py",
"json_migrate_content.py",
"json_node_edit.py",
"json_node_edit.py",
"json_read.py",
"json_read.py",
"json_item_insert.py",
"json_item_insert.py",
"json_item_set.py",
"json_item_set.py",
"json_item_move.py",
"json_item_move.py",
"json_item_delete.py",
"json_item_delete.py",
"json_line_insert.py",
"json_line_insert.py",
"json_line_set.py",
"json_line_set.py",
"json_line_move.py",
"json_line_move.py",
"run_document_post_edit_checks.py",
"read_document_item.py",
"read_document_items_by_title.py",
"document_read_cache_engine.py",
"migrate_document_schema.py",
"document_schema_migration_engine.py",
"normalize_document_structure.py",
"document_structure_normalizer_engine.py",
"check_toolchain_health.py",
"finalize_task_check_commit_push.py",
"end_prompt_snapshot.py",
"end_prompt_snapshot.py",
"finalize_changed_files_commit_push.py",
"finalize_changed_files_commit_push.py",
"run_final_task_checks.py",
"run_final_task_checks.py",
"shared_script_parity.py",
"generate_embedded_config_payload.py",
"import_existing_project.py",
"init_branch_memory.py",
"init_task_work.py",
"grouped_task_handoff.py",
"Initialize-SocratexPipeline.py",
"Initialize-SocratexPipeline.py",
"knowledge_check.py",
"knowledge_check.py",
"knowledge_code_context.py",
"knowledge_code_context.py",
"knowledge_compile.py",
"knowledge_compile.py",
"knowledge_delete.py",
"knowledge_delete.py",
"knowledge_file_check.py",
"knowledge_file_check.py",
"knowledge_file_compile.py",
"knowledge_file_compile.py",
"knowledge_file_delete.py",
"knowledge_file_delete.py",
"knowledge_file_query.py",
"knowledge_file_query.py",
"knowledge_file_rename.py",
"knowledge_file_rename.py",
"knowledge_file_select.py",
"knowledge_file_select.py",
"knowledge_file_upsert.py",
"knowledge_file_upsert.py",
"knowledge_index.py",
"knowledge_tier_report.py",
"knowledge_tier_report.py",
"knowledge_tier_check.py",
"knowledge_tier_check.py",
"knowledge_query.py",
"knowledge_query.py",
"knowledge_rename.py",
"knowledge_rename.py",
"knowledge_select.py",
"knowledge_select.py",
"knowledge_upsert.py",
"knowledge_upsert.py",
"learn_pipeline_features.py",
"log_summary.py",
"migrate_ai_pipeline.py",
"normalize_documents.bat",
"normalize_json_files.py",
"normalize_json_files.py",
"normalize_markdown_emoji.py",
"normalize_text_files.py",
"normalize_text_files.py",
"open_pipeline_learning_issue.py",
"pipeline_bootstrap_index.py",
"pipeline_bootstrap_index.py",
"chain_runner.py",
"child_sync_smoke.py",
"context_bootstrap_load.py",
"final_runtime_gate.py",
"helper_refactor_smoke.py",
"no_legacy_shell_verification.py",
"pipeline_sweep.py",
"pipeline_sweep.py",
"source_finalization_precheck.py",
"resolve_tool_runtime.py",
"resolve_workspace_root.py",
"rebuild_ai_compiled_context.py",
"rebuild_ai_compiled_context.py",
"reinitialize_pipeline.py",
"remove_pipeline.py",
"repair_mojibake.py",
"repair_mojibake.py",
"report_pipeline_learning.py",
"run_quality_fix.py",
"run_quality_gate.py",
"run_quality_gate.py",
"run_quality_gate_contract.py",
"run_quality_gate_contract.py",
"set_directives.py",
"sync_pipeline_featurelist.py",
"sync_pipeline_featurelist.py",
"task_snapshot.py",
"task_snapshot.py",
"task_flow_audit.py",
"task_flow_audit.py",
"update_code_line_index.py",
"update_code_line_index.py",
"update_pipeline_from_link.py",
"update_pipeline_from_link.py",
"upgrade_from_reference_project.py",
"utf8_file_helpers.py",
"utf8_file_helpers.py",
"run_interactive_setup.py",
"write_utf8_file.py",
"write_utf8_file.py",
"sync_managed_pipeline_package.py",
"sync_managed_pipeline_package.py",
"read_compiled_context.py",
"read_compiled_context.py",
"tool_error_log.py",
"tool_handler.py",
"project_design_context.py",
"check_project_design_context_gate.py",
"gpt_shared_conversation_extract.py",
"gpt_conversation_archive.py"
],
"content": {
"add_changelog_entry.py": {
"path": "tools/repo/add_changelog_entry.py",
"category": "repo",
"description": "Append a factual shipped-change entry to CHANGELOG.json or CHANGELOG.md.",
"input": {
"required": [
"-Summary"
],
"optional": [
"-Feature",
"-Why",
"-Version",
"-Timestamp",
"-Path"
],
"rule": "Pass one concise summary string or a comma-separated list string; avoid shell-specific array conventions."
},
"output": {
"success": "Appends one changelog entry and prints the target feature or timestamp.",
"failure": "Throws when the changelog path is missing, the timestamp is invalid, or Summary is empty."
}
},
"audit_docs.py": {
"path": "tools/documents/audit_docs.py",
"category": "documents",
"description": "Python-first document audit entrypoint for JSON document contracts and smoke sweeps.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--strict",
"--initialized"
],
"rule": "Run from the repository root or pass --repo-root. This is the Python smoke entrypoint; broader legacy audit parity remains tracked as migration debt until all legacy-shell-only checks are ported."
},
"output": {
"success": "Runs the Python JSON document audit and prints OK when document contracts pass.",
"failure": "Exits nonzero when JSON documents, generated document cache, or checked template schema rules fail."
}
},
"audit_json_docs.py": {
"path": "tools/json/audit_json_docs.py",
"category": [
"json"
],
"description": "Validate JSON document files for parseability and repository document conventions.",
"input": {
"required": [],
"optional": [
"--repo-root"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"check_code_context_gate.py": {
"path": "tools/codebase/check_code_context_gate.py",
"category": "codebase",
"description": "Verify that required compiled code-guidance context was loaded for the current HEAD before code-changing work.",
"input": {
"required": [],
"optional": [
"-Paths",
"-MaxAgeMinutes"
],
"rule": "Run from the repository root when verifying codebase context or generated codebase indexes."
},
"output": {
"success": "Completes the codebase verification or reporting step and exits 0 when the contract is satisfied.",
"failure": "Throws or exits nonzero when required codebase context or generated codebase artifacts are missing or stale."
}
},
"check_ai_compiled_context.py": {
"path": "tools/pipeline/check_ai_compiled_context.py",
"category": "pipeline",
"description": "Python cheap check for compiled-context anchor files and bootstrap-index freshness.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--output-dir"
],
"rule": "Use for Python-first smoke sweeps when full compiled-context regeneration is not being requested."
},
"output": {
"success": "Prints OK when required compiled-context anchors exist and the bootstrap index is current.",
"failure": "Exits nonzero when compiled-context anchors are missing or the bootstrap index is stale."
}
},
"check_evals.py": {
"path": "tools/quality/check_evals.py",
"category": "quality",
"description": "Python-first checker for manual eval framework files, prompt scenarios, personas, expected behaviors, scoring docs, and result JSONs.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--eval-dir"
],
"rule": "Run from the repository root or pass --repo-root. Use --eval-dir only when checking a nonstandard eval directory."
},
"output": {
"success": "Prints OK when required eval files parse and scenario references are consistent.",
"failure": "Exits nonzero when eval files are missing, invalid JSON, or internally inconsistent."
}
},
"check_pipeline_featurelist_update.py": {
"path": "tools/repo/check_pipeline_featurelist_update.py",
"category": "repo",
"description": "Repository pipeline feature synchronization helper.",
"input": {
"required": [],
"optional": [],
"rule": "Use documented script parameters for the selected workflow."
},
"output": {
"success": "Exits 0 and prints status when the operation succeeds.",
"failure": "Throws or exits nonzero with a concrete error."
}
},
"check_pipeline_feature_contracts.py": {
"path": "tools/repo/check_pipeline_feature_contracts.py",
"category": "repo",
"description": "Python-first validator for pipeline_featurelist.json feature artifact contracts and changed pipeline-owned path coverage.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--paths"
],
"rule": "Use this Python entrypoint for source and installed-package feature contract checks. Pass changed paths for focused task verification; omit paths for a full feature contract audit."
},
"output": {
"success": "Prints the number of covered feature contracts and confirms changed pipeline paths are assigned.",
"failure": "Exits nonzero when feature contracts, required artifacts, catalog entries, managed-package coverage, or changed-path coverage fail."
}
},
"check_sensitive_reference_leaks.py": {
"path": "tools/repo/check_sensitive_reference_leaks.py",
"category": "repo",
"description": "Python-first smoke-test for private project, private domain, and private identity references before publication or pipeline sync.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--max-findings"
],
"rule": "Run without arguments from the source pipeline repository; pass --repo-root only when checking another checkout."
},
"output": {
"success": "Exits 0 when no blocked private references are found.",
"failure": "Exits nonzero and prints file, line, rule, and matched text for every blocked reference up to max findings."
}
},
"check_python_syntax.py": {
"path": "tools/quality/check_python_syntax.py",
"category": "quality",
"description": "Check Python source syntax in memory without writing bytecode cache files.",
"input": {
"required": [
"paths"
],
"optional": [
"--repo-root"
],
"rule": "Use this instead of py_compile for Python-first quality gates that must not create __pycache__ artifacts."
},
"output": {
"success": "Prints OK with the number of checked Python files.",
"failure": "Exits nonzero when a source file is missing or cannot compile."
}
},
"check_runtime.py": {
"path": "tools/quality/check_runtime.py",
"category": "quality",
"description": "Report required Python runtime availability as JSON for setup, update, and degraded-mode decisions.",
"input": {
"required": [],
"optional": [
"--root-key",
"--profile",
"--strict",
"--json"
],
"rule": "Run through the current Python runtime when setup or update needs toolchain status; set SOCRATEX_PYTHON to override discovery."
},
"output": {
"success": "Prints a JSON object with Python availability, version, executable, source, minimum/recommended version, and install hints.",
"failure": "With --strict, exits nonzero when Python 3.10+ cannot be resolved."
}
},
"script_runtime_gate.py": {
"path": "tools/quality/script_runtime_gate.py",
"category": "quality",
"description": "Python gate that fails while tracked automation still contains retired script files or canonical references to the retired command runtime.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--json",
"--write-report",
"--max-examples",
"--max-line-length",
"--skip-part"
],
"rule": "Run from the repository root or pass --repo-root. Do not pass --skip-part for final verification; it exists only for local exploratory slicing."
},
"output": {
"success": "Exits 0 and reports pass when no retired script files or canonical retired-runtime references remain.",
"failure": "Exits nonzero and reports counts, top-level ownership groups, blocked script files, and reference locations."
}
},
"python_runtime.py": {
"path": "tools/pipeline/python_runtime.py",
"category": "pipeline",
"description": "Resolve and report the required SocratexPipeline Python runtime without depending on legacy shell.",
"input": {
"required": [],
"optional": [
"--root-key",
"--search-root",
"--strict"
],
"rule": "Use before Python-first pipeline tools when runtime availability is uncertain. Set SOCRATEX_PYTHON to override discovery."
},
"output": {
"success": "Prints JSON runtime status with executable, version, source, minimum version, and install hint fields.",
"failure": "With --strict, exits nonzero when Python 3.10+ cannot be resolved."
}
},
"pipeline_package.py": {
"path": "tools/pipeline/pipeline_package.py",
"category": "pipeline",
"description": "Shared managed-package constants for Python-first update and feature-contract tooling.",
"input": {
"required": [],
"optional": [],
"rule": "Internal helper imported by Python pipeline tools; not normally invoked directly."
},
"output": {
"success": "Provides default managed package, generated, and protected path constants to Python callers.",
"failure": "Import fails when the source package is missing or Python cannot read the file."
}
},
"ai_native_contract_dry_run.py": {
"path": "tools/codebase/ai_native_contract_dry_run.py",
"category": "codebase",
"description": "Print the AI-native code contract header standard and list likely source files that should receive it in later per-system rollout passes. Dry-run only; it never edits source files.",
"input": {
"required": [],
"optional": [
"-ProjectRoot",
"-MaxCandidates"
],
"rule": "Run from a project root or pass -ProjectRoot <path>. Use the output as planning/audit evidence, not as an automatic rewrite."
},
"output": {
"success": "Prints the JSON-like comment header standard and a scored candidate file list.",
"failure": "Throws when ProjectRoot cannot be resolved."
}
},
"check_task.py": {
"path": "tools/repo/check_task.py",
"category": "repo",
"description": "Run the compact repository task check: code-context gate, normalization, bootstrap, diff, UTF-8, feature-list guard, line index, and optional docs audit.",
"input": {
"required": [],
"optional": [
"-Paths",
"-ProjectRoot",
"-Audit",
"-MarkdownEmoji",
"-NoLineIndex",
"-NoNormalize",
"-NoStat",
"-NoStatus"
],
"rule": "Use before committing changed source-pipeline files; pass -Audit for broad or document-affecting changes."
},
"output": {
"success": "Refreshes/checks selected artifacts and prints OK: task check completed.",
"failure": "Throws when any selected gate, normalizer check, bootstrap check, audit, or git check fails."
}
},
"check_utf8_writes.py": {
"path": "tools/text/check_utf8_writes.py",
"category": "text",
"description": "Scan repository text writes for unsafe encoding or newline drift.",
"input": {
"required": [],
"optional": [
"-Paths"
],
"rule": "Run from the repository root when checking or normalizing repository text files."
},
"output": {
"success": "Completes text normalization, repair, write, or check work and prints OK or the generated output.",
"failure": "Throws or exits nonzero when files cannot be read/written or check mode finds stale normalization."
}
},
"legacy_commit_task_compatibility_wrapper.py": {
"path": "tools/repo/legacy_commit_task_compatibility_wrapper.py",
"category": "repo",
"description": "Compatibility wrapper that forwards legacy commit-task calls to finalize_changed_files_commit_push.py.",
"input": {
"required": [
"-Message"
],
"optional": [
"-Paths",
"-Quality",
"-QualityCommand",
"-StrictAudit",
"-NoAudit",
"-NoPush",
"-AllowPreStaged"
],
"rule": "Use only for older automation; new flows should call finalize_changed_files_commit_push.py or finalize_task_check_commit_push.py directly."
},
"output": {
"success": "Delegates to the modern finalizer and exits 0 when it succeeds.",
"failure": "Throws when delegation or the underlying finalizer fails."
}
},
"compile_pipeline_context.py": {
"path": "tools/pipeline/compile_pipeline_context.py",
"category": "pipeline",
"description": "Python orchestration entrypoint for refreshing or checking pipeline bootstrap and AI-compiled context.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--output-dir",
"--check"
],
"rule": "Use this as the Python-first replacement for compile_pipeline_context.py during Pass 0S."
},
"output": {
"success": "Refreshes/checks pipeline bootstrap and AI-compiled context through Python tools.",
"failure": "Exits nonzero when bootstrap, compiled context generation, or compiled context check fails."
}
},
"generate_installed_agent_instructions.py": {
"path": "tools/pipeline/generate_installed_agent_instructions.py",
"category": "pipeline",
"description": "Generate installed-project AGENTS.md instructions for selected Socratex pipeline packs.",
"input": {
"required": [],
"optional": [
"-Packs",
"-OutputPath"
],
"rule": "Run from the repository root or an explicit target path when initializing, syncing, compiling, or migrating pipeline packages."
},
"output": {
"success": "Completes the pipeline operation and writes, checks, or prints the requested pipeline artifact.",
"failure": "Throws or exits nonzero when inputs are invalid, target paths are unsafe, generated artifacts are stale, or pipeline checks fail."
}
},
"console_summary.py": {
"path": "tools/diagnostics/console_summary.py",
"category": "diagnostics",
"description": "Summarize the current console log into a compact diagnostics artifact.",
"input": {
"required": [],
"optional": [
"-ConsoleLogPath",
"-OutputPath"
],
"rule": "Run from the repository root when producing diagnostics artifacts from logs or console output."
},
"output": {
"success": "Writes or prints the requested diagnostics summary.",
"failure": "Throws or exits nonzero when log inputs are missing, unreadable, or summary writing fails."
}
},
"context_tags.py": {
"path": "tools/knowledge/context_tags.py",
"category": "knowledge",
"description": "Extract normalized context tags from task text for knowledge selection and routing with Python-only tooling.",
"input": {
"required": [],
"optional": [
"text...",
"--repo-root",
"--no-defaults",
"--json",
"--as-knowledge-select-args"
],
"rule": "Run from the repository root before substantive answers or command execution when routing through compiled knowledge context."
},
"output": {
"success": "Completes the knowledge operation and prints the selected output, report, or OK status.",
"failure": "Throws or exits nonzero when source knowledge, compiled artifacts, filters, tiers, or mutation targets are invalid."
}
},
"detect_project_stack.py": {
"path": "tools/setup/detect_project_stack.py",
"category": "setup",
"description": "Detect the target project stack and emit setup hints for pipeline initialization.",
"input": {
"required": [],
"optional": [
"-TargetPath"
],
"rule": "Run from the repository root or setup target when checking host/runtime setup."
},
"output": {
"success": "Completes setup probing or configuration and prints the resulting setup status.",
"failure": "Throws or exits nonzero when runtime detection or requested setup configuration fails."
}
},
"build_document_cache.py": {
"path": "tools/documents/build_document_cache.py",
"category": "documents",
"description": "Build the structured document read cache through Python with a Python entrypoint.",
"input": {
"required": [],
"optional": [
"--repo-root",
"--output-dir",
"paths"
],
"rule": "Use during Pass 0S as the Python replacement for document cache refresh."
},
"output": {
"success": "Writes docs-tech/cache/doc_index.json or the configured output and prints the output path.",
"failure": "Exits nonzero when document cache generation fails."
}
},
"document_item_edit_engine.py": {
"path": "tools/documents/document_item_edit_engine.py",
"category": "documents",
"description": "Internal engine for inserting, moving, migrating, and reading canonical structured document content items.",
"input": {
"required": [],
"optional": [
"--position",
"--before",
"--after",
"--title",
"--content",
"--content-file",
"--item-file",
"--allow-empty",
"--replace",
"--keep-source"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"bulk_insert_document_items.py": {
"path": "tools/documents/bulk_insert_document_items.py",
"category": "documents",
"description": "Insert multiple structured document items from a payload file through the document edit engine.",
"input": {
"required": [
"-Path",
"-ItemsFile"
],
"optional": [
"-Position",
"-Before",
"-After",
"-Replace",
"-NoPostEdit"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"insert_document_item.py": {
"path": "tools/documents/insert_document_item.py",
"category": "documents",
"description": "Insert a canonical JSON document content item; routes .json paths through json_item_insert.py/json_item_set.py and legacy non-JSON structured documents through document_item_edit_engine.py.",
"input": {
"required": [
"-Path",
"-Key"
],
"optional": [
"-Title",
"-Content",
"-ContentFile",
"-ItemFile",
"-Position",
"-Before",
"-After",
"-AllowEmpty",
"-Replace",
"-NoPostEdit"
],
"rule": "Use -ContentFile or -ItemFile for multiline or quote-heavy content. For direct JSON control, use json_item_insert.py/json_item_set.py."
},
"output": {
"success": "OK from the underlying document editor.",
"failure": "Throws child editor failure with the child process exit code."
}
},
"migrate_document_item.py": {
"path": "tools/documents/migrate_document_item.py",
"category": "documents",
"description": "Move or copy one structured document item from a source document to a target document.",
"input": {
"required": [
"-Source",
"-Target",
"-Key"
],
"optional": [
"-Position",
"-Before",
"-After",
"-KeepSource",
"-Replace",
"-NoPostEdit"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"move_document_item.py": {
"path": "tools/documents/move_document_item.py",
"category": "documents",
"description": "Move an item within a structured document while preserving document ordering rules.",
"input": {
"required": [
"-Path",
"-Key"
],
"optional": [
"-Position",
"-Before",
"-After",
"-NoPostEdit"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"list_document_keys.py": {
"path": "tools/documents/list_document_keys.py",
"category": "documents",
"description": "List ordered keys from a structured document for selection and edit planning.",
"input": {
"required": [
"-Path"
],
"optional": [
"-Json"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"check_document_list_item_duplicates.py": {
"path": "tools/documents/check_document_list_item_duplicates.py",
"category": "documents",
"description": "Check whether a proposed list-document item duplicates existing title, URL, text, or search terms.",
"input": {
"required": [
"-Path"
],
"optional": [
"-Key",
"-Scope",
"-Text",
"-Url",
"-Terms",
"-Limit",
"-Json",
"-FailOnDuplicate"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"insert_document_list_item.py": {
"path": "tools/documents/insert_document_list_item.py",
"category": "documents",
"description": "Insert a validated list-document item while applying duplicate policy and title creation rules.",
"input": {
"required": [
"-Path",
"-Key",
"-Text"
],
"optional": [
"-Url",
"-DuplicateScope",
"-CreateTitle",
"-AllowDuplicate",
"-NoPostEdit"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"insert_checked_document_list_item.py": {
"path": "tools/documents/insert_checked_document_list_item.py",
"category": "documents",
"description": "Insert a list-document item and run the standard task checks around the edit.",
"input": {
"required": [
"-Path",
"-Key",
"-Text"
],
"optional": [
"-Url",
"-DuplicateScope",
"-CreateTitle",
"-AllowDuplicate",
"-Audit",
"-MarkdownEmoji",
"-NoLineIndex",
"-NoNormalize",
"-NoStat",
"-NoStatus"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"document_list_item_edit_engine.py": {
"path": "tools/documents/document_list_item_edit_engine.py",
"category": "documents",
"description": "Internal engine for duplicate checks and list-line insertion in canonical structured document content.",
"input": {
"required": [],
"optional": [
"--key",
"--scope",
"--text",
"--url",
"--terms",
"--limit",
"--json",
"--fail-on-duplicate",
"--titles",
"--allow-duplicate",
"--create-title"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"review_document_list_candidates.py": {
"path": "tools/documents/review_document_list_candidates.py",
"category": "documents",
"description": "Preview duplicate candidates for a proposed list-document insertion.",
"input": {
"required": [],
"optional": [
"-Path",
"-Key",
"-Scope",
"-Text",
"-Url",
"-Terms",
"-Limit",
"-Json",
"-FailOnDuplicate"
],
"rule": "Run from the repository root and prefer wrapper scripts over internal engines for normal document edits."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Throws or exits nonzero when paths, selectors, duplicate policy, schema rules, normalization, or post-edit checks fail."
}
},
"json_list_doc.py": {
"path": "tools/json/json_list_doc.py",
"description": "Edit and read list-style JSON source documents while preserving collection order, root indexes, full node paths, and nested list nodes.",
"input": {
"required": [],
"optional": [
"--collection",
"--position",
"--reference",
"--text",
"--value-json",
"--value-json-file",
"--value-json-stdin",
"--line",
"--field-path",
"--new-key",
"--reference-line",
"--reference-text",
"--reference-node",
"--target-path",
"--target-node",
"--replace"
],
"rule": "Use wrapper scripts for normal document edits. Use exactly one value source per insert-entry, set-entry, insert-node, or set-node call."
},
"output": {
"success": "Completes the document operation or check and prints the requested result or OK status.",
"failure": "Non-zero exit with ERROR message on stderr/stdout from the Python wrapper."
},
"category": [
"json"
]
},
"smoke_json_tools.py": {
"path": "tools/json/smoke_json_tools.py",
"description": "Smoke-test portable JSON tooling operations on temporary fixtures: read-node, set-node, insert-node-line, move-node-line, refresh-index, and migrate-content.",
"input": {
"required": [],
"optional": [],
"rule": "Run from the SocratexAI repository root after moving or changing tools/json helpers."
},
"output": {
"success": "Prints OK when all portable JSON operations behave as expected.",
"failure": "Non-zero exit with the failed child command or assertion."
},
"category": "json"
},
"json_refresh_index.py": {
"path": "tools/json/json_refresh_index.py",
"category": "json",
"description": "Python native entrypoint for json_refresh_index JSON document operations.",
"input": {
"required": [
"path"
],
"optional": [
"key",
"--collection",
"--position",
"--reference",
"--field-path",
"--line",
"--text",
"--value-json",
"--value-json-file",
"--value-json-stdin"
],
"rule": "Use this Python wrapper for direct JSON control; use file/stdin value inputs for multiline or quote-heavy JSON."
},
"output": {
"success": "Prints the requested JSON output or OK status after the document operation.",
"failure": "Exits nonzero when the path, key, node, value input, or JSON document operation is invalid."
}
},
"json_migrate_content.py": {
"path": "tools/json/json_migrate_content.py",
"category": "json",
"description": "Python native entrypoint for json_migrate_content JSON document operations.",
"input": {
"required": [
"path"
],
"optional": [
"key",
"--collection",
"--position",
"--reference",
"--field-path",
"--line",
"--text",
"--value-json",
"--value-json-file",
"--value-json-stdin"
],
"rule": "Use this Python wrapper for direct JSON control; use file/stdin value inputs for multiline or quote-heavy JSON."
},
"output": {
"success": "Prints the requested JSON output or OK status after the document operation.",
"failure": "Exits nonzero when the path, key, node, value input, or JSON document operation is invalid."
}
},
"json_node_edit.py": {
"path": "tools/json/json_node_edit.py",
"category": "json",
"description": "Python native entrypoint for json_node_edit JSON document operations.",