@yandy-r/ycc-opencode 6.1.1 → 6.2.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.
Files changed (119) hide show
  1. package/README.md +7 -3
  2. package/agents/code-researcher.md +3 -3
  3. package/agents/feature-researcher.md +1 -1
  4. package/agents/implementor.md +4 -4
  5. package/agents/pr-comment-fixer.md +1 -1
  6. package/agents/release-fix-applier.md +1 -1
  7. package/agents/review-fixer.md +1 -1
  8. package/package.json +1 -1
  9. package/shared/references/artifact-store.md +613 -0
  10. package/shared/references/branch-prep.md +2 -0
  11. package/shared/references/forge-detection.md +3 -2
  12. package/shared/references/review-artifact-format.md +13 -6
  13. package/shared/references/review-checklist.md +3 -2
  14. package/shared/references/review-dispatch.md +15 -10
  15. package/shared/references/target-capability-matrix.md +42 -6
  16. package/shared/references/visual-mode.md +19 -13
  17. package/shared/references/worktree-strategy.md +12 -8
  18. package/shared/scripts/artifact-body.sh +71 -0
  19. package/shared/scripts/artifact-store-pointer.sh +245 -0
  20. package/shared/scripts/ci-monitor.sh +9 -4
  21. package/shared/scripts/collect-linear-keys.sh +77 -0
  22. package/shared/scripts/lib/ci-classify.sh +13 -10
  23. package/shared/scripts/lib/forge.sh +13 -4
  24. package/shared/scripts/prepare-feature-branch.sh +96 -10
  25. package/shared/scripts/release-ci-monitor.sh +2 -2
  26. package/shared/scripts/report-bundle-drift.sh +1 -1
  27. package/shared/scripts/resolve-artifact-store.sh +636 -0
  28. package/shared/scripts/validate-file-paths.sh +11 -4
  29. package/skills/blueprint/SKILL.md +48 -13
  30. package/skills/clean/SKILL.md +1 -1
  31. package/skills/clean/scripts/detect-project-type.sh +2 -2
  32. package/skills/clean/scripts/generate-report.sh +34 -5
  33. package/skills/clean/scripts/validate-safety.sh +9 -6
  34. package/skills/code-report/SKILL.md +26 -14
  35. package/skills/code-report/scripts/check-prerequisites.sh +72 -12
  36. package/skills/code-report/templates/report-structure.md +1 -1
  37. package/skills/code-review/SKILL.md +68 -17
  38. package/skills/code-review/references/pr-procedure.md +28 -15
  39. package/skills/compatibility-audit/scripts/audit-target-features.sh +1 -1
  40. package/skills/deep-research/SKILL.md +28 -5
  41. package/skills/deep-research/references/completion-summary-template.md +3 -2
  42. package/skills/deep-research/scripts/validate-research.sh +8 -2
  43. package/skills/feature-research/SKILL.md +48 -25
  44. package/skills/feature-research/scripts/validate-research.sh +51 -12
  45. package/skills/feature-research/scripts/validate-spec.sh +53 -22
  46. package/skills/feature-research/templates/research-agents.md +15 -14
  47. package/skills/feature-research/templates/spec-structure.md +5 -0
  48. package/skills/formatters/scripts/apply-aliases.sh +3 -1
  49. package/skills/formatters/scripts/apply-ci.sh +3 -1
  50. package/skills/git-workflow/SKILL.md +2 -1
  51. package/skills/git-workflow/references/pr-creation.md +10 -0
  52. package/skills/git-workflow/scripts/analyze-changes.sh +21 -11
  53. package/skills/git-workflow/scripts/create-pr.sh +51 -6
  54. package/skills/git-workflow/scripts/validate-commit.sh +26 -14
  55. package/skills/hooks-workflow/scripts/verify-hooks.sh +1 -1
  56. package/skills/implement-plan/SKILL.md +35 -16
  57. package/skills/implement-plan/references/agent-task-prompt.md +8 -5
  58. package/skills/implement-plan/references/linear-sync.md +20 -0
  59. package/skills/implement-plan/references/output-formats.md +17 -2
  60. package/skills/implement-plan/references/plan-inputs.md +23 -4
  61. package/skills/implement-plan/scripts/check-prerequisites.sh +95 -49
  62. package/skills/implement-plan/scripts/parse-dependencies.sh +10 -10
  63. package/skills/init/SKILL.md +77 -42
  64. package/skills/init/references/flag-reference.md +41 -17
  65. package/skills/init/references/project-profile-heuristics.md +3 -0
  66. package/skills/init/references/template-library.md +15 -5
  67. package/skills/init/scripts/profile-project.sh +26 -0
  68. package/skills/init/scripts/render-template.py +2 -2
  69. package/skills/init/templates/AGENTS.md.tmpl +6 -0
  70. package/skills/init/templates/git/gitignore.tmpl +5 -0
  71. package/skills/orchestrate/SKILL.md +17 -2
  72. package/skills/parallel-plan/SKILL.md +14 -8
  73. package/skills/plan/SKILL.md +18 -2
  74. package/skills/plan/references/planning-tracks.md +1 -1
  75. package/skills/plan-workflow/SKILL.md +67 -32
  76. package/skills/plan-workflow/references/checkpoint-messages.md +23 -14
  77. package/skills/plan-workflow/references/plan-structure.md +1 -1
  78. package/skills/plan-workflow/references/planning-agents.md +11 -9
  79. package/skills/plan-workflow/references/research-agents-optimized.md +12 -10
  80. package/skills/plan-workflow/references/research-agents.md +11 -10
  81. package/skills/plan-workflow/scripts/check-prerequisites.sh +50 -11
  82. package/skills/plan-workflow/scripts/check-state.sh +53 -9
  83. package/skills/plan-workflow/scripts/persist-or-fail.sh +21 -7
  84. package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +28 -14
  85. package/skills/plan-workflow/scripts/validate-research-artifacts.sh +35 -10
  86. package/skills/plan-workflow/scripts/validate-shared.sh +56 -15
  87. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +48 -17
  88. package/skills/pr-autofix/SKILL.md +19 -4
  89. package/skills/pr-autofix/references/output-templates.md +3 -2
  90. package/skills/pr-autofix/scripts/fetch-pr-comments.sh +1 -2
  91. package/skills/pr-autofix/scripts/post-summary.sh +1 -2
  92. package/skills/pr-autofix/scripts/resolve-thread.sh +3 -4
  93. package/skills/prp-implement/SKILL.md +31 -16
  94. package/skills/prp-implement/references/agent-task-prompt.md +5 -2
  95. package/skills/prp-implement/references/detection.md +4 -1
  96. package/skills/prp-implement/references/linear-sync.md +25 -0
  97. package/skills/prp-implement/references/report-output.md +15 -2
  98. package/skills/prp-plan/SKILL.md +62 -30
  99. package/skills/prp-plan/references/enhanced-researchers.md +8 -9
  100. package/skills/prp-plan/scripts/validate-prp-plan.sh +42 -18
  101. package/skills/prp-pr/SKILL.md +14 -1
  102. package/skills/prp-prd/SKILL.md +21 -9
  103. package/skills/prp-spec/SKILL.md +30 -20
  104. package/skills/quick-fix/SKILL.md +6 -4
  105. package/skills/quick-review/SKILL.md +62 -25
  106. package/skills/release-model/scripts/collect-signals.sh +9 -3
  107. package/skills/releaser/scripts/publish-release.sh +6 -3
  108. package/skills/research-to-issues/SKILL.md +33 -14
  109. package/skills/research-to-issues/scripts/validate-prerequisites.sh +45 -23
  110. package/skills/research-to-issues/templates/task-issue.md +4 -0
  111. package/skills/research-to-issues/templates/tracking-issue.md +3 -0
  112. package/skills/review-fix/SKILL.md +96 -14
  113. package/skills/review-fix/references/fix-report.md +10 -10
  114. package/skills/review-fix/references/plan.md +5 -2
  115. package/skills/shared-context/SKILL.md +14 -11
  116. package/skills/visual-plan/SKILL.md +26 -8
  117. package/skills/visual-recap/SKILL.md +1 -1
  118. package/skills/write-docs/scripts/audit-documentation.sh +44 -10
  119. package/skills/write-docs/scripts/generate-doc-index.sh +10 -3
