Skip to content

Issue #145: Part 1: api-aqa-flow compression - #218

Open
mkuznietsov wants to merge 4 commits into
mainfrom
145_api-aqa-flow_compression
Open

Issue #145: Part 1: api-aqa-flow compression#218
mkuznietsov wants to merge 4 commits into
mainfrom
145_api-aqa-flow_compression

Conversation

@mkuznietsov

Copy link
Copy Markdown
Contributor

25% less symbols, 4% less lines.

…aqa-flow_compression

# Conflicts:
#	instructions/r3/core/workflows/api-aqa-flow-api-spec-analysis.md
#	instructions/r3/core/workflows/api-aqa-flow-data-collection.md
@github-actions github-actions Bot added instructions skills, subagents, rules, workflows, commands for AI agents needs more work labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: Mechanical prose-compression pass over 9 api-aqa-flow workflow files in instructions/r3/core/workflows/ (25% fewer symbols, 4% fewer lines per the PR body). No behavioral additions intended — goal is reducing token cost while preserving contracts.

Since this PR modifies instructions/r3/**, this was treated as instruction-quality review (not ordinary doc/code review), per Rosetta's own triage rule for Rosetta-instruction changes. Two independent reviewers simulated an AI coding agent consuming these files inside a target repository and diffed every changed file against main.

Findings:

  • api-aqa-flow-api-spec-analysis.md: introduces an inconsistent path casing within the same sentence — `RefSrc/{project-name}/docs/` vs. `refsrc/{project-name}/docs/` (canonical lowercase form used elsewhere, e.g. docs/ARCHITECTURE.md). On a case-sensitive filesystem this can make an agent treat them as different paths and wrongly fall through to the zero-source fallback even when refsrc/... exists.
  • api-aqa-flow-api-spec-analysis.md: validation_checklist dropped the two document-level completeness bullets (schemas/auth/data-deps documented; api-analysis.md has all <produce_output> sections + Analysis Summary). Remaining bullets only check per-endpoint entries, so an agent could pass the checklist while emitting an api-analysis.md missing/empty ## Data Dependencies or ## Analysis Summary.
  • api-aqa-flow-test-case-specification.md (Phase 4): dropped "all source test cases converted", "Test file mapping defined", "Shared utilities identified". Remaining ATC-traceability check only verifies specs have a source, not that every source test case produced a spec — an agent could silently drop test cases or leave Test File Mapping/Shared Utilities sections empty and still report N/N satisfied.
  • api-aqa-flow-test-correction.md (Phase 7): "All approved changes applied" and "no inferred approval" were replaced with shape-only checks (Files Modified file-type check; approval-record-has-fields check). An agent could apply only 2 of 5 approved fixes and still pass, since nothing re-verifies every approved change was applied.
  • api-aqa-flow-gap-and-requirements-clarification.md: dropped "Cross-reference analysis completed" without an equivalent replacement — the Gaps section can be N/A — no gaps found without the cross-reference variant ever running, and the remaining "7 sections present" check doesn't catch that.

Caveats:

  • All HITL/STOP gates, approval-token exactness rules, read-only/in-scope boundaries, and fail-closed redaction gates were checked line-by-line and are intact/unweakened across all 9 files — the compression did not touch the safety-critical language.
  • Most other checklist-line removals are genuinely safe (subsumed by a stronger remaining invariant, e.g. Phase 3's "Questions Asked == Answers Received + ..." supersedes the separate "answers received" bullet).

Suggestions:

  • Restore a document-shape completeness check to api-aqa-flow-api-spec-analysis.md's validation checklist (all <produce_output> sections non-empty).
  • Fix the RefSrc/refsrc casing inconsistency.
  • Restore an explicit "every approved change applied" check in Phase 7, and a "no test case silently dropped" check in Phase 4.
  • Restore (or fold into an equivalent) a cross-reference-completed check in Phase 3.

Questions:

  • Was the checklist trimming in these four spots intentional (assuming remaining checks are "close enough") or an oversight of the compression pass? If intentional, worth confirming the four specific gaps above are acceptable risk before merging Part 1.

Automated triage by Rosetta agent

4. **If none found**: Proceed with documentation from Phase 1 only; ask user for endpoint details. **Zero-source fallback:** if the user is unavailable, refuses, or supplies only partial info: mark each missing template field (request schema, response schema, auth, data dependencies) as `TBD` and add an explicit `## Assumptions` section in `api-analysis.md` listing every unknown field and the reason it is unknown. Flag Phase 2 as `partial — N/M endpoints fully analyzed` in `agents/TEMP/<FEATURE>/api-aqa-state.md` so downstream phases know not to treat the analysis as authoritative.

Decision point: Swagger available -> full spec analysis. No Swagger -> code-based analysis + user input.
2. **Swagger/OpenAPI in backend source**: search `{backend-source-path}` for `swagger.json`, `swagger.yaml`, `openapi.json`, `openapi.yaml`, `api-docs`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This part is missed: If {backend-source-path} is NOT configured, search entire codebase instead.

@mkuznietsov mkuznietsov Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We have it in line №42

If `{backend-source-path}` NOT configured, search entire codebase for items 2–3 below.

2. Confirm request/response schemas documented
3. Confirm auth requirements identified
4. Confirm data dependencies mapped
1. Run `<validation_checklist>` against output.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the validate_findings step could be removed entirely. Since the validation_checklist is run against the output, this step seems redundant

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will be removed

- Read-only scope (single SSoT — referenced by other sections as "the read-only scope"): parse / categorize / root-cause / label evidence / recommend. NO production code edits, NO writes to test or product source files. Refuse "just fix it now" / "patch and move on" with citation of this scope; the only acceptable user inputs are report location, evidence/labeling clarifications, or explicit approval to leave borderline items as `Assumption`.
- Required skills: `qa-knowledge` (`test_execution_triage` mode + API failure taxonomy + failure-report skeleton), `sensitive-data` (redaction), `qa-structure` (`{IDENTIFIER}` + artifact path)
- Read-only scope: parse / categorize / root-cause / label evidence / recommend. NO production code edits, NO writes to test or product source files. Refuse "just fix it now" / "patch and move on" with citation of this scope; acceptable user inputs: report location, evidence/labeling clarifications, or explicit approval to leave borderline items as `Assumption`.
- Required skills: `qa-knowledge` (`test_execution_triage` mode), `sensitive-data` (redaction), `qa-structure` (`{IDENTIFIER}` + artifact path)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we sure that we could omit that + API failure taxonomy + failure-report skeleton)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Safe to omit - nothing became unreachable, only the duplicate preview was dropped.

Both artifacts are owned by qa-knowledge and loaded by the skill itself at point of use, via its <resources> router rows:

  • "classify an API-AQA backend-API failure" → skills/qa-knowledge/references/api-aqa-failure-taxonomy.md
  • "emit the API-AQA execution report" → skills/qa-knowledge/assets/failure-report-template.md
    The phase still binds both where it's actionable: step 6.1.2 passes taxonomy = API failure taxonomy, <execution_report_contract> (line 27) names qa-knowledge's API failure taxonomy + failure-report template, API variant, and the validation checklist (line 65) re-checks categorization against that taxonomy. So the API/UI variant disambiguation is preserved.

@mkuznietsov

Copy link
Copy Markdown
Contributor Author

/rosetta review pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

instructions skills, subagents, rules, workflows, commands for AI agents needs more work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants