diff --git a/.specify/logs/audit/security.jsonl b/.specify/logs/audit/security.jsonl index 8234e22..17a8c08 100644 --- a/.specify/logs/audit/security.jsonl +++ b/.specify/logs/audit/security.jsonl @@ -92,3 +92,57 @@ {"timestamp":"2026-07-10T06:20:20Z","trace_id":"trace-1783664420-1347","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"d1c3c3a7ee70994d948443ba05bb0a9c2dd1f1852a994ab80d722730d282ae44","output_hash":"d1c3c3a7ee70994d948443ba05bb0a9c2dd1f1852a994ab80d722730d282ae44"} {"timestamp":"2026-07-10T07:20:30Z","trace_id":"trace-1783668030-52","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa","output_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa"} {"timestamp":"2026-07-10T07:21:21Z","trace_id":"trace-1783668081-716","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"280cadd0be725e6496a8614b12a98836bedb5c8a38fc6b2a8afe5f44b237158e","output_hash":"280cadd0be725e6496a8614b12a98836bedb5c8a38fc6b2a8afe5f44b237158e"} +{"timestamp":"2026-07-10T08:10:53Z","trace_id":"trace-1783671053-3456","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"a5029c2ba88119946f6ad1c38d796eea7f3519b4ef847a98ef827633e796c717","output_hash":"a5029c2ba88119946f6ad1c38d796eea7f3519b4ef847a98ef827633e796c717"} +{"timestamp":"2026-07-10T08:37:34Z","trace_id":"trace-1783672654-290","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:38:21Z","trace_id":"trace-1783672701-1074","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:38:29Z","trace_id":"trace-1783672709-1683","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:39:00Z","trace_id":"trace-1783672740-2286","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:39:07Z","trace_id":"trace-1783672747-2894","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:39:13Z","trace_id":"trace-1783672753-3495","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:39:54Z","trace_id":"trace-1783672794-129","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5","output_hash":"305d51e7bd89770c78e56848036699dbdf4040c1d17a325c8b534703c5fa45c5"} +{"timestamp":"2026-07-10T08:40:24Z","trace_id":"trace-1783672824-709","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"98be3b34b18aae993bb1a5c6f2151a21b9e103a8f56c19e650bf03514231cb26","output_hash":"98be3b34b18aae993bb1a5c6f2151a21b9e103a8f56c19e650bf03514231cb26"} +{"timestamp":"2026-07-10T08:45:46Z","trace_id":"trace-1783673146-2396","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"2fcbb74936de0bc90851761d4f0c53506b696fc83f50c1f5b91119236af6ed83","output_hash":"2fcbb74936de0bc90851761d4f0c53506b696fc83f50c1f5b91119236af6ed83"} +{"timestamp":"2026-07-10T08:46:14Z","trace_id":"trace-1783673174-3110","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"a5bbfed3fa6a86702ff80efcdac35d14cfb2a3cfb9692c03584baf2a5fe9b76c","output_hash":"a5bbfed3fa6a86702ff80efcdac35d14cfb2a3cfb9692c03584baf2a5fe9b76c"} +{"timestamp":"2026-07-10T08:48:31Z","trace_id":"trace-1783673311-3706","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"ade0e2d2828ff5a8f87d08d62f320f69e057fdbcbba54935a5346601c6ef93fc","output_hash":"ade0e2d2828ff5a8f87d08d62f320f69e057fdbcbba54935a5346601c6ef93fc"} +{"timestamp":"2026-07-10T08:48:51Z","trace_id":"trace-1783673331-4392","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"2c52b7763ce9f000c563843ffc3301f85f1d95f6b5f8e818c02acb7dd2aa842f","output_hash":"2c52b7763ce9f000c563843ffc3301f85f1d95f6b5f8e818c02acb7dd2aa842f"} +{"timestamp":"2026-07-10T08:49:37Z","trace_id":"trace-1783673377-4840","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"18f3c234faddf6ad5421a2b9cae1036a7a958bc4ecc534f8e8f8395670c2530c","output_hash":"18f3c234faddf6ad5421a2b9cae1036a7a958bc4ecc534f8e8f8395670c2530c"} +{"timestamp":"2026-07-10T08:49:57Z","trace_id":"trace-1783673397-5474","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"757ffca4ffccc7668753e79687ee40738d795428588fee4c6b8180c0bc734124","output_hash":"757ffca4ffccc7668753e79687ee40738d795428588fee4c6b8180c0bc734124"} +{"timestamp":"2026-07-10T08:51:04Z","trace_id":"trace-1783673464-5971","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"1ce53bc84ad799d7ca3890e6a79e8a695ea48b8fce13f78c38eb657e2fe80ed7","output_hash":"1ce53bc84ad799d7ca3890e6a79e8a695ea48b8fce13f78c38eb657e2fe80ed7"} +{"timestamp":"2026-07-10T08:51:25Z","trace_id":"trace-1783673485-6637","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"14b9e1c2352607b7a4d0dfa80e22d6d4ec1409db91511cc610bd3c7f975d3321","output_hash":"14b9e1c2352607b7a4d0dfa80e22d6d4ec1409db91511cc610bd3c7f975d3321"} +{"timestamp":"2026-07-10T14:24:32Z","trace_id":"trace-1783693472-175","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"6a4afba59fa567c089a84e6e933c8665380c63c93f00de70e1cba2a26512f623","output_hash":"6a4afba59fa567c089a84e6e933c8665380c63c93f00de70e1cba2a26512f623"} +{"timestamp":"2026-07-10T14:25:28Z","trace_id":"trace-1783693528-893","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"317d789d9c23693bb1dda981d9f75e1eff9ca8fa1aa9a722115c6fef78caad23","output_hash":"317d789d9c23693bb1dda981d9f75e1eff9ca8fa1aa9a722115c6fef78caad23"} +{"timestamp":"2026-07-10T14:26:59Z","trace_id":"trace-1783693619-122","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"491375254fe83e91fad084ef998ddda780654f1ef921a2cd9148466a74fb1c9a","output_hash":"491375254fe83e91fad084ef998ddda780654f1ef921a2cd9148466a74fb1c9a"} +{"timestamp":"2026-07-10T14:27:46Z","trace_id":"trace-1783693666-838","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"642e21a39cd734fd6667a540da58d494fe3e3a2d4a2297b49334dc5536834c77","output_hash":"642e21a39cd734fd6667a540da58d494fe3e3a2d4a2297b49334dc5536834c77"} +{"timestamp":"2026-07-10T14:33:04Z","trace_id":"trace-1783693984-175","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"5e9f6afb8b00b1c071e64b07ffa8ee66d67f298d65a0b6285a2f3ad92010aa56","output_hash":"5e9f6afb8b00b1c071e64b07ffa8ee66d67f298d65a0b6285a2f3ad92010aa56"} +{"timestamp":"2026-07-10T14:33:34Z","trace_id":"trace-1783694014-789","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"1e1864543ed2100727fadf80b16bf47ed37d681f3a603bdd9342bfcaa86a5bb7","output_hash":"1e1864543ed2100727fadf80b16bf47ed37d681f3a603bdd9342bfcaa86a5bb7"} +{"timestamp":"2026-07-10T14:33:48Z","trace_id":"trace-1783694028-933","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"e08f4d05c9a0f21dbdc0edc3d759d9324cbd6ca23d3ab958edac1305ecbfeb17","output_hash":"e08f4d05c9a0f21dbdc0edc3d759d9324cbd6ca23d3ab958edac1305ecbfeb17"} +{"timestamp":"2026-07-10T14:46:33Z","trace_id":"trace-1783694793-134","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"f0becd0ba8ba760f9e11045bc17c25c826cef2fd9b5848568a6e704da48562d3","output_hash":"f0becd0ba8ba760f9e11045bc17c25c826cef2fd9b5848568a6e704da48562d3"} +{"timestamp":"2026-07-10T14:46:33Z","trace_id":"trace-1783694793-600","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"6cbc480a81d9e566f94340e479b0da7780e51f0ef93db82a9e6d808d93509c2c","output_hash":"6cbc480a81d9e566f94340e479b0da7780e51f0ef93db82a9e6d808d93509c2c"} +{"timestamp":"2026-07-10T14:46:34Z","trace_id":"trace-1783694794-1066","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"49bd44fb1dd64f1606d448efcc591f6662bb6c06de2541ce3ea6804f3d2b6c5f","output_hash":"49bd44fb1dd64f1606d448efcc591f6662bb6c06de2541ce3ea6804f3d2b6c5f"} +{"timestamp":"2026-07-10T14:46:35Z","trace_id":"trace-1783694795-1532","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"a2ffaa6bc02119947e88c0899e3efb78084e20072b5650e1d463b3e978acb644","output_hash":"a2ffaa6bc02119947e88c0899e3efb78084e20072b5650e1d463b3e978acb644"} +{"timestamp":"2026-07-10T14:46:35Z","trace_id":"trace-1783694795-1997","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"b122eccde5def8f8a3ede374073d555eeb0649060a93650ca0fdffb940760321","output_hash":"b122eccde5def8f8a3ede374073d555eeb0649060a93650ca0fdffb940760321"} +{"timestamp":"2026-07-10T14:59:15Z","trace_id":"trace-1783695555-208","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"b65685191514667998f209dd8ce72e73e83fb0c2be00e8bd3c7e7cfef02fbd7a","output_hash":"b65685191514667998f209dd8ce72e73e83fb0c2be00e8bd3c7e7cfef02fbd7a"} +{"timestamp":"2026-07-10T15:07:10Z","trace_id":"trace-1783696030-1110","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"63073e9ea949155b9fc8db84dca22a3b8a635b11ab60e45b00c5914c842473fa","output_hash":"63073e9ea949155b9fc8db84dca22a3b8a635b11ab60e45b00c5914c842473fa"} +{"timestamp":"2026-07-10T15:11:07Z","trace_id":"trace-1783696267-3617","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa","output_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa"} +{"timestamp":"2026-07-10T15:11:50Z","trace_id":"trace-1783696310-4454","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"d5e4481c6b2b996576af60207f92dc3c8d400d56909a23d41a96d491f520589f","output_hash":"d5e4481c6b2b996576af60207f92dc3c8d400d56909a23d41a96d491f520589f"} +{"timestamp":"2026-07-10T15:12:19Z","trace_id":"trace-1783696339-4956","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"d6f4b13ee10ffdf48682e7f3d43f5e4df05dff4b9d2e63b1a8585220634b5027","output_hash":"d6f4b13ee10ffdf48682e7f3d43f5e4df05dff4b9d2e63b1a8585220634b5027"} +{"timestamp":"2026-07-10T15:13:05Z","trace_id":"trace-1783696385-5687","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"9b65df7891907c5a3a9fadc9b72f5541e548f330aeffd31365a50a690a415d97","output_hash":"9b65df7891907c5a3a9fadc9b72f5541e548f330aeffd31365a50a690a415d97"} +{"timestamp":"2026-07-11T02:45:11Z","trace_id":"trace-1783737911-272","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa","output_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa"} +{"timestamp":"2026-07-11T02:54:20Z","trace_id":"trace-1783738460-1030","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa","output_hash":"8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa"} +{"timestamp":"2026-07-11T02:54:39Z","trace_id":"trace-1783738479-1761","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"d5e4481c6b2b996576af60207f92dc3c8d400d56909a23d41a96d491f520589f","output_hash":"d5e4481c6b2b996576af60207f92dc3c8d400d56909a23d41a96d491f520589f"} +{"timestamp":"2026-07-11T02:55:18Z","trace_id":"trace-1783738518-2282","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"77100d99316b67f917a2dc398f03532f93c86f9f94fc6d1f0a2ec9a128017b2b","output_hash":"77100d99316b67f917a2dc398f03532f93c86f9f94fc6d1f0a2ec9a128017b2b"} +{"timestamp":"2026-07-11T02:55:45Z","trace_id":"trace-1783738545-3066","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"a22bc04e692ed93ccf0a1564be9f47ecd8e4991ca69780760ce14a26f73178af","output_hash":"a22bc04e692ed93ccf0a1564be9f47ecd8e4991ca69780760ce14a26f73178af"} +{"timestamp":"2026-07-11T02:56:30Z","trace_id":"trace-1783738590-3520","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a","output_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a"} +{"timestamp":"2026-07-11T03:03:09Z","trace_id":"trace-1783738989-117","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a","output_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a"} +{"timestamp":"2026-07-11T03:04:01Z","trace_id":"trace-1783739041-117","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a","output_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a"} +{"timestamp":"2026-07-11T03:04:11Z","trace_id":"trace-1783739051-704","harness":"H4-security","mode":"input","status":"blocked","action":"block","risk_level":"high","input_hash":"c54aefd8623387334779587082579e91f78f55a823adbf5cf812f98a6255dc85","output_hash":"c54aefd8623387334779587082579e91f78f55a823adbf5cf812f98a6255dc85"} +{"timestamp":"2026-07-11T03:04:43Z","trace_id":"trace-1783739083-1081","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"3cb27554ac2eb202e09ec170b6a6fb028d4fd9b15a3448e999db8a88b3a7e5e4","output_hash":"3cb27554ac2eb202e09ec170b6a6fb028d4fd9b15a3448e999db8a88b3a7e5e4"} +{"timestamp":"2026-07-11T03:05:27Z","trace_id":"trace-1783739127-1189","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"d94f7cb51d952fcaffb585e76c16542aba2f774d64c6d270eab32e7888eccc40","output_hash":"d94f7cb51d952fcaffb585e76c16542aba2f774d64c6d270eab32e7888eccc40"} +{"timestamp":"2026-07-11T03:06:28Z","trace_id":"trace-1783739188-1394","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a","output_hash":"d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a"} +{"timestamp":"2026-07-11T03:07:06Z","trace_id":"trace-1783739226-1926","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"dbdf75779e5a2b0732d18da95767b4231985a6205836f12321935404b41a47c3","output_hash":"dbdf75779e5a2b0732d18da95767b4231985a6205836f12321935404b41a47c3"} +{"timestamp":"2026-07-11T03:07:54Z","trace_id":"trace-1783739274-2082","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"fd6094f85e823a0be31d54bc5dbecf5e174275ad8b85ca2aa56f58658789e7a3","output_hash":"fd6094f85e823a0be31d54bc5dbecf5e174275ad8b85ca2aa56f58658789e7a3"} +{"timestamp":"2026-07-11T03:09:42Z","trace_id":"trace-1783739382-2291","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"9e2a2bc7bccc5123fb02c5789591db77dabed477b5ffba09f2db460de423bb05","output_hash":"9e2a2bc7bccc5123fb02c5789591db77dabed477b5ffba09f2db460de423bb05"} +{"timestamp":"2026-07-11T03:13:24Z","trace_id":"trace-1783739604-121","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"63073e9ea949155b9fc8db84dca22a3b8a635b11ab60e45b00c5914c842473fa","output_hash":"63073e9ea949155b9fc8db84dca22a3b8a635b11ab60e45b00c5914c842473fa"} +{"timestamp":"2026-07-11T03:14:47Z","trace_id":"trace-1783739687-743","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"41787b8b4a629028ae972d8db1cf4ac491af928978e0469269655a140a41e20c","output_hash":"41787b8b4a629028ae972d8db1cf4ac491af928978e0469269655a140a41e20c"} +{"timestamp":"2026-07-11T03:15:44Z","trace_id":"trace-1783739744-857","harness":"H4-security","mode":"output","status":"pass","action":"allow","risk_level":"low","input_hash":"8367afe050a5086cac52162ee740dc4f68949e6901538d86f49802ad069e1e54","output_hash":"8367afe050a5086cac52162ee740dc4f68949e6901538d86f49802ad069e1e54"} +{"timestamp":"2026-07-11T03:17:50Z","trace_id":"trace-1783739870-1068","harness":"H4-security","mode":"input","status":"pass","action":"allow","risk_level":"low","input_hash":"744ebdf28580ca15b50dd647f69de9e8ae2288bd6267a2a792f4ca2816f856f9","output_hash":"744ebdf28580ca15b50dd647f69de9e8ae2288bd6267a2a792f4ca2816f856f9"} diff --git a/.specify/logs/cost/metrics.jsonl b/.specify/logs/cost/metrics.jsonl index 5be67a8..27c4da7 100644 --- a/.specify/logs/cost/metrics.jsonl +++ b/.specify/logs/cost/metrics.jsonl @@ -23,3 +23,9 @@ {"timestamp": "2026-07-10T06:19:34Z", "trace_id": "d8796e51-f1bf-4950-b27d-5327ed69ee12", "harness": "H6-agentops", "agent": "chat.ask-casan", "step": "ask-casan-readonly", "status": "success", "exit_code": 0, "latency_ms": 57864, "retry_count": 0, "input_tokens": 427, "output_tokens": 406, "total_tokens": 833, "cost_estimate": 0.0, "cost_source": "ollama_local_real_tokens", "synthesis_mode": "model", "hallucination_signals": 0, "alerts": [], "input_hash": "5da5739dfab4b282139a20d7272d0e676331eb09f86f562cc5e6d1f3b668a5ab", "output_hash": "142404dfd1bd2e31f6bef54bb495685e059a9b5c4b2e3369c8b79f8c7bec67a9"} {"timestamp": "2026-07-10T06:20:20Z", "trace_id": "b5ad414a-4662-49c5-a024-3f2bb51ada64", "harness": "H6-agentops", "agent": "chat.ask-casan", "step": "ask-casan-readonly", "status": "success", "exit_code": 0, "latency_ms": 43174, "retry_count": 0, "input_tokens": 511, "output_tokens": 288, "total_tokens": 799, "cost_estimate": 0.0, "cost_source": "ollama_local_real_tokens", "synthesis_mode": "model", "hallucination_signals": 0, "alerts": [], "input_hash": "5da5739dfab4b282139a20d7272d0e676331eb09f86f562cc5e6d1f3b668a5ab", "output_hash": "d1c3c3a7ee70994d948443ba05bb0a9c2dd1f1852a994ab80d722730d282ae44"} {"timestamp": "2026-07-10T07:21:22Z", "trace_id": "1fd5d347-f21c-4370-a60d-30b11fd8c53e", "harness": "H6-agentops", "agent": "chat.ask-casan", "step": "ask-casan-readonly", "status": "success", "exit_code": 0, "latency_ms": 51212, "retry_count": 0, "input_tokens": 362, "output_tokens": 59, "total_tokens": 421, "cost_estimate": 0.0, "cost_source": "ollama_local_real_tokens", "synthesis_mode": "model", "hallucination_signals": 0, "alerts": [], "input_hash": "8aaecd06d85c7f743d3545e7b865f3053c647591f95919c1c0b003046d4757aa", "output_hash": "280cadd0be725e6496a8614b12a98836bedb5c8a38fc6b2a8afe5f44b237158e"} +{"timestamp": "2026-07-10T14:25:28Z", "trace_id": "1c93ce8a-db76-4573-b49f-07f9fc408056", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "degraded", "exit_code": 0, "latency_ms": 55732, "input_tokens": 144, "output_tokens": 943, "total_tokens": 1087, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "6a4afba59fa567c089a84e6e933c8665380c63c93f00de70e1cba2a26512f623", "output_hash": "317d789d9c23693bb1dda981d9f75e1eff9ca8fa1aa9a722115c6fef78caad23"} +{"timestamp": "2026-07-10T14:27:47Z", "trace_id": "6700500f-3f3d-40ab-92b1-70315fc42ea5", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "degraded", "exit_code": 0, "latency_ms": 51117, "input_tokens": 143, "output_tokens": 450, "total_tokens": 593, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "491375254fe83e91fad084ef998ddda780654f1ef921a2cd9148466a74fb1c9a", "output_hash": "642e21a39cd734fd6667a540da58d494fe3e3a2d4a2297b49334dc5536834c77"} +{"timestamp": "2026-07-10T14:33:48Z", "trace_id": "21b6f387-84ad-4856-a8da-102bd70c037a", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "success", "exit_code": 0, "latency_ms": 44058, "input_tokens": 142, "output_tokens": 418, "total_tokens": 560, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "5e9f6afb8b00b1c071e64b07ffa8ee66d67f298d65a0b6285a2f3ad92010aa56", "output_hash": "e08f4d05c9a0f21dbdc0edc3d759d9324cbd6ca23d3ab958edac1305ecbfeb17"} +{"timestamp": "2026-07-11T03:05:27Z", "trace_id": "832cc182-7bb8-4666-9bbc-c077a943e7f9", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "success", "exit_code": 0, "latency_ms": 85641, "input_tokens": 127, "output_tokens": 620, "total_tokens": 747, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a", "output_hash": "d94f7cb51d952fcaffb585e76c16542aba2f774d64c6d270eab32e7888eccc40"} +{"timestamp": "2026-07-11T03:07:54Z", "trace_id": "3fc2c4a0-32ab-4be3-b12f-ca83a65869c7", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "success", "exit_code": 0, "latency_ms": 85595, "input_tokens": 127, "output_tokens": 471, "total_tokens": 598, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "d2f690b77d00aa01559991486f7825c7a1ea402429c5638e8dbf2a40e7b6eb9a", "output_hash": "fd6094f85e823a0be31d54bc5dbecf5e174275ad8b85ca2aa56f58658789e7a3"} +{"timestamp": "2026-07-11T03:15:44Z", "trace_id": "d1f5f078-63dc-4f21-a4f7-c0ccab19bc3d", "harness": "H6-agentops", "agent": "goal.orchestrator", "step": "local-worker-cloud-reviewer", "status": "success", "exit_code": 0, "latency_ms": 140071, "input_tokens": 2406, "output_tokens": 1400, "total_tokens": 3806, "cost_estimate": 0.0, "cost_source": "provider_usage_logs", "input_hash": "63073e9ea949155b9fc8db84dca22a3b8a635b11ab60e45b00c5914c842473fa", "output_hash": "8367afe050a5086cac52162ee740dc4f68949e6901538d86f49802ad069e1e54"} diff --git a/.specify/logs/level5/provider-usage.jsonl b/.specify/logs/level5/provider-usage.jsonl index 0b56a8e..4a06af7 100644 --- a/.specify/logs/level5/provider-usage.jsonl +++ b/.specify/logs/level5/provider-usage.jsonl @@ -13,3 +13,34 @@ {"timestamp": "2026-07-10T06:20:20Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 511, "output_tokens": 288, "total_tokens": 799, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 31437, "status": "success"} {"timestamp": "2026-07-10T07:20:36Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 207, "output_tokens": 2, "total_tokens": 209, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 5868, "status": "success"} {"timestamp": "2026-07-10T07:21:21Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 362, "output_tokens": 59, "total_tokens": 421, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 4829, "status": "success"} +{"timestamp": "2026-07-10T08:38:12Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 206, "output_tokens": 2, "total_tokens": 208, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 6915, "status": "success"} +{"timestamp": "2026-07-10T08:38:31Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 213, "output_tokens": 2, "total_tokens": 215, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1525, "status": "success"} +{"timestamp": "2026-07-10T08:39:55Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 213, "output_tokens": 2, "total_tokens": 215, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 479, "status": "success"} +{"timestamp": "2026-07-10T08:40:24Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 424, "output_tokens": 521, "total_tokens": 945, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 28692, "status": "success"} +{"timestamp": "2026-07-10T08:45:51Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 256, "output_tokens": 2, "total_tokens": 258, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 4818, "status": "success"} +{"timestamp": "2026-07-10T08:46:14Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 535, "output_tokens": 448, "total_tokens": 983, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 23352, "status": "success"} +{"timestamp": "2026-07-10T08:48:33Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 214, "output_tokens": 2, "total_tokens": 216, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1435, "status": "success"} +{"timestamp": "2026-07-10T08:48:51Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 394, "output_tokens": 334, "total_tokens": 728, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 18226, "status": "success"} +{"timestamp": "2026-07-10T08:49:39Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 211, "output_tokens": 2, "total_tokens": 213, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1403, "status": "success"} +{"timestamp": "2026-07-10T08:49:57Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 394, "output_tokens": 335, "total_tokens": 729, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 18167, "status": "success"} +{"timestamp": "2026-07-10T08:51:05Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 210, "output_tokens": 2, "total_tokens": 212, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1407, "status": "success"} +{"timestamp": "2026-07-10T08:51:25Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 519, "output_tokens": 339, "total_tokens": 858, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 19083, "status": "success"} +{"timestamp": "2026-07-10T14:24:40Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 232, "output_tokens": 2, "total_tokens": 234, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 7351, "status": "success"} +{"timestamp": "2026-07-10T14:25:27Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 144, "output_tokens": 943, "total_tokens": 1087, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 47635, "status": "success"} +{"timestamp": "2026-07-10T14:27:02Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 231, "output_tokens": 2, "total_tokens": 233, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 2816, "status": "success"} +{"timestamp": "2026-07-10T14:27:46Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 143, "output_tokens": 450, "total_tokens": 593, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 43467, "status": "success"} +{"timestamp": "2026-07-10T14:33:09Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 230, "output_tokens": 2, "total_tokens": 232, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 5224, "status": "success"} +{"timestamp": "2026-07-10T14:33:34Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 142, "output_tokens": 418, "total_tokens": 560, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 24025, "status": "success"} +{"timestamp": "2026-07-10T14:59:35Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 2544, "output_tokens": 2, "total_tokens": 2546, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 19119, "status": "success"} +{"timestamp": "2026-07-10T15:07:29Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 2494, "output_tokens": 2, "total_tokens": 2496, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 18212, "status": "success"} +{"timestamp": "2026-07-10T15:11:09Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 207, "output_tokens": 2, "total_tokens": 209, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1383, "status": "success"} +{"timestamp": "2026-07-10T15:11:50Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 540, "output_tokens": 202, "total_tokens": 742, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 11855, "status": "success"} +{"timestamp": "2026-07-10T15:12:20Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 212, "output_tokens": 2, "total_tokens": 214, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1394, "status": "success"} +{"timestamp": "2026-07-10T15:13:05Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 595, "output_tokens": 463, "total_tokens": 1058, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 32615, "status": "success"} +{"timestamp": "2026-07-11T02:54:27Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 207, "output_tokens": 2, "total_tokens": 209, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 6819, "status": "success"} +{"timestamp": "2026-07-11T02:54:39Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 531, "output_tokens": 172, "total_tokens": 703, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 10793, "status": "success"} +{"timestamp": "2026-07-11T02:55:20Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "classify", "role": "classify", "input_tokens": 218, "output_tokens": 2, "total_tokens": 220, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 1428, "status": "success"} +{"timestamp": "2026-07-11T02:55:45Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 608, "output_tokens": 472, "total_tokens": 1080, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 25130, "status": "success"} +{"timestamp": "2026-07-11T03:04:43Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 127, "output_tokens": 620, "total_tokens": 747, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 41710, "status": "success"} +{"timestamp": "2026-07-11T03:07:06Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 127, "output_tokens": 471, "total_tokens": 598, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 37299, "status": "success"} +{"timestamp": "2026-07-11T03:14:47Z", "harness": "L5-provider-telemetry", "provider": "ollama", "model": "ornith:9b", "run_id": "adhoc", "step": "generate", "role": "generate", "input_tokens": 2406, "output_tokens": 1400, "total_tokens": 3806, "cost_usd": 0.0, "cost_source": "ollama_local_real_tokens", "latency_ms": 82969, "status": "success"} diff --git a/README.md b/README.md index 05e4727..718e0c4 100644 --- a/README.md +++ b/README.md @@ -6,417 +6,417 @@ AI-SDLC (AI Software Development Life Cycle) - Applying AI to the software devel > [Dùng CASAN để làm dự án — giải thích thực tế, dễ hiểu](docs/guides/CASAN_USING_FOR_REAL_PROJECTS_VI.md). > CASAN core không phụ thuộc Codex, VS Code hay Claude Code; các agent được mô tả > dưới đây là flow demo/legacy có thể đặt phía sau CASAN governance. - -## Table of Contents - + +## Table of Contents + - [Project Objectives](#project-objectives) - [Dùng CASAN cho dự án thực tế](docs/guides/CASAN_USING_FOR_REAL_PROJECTS_VI.md) -- [Requirements](#requirements) -- [Input for Flow](#input-for-flow) -- [Output for FLow](#output-for-flow) -- [Full AI-SDLC Flow](#full-ai-sdlc-flow) - - [Flow Steps](#flow-steps) - - [Flow Diagram](#flow-diagram) - - [Legend](#legend) -- [Agents](#agents) - - [Spec-Kit Agents (Core Flow)](#spec-kit-agents-core-flow) - - [FPT-Defined Agents (IPA Gen + Review + Orchestrator + Test)](#fpt-defined-agents-ipa-gen--review--orchestrator--test) -- [AI-SDLC Usage Guide](#ai-sdlc-usage-guide) -- [Directory Structure](#directory-structure) - - [Directory Details](#directory-details) -- [FPT Deliverable List for NES](#fpt-deliverable-list-for-nes) - - [A. Development Deliverables](#a-development-deliverables) - - [B. Process Records (Required)](#b-process-records-required) - - [C. Process Design Document](#c-process-design-document) - - [D. Specification Files](#d-specification-files) - - [E. Review & Insights](#e-review--insights) - - [Optional Deliverables](#optional-deliverables) -- [License](#license) - - -## Project Objectives - -Apply AI to the SDLC process to automate and optimize the creation of software products from initial requirements to complete source code. - -## Requirements -- **Flow + Prompt + Template**: **Spec-Kit** +- [Requirements](#requirements) +- [Input for Flow](#input-for-flow) +- [Output for FLow](#output-for-flow) +- [Full AI-SDLC Flow](#full-ai-sdlc-flow) + - [Flow Steps](#flow-steps) + - [Flow Diagram](#flow-diagram) + - [Legend](#legend) +- [Agents](#agents) + - [Spec-Kit Agents (Core Flow)](#spec-kit-agents-core-flow) + - [FPT-Defined Agents (IPA Gen + Review + Orchestrator + Test)](#fpt-defined-agents-ipa-gen--review--orchestrator--test) +- [AI-SDLC Usage Guide](#ai-sdlc-usage-guide) +- [Directory Structure](#directory-structure) + - [Directory Details](#directory-details) +- [FPT Deliverable List for NES](#fpt-deliverable-list-for-nes) + - [A. Development Deliverables](#a-development-deliverables) + - [B. Process Records (Required)](#b-process-records-required) + - [C. Process Design Document](#c-process-design-document) + - [D. Specification Files](#d-specification-files) + - [E. Review & Insights](#e-review--insights) + - [Optional Deliverables](#optional-deliverables) +- [License](#license) + + +## Project Objectives + +Apply AI to the SDLC process to automate and optimize the creation of software products from initial requirements to complete source code. + +## Requirements +- **Flow + Prompt + Template**: **Spec-Kit** - **AI Tool của flow demo/legacy**: **Claude Code** là assistant chính; CASAN harness và Control Panel có thể chạy độc lập bằng browser/CLI/CI hoặc dùng model local/OmniRoute. -- **AI-SDLC**: AI-integrated SDLC process **Spec-Kit Modified** (Add IPA Gen + Review Loop + Orchestrator) -- **IPA Template**: Following IPA (Information-technology Promotion Agency) template standards - ---- - -## Input for Flow - -- `apps/okr/domain/input/okr-requirement.md` — Raw requirements from customers -- `docs/technical_architecture.md` — Technical stack decisions and constraints -- `apps/okr/domain/input/change-request/` — Change requests (e.g., `change-0406.md`) - -## Output for FLow - -| Output | Location | Description | -|--------|----------|-------------| -| **IPA Docs** (SRS, BD, DD, Test Cases, Test Reports) | `docs/output/ipa-docs/` | Design documents generated by IPA agents (organized in `srs/`, `bd/`, `dd/`, `testcase/`, `testreport/` subdirectories) | -| **AI Agent Logs** | `docs/output/output_logs/` | Execution logs from AI agents | -| **SRS-Systems** | `docs/output/srs-systems/` | System-wide SRS (generated once during input clarification phase, not part of the main flow steps) | -| **Spec-Kit Artifacts** | `specs/[FEATURE_NAME]/` | Feature artifacts generated by Spec-Kit agents (`spec.md`, `plan.md`, `tasks.md`, contracts, checklists) | -| **Source Code** | `backend/` + `frontend/` | Application source code (NestJS backend + React frontend) | - ---- - -## Full AI-SDLC Flow - -The entire flow is orchestrated by **`okr.bossbuiltin`**, which executes all steps automatically from start to finish. - -### Flow Steps - -| Step | Agent | Output | Category | -|------|-------|--------|----------| -| **STEP 1** | `okr.srs` | SRS (ソフトウェア要件定義書) | 📄 IPA Doc Gen | -| **STEP 2** | `okr.bd` | BD — 外部設計 (Basic Design) | 📄 IPA Doc Gen | -| **STEP 3** | `speckit.specify` | `spec.md` | 📝 Spec-Kit | -| **STEP 4** | `speckit.clarify` | Resolve ambiguities (NO PAUSE) | 📝 Spec-Kit | -| **STEP 5** | `okr.reviewspec` 🔄 | Spec review (auto-retry) | 🔍 Agent Review | -| **STEP 6** | `speckit.plan` | `plan.md` + data-model + contracts | 📝 Spec-Kit | -| **STEP 7** | `okr.reviewplan` 🔄 | Plan review (auto-retry) | 🔍 Agent Review | -| **STEP 8** | `okr.dd` | DD — 内部設計 (Detail Design) | 📄 IPA Doc Gen | -| **STEP 8b** | `okr.testkit` | Test cases (`gen-testcases`) | 🧪 Test | -| **STEP 9** | `speckit.tasks` | `tasks.md` | 📝 Spec-Kit | -| **STEP 10** | `speckit.implement` 🔄 | Implementation + build & fix (auto-retry) | 📝 Spec-Kit | -| **STEP 11** | `okr.reviewcode` 🔄 | Code review + DB data check (auto-retry) | 🔍 Agent Review | -| **STEP 12** | `okr.testkit` 🔄 | Run tests (`run-tests`) — BACK-TO-PLAN on fail | 🧪 Test | -| **STEP 13** | Boss (direct) | Build BE + connect DB + Build FE + Launch UI → `open_browser_page` | 🚀 Deploy | - -### Flow Diagram - -``` -┌─────────────────────────────────────────────────────────────┐ -│ INPUT │ -│ [ Raw Requirement ] [ Clear Requirement ] [ Tech Stack ] │ -└──────────────────────────────┬──────────────────────────────┘ - │ - ┌────────────────────┴──── (one-time, pre-flow) ────┐ - │ okr.srsallsystem → docs/output/srs-systems/ │ - └────────────────────┬──────────────────────────────┘ - │ - ╔════════════════════════════╧══════════════════════════════════╗ - ║ okr.bossbuiltin (Orchestrator) ║ - ║ ║ - ║ ┌─── IPA Doc Gen ───────────────────────────────────────┐ ║ - ║ │ STEP 1 okr.srs → SRS │ ║ - ║ │ STEP 2 okr.bd → BD (外部設計) │ ║ - ║ └───────────────────────────────────────────────────────┘ ║ - ║ │ ║ - ║ ▼ ║ - ║ ┌─── Spec-Kit + Review Loop ────────────────────────────┐ ║ - ║ │ STEP 3 speckit.specify → spec.md │ ║ - ║ │ STEP 4 speckit.clarify → resolve ambiguities │ ║ - ║ │ STEP 5 okr.reviewspec 🔄 auto-retry │ ║ - ║ │ │ │ ║ - ║ │ ▼ │ ║ - ║ │ STEP 6 speckit.plan → plan.md + data-model │ ║ - ║ │ STEP 7 okr.reviewplan 🔄 auto-retry │ ║ - ║ └───────────────────────────────────────────────────────┘ ║ - ║ │ ║ - ║ ▼ ║ - ║ ┌─── IPA Doc Gen (Detail) ──────────────────────────────┐ ║ - ║ │ STEP 8 okr.dd → DD (内部設計) │ ║ - ║ │ STEP 8b okr.testkit → gen-testcases │ ║ - ║ └───────────────────────────────────────────────────────┘ ║ - ║ │ ║ - ║ ▼ ║ - ║ ┌─── Implementation ───────────────────────────────────┐ ║ - ║ │ STEP 9 speckit.tasks → tasks.md │ ║ - ║ │ STEP 10 speckit.implement 🔄 build & fix │ ║ - ║ │ STEP 11 okr.reviewcode 🔄 code review │ ║ - ║ │ STEP 12 okr.testkit 🔄 run-tests │ ║ - ║ │ (BACK-TO-PLAN on fail) │ ║ - ║ └──────────────────────────────────────────────────────┘ ║ - ║ │ ║ - ║ ▼ ║ - ║ ┌─── Deploy ───────────────────────────────────────────┐ ║ - ║ │ STEP 13 Boss → build BE + DB + FE → open_browser │ ║ - ║ └──────────────────────────────────────────────────────┘ ║ - ║ ║ - ╚══════════════════════════════════════════════════════════════╝ -``` - -### Legend - -| Symbol | Meaning | -|--------|---------| -| 🔄 | Auto-retry loop (agent retries until pass) | - ---- - -## Agents - -### Spec-Kit Agents (Core Flow) - -| Agent | Description | -|-------|-------------| -| `speckit.constitution` | Define project principles and constraints | -| `speckit.specify` | Convert requirements into feature specification (`spec.md`) | -| `speckit.clarify` | Resolve ambiguous requirements (no pause) | -| `speckit.plan` | Create implementation plan (`plan.md` + data-model + contracts) | -| `speckit.tasks` | Generate task list (`tasks.md`) | -| `speckit.implement` | Implementation with auto build & fix | -| `speckit.analyze` | Cross-artifact consistency and quality analysis | -| `speckit.checklist` | Generate custom quality checklists | -| `speckit.taskstoissues` | Convert tasks to GitHub issues | - -### FPT-Defined Agents (IPA Gen + Review + Orchestrator + Test) - -| Agent | Description | -|-------|-------------| -| `okr.bossbuiltin` | **Orchestrator** — runs all 13 steps end-to-end automatically | -| `okr.srs` | Generate SRS (ソフトウェア要件定義書) per module → `docs/output/ipa-docs/` | -| `okr.bd` | Generate BD / 外部設計 (Basic Design) per module → `docs/output/ipa-docs/` | -| `okr.dd` | Generate DD / 内部設計 (Detail Design) per module → `docs/output/ipa-docs/` | -| `okr.srsallsystem` | Generate system-wide SRS (one-time, pre-flow) → `docs/output/srs-systems/` | -| `okr.reviewspec` | **Review** — validate `spec.md` quality and completeness | -| `okr.reviewplan` | **Review** — validate `plan.md` conformance to spec | -| `okr.reviewcode` | **Review** — code review + DB data check | -| `okr.testkit` | **Test** — generate test cases from SRS + BD + DD; run automated tests | -| `Flow-Agent` | General-purpose flow agent | - ---- - -## AI-SDLC Usage Guide - -1. **Prepare Input**: Place raw requirements in `apps/okr/domain/input/okr-requirement.md` and tech stack in `docs/technical_architecture.md` -2. **Configuration**: Set up the project constitution first, keep specifications focused on what and why, and only decide technical stack where the input explicitly requires it -3. **(One-time) Generate System SRS**: Run `okr.srsallsystem` to generate system-wide SRS → `docs/output/srs-systems/` -4. **Run AI Flow**: Invoke `okr.bossbuiltin` to execute the full 13-step flow automatically, with strict TDD enforced across specification, planning, task generation, and implementation -5. **Output**: - - `docs/output/ipa-docs/` — IPA design documents (SRS, BD, DD, Test Cases) - - `docs/output/output_logs/` — AI agent execution logs - - `docs/output/srs-systems/` — System-wide SRS (generated once) - - `specs/[FEATURE_NAME]/` — Spec-Kit artifacts (`spec.md`, `plan.md`, `tasks.md`, etc.) - - `backend/` + `frontend/` — Source code (NestJS backend + React frontend) - ---- - -## Directory Structure - -``` -├── .claude/ -│ ├── agents/ # All agent definitions (subagents) -│ │ ├── okr.bossbuiltin.md # Boss orchestrator agent -│ │ ├── speckit.*.md # Spec-Kit agents (specify, clarify, plan, tasks, implement, analyze, checklist, taskstoissues) -│ │ ├── okr.*.md # FPT-defined agents (srs, bd, dd, reviewspec, reviewplan, reviewcode, srsallsystem, testkit) -│ │ ├── protocols/ # Shared protocols (auto-resolve, gate-retry, logging, pipeline-context, etc.) -│ │ ├── steps/ # Step definitions for orchestrator (steps-01-04, steps-05-07, etc.) -│ │ └── templates/ # Agent output templates (pipeline-completion, report-templates) -│ └── commands/ # Claude Code slash commands -│ ├── okr.bossbuiltin.md # Run full pipeline (/okr.bossbuiltin) -│ ├── speckit.*.md # Spec-Kit slash commands -│ └── okr.*.md # OKR agent slash commands -│ -├── CLAUDE.md # Global Claude Code project instructions -│ -├── .specify/ # SpecKit configuration and templates -│ ├── init-options.json # Initialization options -│ ├── memory/ -│ │ └── constitution.md # Project-wide principles and constraints -│ ├── scripts/ # Utility scripts -│ │ ├── bash/ # Bash scripts -│ │ └── powershell/ # PowerShell scripts -│ └── templates/ -│ ├── agent-file-template.md # Agent definition template -│ ├── checklist-template.md # Quality checklist template -│ ├── constitution-template.md -│ ├── spec-template.md # Spec-Kit templates -│ ├── plan-template.md -│ ├── tasks-template.md -│ ├── srs-template.md # IPA templates (SRS, BD, DD) -│ ├── bd-ipa-template.md -│ └── dd-ipa-template.md -│ -├── docs/ -│ ├── input/ # Input for the entire AI-SDLC flow -│ ├── change-request/ # Change requests -│ │ └── okr-requirement.md # Raw requirements from customers -│ ├── technical_architecture.md # Technical stack decisions and constraints -│ └── output/ # Output of the AI-SDLC process -│ ├── ipa-docs/ # IPA documents -│ │ ├── srs/ # SRS documents per module -│ │ ├── bd/ # BD documents per module -│ │ ├── dd/ # DD documents per module -│ │ ├── testcase/ # Test case documents per module -│ │ └── testreport/ # Test report documents per module -│ ├── output_logs/ # AI agent execution logs (per feature) -│ └── srs-systems/ # System-wide SRS (generated once, pre-flow) -│ -├── specs/ # Spec-Kit feature artifacts (per feature) -│ ├── 001-access-authentication/ -│ ├── 002-workspace-dashboard/ -│ ├── 003-objective-keyresult/ -│ └── 004-review-collaboration/ -│ -├── e2e/ # End-to-end tests (Playwright) -│ └── auth/ # Auth E2E tests -│ -├── frontend/ # React + Vite SPA (source code) -│ -├── backend/ # NestJS API service (source code) -│ -├── docker/ # Docker utilities -└── docker-compose.yml # Docker Compose orchestration -``` - -### Directory Details - -#### `.claude/agents/` -Contains all agent definition files used by Claude Code. This includes both **Spec-Kit agents** (core flow: `speckit.specify`, `speckit.clarify`, `speckit.plan`, `speckit.tasks`, `speckit.implement`, plus utility agents `speckit.analyze`, `speckit.checklist`, `speckit.taskstoissues`) and **FPT-defined agents** (`okr.*`): -- **IPA Doc Gen agents** — `okr.srs`, `okr.bd`, `okr.dd`: generate IPA-standard design documents (SRS, BD, DD) per module, output to `docs/output/ipa-docs/`. -- **Review agents** — `okr.reviewspec`, `okr.reviewplan`, `okr.reviewcode`: validate the quality of Spec-Kit artifacts (`spec.md`, `plan.md`, source code) with auto-retry loops. -- **Orchestrator** — `okr.bossbuiltin`: runs the full 13-step flow end-to-end automatically. -- **Test agent** — `okr.testkit`: generates test cases from SRS + BD + DD and executes automated tests (Jest / Playwright). -- **Subdirectories** — `protocols/` (shared protocols for auto-resolve, gate-retry, logging, etc.), `steps/` (orchestrator step definitions), `templates/` (output report templates). - -#### `.claude/commands/` -Claude Code slash commands that invoke the corresponding agents. Type `/speckit.specify`, `/okr.bossbuiltin`, etc. in Claude Code to trigger the pipeline. - -#### `.specify/` -Spec-Kit configuration directory. Stores project-wide principles, scripts, and all templates: -- **`init-options.json`** — Initialization options for Spec-Kit setup. -- **`memory/constitution.md`** — The project constitution: shared principles, constraints, and conventions that apply to every feature across the entire project. -- **`scripts/`** — Utility scripts in `bash/` and `powershell/` for automation tasks. -- **`templates/`** — Format templates used by agents to generate artifacts. Includes Spec-Kit templates (`spec-template.md`, `plan-template.md`, `tasks-template.md`, `constitution-template.md`, `checklist-template.md`, `agent-file-template.md`) and IPA templates (`srs-template.md`, `bd-ipa-template.md`, `dd-ipa-template.md`). - -#### `apps/okr/domain/input/` -Input data for the AI-SDLC flow: -- **`okr-requirement.md`** — Raw requirement documents from the customer. - -#### `docs/technical_architecture.md` -Technical stack decisions and constraints (languages, frameworks, infrastructure). - -#### `apps/okr/domain/input/change-request/` -Change requests applied during the project lifecycle (e.g., `change-0406.md`). - -#### `docs/output/` -All artifacts produced by the AI-SDLC process: -- **`ipa-docs/`** — IPA design documents organized in subdirectories: `srs/`, `bd/`, `dd/`, `testcase/`, `testreport/`. Generated by `okr.srs`, `okr.bd`, `okr.dd`, and `okr.testkit`. Each subdirectory contains per-module documents. -- **`output_logs/`** — Execution logs from AI agents organized per feature (e.g., `000-system-srs/`, `001-access-authentication/`, etc.), useful for debugging and auditing the generation process. -- **`srs-systems/`** — System-wide SRS generated once at the beginning by `okr.srsallsystem`. Contains per-module SRS overviews (`mod01-access-authentication/`, `mod02-workspace-dashboard/`, etc.) plus `srs-overview-system.md`. Not part of the 13-step flow. - -#### `specs/` - -Each folder contains `spec.md`, `plan.md`, `tasks.md`, `checklists/`, and `contracts/`. This directory serves as the **knowledge base** for agents. - -#### Source Code -Source code generated by Agents during `speckit.implement` (STEP 10). -`backend/` and `frontend/` contain the application source code, co-located with the monorepo root: -- **`backend/`** — NestJS application. `src/` contains feature modules (`auth/`, `users/`, `objectives/`, `workspaces/`, `common/`). `prisma/` contains `schema.prisma`, migrations, and `seed.ts`. `test/` contains unit tests organized by module (`auth/`, `objectives/`, `users/`). Includes `Dockerfile`. -- **`frontend/`** — React + Vite SPA (TypeScript). `src/pages/` for route-level components (Login, ForgotPassword, Dashboard, CreateObjective, EditObjective, ObjectiveDetail, KeyResultDetail); `src/components/` organized by feature (`auth/`, `dashboard/`, `objective-detail/`, `objective-form/`), `layout/` (Sidebar, AppHeader, AppLayout) and `ui/` (Button, Input, Alert). `src/hooks/` (useAuth, useObjectives, useUsers, useWorkspaces), `src/lib/` (api, queryClient), `src/schemas/`, `src/types/`. `test/` contains unit tests (`hooks/`, `pages/`). Includes `Dockerfile`. -- **`e2e/`** — End-to-end tests using Playwright, organized by feature (e.g., `auth/auth.spec.ts`). -- **`docker/`** — Docker utilities. Main orchestration is in `docker-compose.yml` at the project root. - ---- - -## OKR Web Application — Quick Start - -### Description - -The **OKR Web Application** is a full-stack web app for managing Objectives and Key Results (OKR). It consists of: - -- **Backend**: NestJS REST API with Prisma ORM and MySQL -- **Frontend**: React + Vite SPA with Tailwind CSS -- **Database**: MySQL 8.0 - -### Prerequisites - -- [Docker](https://docs.docker.com/get-docker/) and Docker Compose -- Node.js 20.x and npm (for local development without Docker) - -### Quick Start (Docker) - -```bash -# Clone the repository and navigate to project root -cd AINative_OKR_Claude_GHCP - -# Build and start all services (MySQL + Backend + Frontend) -docker compose up --build - -# To run in detached mode -docker compose up --build -d -``` - -Docker Compose will automatically: -1. Start MySQL and wait for it to be healthy -2. Run Prisma migrations (`prisma migrate deploy`) -3. Seed the database with default data (`prisma db seed`) -4. Start the NestJS backend -5. Start the React frontend dev server - -### Default Credentials - -| Role | Email | Password | -|------|-------|----------| -| Admin | `admin@okr.local` | `Password@123` | -| Manager | `manager@okr.local` | `Password@123` | -| Employee | `employee@okr.local` | `Password@123` | - -### Service URLs - -| Service | URL | -|---------|-----| -| Frontend | http://localhost:5173 | -| Backend API | http://localhost:3000 | -| API Documentation (Swagger) | http://localhost:3000/api/docs | -| MySQL | localhost:3307 | - -### Development Without Docker - -#### Backend - -```bash -cd backend - -# Install dependencies -npm install - -# Copy and configure environment variables -cp .env.example .env -# Edit .env — set DATABASE_URL to point to your local MySQL instance - -# Run database migrations -npx prisma migrate dev - -# Seed the database -npx prisma db seed - -# Start the development server -npm run start:dev -``` - -#### Frontend - -```bash -cd frontend - -# Install dependencies -npm install - -# Copy and configure environment variables -cp .env.example .env -# Edit .env if the backend runs on a different port - -# Start the Vite dev server -npm run dev -``` - -The frontend will be available at http://localhost:5173 and proxies API requests to http://localhost:3000/api/v1. - -### Stopping Services - -```bash -# Stop all containers -docker compose down - -# Stop and remove volumes (resets the database) -docker compose down -v -``` +- **AI-SDLC**: AI-integrated SDLC process **Spec-Kit Modified** (Add IPA Gen + Review Loop + Orchestrator) +- **IPA Template**: Following IPA (Information-technology Promotion Agency) template standards + +--- + +## Input for Flow + +- `apps/okr/domain/input/okr-requirement.md` — Raw requirements from customers +- `docs/technical_architecture.md` — Technical stack decisions and constraints +- `apps/okr/domain/input/change-request/` — Change requests (e.g., `change-0406.md`) + +## Output for FLow + +| Output | Location | Description | +|--------|----------|-------------| +| **IPA Docs** (SRS, BD, DD, Test Cases, Test Reports) | `docs/output/ipa-docs/` | Design documents generated by IPA agents (organized in `srs/`, `bd/`, `dd/`, `testcase/`, `testreport/` subdirectories) | +| **AI Agent Logs** | `docs/output/output_logs/` | Execution logs from AI agents | +| **SRS-Systems** | `docs/output/srs-systems/` | System-wide SRS (generated once during input clarification phase, not part of the main flow steps) | +| **Spec-Kit Artifacts** | `specs/[FEATURE_NAME]/` | Feature artifacts generated by Spec-Kit agents (`spec.md`, `plan.md`, `tasks.md`, contracts, checklists) | +| **Source Code** | `backend/` + `frontend/` | Application source code (NestJS backend + React frontend) | + +--- + +## Full AI-SDLC Flow + +The entire flow is orchestrated by **`okr.bossbuiltin`**, which executes all steps automatically from start to finish. + +### Flow Steps + +| Step | Agent | Output | Category | +|------|-------|--------|----------| +| **STEP 1** | `okr.srs` | SRS (ソフトウェア要件定義書) | 📄 IPA Doc Gen | +| **STEP 2** | `okr.bd` | BD — 外部設計 (Basic Design) | 📄 IPA Doc Gen | +| **STEP 3** | `speckit.specify` | `spec.md` | 📝 Spec-Kit | +| **STEP 4** | `speckit.clarify` | Resolve ambiguities (NO PAUSE) | 📝 Spec-Kit | +| **STEP 5** | `okr.reviewspec` 🔄 | Spec review (auto-retry) | 🔍 Agent Review | +| **STEP 6** | `speckit.plan` | `plan.md` + data-model + contracts | 📝 Spec-Kit | +| **STEP 7** | `okr.reviewplan` 🔄 | Plan review (auto-retry) | 🔍 Agent Review | +| **STEP 8** | `okr.dd` | DD — 内部設計 (Detail Design) | 📄 IPA Doc Gen | +| **STEP 8b** | `okr.testkit` | Test cases (`gen-testcases`) | 🧪 Test | +| **STEP 9** | `speckit.tasks` | `tasks.md` | 📝 Spec-Kit | +| **STEP 10** | `speckit.implement` 🔄 | Implementation + build & fix (auto-retry) | 📝 Spec-Kit | +| **STEP 11** | `okr.reviewcode` 🔄 | Code review + DB data check (auto-retry) | 🔍 Agent Review | +| **STEP 12** | `okr.testkit` 🔄 | Run tests (`run-tests`) — BACK-TO-PLAN on fail | 🧪 Test | +| **STEP 13** | Boss (direct) | Build BE + connect DB + Build FE + Launch UI → `open_browser_page` | 🚀 Deploy | + +### Flow Diagram + +``` +┌─────────────────────────────────────────────────────────────┐ +│ INPUT │ +│ [ Raw Requirement ] [ Clear Requirement ] [ Tech Stack ] │ +└──────────────────────────────┬──────────────────────────────┘ + │ + ┌────────────────────┴──── (one-time, pre-flow) ────┐ + │ okr.srsallsystem → docs/output/srs-systems/ │ + └────────────────────┬──────────────────────────────┘ + │ + ╔════════════════════════════╧══════════════════════════════════╗ + ║ okr.bossbuiltin (Orchestrator) ║ + ║ ║ + ║ ┌─── IPA Doc Gen ───────────────────────────────────────┐ ║ + ║ │ STEP 1 okr.srs → SRS │ ║ + ║ │ STEP 2 okr.bd → BD (外部設計) │ ║ + ║ └───────────────────────────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ + ║ ┌─── Spec-Kit + Review Loop ────────────────────────────┐ ║ + ║ │ STEP 3 speckit.specify → spec.md │ ║ + ║ │ STEP 4 speckit.clarify → resolve ambiguities │ ║ + ║ │ STEP 5 okr.reviewspec 🔄 auto-retry │ ║ + ║ │ │ │ ║ + ║ │ ▼ │ ║ + ║ │ STEP 6 speckit.plan → plan.md + data-model │ ║ + ║ │ STEP 7 okr.reviewplan 🔄 auto-retry │ ║ + ║ └───────────────────────────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ + ║ ┌─── IPA Doc Gen (Detail) ──────────────────────────────┐ ║ + ║ │ STEP 8 okr.dd → DD (内部設計) │ ║ + ║ │ STEP 8b okr.testkit → gen-testcases │ ║ + ║ └───────────────────────────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ + ║ ┌─── Implementation ───────────────────────────────────┐ ║ + ║ │ STEP 9 speckit.tasks → tasks.md │ ║ + ║ │ STEP 10 speckit.implement 🔄 build & fix │ ║ + ║ │ STEP 11 okr.reviewcode 🔄 code review │ ║ + ║ │ STEP 12 okr.testkit 🔄 run-tests │ ║ + ║ │ (BACK-TO-PLAN on fail) │ ║ + ║ └──────────────────────────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ + ║ ┌─── Deploy ───────────────────────────────────────────┐ ║ + ║ │ STEP 13 Boss → build BE + DB + FE → open_browser │ ║ + ║ └──────────────────────────────────────────────────────┘ ║ + ║ ║ + ╚══════════════════════════════════════════════════════════════╝ +``` + +### Legend + +| Symbol | Meaning | +|--------|---------| +| 🔄 | Auto-retry loop (agent retries until pass) | + +--- + +## Agents + +### Spec-Kit Agents (Core Flow) + +| Agent | Description | +|-------|-------------| +| `speckit.constitution` | Define project principles and constraints | +| `speckit.specify` | Convert requirements into feature specification (`spec.md`) | +| `speckit.clarify` | Resolve ambiguous requirements (no pause) | +| `speckit.plan` | Create implementation plan (`plan.md` + data-model + contracts) | +| `speckit.tasks` | Generate task list (`tasks.md`) | +| `speckit.implement` | Implementation with auto build & fix | +| `speckit.analyze` | Cross-artifact consistency and quality analysis | +| `speckit.checklist` | Generate custom quality checklists | +| `speckit.taskstoissues` | Convert tasks to GitHub issues | + +### FPT-Defined Agents (IPA Gen + Review + Orchestrator + Test) + +| Agent | Description | +|-------|-------------| +| `okr.bossbuiltin` | **Orchestrator** — runs all 13 steps end-to-end automatically | +| `okr.srs` | Generate SRS (ソフトウェア要件定義書) per module → `docs/output/ipa-docs/` | +| `okr.bd` | Generate BD / 外部設計 (Basic Design) per module → `docs/output/ipa-docs/` | +| `okr.dd` | Generate DD / 内部設計 (Detail Design) per module → `docs/output/ipa-docs/` | +| `okr.srsallsystem` | Generate system-wide SRS (one-time, pre-flow) → `docs/output/srs-systems/` | +| `okr.reviewspec` | **Review** — validate `spec.md` quality and completeness | +| `okr.reviewplan` | **Review** — validate `plan.md` conformance to spec | +| `okr.reviewcode` | **Review** — code review + DB data check | +| `okr.testkit` | **Test** — generate test cases from SRS + BD + DD; run automated tests | +| `Flow-Agent` | General-purpose flow agent | + +--- + +## AI-SDLC Usage Guide + +1. **Prepare Input**: Place raw requirements in `apps/okr/domain/input/okr-requirement.md` and tech stack in `docs/technical_architecture.md` +2. **Configuration**: Set up the project constitution first, keep specifications focused on what and why, and only decide technical stack where the input explicitly requires it +3. **(One-time) Generate System SRS**: Run `okr.srsallsystem` to generate system-wide SRS → `docs/output/srs-systems/` +4. **Run AI Flow**: Invoke `okr.bossbuiltin` to execute the full 13-step flow automatically, with strict TDD enforced across specification, planning, task generation, and implementation +5. **Output**: + - `docs/output/ipa-docs/` — IPA design documents (SRS, BD, DD, Test Cases) + - `docs/output/output_logs/` — AI agent execution logs + - `docs/output/srs-systems/` — System-wide SRS (generated once) + - `specs/[FEATURE_NAME]/` — Spec-Kit artifacts (`spec.md`, `plan.md`, `tasks.md`, etc.) + - `backend/` + `frontend/` — Source code (NestJS backend + React frontend) + +--- + +## Directory Structure + +``` +├── .claude/ +│ ├── agents/ # All agent definitions (subagents) +│ │ ├── okr.bossbuiltin.md # Boss orchestrator agent +│ │ ├── speckit.*.md # Spec-Kit agents (specify, clarify, plan, tasks, implement, analyze, checklist, taskstoissues) +│ │ ├── okr.*.md # FPT-defined agents (srs, bd, dd, reviewspec, reviewplan, reviewcode, srsallsystem, testkit) +│ │ ├── protocols/ # Shared protocols (auto-resolve, gate-retry, logging, pipeline-context, etc.) +│ │ ├── steps/ # Step definitions for orchestrator (steps-01-04, steps-05-07, etc.) +│ │ └── templates/ # Agent output templates (pipeline-completion, report-templates) +│ └── commands/ # Claude Code slash commands +│ ├── okr.bossbuiltin.md # Run full pipeline (/okr.bossbuiltin) +│ ├── speckit.*.md # Spec-Kit slash commands +│ └── okr.*.md # OKR agent slash commands +│ +├── CLAUDE.md # Global Claude Code project instructions +│ +├── .specify/ # SpecKit configuration and templates +│ ├── init-options.json # Initialization options +│ ├── memory/ +│ │ └── constitution.md # Project-wide principles and constraints +│ ├── scripts/ # Utility scripts +│ │ ├── bash/ # Bash scripts +│ │ └── powershell/ # PowerShell scripts +│ └── templates/ +│ ├── agent-file-template.md # Agent definition template +│ ├── checklist-template.md # Quality checklist template +│ ├── constitution-template.md +│ ├── spec-template.md # Spec-Kit templates +│ ├── plan-template.md +│ ├── tasks-template.md +│ ├── srs-template.md # IPA templates (SRS, BD, DD) +│ ├── bd-ipa-template.md +│ └── dd-ipa-template.md +│ +├── docs/ +│ ├── input/ # Input for the entire AI-SDLC flow +│ ├── change-request/ # Change requests +│ │ └── okr-requirement.md # Raw requirements from customers +│ ├── technical_architecture.md # Technical stack decisions and constraints +│ └── output/ # Output of the AI-SDLC process +│ ├── ipa-docs/ # IPA documents +│ │ ├── srs/ # SRS documents per module +│ │ ├── bd/ # BD documents per module +│ │ ├── dd/ # DD documents per module +│ │ ├── testcase/ # Test case documents per module +│ │ └── testreport/ # Test report documents per module +│ ├── output_logs/ # AI agent execution logs (per feature) +│ └── srs-systems/ # System-wide SRS (generated once, pre-flow) +│ +├── specs/ # Spec-Kit feature artifacts (per feature) +│ ├── 001-access-authentication/ +│ ├── 002-workspace-dashboard/ +│ ├── 003-objective-keyresult/ +│ └── 004-review-collaboration/ +│ +├── e2e/ # End-to-end tests (Playwright) +│ └── auth/ # Auth E2E tests +│ +├── frontend/ # React + Vite SPA (source code) +│ +├── backend/ # NestJS API service (source code) +│ +├── docker/ # Docker utilities +└── docker-compose.yml # Docker Compose orchestration +``` + +### Directory Details + +#### `.claude/agents/` +Contains all agent definition files used by Claude Code. This includes both **Spec-Kit agents** (core flow: `speckit.specify`, `speckit.clarify`, `speckit.plan`, `speckit.tasks`, `speckit.implement`, plus utility agents `speckit.analyze`, `speckit.checklist`, `speckit.taskstoissues`) and **FPT-defined agents** (`okr.*`): +- **IPA Doc Gen agents** — `okr.srs`, `okr.bd`, `okr.dd`: generate IPA-standard design documents (SRS, BD, DD) per module, output to `docs/output/ipa-docs/`. +- **Review agents** — `okr.reviewspec`, `okr.reviewplan`, `okr.reviewcode`: validate the quality of Spec-Kit artifacts (`spec.md`, `plan.md`, source code) with auto-retry loops. +- **Orchestrator** — `okr.bossbuiltin`: runs the full 13-step flow end-to-end automatically. +- **Test agent** — `okr.testkit`: generates test cases from SRS + BD + DD and executes automated tests (Jest / Playwright). +- **Subdirectories** — `protocols/` (shared protocols for auto-resolve, gate-retry, logging, etc.), `steps/` (orchestrator step definitions), `templates/` (output report templates). + +#### `.claude/commands/` +Claude Code slash commands that invoke the corresponding agents. Type `/speckit.specify`, `/okr.bossbuiltin`, etc. in Claude Code to trigger the pipeline. + +#### `.specify/` +Spec-Kit configuration directory. Stores project-wide principles, scripts, and all templates: +- **`init-options.json`** — Initialization options for Spec-Kit setup. +- **`memory/constitution.md`** — The project constitution: shared principles, constraints, and conventions that apply to every feature across the entire project. +- **`scripts/`** — Utility scripts in `bash/` and `powershell/` for automation tasks. +- **`templates/`** — Format templates used by agents to generate artifacts. Includes Spec-Kit templates (`spec-template.md`, `plan-template.md`, `tasks-template.md`, `constitution-template.md`, `checklist-template.md`, `agent-file-template.md`) and IPA templates (`srs-template.md`, `bd-ipa-template.md`, `dd-ipa-template.md`). + +#### `apps/okr/domain/input/` +Input data for the AI-SDLC flow: +- **`okr-requirement.md`** — Raw requirement documents from the customer. + +#### `docs/technical_architecture.md` +Technical stack decisions and constraints (languages, frameworks, infrastructure). + +#### `apps/okr/domain/input/change-request/` +Change requests applied during the project lifecycle (e.g., `change-0406.md`). + +#### `docs/output/` +All artifacts produced by the AI-SDLC process: +- **`ipa-docs/`** — IPA design documents organized in subdirectories: `srs/`, `bd/`, `dd/`, `testcase/`, `testreport/`. Generated by `okr.srs`, `okr.bd`, `okr.dd`, and `okr.testkit`. Each subdirectory contains per-module documents. +- **`output_logs/`** — Execution logs from AI agents organized per feature (e.g., `000-system-srs/`, `001-access-authentication/`, etc.), useful for debugging and auditing the generation process. +- **`srs-systems/`** — System-wide SRS generated once at the beginning by `okr.srsallsystem`. Contains per-module SRS overviews (`mod01-access-authentication/`, `mod02-workspace-dashboard/`, etc.) plus `srs-overview-system.md`. Not part of the 13-step flow. + +#### `specs/` + +Each folder contains `spec.md`, `plan.md`, `tasks.md`, `checklists/`, and `contracts/`. This directory serves as the **knowledge base** for agents. + +#### Source Code +Source code generated by Agents during `speckit.implement` (STEP 10). +`backend/` and `frontend/` contain the application source code, co-located with the monorepo root: +- **`backend/`** — NestJS application. `src/` contains feature modules (`auth/`, `users/`, `objectives/`, `workspaces/`, `common/`). `prisma/` contains `schema.prisma`, migrations, and `seed.ts`. `test/` contains unit tests organized by module (`auth/`, `objectives/`, `users/`). Includes `Dockerfile`. +- **`frontend/`** — React + Vite SPA (TypeScript). `src/pages/` for route-level components (Login, ForgotPassword, Dashboard, CreateObjective, EditObjective, ObjectiveDetail, KeyResultDetail); `src/components/` organized by feature (`auth/`, `dashboard/`, `objective-detail/`, `objective-form/`), `layout/` (Sidebar, AppHeader, AppLayout) and `ui/` (Button, Input, Alert). `src/hooks/` (useAuth, useObjectives, useUsers, useWorkspaces), `src/lib/` (api, queryClient), `src/schemas/`, `src/types/`. `test/` contains unit tests (`hooks/`, `pages/`). Includes `Dockerfile`. +- **`e2e/`** — End-to-end tests using Playwright, organized by feature (e.g., `auth/auth.spec.ts`). +- **`docker/`** — Docker utilities. Main orchestration is in `docker-compose.yml` at the project root. + +--- + +## OKR Web Application — Quick Start + +### Description + +The **OKR Web Application** is a full-stack web app for managing Objectives and Key Results (OKR). It consists of: + +- **Backend**: NestJS REST API with Prisma ORM and MySQL +- **Frontend**: React + Vite SPA with Tailwind CSS +- **Database**: MySQL 8.0 + +### Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) and Docker Compose +- Node.js 20.x and npm (for local development without Docker) + +### Quick Start (Docker) + +```bash +# Clone the repository and navigate to project root +cd AINative_OKR_Claude_GHCP + +# Build and start all services (MySQL + Backend + Frontend) +docker compose up --build + +# To run in detached mode +docker compose up --build -d +``` + +Docker Compose will automatically: +1. Start MySQL and wait for it to be healthy +2. Run Prisma migrations (`prisma migrate deploy`) +3. Seed the database with default data (`prisma db seed`) +4. Start the NestJS backend +5. Start the React frontend dev server + +### Default Credentials + +| Role | Email | Password | +|------|-------|----------| +| Admin | `admin@okr.local` | `Password@123` | +| Manager | `manager@okr.local` | `Password@123` | +| Employee | `employee@okr.local` | `Password@123` | + +### Service URLs + +| Service | URL | +|---------|-----| +| Frontend | http://localhost:5173 | +| Backend API | http://localhost:3000 | +| API Documentation (Swagger) | http://localhost:3000/api/docs | +| MySQL | localhost:3307 | + +### Development Without Docker + +#### Backend + +```bash +cd backend + +# Install dependencies +npm install + +# Copy and configure environment variables +cp .env.example .env +# Edit .env — set DATABASE_URL to point to your local MySQL instance + +# Run database migrations +npx prisma migrate dev + +# Seed the database +npx prisma db seed + +# Start the development server +npm run start:dev +``` + +#### Frontend + +```bash +cd frontend + +# Install dependencies +npm install + +# Copy and configure environment variables +cp .env.example .env +# Edit .env if the backend runs on a different port + +# Start the Vite dev server +npm run dev +``` + +The frontend will be available at http://localhost:5173 and proxies API requests to http://localhost:3000/api/v1. + +### Stopping Services + +```bash +# Stop all containers +docker compose down + +# Stop and remove volumes (resets the database) +docker compose down -v +``` diff --git a/docs/diagrams/goal-model-interaction.mmd b/docs/diagrams/goal-model-interaction.mmd new file mode 100644 index 0000000..333efb6 --- /dev/null +++ b/docs/diagrams/goal-model-interaction.mmd @@ -0,0 +1,13 @@ +sequenceDiagram + participant O as Goal Orchestrator + participant L as Local Worker + participant S as H4 Security + participant C as Cloud Reviewer + participant A as H5 Audit + + O->>L: Objective and governed context + L-->>S: Primary proposal + S->>C: Safe draft for independent review + C-->>O: Critique and refined outcome + O->>A: Certified final decision + A-->>O: Audit hash and status diff --git a/docs/diagrams/goal-model-interaction.svg b/docs/diagrams/goal-model-interaction.svg new file mode 100644 index 0000000..d9065b8 --- /dev/null +++ b/docs/diagrams/goal-model-interaction.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/output/casan/agentops-dashboard.html b/docs/output/casan/agentops-dashboard.html index ec726c1..655a571 100644 --- a/docs/output/casan/agentops-dashboard.html +++ b/docs/output/casan/agentops-dashboard.html @@ -43,7 +43,7 @@ tr:nth-child(even) td { background: #f7f9fc; }
7-harness security posture · Level-5 controls demonstrated locally · điểm công tâm theo rubric (evidence/scoring-run-report.md) · Generated: 2026-07-08T09:20:56Z
+7-harness security posture · Level-5 controls demonstrated locally · điểm công tâm theo rubric (evidence/scoring-run-report.md) · Generated: 2026-07-11T02:34:11Z
| Signal | Value |
|---|---|
| Tool registry denials | 2 |
| Fallback records | 1 |
| Tool registry records | 3 |
| Provider telemetry records | 2 |
| Tool registry denials | 6 |
| Fallback records | 3 |
| Tool registry records | 11 |
| Provider telemetry records | 39 |
| Registered harness projects | 0 |
| Trace | Agent | Step | Status | Latency | Tokens | Cost |
|---|---|---|---|---|---|---|
| 55ac657c… | demo.agent | demo-step | success | 94ms | 12 | $2.4e-05 |
| a14c5f93… | demo.agent | step-1-srs | success | 319ms | 26 | $5.2e-05 |
| 9b58d449… | demo.agent | speckit.implement | success | 103ms | 2778 | $0.08334 |
| aa388ecd… | demo.agent | failing-step | failed | 293ms | 6 | $1.2e-05 |
| bf63152b… | wrapper.demo | wrapper-step | success | 92ms | 14 | $2.8e-05 |
| 48236a7c… | wrapper.demo | wrapper-step | success | 301ms | 14 | $2.8e-05 |
| 96b4c003… | chat.ask-casan | ask-casan-readonly | failed | 141ms | 10 | $0.0 |
| c924568f… | chat.ask-casan | ask-casan-readonly | failed | 219ms | 10 | $0.0 |
| 10331f30… | chat.ask-casan | ask-casan-readonly | failed | 342ms | 10 | $0.0 |
| 2e9b93cb… | chat.ask-casan | ask-casan-readonly | success | 57161ms | 57 | $0.0 |
| d8796e51… | chat.ask-casan | ask-casan-readonly | success | 57864ms | 833 | $0.0 |
| b5ad414a… | chat.ask-casan | ask-casan-readonly | success | 43174ms | 799 | $0.0 |
| 1fd5d347… | chat.ask-casan | ask-casan-readonly | success | 51212ms | 421 | $0.0 |
| 1c93ce8a… | goal.orchestrator | local-worker-cloud-reviewer | degraded | 55732ms | 1087 | $0.0 |
| 6700500f… | goal.orchestrator | local-worker-cloud-reviewer | degraded | 51117ms | 593 | $0.0 |
| 21b6f387… | goal.orchestrator | local-worker-cloud-reviewer | success | 44058ms | 560 | $0.0 |