@@ -18,10 +18,22 @@ if [[ -d "docs" ]]; then
18
18
  echo "✅ \`docs/\` directory exists"
19
19
  echo ""
20
20
  echo "\`\`\`"
21
+ # Capture the full find output and trim with head on a here-string, not
22
+ # `find | head`: under pipefail an early-exiting head SIGPIPEs find once
23
+ # there are more files than the limit and errexit aborts the audit
24
+ # (YAN-1587).
21
25
  if command -v tree &> /dev/null; then
22
- tree -L 3 docs 2>/dev/null || find docs -type f -name "*.md" | head -50
26
+ tree -L 3 docs 2>/dev/null || {
27
+ doc_listing="$(find docs -type f -name "*.md" || true)"
28
+ if [[ -n "$doc_listing" ]]; then
29
+ head -n 50 <<<"$doc_listing"
30
+ fi
31
+ }
23
32
  else
24
- find docs -type f -name "*.md" 2>/dev/null | head -50
33
+ doc_listing="$(find docs -type f -name "*.md" 2>/dev/null || true)"
34
+ if [[ -n "$doc_listing" ]]; then
35
+ head -n 50 <<<"$doc_listing"
36
+ fi
25
37
  fi
26
38
  echo "\`\`\`"
27
39
  echo ""
