Skip to content

docs: add LangChain issue intake enhancement proposal#476

Merged
stranske merged 1 commit intomainfrom
docs/langchain-issue-intake-proposal
Jan 3, 2026
Merged

docs: add LangChain issue intake enhancement proposal#476
stranske merged 1 commit intomainfrom
docs/langchain-issue-intake-proposal

Conversation

@stranske
Copy link
Copy Markdown
Owner

@stranske stranske commented Jan 3, 2026

Source: Issue #4

Automated Status Summary

Scope

scripts/validate_fast.sh contains 12 TODO Phase 4 markers referencing Trend_Model_Project-specific features (SRC_FILES detection, autofix tests, coverage requirements) that are not applicable to this workflow repository. These dead code paths and stale references cause confusion and add maintenance burden.

Tasks

  • Remove all TODO Phase 4 markers and their associated dead/commented code blocks.
  • Remove SRC_FILES and AUTOFIX_FILES detection logic that references src/ directory patterns not present in this repo.
  • Update linting targets to use scripts/ and .github/ instead of src/ tests/.
  • Replace Python package-specific validation (coverage requirements, import tests) with workflow-specific checks (actionlint, YAML validation).
  • Ensure the script still runs successfully after cleanup.

Acceptance criteria

  • - grep -c "TODO Phase" scripts/validate_fast.sh returns 0.
  • - Script executes without errors: bash scripts/validate_fast.sh --help works.
  • - No references to src/ directory or Trend_Model_Project-specific patterns remain.
  • - Validation targets are appropriate for a workflow repository (scripts/, .github/).

Head SHA: 423bd18
Latest Runs: ❔ in progress — Gate
Required: gate: ❔ in progress

Workflow / Job Result Logs
Agents PR meta manager ❔ in progress View run
CI Autofix Loop ✅ success View run
Copilot code review ❔ in progress View run
Gate ❔ in progress View run
Health 40 Sweep ✅ success View run
Health 44 Gate Branch Protection ❔ in progress View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ❔ in progress View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Selftest CI ✅ success View run

Explores using LangChain to improve the Agents 63 issue intake pipeline:

1. Human Language → AGENT_ISSUE_TEMPLATE conversion (P1)
2. Contextual data injection for PRs (P2)
3. Agent capability pre-flight check (P0) - validates tasks are agent-actionable
4. Analyze → Approve → Format hybrid optimization (P1) - stateless two-phase flow

Key insight: #4 uses label-based approval (agents:optimize → agents:apply-suggestions)
instead of stateful multi-turn conversation, reducing complexity from 5-7d to 2-3d
while reusing the Formatter (#1) infrastructure.

Also identifies additional opportunities:
- Task decomposition for large tasks
- Duplicate/related issue detection
- Post-merge learning feedback
Copilot AI review requested due to automatic review settings January 3, 2026 11:55
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 3, 2026

Gate fast-pass: docs-only change detected; heavy checks skipped.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 3, 2026

Automated Status Summary

Head SHA: 9a842da
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / Enforce agents workflow protections
Required: core tests (3.11): ⏳ pending, core tests (3.12): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske stranske merged commit 90ac553 into main Jan 3, 2026
53 checks passed
@stranske stranske deleted the docs/langchain-issue-intake-proposal branch January 3, 2026 11:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive proposal document for enhancing the Agents 63 issue intake pipeline using LangChain to improve issue quality, reduce wasted agent iterations, and enable better human-agent collaboration. The proposal outlines a phased approach with prioritized enhancements focusing on high-value, scoped improvements.

Key Changes:

  • Introduces 7 enhancement proposals ranging from basic formatting automation to sophisticated capability pre-flight checks
  • Proposes a hybrid "Analyze → Approve → Format" flow that eliminates complex state management
  • Includes technical architecture, implementation estimates, risk assessment, and success metrics
  • Prioritizes Agent Capability Pre-Flight (P0) to validate tasks before agent engagement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

uses: actions/github-script@v7
with:
script: |
const { analyzeIssue } = require('./scripts/langchain/issue_optimizer.py');
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow integration examples show JavaScript code being called from Python files. The script shows "require('./scripts/langchain/issue_optimizer.py')" but .py files cannot be required in JavaScript. This should either use a Python action or call a JavaScript wrapper that invokes the Python script.

Suggested change
const { analyzeIssue } = require('./scripts/langchain/issue_optimizer.py');
const { analyzeIssue } = require('./scripts/langchain/issue_optimizer.js');

Copilot uses AI. Check for mistakes.
Comment on lines +528 to +532
const { checkAgentCapability } = require('./scripts/langchain/capability_check.py');
const result = await checkAgentCapability({
tasks: '${{ steps.parse.outputs.tasks }}',
acceptance: '${{ steps.parse.outputs.acceptance }}'
});
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar issue: The workflow attempts to require a Python file in JavaScript context. The script shows "require('./scripts/langchain/capability_check.py')" which is not valid. JavaScript cannot directly require Python modules.

Suggested change
const { checkAgentCapability } = require('./scripts/langchain/capability_check.py');
const result = await checkAgentCapability({
tasks: '${{ steps.parse.outputs.tasks }}',
acceptance: '${{ steps.parse.outputs.acceptance }}'
});
const { execFile } = require('child_process');
const util = require('util');
const execFileAsync = util.promisify(execFile);
const input = {
tasks: '${{ steps.parse.outputs.tasks }}',
acceptance: '${{ steps.parse.outputs.acceptance }}'
};
// Call the Python capability checker and expect JSON on stdout.
const { stdout } = await execFileAsync('python', [
'scripts/langchain/capability_check.py',
JSON.stringify(input)
]);
const result = JSON.parse(stdout);

Copilot uses AI. Check for mistakes.
Comment on lines +495 to +499
# NEW: Optimize flow (Phase 1)
analyze_for_optimization:
if: github.event.action == 'labeled' && github.event.label.name == 'agents:optimize'
steps:
- name: Analyze issue
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent terminology: The document refers to this as "Phase 1" but the ASCII diagram header shows "Phase 1: Analysis (label: agents:optimize)" while later content sometimes just says "analyze_for_optimization". Consider using consistent naming throughout, especially in the workflow YAML examples where job names should match the phase descriptions.

Suggested change
# NEW: Optimize flow (Phase 1)
analyze_for_optimization:
if: github.event.action == 'labeled' && github.event.label.name == 'agents:optimize'
steps:
- name: Analyze issue
# NEW: Optimize flow (Phase 1: Analysis)
phase1_analysis:
if: github.event.action == 'labeled' && github.event.label.name == 'agents:optimize'
steps:
- name: Phase 1: Analyze issue for optimization

Copilot uses AI. Check for mistakes.
uses: actions/github-script@v7
with:
script: |
// Post comment with blocked task analysis
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment mentions "Post comment with blocked task analysis" but doesn't specify what information should be included in this comment or reference the format. For consistency with other sections in the document, consider adding a brief description or referencing the structure mentioned in line 197-198.

Suggested change
// Post comment with blocked task analysis
// Post comment with blocked task analysis (include overall recommendation and per-task blocked reasons)
// Use the "Blocked task analysis comment format" described in lines 197–198 of this document

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants