loki-mode 6.10.0 → 6.11.1

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/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Multi-agent autonomous startup system. Triggers on "Loki Mode". Takes PRD to deployed product with minimal human intervention. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v6.10.0
6
+ # Loki Mode v6.11.1
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -267,4 +267,4 @@ The following features are documented in skill modules but not yet fully automat
267
267
  | Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
268
268
  | Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
269
269
 
270
- **v6.10.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
270
+ **v6.11.1 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.10.0
1
+ 6.11.1
package/autonomy/loki CHANGED
@@ -448,6 +448,7 @@ show_help() {
448
448
  echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
449
449
  echo " --budget USD Set cost budget limit (display in dashboard/status)"
450
450
  echo " --bmad-project PATH Use BMAD Method project artifacts as input"
451
+ echo " --openspec PATH Use OpenSpec change directory as input"
451
452
  echo ""
452
453
  echo "Options for 'run' (v6.0.0):"
453
454
  echo " --dry-run Preview generated PRD without starting"
@@ -490,6 +491,7 @@ cmd_start() {
490
491
  local prd_file=""
491
492
  local provider=""
492
493
  local bmad_project_path=""
494
+ local openspec_change_path=""
493
495
 
494
496
  while [[ $# -gt 0 ]]; do
495
497
  case "$1" in
@@ -514,6 +516,7 @@ cmd_start() {
514
516
  echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
515
517
  echo " --budget USD Cost budget limit (auto-pause when exceeded)"
516
518
  echo " --bmad-project PATH Use BMAD Method project artifacts as input"
519
+ echo " --openspec PATH Use OpenSpec change directory as input"
517
520
  echo " --yes, -y Skip confirmation prompts (auto-confirm)"
518
521
  echo ""
519
522
  echo "Environment Variables:"
@@ -529,6 +532,7 @@ cmd_start() {
529
532
  echo " loki start ./prd.md --parallel # Parallel mode with worktrees"
530
533
  echo " loki start --provider codex # Use OpenAI Codex CLI"
531
534
  echo " loki start --bmad-project ./my-project # Start from BMAD artifacts"
535
+ echo " loki start --openspec ./openspec/changes/my-feature # Start from OpenSpec change"
532
536
  echo " loki start --yes # Skip confirmation prompt"
533
537
  echo " LOKI_PRD_FILE=./prd.md loki start # PRD via env var"
534
538
  exit 0
@@ -652,6 +656,19 @@ cmd_start() {
652
656
  bmad_project_path="${1#*=}"
653
657
  shift
654
658
  ;;
659
+ --openspec)
660
+ if [[ -n "${2:-}" ]]; then
661
+ openspec_change_path="$2"
662
+ shift 2
663
+ else
664
+ echo -e "${RED}--openspec requires a path to an OpenSpec change directory${NC}"
665
+ exit 1
666
+ fi
667
+ ;;
668
+ --openspec=*)
669
+ openspec_change_path="${1#*=}"
670
+ shift
671
+ ;;
655
672
  --budget)
656
673
  if [[ -n "${2:-}" ]]; then
657
674
  if ! echo "$2" | grep -qE '^[0-9]+(\.[0-9]+)?$'; then
@@ -690,6 +707,12 @@ cmd_start() {
690
707
  prd_file="$LOKI_PRD_FILE"
691
708
  fi
692
709
 
710
+ # Mutual exclusivity: --openspec and --bmad-project cannot be used together
711
+ if [[ -n "${openspec_change_path:-}" ]] && [[ -n "${bmad_project_path:-}" ]]; then
712
+ echo -e "${RED}Error: --openspec and --bmad-project are mutually exclusive. Use one or the other.${NC}"
713
+ exit 1
714
+ fi
715
+
693
716
  # BMAD project validation and adapter execution
694
717
  if [[ -n "$bmad_project_path" ]]; then
695
718
  # Resolve to absolute path
@@ -752,6 +775,65 @@ cmd_start() {
752
775
  fi
753
776
  fi
754
777
 
778
+ # OpenSpec change directory validation and adapter execution
779
+ if [[ -n "$openspec_change_path" ]]; then
780
+ # Resolve to absolute path
781
+ if [[ ! "$openspec_change_path" = /* ]]; then
782
+ local original_openspec_path="$openspec_change_path"
783
+ openspec_change_path="$(cd "$openspec_change_path" 2>/dev/null && pwd)" || {
784
+ echo -e "${RED}Error: OpenSpec change path does not exist: $original_openspec_path${NC}"
785
+ exit 1
786
+ }
787
+ fi
788
+
789
+ # Validate path is a directory
790
+ if [[ ! -d "$openspec_change_path" ]]; then
791
+ echo -e "${RED}Error: OpenSpec change path is not a directory: $openspec_change_path${NC}"
792
+ exit 1
793
+ fi
794
+
795
+ # Check for required OpenSpec artifacts
796
+ if [[ ! -f "$openspec_change_path/proposal.md" ]]; then
797
+ echo -e "${RED}Error: No proposal.md found in $openspec_change_path${NC}"
798
+ echo "Expected an OpenSpec change directory with proposal.md and specs/."
799
+ exit 1
800
+ fi
801
+
802
+ # Export for run.sh to access
803
+ export OPENSPEC_CHANGE_PATH="$openspec_change_path"
804
+
805
+ # Ensure .loki directory exists for adapter output
806
+ mkdir -p "$LOKI_DIR"
807
+
808
+ # Run the OpenSpec adapter to normalize artifacts
809
+ echo -e "${CYAN}Running OpenSpec adapter...${NC}"
810
+ local adapter_script="${SCRIPT_DIR:-$(dirname "$0")}/openspec-adapter.py"
811
+ if [[ ! -f "$adapter_script" ]]; then
812
+ echo -e "${RED}Error: OpenSpec adapter not found at $adapter_script${NC}"
813
+ echo "Please ensure autonomy/openspec-adapter.py exists."
814
+ exit 1
815
+ fi
816
+
817
+ # Validate first
818
+ if ! python3 "$adapter_script" "$openspec_change_path" --validate; then
819
+ echo -e "${RED}Error: OpenSpec adapter validation failed. Check the change artifacts.${NC}"
820
+ exit 1
821
+ fi
822
+
823
+ # Generate output files
824
+ if ! python3 "$adapter_script" "$openspec_change_path" --output-dir "$LOKI_DIR"; then
825
+ echo -e "${RED}Error: OpenSpec adapter failed to generate output files.${NC}"
826
+ exit 1
827
+ fi
828
+ echo -e "${GREEN}OpenSpec artifacts normalized successfully.${NC}"
829
+
830
+ # If no explicit PRD was provided, use the normalized OpenSpec PRD
831
+ if [[ -z "$prd_file" ]] && [[ -f "$LOKI_DIR/openspec-prd-normalized.md" ]]; then
832
+ prd_file="$LOKI_DIR/openspec-prd-normalized.md"
833
+ echo -e "${CYAN}Using normalized OpenSpec PRD: $prd_file${NC}"
834
+ fi
835
+ fi
836
+
755
837
  if [ -n "$prd_file" ]; then
756
838
  args+=("$prd_file")
757
839
  else
@@ -11503,7 +11585,22 @@ cmd_remote() {
11503
11585
  emit_event session cli remote_start "prd=${prd_abs:-none}"
11504
11586
 
11505
11587
  # Hand off to claude remote-control
11506
- exec claude remote-control ${rc_flags[@]+"${rc_flags[@]}"}
11588
+ # Note: not using exec so we can provide guidance if it fails
11589
+ claude remote-control ${rc_flags[@]+"${rc_flags[@]}"}
11590
+ local rc_exit=$?
11591
+
11592
+ if [ $rc_exit -ne 0 ]; then
11593
+ echo ""
11594
+ echo -e "${YELLOW}Troubleshooting:${NC}"
11595
+ echo ""
11596
+ echo -e " ${CYAN}Workspace not trusted?${NC}"
11597
+ echo " Run 'claude' in this directory first to accept the trust dialog,"
11598
+ echo " then exit (/exit) and run 'loki remote' again."
11599
+ echo ""
11600
+ echo -e " ${CYAN}Not logged in?${NC}"
11601
+ echo " Run 'claude' then '/login' -- requires a Pro or Max subscription."
11602
+ exit $rc_exit
11603
+ fi
11507
11604
  }
11508
11605
 
11509
11606
  # Syslog/SIEM integration management