@@ -38,7 +50,14 @@ echo ""
38
50
  echo "## README Files"
39
51
  echo ""
40
52
  readme_files=$(find . -name "README.md" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null)
41
- readme_count=$(echo "$readme_files" | grep -c "README.md" || echo "0")
53
+ # grep -c prints the count itself; exit 1 only means zero matches. Any other
54
+ # non-zero status is a real failure.
55
+ readme_count_status=0
56
+ readme_count=$(grep -c "README.md" <<<"$readme_files") || readme_count_status=$?
57
+ if [ "$readme_count_status" -gt 1 ]; then
58
+ echo "Error: Failed to count README.md files" >&2
59
+ exit "$readme_count_status"
60
+ fi
42
61
  echo "📊 **Total README.md files**: ${readme_count}"
43
62
  echo ""
44
63
  if [[ -n "$readme_files" ]]; then
@@ -59,7 +78,14 @@ echo ""
59
78
  echo "## AGENTS.md Files"
60
79
  echo ""
61
80
  claude_files=$(find . -name "AGENTS.md" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null)
62
- claude_count=$(echo "$claude_files" | grep -c "AGENTS.md" || echo "0")
81
+ # grep -c prints the count itself; exit 1 only means zero matches. Any other
82
+ # non-zero status is a real failure.
83
+ claude_count_status=0
84
+ claude_count=$(grep -c "AGENTS.md" <<<"$claude_files") || claude_count_status=$?
85
+ if [ "$claude_count_status" -gt 1 ]; then
86
+ echo "Error: Failed to count AGENTS.md files" >&2
87
+ exit "$claude_count_status"
88
+ fi
63
89
  echo "📊 **Total AGENTS.md files**: ${claude_count}"
64
90
  echo ""
65
91
  if [[ -n "$claude_files" && "$claude_count" -gt 0 ]]; then
@@ -107,10 +133,16 @@ echo "## Inline Documentation Density"
107
133
  echo ""
108
134
 
109
135
  # Check for JSDoc comments in JS/TS files
110
- js_ts_files=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null | head -100)
136
+ # Capture all of find's output, then trim with head on a here-string: a
137
+ # `find | head -100` pipeline SIGPIPEs find past 100 files and pipefail +
138
+ # errexit aborts the audit (YAN-1587).
139
+ all_js_ts_files=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null || true)
140
+ js_ts_files=$(head -n 100 <<<"$all_js_ts_files")
111
141
  if [[ -n "$js_ts_files" ]]; then
112
142
  total_js_files=$(echo "$js_ts_files" | wc -l | tr -d ' ')
