@relipa/ai-flow-kit 0.1.2 โ†’ 0.1.3

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 (41) hide show
  1. package/README.md +26 -0
  2. package/bin/aiflow.js +40 -1
  3. package/custom/harness/playwright/.env.example +10 -0
  4. package/custom/harness/playwright/playwright.config.ts +34 -0
  5. package/custom/harness/playwright/tests/e2e/auth.setup.ts +25 -0
  6. package/custom/harness/playwright/tests/e2e/fixtures/test.ts +6 -0
  7. package/custom/harness/playwright/tests/e2e/pages/BasePage.ts +9 -0
  8. package/custom/harness/playwright/tests/e2e/support/auth.ts +5 -0
  9. package/custom/mcp-presets/playwright.json +8 -0
  10. package/custom/rules/test-patterns.md +70 -0
  11. package/custom/skills/automation-testing/SKILL.md +239 -0
  12. package/custom/skills/automation-testing/templates/BasePage.ts +29 -0
  13. package/custom/skills/automation-testing/templates/PageObject.example.ts +29 -0
  14. package/custom/skills/automation-testing/templates/playwright.config.ts +39 -0
  15. package/custom/skills/automation-testing/templates/spec.example.ts +29 -0
  16. package/custom/skills/coverage-check/SKILL.md +202 -0
  17. package/custom/skills/evidence-aggregation/SKILL.md +246 -0
  18. package/custom/skills/execute-flow/SKILL.md +479 -0
  19. package/custom/skills/execute-flow/templates/playwright.config.ts +39 -0
  20. package/custom/skills/generate-test-report/SKILL.md +99 -0
  21. package/custom/skills/generate-test-report/templates/test-report.md +58 -0
  22. package/custom/skills/generate-testcase/SKILL.md +303 -0
  23. package/custom/skills/generate-testcase/templates/testcase.md +88 -0
  24. package/custom/skills/log-bug/SKILL.md +131 -0
  25. package/custom/skills/pr-impact-analysis/SKILL.md +180 -0
  26. package/custom/skills/retest-orchestration/SKILL.md +191 -0
  27. package/custom/skills/script-sync/SKILL.md +208 -0
  28. package/custom/skills/test-analysis/SKILL.md +262 -0
  29. package/custom/templates/shared/gate-workflow.md +306 -2
  30. package/docs/common/CHANGELOG.md +52 -0
  31. package/docs/common/QUICK_START.md +30 -0
  32. package/docs/common/cli-reference.md +48 -7
  33. package/package.json +1 -1
  34. package/scripts/create-score-excel.js +20 -7
  35. package/scripts/detect.js +10 -0
  36. package/scripts/guide.js +9 -0
  37. package/scripts/prompt.js +36 -0
  38. package/scripts/scaffold-playwright.js +106 -0
  39. package/scripts/task.js +21 -7
  40. package/scripts/update.js +124 -124
  41. package/scripts/use.js +30 -12
package/scripts/use.js CHANGED
@@ -5,6 +5,18 @@ const chalk = require("chalk");
5
5
  const https = require("https");
6
6
  const { select, input } = require("@inquirer/prompts");
7
7
 
8
+ const stringWidth = require("string-width");
9
+ const CATEGORY_COLOR = {
10
+ Coding: chalk.cyan,
11
+ Testing: chalk.green,
12
+ Analysis: chalk.yellow,
13
+ Document: chalk.magenta,
14
+ };
15
+ const td = (label, cat, desc) => {
16
+ const pad = " ".repeat(Math.max(0, 20 - stringWidth(label)));
17
+ return label + pad + CATEGORY_COLOR[cat](cat.padEnd(10)) + chalk.dim(desc);
18
+ };
19
+
8
20
  const PROJECT_DIR = process.cwd();
9
21
  const AIFLOW_DIR = path.join(PROJECT_DIR, ".aiflow");
10
22
  const STATE_FILE = path.join(AIFLOW_DIR, "state.json");