113
- jsdoc_count=$(echo "$js_ts_files" | xargs grep -l "@param\|@returns\|@description" 2>/dev/null | wc -l | tr -d ' ')
143
+ # xargs exits 123 when a grep batch matches nothing; tolerate it so a
144
+ # zero-match scan reports 0 instead of aborting under errexit+pipefail.
145
+ jsdoc_count=$({ xargs grep -l "@param\|@returns\|@description" <<<"$js_ts_files" 2>/dev/null || true; } | wc -l | tr -d ' ')
114
146
  echo "### JavaScript/TypeScript"
115
147
  echo "- Files scanned: ${total_js_files}"
116
148
  echo "- Files with JSDoc: ${jsdoc_count}"
@@ -122,10 +154,11 @@ if [[ -n "$js_ts_files" ]]; then
122
154
  fi
123
155
 
124
156
  # Check for docstrings in Python files
125
- py_files=$(find . -type f -name "*.py" -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./.venv/*" 2>/dev/null | head -100)
157
+ all_py_files=$(find . -type f -name "*.py" -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./.venv/*" 2>/dev/null || true)
158
+ py_files=$(head -n 100 <<<"$all_py_files")
126
159
  if [[ -n "$py_files" ]]; then
127
160
  total_py_files=$(echo "$py_files" | wc -l | tr -d ' ')
128
- docstring_count=$(echo "$py_files" | xargs grep -l '"""' 2>/dev/null | wc -l | tr -d ' ')
161
+ docstring_count=$({ xargs grep -l '"""' <<<"$py_files" 2>/dev/null || true; } | wc -l | tr -d ' ')
129
162
  echo "### Python"
130
163
  echo "- Files scanned: ${total_py_files}"
131
164
  echo "- Files with docstrings: ${docstring_count}"
@@ -137,10 +170,11 @@ if [[ -n "$py_files" ]]; then
137
170
  fi
138
171
 
139
172
  # Check for Go doc comments
140
- go_files=$(find . -type f -name "*.go" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null | head -100)
173
+ all_go_files=$(find . -type f -name "*.go" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null || true)
174
+ go_files=$(head -n 100 <<<"$all_go_files")
141
175
  if [[ -n "$go_files" ]]; then
142
176
  total_go_files=$(echo "$go_files" | wc -l | tr -d ' ')
143
- godoc_count=$(echo "$go_files" | xargs grep -l "^// [A-Z]" 2>/dev/null | wc -l | tr -d ' ')
177
+ godoc_count=$({ xargs grep -l "^// [A-Z]" <<<"$go_files" 2>/dev/null || true; } | wc -l | tr -d ' ')
144
178
  echo "### Go"
145
179
  echo "- Files scanned: ${total_go_files}"
146
180
  echo "- Files with doc comments: ${godoc_count}"
@@ -63,8 +63,12 @@ generate_tree() {
63
63
 
64
64
  # Get recently updated files (portable across GNU/BSD)
65
65
  get_recent_files() {
66
- # Find all markdown files and get their timestamps using portable stat
67
- find "$DOCS_DIR" -type f -name "*.md" 2>/dev/null | while IFS= read -r file; do
66
+ # Find all markdown files and get their timestamps using portable stat.
67
+ # Sort into a variable and trim with head on a here-string, not
68
+ # `sort | head`: under pipefail an early-exiting head SIGPIPEs the writer
69
+ # (YAN-1587).
70
+ local stamped sorted
71
+ stamped="$(find "$DOCS_DIR" -type f -name "*.md" 2>/dev/null | while IFS= read -r file; do
68
72
  # Try GNU stat first, fallback to BSD stat
69
73
  if timestamp=$(stat -c '%Y' "$file" 2>/dev/null); then
70
74
  # GNU stat
@@ -73,7 +77,10 @@ get_recent_files() {
73
77
  # BSD stat
74
78
  echo "$timestamp $file"
75
79
  fi
76
- done | sort -rn | head -10 | while read -r timestamp file; do
80
+ done)"
81
+ [[ -n "$stamped" ]] || return 0
82
+ sorted="$(sort -rn <<<"$stamped")"
83
+ head -n 10 <<<"$sorted" | while read -r timestamp file; do
77
84
  # Format date (both GNU and BSD date support -r)
78
85
  local date
79
86
  date=$(date -d "@$timestamp" '+%Y-%m-%d' 2>/dev/null || date -r "$timestamp" '+%Y-%m-%d' 2>/dev/null)