@@ -613,12 +625,14 @@ async function promptForTaskType(detectedDefault) {
613
625
  return await select({
614
626
  message: "Task type:",
615
627
  choices: [
616
- { name: "๐Ÿ› Bug Fix", value: "bug-fix" },
617
- { name: "โœจ Feature", value: "feature" },
618
- { name: "๐Ÿ” Investigation", value: "investigation" },
619
- { name: "โ™ป๏ธ Refactor", value: "refactor" },
620
- { name: "๐Ÿ“Š Impact Analysis", value: "impact-analysis" },
621
- { name: "๐Ÿ“– Documentation", value: "documentation" },
628
+ { name: td("๐Ÿ› Bug Fix", "Coding", "Fix bugs, crashes, regressions"), value: "bug-fix" },
629
+ { name: td("โœจ Feature", "Coding", "Build new features, user stories"), value: "feature" },
630
+ { name: td("๐Ÿ”„ Refactor", "Coding", "Improve code without behavior change"), value: "refactor" },
631
+ { name: td("๐Ÿ”ฌ Testing", "Testing", "Write tests, QA, coverage"), value: "testing" },
632
+ { name: td("โ–ถ๏ธ Execute Test", "Testing", "Run existing TC scripts (4-gate flow)"), value: "execute" },
633
+ { name: td("๐Ÿ” Investigation", "Analysis", "Investigate, analyze root cause"), value: "investigation" },
634
+ { name: td("๐Ÿ“Š Impact Analysis", "Analysis", "Assess scope and risk of changes"), value: "impact-analysis" },
635
+ { name: td("๐Ÿ“– Documentation", "Document", "Write docs, README, API reference"), value: "documentation" },
622
636
  ],
623
637
  default: detectedDefault || "feature",
624
638
  });
@@ -683,12 +697,14 @@ async function manualContext(prefillId = "") {
683
697
  const taskType = await select({
684
698
  message: "Task type:",
685
699
  choices: [
686
- { name: "๐Ÿ› Bug Fix", value: "bug-fix" },
687
- { name: "โœจ Feature", value: "feature" },
688
- { name: "๐Ÿ” Investigation", value: "investigation" },
689
- { name: "โ™ป๏ธ Refactor", value: "refactor" },
690
- { name: "๐Ÿ“Š Impact Analysis", value: "impact-analysis" },
691
- { name: "๐Ÿ“– Documentation", value: "documentation" },
700
+ { name: td("๐Ÿ› Bug Fix", "Coding", "Fix bugs, crashes, regressions"), value: "bug-fix" },
701
+ { name: td("โœจ Feature", "Coding", "Build new features, user stories"), value: "feature" },
702
+ { name: td("๐Ÿ”„ Refactor", "Coding", "Improve code without behavior change"), value: "refactor" },
703
+ { name: td("๐Ÿ”ฌ Testing", "Testing", "Write tests, QA, coverage"), value: "testing" },
704
+ { name: td("โ–ถ๏ธ Execute Test", "Testing", "Run existing TC scripts (4-gate flow)"), value: "execute" },
705
+ { name: td("๐Ÿ” Investigation", "Analysis", "Investigate, analyze root cause"), value: "investigation" },
706
+ { name: td("๐Ÿ“Š Impact Analysis", "Analysis", "Assess scope and risk of changes"), value: "impact-analysis" },
707
+ { name: td("๐Ÿ“– Documentation", "Document", "Write docs, README, API reference"), value: "documentation" },
692
708
  ],
693
709
  default: existing.taskType || undefined,
694
710
  });
@@ -939,6 +955,8 @@ function detectTaskTypeFromString(text) {
939
955
  return "feature";
940
956
  if (["research", "investigation", "่ชฟๆŸป"].some((k) => lower.includes(k)))
941
957
  return "investigation";
958
+ if (["test", "testing", "qa", "quality", "coverage", "ใƒ†ใ‚นใƒˆ"].some((k) => lower.includes(k)))
959
+ return "testing";
942
960
  return "bug-fix"; // default for unknown
943
961
  }
944
962